o
    e17                     @   s   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ G dd	 d	e	ZG d
d deZG dd deZG dd deZdS )za
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
    )deserialize)values)InstanceContext)InstanceResource)ListResource)Pagec                       sr   e Zd ZdZ fddZdd ZdddZdd	d
Zej	ej	ej	fddZ
dd Zdd Zdd Zdd Z  ZS )AlphaSenderListk PLEASE NOTE that this class contains beta products that are subject to
    change. Use them with caution. c                    s2   t t| | d|i| _djdi | j| _dS )ak  
        Initialize the AlphaSenderList

        :param Version version: Version that contains the resource
        :param service_sid: The SID of the Service that the resource is associated with

        :returns: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderList
        :rtype: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderList
        service_sidz$/Services/{service_sid}/AlphaSendersN )superr   __init__	_solutionformat_uri)selfversionr
   	__class__r   `/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/messaging/v1/service/alpha_sender.pyr      s   

zAlphaSenderList.__init__c                 C   s8   t d|i}| jjd| j|d}t| j|| jd dS )z
        Create the AlphaSenderInstance

        :param unicode alpha_sender: The Alphanumeric Sender ID string

        :returns: The created AlphaSenderInstance
        :rtype: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderInstance
        AlphaSenderPOST)methoduridatar
   r
   )r   of_versioncreater   AlphaSenderInstancer   )r   alpha_senderr   payloadr   r   r   r   %   s   	zAlphaSenderList.createNc                 C   s0   | j ||}| j|d d}| j ||d S )a  
        Streams AlphaSenderInstance records from the API as a generator stream.
        This operation lazily loads records as efficiently as possible until the limit
        is reached.
        The results are returned as a generator, so this operation is memory efficient.

        :param int limit: Upper limit for the number of records to return. stream()
                          guarantees to never return more than limit.  Default is no limit
        :param int page_size: Number of records to fetch per request, when not set will use
                              the default value of 50 records.  If no page_size is defined
                              but a limit is defined, stream() will attempt to read the
                              limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        :rtype: list[twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderInstance]
        	page_size)r"   limit)r   read_limitspagestream)r   r#   r"   limitsr%   r   r   r   r&   4   s   zAlphaSenderList.streamc                 C   s   t | j||dS )aq  
        Lists AlphaSenderInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param int limit: Upper limit for the number of records to return. list() guarantees
                          never to return more than limit.  Default is no limit
        :param int page_size: Number of records to fetch per request, when not set will use
                              the default value of 50 records.  If no page_size is defined
                              but a limit is defined, list() will attempt to read the limit
                              with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        :rtype: list[twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderInstance]
        )r#   r"   )listr&   )r   r#   r"   r   r   r   r(   K   s   zAlphaSenderList.listc                 C   s6   t |||d}| jjd| j|d}t| j|| jS )a  
        Retrieve a single page of AlphaSenderInstance records from the API.
        Request is executed immediately

        :param str page_token: PageToken provided by the API
        :param int page_number: Page Number, this value is simply for client state
        :param int page_size: Number of records to return, defaults to 50

        :returns: Page of AlphaSenderInstance
        :rtype: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderPage
        )	PageTokenr   PageSizeGET)r   r   params)r   r   r   r%   r   AlphaSenderPager   )r   
page_tokenpage_numberr"   r   responser   r   r   r%   ]   s   zAlphaSenderList.pagec                 C   s"   | j jjd|}t| j || jS )aM  
        Retrieve a specific page of AlphaSenderInstance records from the API.
        Request is executed immediately

        :param str target_url: API-generated URL for the requested results page

        :returns: Page of AlphaSenderInstance
        :rtype: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderPage
        r+   )r   domaintwiliorequestr-   r   )r   
target_urlr0   r   r   r   get_pagep   s
   

zAlphaSenderList.get_pagec                 C      t | j| jd |dS a  
        Constructs a AlphaSenderContext

        :param sid: The SID that identifies the resource to fetch

        :returns: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderContext
        :rtype: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderContext
        r
   r
   sidAlphaSenderContextr   r   r   r9   r   r   r   get      	zAlphaSenderList.getc                 C   r6   r7   r:   r<   r   r   r   __call__   r>   zAlphaSenderList.__call__c                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z%<Twilio.Messaging.V1.AlphaSenderList>r   r   r   r   r   __repr__      zAlphaSenderList.__repr__)NN)__name__
__module____qualname____doc__r   r   r&   r(   r   unsetr%   r5   r=   r?   rC   __classcell__r   r   r   r   r      s    


r   c                       s0   e Zd ZdZ fddZdd Zdd Z  ZS )r-   r	   c                    s   t t| || || _dS )a  
        Initialize the AlphaSenderPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param service_sid: The SID of the Service that the resource is associated with

        :returns: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderPage
        :rtype: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderPage
        N)r   r-   r   r   )r   r   r0   solutionr   r   r   r      s   
zAlphaSenderPage.__init__c                 C   s   t | j|| jd dS )a  
        Build an instance of AlphaSenderInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderInstance
        :rtype: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderInstance
        r
   r   )r   r   r   r   r!   r   r   r   get_instance   r>   zAlphaSenderPage.get_instancec                 C   r@   )rA   z%<Twilio.Messaging.V1.AlphaSenderPage>r   rB   r   r   r   rC      rD   zAlphaSenderPage.__repr__)rE   rF   rG   rH   r   rM   rC   rJ   r   r   r   r   r-      s
    r-   c                       s8   e Zd ZdZ fddZdd Zdd Zdd	 Z  ZS )
r;   r	   c                    s4   t t| | ||d| _djdi | j| _dS )a  
        Initialize the AlphaSenderContext

        :param Version version: Version that contains the resource
        :param service_sid: The SID of the Messaging Service to fetch the resource from
        :param sid: The SID that identifies the resource to fetch

        :returns: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderContext
        :rtype: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderContext
        r8   z*/Services/{service_sid}/AlphaSenders/{sid}Nr   )r   r;   r   r   r   r   )r   r   r
   r9   r   r   r   r      s   zAlphaSenderContext.__init__c                 C   s0   | j jd| jd}t| j || jd | jd dS )
        Fetch the AlphaSenderInstance

        :returns: The fetched AlphaSenderInstance
        :rtype: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderInstance
        r+   r   r   r
   r9   r8   )r   fetchr   r   r   rL   r   r   r   rP      s   zAlphaSenderContext.fetchc                 C   s   | j jd| jdS )
        Deletes the AlphaSenderInstance

        :returns: True if delete succeeds, False otherwise
        :rtype: bool
        DELETErO   )r   deleter   rB   r   r   r   rS      s   zAlphaSenderContext.deletec                 C   $   d dd | j D }d|S )rA    c                 s        | ]\}}d  ||V  qdS z{}={}Nr   .0kvr   r   r   	<genexpr>       z.AlphaSenderContext.__repr__.<locals>.<genexpr>z+<Twilio.Messaging.V1.AlphaSenderContext {}>joinr   itemsr   r   contextr   r   r   rC         
zAlphaSenderContext.__repr__)	rE   rF   rG   rH   r   rP   rS   rC   rJ   r   r   r   r   r;      s    	r;   c                       s   e Zd ZdZd fdd	Zedd Zedd Zed	d
 Zedd Z	edd Z
edd Zedd Zedd Zedd Zdd Zdd Zdd Z  ZS )r   r	   Nc              
      s   t t| | |d|d|dt|dt|d|d|d|dd	| _d
| _||p<| jd d| _d
S )z
        Initialize the AlphaSenderInstance

        :returns: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderInstance
        :rtype: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderInstance
        r9   account_sidr
   date_createddate_updatedr    capabilitiesurl)r9   re   r
   rf   rg   r    rh   ri   Nr8   )	r   r   r   r=   r   iso8601_datetime_properties_contextr   )r   r   r!   r
   r9   r   r   r   r     s   zAlphaSenderInstance.__init__c                 C   s.   | j du rt| j| jd | jd d| _ | j S )aC  
        Generate an instance context for the instance, the context is capable of
        performing various actions.  All instance actions are proxied to the context

        :returns: AlphaSenderContext for this AlphaSenderInstance
        :rtype: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderContext
        Nr
   r9   r8   )rl   r;   r   r   rB   r   r   r   _proxy   s   
	zAlphaSenderInstance._proxyc                 C   
   | j d S )zb
        :returns: The unique string that identifies the resource
        :rtype: unicode
        r9   rk   rB   r   r   r   r9   1     
zAlphaSenderInstance.sidc                 C   rn   )zd
        :returns: The SID of the Account that created the resource
        :rtype: unicode
        re   ro   rB   r   r   r   re   9  rp   zAlphaSenderInstance.account_sidc                 C   rn   )zo
        :returns: The SID of the Service that the resource is associated with
        :rtype: unicode
        r
   ro   rB   r   r   r   r
   A  rp   zAlphaSenderInstance.service_sidc                 C   rn   )zt
        :returns: The ISO 8601 date and time in GMT when the resource was created
        :rtype: datetime
        rf   ro   rB   r   r   r   rf   I  rp   z AlphaSenderInstance.date_createdc                 C   rn   )zy
        :returns: The ISO 8601 date and time in GMT when the resource was last updated
        :rtype: datetime
        rg   ro   rB   r   r   r   rg   Q  rp   z AlphaSenderInstance.date_updatedc                 C   rn   )zU
        :returns: The Alphanumeric Sender ID string
        :rtype: unicode
        r    ro   rB   r   r   r   r    Y  rp   z AlphaSenderInstance.alpha_senderc                 C   rn   )z
        :returns: An array of values that describe whether the number can receive calls or messages
        :rtype: list[unicode]
        rh   ro   rB   r   r   r   rh   a  rp   z AlphaSenderInstance.capabilitiesc                 C   rn   )z`
        :returns: The absolute URL of the AlphaSender resource
        :rtype: unicode
        ri   ro   rB   r   r   r   ri   i  rp   zAlphaSenderInstance.urlc                 C   
   | j  S )rN   )rm   rP   rB   r   r   r   rP   q     
zAlphaSenderInstance.fetchc                 C   rq   )rQ   )rm   rS   rB   r   r   r   rS   z  rr   zAlphaSenderInstance.deletec                 C   rT   )rA   rU   c                 s   rV   rW   rX   rY   r   r   r   r]     r^   z/AlphaSenderInstance.__repr__.<locals>.<genexpr>z,<Twilio.Messaging.V1.AlphaSenderInstance {}>r_   rb   r   r   r   rC     rd   zAlphaSenderInstance.__repr__)N)rE   rF   rG   rH   r   propertyrm   r9   re   r
   rf   rg   r    rh   ri   rP   rS   rC   rJ   r   r   r   r   r     s0    








		r   N)rH   twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r   r-   r;   r   r   r   r   r   <module>   s    )9