o
    �¨Êh/>  ã                   @   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                       s€   e Zd ZdZ‡ fdd„Zejejejf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 )ÚPhoneNumberListúk 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 )a4  
        Initialize the PhoneNumberList

        :param Version version: Version that contains the resource
        :param service_sid: Service Sid.

        :returns: twilio.rest.proxy.v1.service.phone_number.PhoneNumberList
        :rtype: twilio.rest.proxy.v1.service.phone_number.PhoneNumberList
        Úservice_sidz$/Services/{service_sid}/PhoneNumbersN© )Úsuperr   Ú__init__Ú	_solutionÚformatÚ_uri)ÚselfÚversionr
   ©Ú	__class__r   ú[/var/www/html/env/lib/python3.10/site-packages/twilio/rest/proxy/v1/service/phone_number.pyr      s   

zPhoneNumberList.__init__c                 C   s<   t  |||dœ¡}| jjd| j|d�}t| j|| jd d�S )a¼  
        Create a new PhoneNumberInstance

        :param unicode sid: Phone Number Sid of Twilio Number to assign to your Proxy Service
        :param unicode phone_number: Twilio Number to assign to your Proxy Service
        :param bool is_reserved: Reserve for manual assignment to participants only.

        :returns: Newly created PhoneNumberInstance
        :rtype: twilio.rest.proxy.v1.service.phone_number.PhoneNumberInstance
        )ÚSidÚPhoneNumberÚ
IsReservedÚPOST©Údatar
   ©r
   )r   ÚofÚ_versionÚcreater   ÚPhoneNumberInstancer   )r   ÚsidÚphone_numberÚis_reservedr   Úpayloadr   r   r   r   %   s   ýzPhoneNumberList.createNc                 C   s6   | j  ||¡}| j|d d�}| j  ||d |d ¡S )aÍ  
        Streams PhoneNumberInstance 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.proxy.v1.service.phone_number.PhoneNumberInstance]
        Ú	page_size)r%   ÚlimitÚ
page_limit)r   Úread_limitsÚpageÚstream)r   r&   r%   Úlimitsr)   r   r   r   r*   ;   s   zPhoneNumberList.streamc                 C   s   t | j||d�ƒS )am  
        Lists PhoneNumberInstance 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.proxy.v1.service.phone_number.PhoneNumberInstance]
        )r&   r%   )Úlistr*   )r   r&   r%   r   r   r   r,   R   s   zPhoneNumberList.listc                 C   s6   t  |||dœ¡}| jjd| j|d�}t| j|| jƒS )aÑ  
        Retrieve a single page of PhoneNumberInstance 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 PhoneNumberInstance
        :rtype: twilio.rest.proxy.v1.service.phone_number.PhoneNumberPage
        )Ú	PageTokenr   ÚPageSizeÚGET©Úparams)r   r   r   r)   r   ÚPhoneNumberPager   )r   Ú
page_tokenÚpage_numberr%   r1   Úresponser   r   r   r)   d   s   ýzPhoneNumberList.pagec                 C   s"   | j jj d|¡}t| j || jƒS )aI  
        Retrieve a specific page of PhoneNumberInstance records from the API.
        Request is executed immediately

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

        :returns: Page of PhoneNumberInstance
        :rtype: twilio.rest.proxy.v1.service.phone_number.PhoneNumberPage
        r/   )r   ÚdomainÚtwilioÚrequestr2   r   )r   Ú
target_urlr5   r   r   r   Úget_page{   s
   

þzPhoneNumberList.get_pagec                 C   ó   t | j| jd |d�S ©a  
        Constructs a PhoneNumberContext

        :param sid: A string that uniquely identifies this Phone Number.

        :returns: twilio.rest.proxy.v1.service.phone_number.PhoneNumberContext
        :rtype: twilio.rest.proxy.v1.service.phone_number.PhoneNumberContext
        r
   ©r
   r!   ©ÚPhoneNumberContextr   r   ©r   r!   r   r   r   ÚgetŒ   ó   	zPhoneNumberList.getc                 C   r;   r<   r>   r@   r   r   r   Ú__call__—   rB   zPhoneNumberList.__call__c                 C   ó   dS )úz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z!<Twilio.Proxy.V1.PhoneNumberList>r   ©r   r   r   r   Ú__repr__¢   ó   zPhoneNumberList.__repr__)NN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Úunsetr   r*   r,   r)   r:   rA   rC   rG   Ú__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 )r2   r	   c                    s   t t| ƒ ||¡ || _dS )al  
        Initialize the PhoneNumberPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param service_sid: Service Sid.

        :returns: twilio.rest.proxy.v1.service.phone_number.PhoneNumberPage
        :rtype: twilio.rest.proxy.v1.service.phone_number.PhoneNumberPage
        N)r   r2   r   r   )r   r   r5   Úsolutionr   r   r   r   °   s   
zPhoneNumberPage.__init__c                 C   s   t | j|| jd d�S )a  
        Build an instance of PhoneNumberInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.proxy.v1.service.phone_number.PhoneNumberInstance
        :rtype: twilio.rest.proxy.v1.service.phone_number.PhoneNumberInstance
        r
   r   )r    r   r   )r   r$   r   r   r   Úget_instanceÀ   rB   zPhoneNumberPage.get_instancec                 C   rD   )rE   z!<Twilio.Proxy.V1.PhoneNumberPage>r   rF   r   r   r   rG   Ë   rH   zPhoneNumberPage.__repr__)rI   rJ   rK   rL   r   rP   rG   rN   r   r   r   r   r2   ¬   s
    r2   c                       sF   e Zd ZdZ‡ fdd„Zdd„ Zdd„ Zejf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 PhoneNumberContext

        :param Version version: Version that contains the resource
        :param service_sid: Service Sid.
        :param sid: A string that uniquely identifies this Phone Number.

        :returns: twilio.rest.proxy.v1.service.phone_number.PhoneNumberContext
        :rtype: twilio.rest.proxy.v1.service.phone_number.PhoneNumberContext
        r=   z*/Services/{service_sid}/PhoneNumbers/{sid}Nr   )r   r?   r   r   r   r   )r   r   r
   r!   r   r   r   r   Ù   s   zPhoneNumberContext.__init__c                 C   s   | j  d| j¡S )ú‚
        Deletes the PhoneNumberInstance

        :returns: True if delete succeeds, False otherwise
        :rtype: bool
        Údelete)r   rR   r   rF   r   r   r   rR   ê   s   zPhoneNumberContext.deletec                 C   s<   t  i ¡}| jjd| j|d�}t| j|| jd | jd d�S )úª
        Fetch a PhoneNumberInstance

        :returns: Fetched PhoneNumberInstance
        :rtype: twilio.rest.proxy.v1.service.phone_number.PhoneNumberInstance
        r/   r0   r
   r!   r=   )r   r   r   Úfetchr   r    r   )r   r1   r$   r   r   r   rT   ó   s   
ýüzPhoneNumberContext.fetchc                 C   s@   t  d|i¡}| jjd| j|d�}t| j|| jd | jd d�S )á  
        Update the PhoneNumberInstance

        :param bool is_reserved: Reserve for manual assignment to participants only.

        :returns: Updated PhoneNumberInstance
        :rtype: twilio.rest.proxy.v1.service.phone_number.PhoneNumberInstance
        r   r   r   r
   r!   r=   )r   r   r   Úupdater   r    r   )r   r#   r   r$   r   r   r   rV   	  s   	ýüzPhoneNumberContext.updatec                 C   ó$   d  dd„ | j ¡ D ƒ¡}d |¡S )rE   ú c                 s   ó    � | ]\}}d   ||¡V  qdS ©z{}={}N©r   ©Ú.0ÚkÚvr   r   r   Ú	<genexpr>(  ó   € z.PhoneNumberContext.__repr__.<locals>.<genexpr>z'<Twilio.Proxy.V1.PhoneNumberContext {}>©Újoinr   Úitemsr   ©r   Úcontextr   r   r   rG   !  ó   
zPhoneNumberContext.__repr__)rI   rJ   rK   rL   r   rR   rT   r   rM   rV   rG   rN   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edd„ ƒZedd„ ƒZedd„ ƒZdd„ Zdd „ Zejf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
 |d dœ| _d| _||p=| jd dœ| _dS )zÓ
        Initialize the PhoneNumberInstance

        :returns: twilio.rest.proxy.v1.service.phone_number.PhoneNumberInstance
        :rtype: twilio.rest.proxy.v1.service.phone_number.PhoneNumberInstance
        r!   Úaccount_sidr
   Údate_createdÚdate_updatedr"   Úfriendly_nameÚiso_countryÚcapabilitiesÚurlr#   )r!   rh   r
   ri   rj   r"   rk   rl   rm   rn   r#   Nr=   )r   r    r   r   Úiso8601_datetimeÚ_propertiesÚ_contextr   )r   r   r$   r
   r!   r   r   r   r   0  s   õzPhoneNumberInstance.__init__c                 C   s.   | j du rt| j| jd | jd d�| _ | j S )a?  
        Generate an instance context for the instance, the context is capable of
        performing various actions.  All instance actions are proxied to the context

        :returns: PhoneNumberContext for this PhoneNumberInstance
        :rtype: twilio.rest.proxy.v1.service.phone_number.PhoneNumberContext
        Nr
   r!   r=   )rq   r?   r   r   rF   r   r   r   Ú_proxyL  s   
	ýzPhoneNumberInstance._proxyc                 C   ó
   | j d S )zh
        :returns: A string that uniquely identifies this Phone Number.
        :rtype: unicode
        r!   ©rp   rF   r   r   r   r!   ]  ó   
zPhoneNumberInstance.sidc                 C   rs   )z@
        :returns: Account Sid.
        :rtype: unicode
        rh   rt   rF   r   r   r   rh   e  ru   zPhoneNumberInstance.account_sidc                 C   rs   )z@
        :returns: Service Sid.
        :rtype: unicode
        r
   rt   rF   r   r   r   r
   m  ru   zPhoneNumberInstance.service_sidc                 C   rs   )zh
        :returns: The date this Phone Number was added to the service
        :rtype: datetime
        ri   rt   rF   r   r   r   ri   u  ru   z PhoneNumberInstance.date_createdc                 C   rs   )z[
        :returns: The date this Phone Number was updated
        :rtype: datetime
        rj   rt   rF   r   r   r   rj   }  ru   z PhoneNumberInstance.date_updatedc                 C   rs   )zE
        :returns: The phone number.
        :rtype: unicode
        r"   rt   rF   r   r   r   r"   …  ru   z PhoneNumberInstance.phone_numberc                 C   rs   )zb
        :returns: A human-readable description of this resource.
        :rtype: unicode
        rk   rt   rF   r   r   r   rk   �  ru   z!PhoneNumberInstance.friendly_namec                 C   rs   )zE
        :returns: ISO Country Code,
        :rtype: unicode
        rl   rt   rF   r   r   r   rl   •  ru   zPhoneNumberInstance.iso_countryc                 C   rs   )zK
        :returns: A list of capabilities.
        :rtype: unicode
        rm   rt   rF   r   r   r   rm   �  ru   z PhoneNumberInstance.capabilitiesc                 C   rs   )zM
        :returns: The URL of this resource.
        :rtype: unicode
        rn   rt   rF   r   r   r   rn   ¥  ru   zPhoneNumberInstance.urlc                 C   rs   )zd
        :returns: Reserve for manual assignment to participants only.
        :rtype: bool
        r#   rt   rF   r   r   r   r#   ­  ru   zPhoneNumberInstance.is_reservedc                 C   ó
   | j  ¡ S )rQ   )rr   rR   rF   r   r   r   rR   µ  ó   
zPhoneNumberInstance.deletec                 C   rv   )rS   )rr   rT   rF   r   r   r   rT   ¾  rw   zPhoneNumberInstance.fetchc                 C   s   | j j|d�S )rU   )r#   )rr   rV   )r   r#   r   r   r   rV   Ç  s   	zPhoneNumberInstance.updatec                 C   rW   )rE   rX   c                 s   rY   rZ   r[   r\   r   r   r   r`   Ù  ra   z/PhoneNumberInstance.__repr__.<locals>.<genexpr>z(<Twilio.Proxy.V1.PhoneNumberInstance {}>rb   re   r   r   r   rG   Ò  rg   zPhoneNumberInstance.__repr__)N)rI   rJ   rK   rL   r   Úpropertyrr   r!   rh   r
   ri   rj   r"   rk   rl   rm   rn   r#   rR   rT   r   rM   rV   rG   rN   r   r   r   r   r    ,  s>    











		r    N)rL   Útwilio.baser   r   Útwilio.base.instance_contextr   Útwilio.base.instance_resourcer   Útwilio.base.list_resourcer   Útwilio.base.pager   r   r2   r?   r    r   r   r   r   Ú<module>   s    )W