
    d{i6                         d Z ddlmZ ddlmZmZmZmZmZmZm	Z	 ddl
mZmZ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 dd
lmZ  G d de      Z G d de      Z G d de      Z G d de      Zy)a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Proxy
    This is the public Twilio REST API.

    NOTE: This class is auto generated by OpenAPI Generator.
    https://openapi-generator.tech
    Do not edit the class manually.
    )datetime)AnyDictListOptionalUnionIteratorAsyncIterator)deserialize	serializevalues)ApiResponse)InstanceContext)InstanceResource)ListResource)Version)Pagec            
           e Zd ZdZ	 ddedeeef   dedee   f fdZ	e
dd       Zdefd	Zdefd
ZdefdZdefdZddZddZdefdZdefdZej.                  fdeeef   dd fdZej.                  fdeeef   dd fdZej.                  fdeeef   defdZej.                  fdeeef   defdZdefdZ xZS )PhoneNumberInstancea  
    :ivar sid: The unique string that we created to identify the PhoneNumber resource.
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the PhoneNumber resource.
    :ivar service_sid: The SID of the PhoneNumber resource's parent [Service](https://www.twilio.com/docs/proxy/api/service) resource.
    :ivar date_created: The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time in GMT when the resource was created.
    :ivar date_updated: The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time in GMT when the resource was last updated.
    :ivar phone_number: The phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number.
    :ivar friendly_name: The string that you assigned to describe the resource.
    :ivar iso_country: The ISO Country Code for the phone number.
    :ivar capabilities:
    :ivar url: The absolute URL of the PhoneNumber resource.
    :ivar is_reserved: Whether the phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.
    :ivar in_use: The number of open session assigned to the number. See the [How many Phone Numbers do I need?](https://www.twilio.com/docs/proxy/phone-numbers-needed) guide for more information.
    versionpayloadservice_sidsidc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _	        |j                  d      | _
        |j                  d      | _        |j                  d      | _        |j                  d	      | _        |j                  d
      | _        |j                  d      | _        t        j                   |j                  d            | _        ||xs | j                  d| _        d | _        y )Nr   account_sidr   date_createddate_updatedphone_numberfriendly_nameiso_countrycapabilitiesurlis_reservedin_user   r   )super__init__getr   r   r   r   iso8601_datetimer   r   r   r   r    r!   r"   r#   integerr$   	_solution_context)selfr   r   r   r   	__class__s        g/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/rest/proxy/v1/service/phone_number.pyr'   zPhoneNumberInstance.__init__*   s(    	!")++e"4*1++m*D*1++m*D0;0L0LKK'1
 1<0L0LKK'1
 ,3;;~+F,3KK,H*1++m*D+2;;~+F")++e"4+2;;}+E%0%8%8X9N%O '?$((
 7;    returnc                     | j                   7t        | j                  | j                  d   | j                  d         | _         | j                   S )z
        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
        r   r   r%   )r,   PhoneNumberContext_versionr+   r-   s    r/   _proxyzPhoneNumberInstance._proxyJ   sE     == . NN=9NN5)DM
 }}r0   c                 6    | j                   j                         S zn
        Deletes the PhoneNumberInstance


        :returns: True if delete succeeds, False otherwise
        )r6   deleter5   s    r/   r9   zPhoneNumberInstance.deleteZ   s     {{!!##r0   c                 R   K   | j                   j                          d{   S 7 wz
        Asynchronous coroutine that deletes the PhoneNumberInstance


        :returns: True if delete succeeds, False otherwise
        N)r6   delete_asyncr5   s    r/   r<   z PhoneNumberInstance.delete_asyncc   s!      [[--////   '%'c                 6    | j                   j                         S )z
        Deletes the PhoneNumberInstance with HTTP info


        :returns: ApiResponse with success boolean, status code, and headers
        )r6   delete_with_http_infor5   s    r/   r?   z)PhoneNumberInstance.delete_with_http_infol   s     {{0022r0   c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine that deletes the PhoneNumberInstance with HTTP info


        :returns: ApiResponse with success boolean, status code, and headers
        N)r6   delete_with_http_info_asyncr5   s    r/   rA   z/PhoneNumberInstance.delete_with_http_info_asyncu   s!      [[<<>>>>r=   c                 6    | j                   j                         S )c
        Fetch the PhoneNumberInstance


        :returns: The fetched PhoneNumberInstance
        )r6   fetchr5   s    r/   rD   zPhoneNumberInstance.fetch~   s     {{  ""r0   c                 R   K   | j                   j                          d{   S 7 w)}
        Asynchronous coroutine to fetch the PhoneNumberInstance


        :returns: The fetched PhoneNumberInstance
        N)r6   fetch_asyncr5   s    r/   rG   zPhoneNumberInstance.fetch_async   s!      [[,,....r=   c                 6    | j                   j                         S )z
        Fetch the PhoneNumberInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        )r6   fetch_with_http_infor5   s    r/   rI   z(PhoneNumberInstance.fetch_with_http_info   s     {{//11r0   c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine to fetch the PhoneNumberInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        N)r6   fetch_with_http_info_asyncr5   s    r/   rK   z.PhoneNumberInstance.fetch_with_http_info_async   s!      [[;;====r=   r#   c                 :    | j                   j                  |      S )V  
        Update the PhoneNumberInstance

        :param is_reserved: Whether the phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.

        :returns: The updated PhoneNumberInstance
        r#   )r6   updater-   r#   s     r/   rO   zPhoneNumberInstance.update   s#     {{!!# " 
 	
r0   c                 V   K   | j                   j                  |       d{   S 7 w)p  
        Asynchronous coroutine to update the PhoneNumberInstance

        :param is_reserved: Whether the phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.

        :returns: The updated PhoneNumberInstance
        rN   N)r6   update_asyncrP   s     r/   rS   z PhoneNumberInstance.update_async   s1      [[--# . 
 
 	
 
    )')c                 :    | j                   j                  |      S )ay  
        Update the PhoneNumberInstance with HTTP info

        :param is_reserved: Whether the phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.

        :returns: ApiResponse with instance, status code, and headers
        rN   )r6   update_with_http_inforP   s     r/   rV   z)PhoneNumberInstance.update_with_http_info   s#     {{00# 1 
 	
r0   c                 V   K   | j                   j                  |       d{   S 7 w)a  
        Asynchronous coroutine to update the PhoneNumberInstance with HTTP info

        :param is_reserved: Whether the phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.

        :returns: ApiResponse with instance, status code, and headers
        rN   N)r6   update_with_http_info_asyncrP   s     r/   rX   z/PhoneNumberInstance.update_with_http_info_async   s1      [[<<# = 
 
 	
 
rT   c                     dj                  d | j                  j                         D              }dj                  |      S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c              3   F   K   | ]  \  }}d j                  ||        ywz{}={}Nformat.0kvs      r/   	<genexpr>z/PhoneNumberInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z(<Twilio.Proxy.V1.PhoneNumberInstance {}>joinr+   itemsr_   r-   contexts     r/   __repr__zPhoneNumberInstance.__repr__   s6     ((SDNN<P<P<RSS9@@IIr0   )N)r1   r3   )r1   r   ) __name__
__module____qualname____doc__r   r   strr   r   r'   propertyr6   boolr9   r<   r   r?   rA   rD   rG   rI   rK   r   unsetr   objectrO   rS   rV   rX   rl   __classcell__r.   s   @r/   r   r      sU   ( ";; c3h; 	;
 c];@  $ $0D 03{ 3?; ?#/2k 2>+ > 28
 v.
	
 28
 v.
	
 28
 v.
	
 28
 v.
	
J# Jr0   r   c                       e Zd Zdededef fdZdefdZdefdZ	de
fdZdefd	Zdefd
Zde
fdZdefdZdefdZde
fdZdefdZdefdZde
fdZej.                  fdeeef   defdZej.                  fdeeef   defdZej.                  fdeeef   de
fdZej.                  fdeeef   defdZej.                  fdeeef   defdZej.                  fdeeef   de
fdZdefdZ  xZ!S )r3   r   r   r   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)am  
        Initialize the PhoneNumberContext

        :param version: Version that contains the resource
        :param service_sid: The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the PhoneNumber resource to update.
        :param sid: The Twilio-provided string that uniquely identifies the PhoneNumber resource to update.
        r%   z*/Services/{service_sid}/PhoneNumbers/{sid}N r&   r'   r+   r_   _uri)r-   r   r   r   r.   s       r/   r'   zPhoneNumberContext.__init__   sG     	! '
 H@GG 
nn
	r0   r1   c                 |    t        j                  i       }| j                  j                  d| j                  |      S )z
        Internal helper for delete operation

        Returns:
            tuple: (success_boolean, status_code, headers)
        DELETEmethoduriheaders)r   ofr4   delete_with_response_infor|   r-   r   s     r/   _deletezPhoneNumberContext._delete   s8     ))B-}}66G 7 
 	
r0   c                 .    | j                         \  }}}|S r8   )r   r-   success_s      r/   r9   zPhoneNumberContext.delete  s     Ar0   c                 F    | j                         \  }}}t        |||      S )z
        Deletes the PhoneNumberInstance and return response metadata


        :returns: ApiResponse with success boolean, status code, and headers
        datastatus_coder   )r   r   r-   r   r   r   s       r/   r?   z(PhoneNumberContext.delete_with_http_info  s%     )-%g['RRr0   c                    K   t        j                  i       }| j                  j                  d| j                  |       d{   S 7 w)z
        Internal async helper for delete operation

        Returns:
            tuple: (success_boolean, status_code, headers)
        r~   r   N)r   r   r4   delete_with_response_info_asyncr|   r   s     r/   _delete_asyncz PhoneNumberContext._delete_async  sG      ))B-]]BBG C 
 
 	
 
s   AA
AA
c                 J   K   | j                          d{   \  }}}|S 7 
wr;   )r   r   s      r/   r<   zPhoneNumberContext.delete_async)  s)      #0022A 3s   #!#c                 b   K   | j                          d{   \  }}}t        |||      S 7 w)z
        Asynchronous coroutine that deletes the PhoneNumberInstance and return response metadata


        :returns: ApiResponse with success boolean, status code, and headers
        Nr   )r   r   r   s       r/   rA   z.PhoneNumberContext.delete_with_http_info_async3  s5      /3.@.@.B(B%g['RR )Cs   /-/c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      S )zz
        Internal helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        application/jsonAcceptGETr   )r   r   r4   fetch_with_response_infor|   r   s     r/   _fetchzPhoneNumberContext._fetch=  sB     ))B-.}}55dii 6 
 	
r0   c                     | j                         \  }}}t        | j                  || j                  d   | j                  d         S )rC   r   r   r%   )r   r   r4   r+   r-   r   r   s      r/   rD   zPhoneNumberContext.fetchM  sD     A"MM}5u%	
 	
r0   c                     | j                         \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S )z
        Fetch the PhoneNumberInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        r   r   r%   r   )r   r   r4   r+   r   r-   r   r   r   instances        r/   rI   z'PhoneNumberContext.fetch_with_http_info\  sS     )-%g&MM}5u%	
 k7SSr0   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   S 7 w)z
        Internal async helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        r   r   r   r   N)r   r   r4   fetch_with_response_info_asyncr|   r   s     r/   _fetch_asynczPhoneNumberContext._fetch_asyncl  sQ      ))B-.]]AAdii B 
 
 	
 
s   AAA	Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d   | j                  d         S 7 ;w)rF   Nr   r   r%   )r   r   r4   r+   r   s      r/   rG   zPhoneNumberContext.fetch_async|  sS      #//11A"MM}5u%	
 	
 2s   AA<Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S 7 Iw)z
        Asynchronous coroutine to fetch the PhoneNumberInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        Nr   r   r%   r   )r   r   r4   r+   r   r   s        r/   rK   z-PhoneNumberContext.fetch_with_http_info_async  sc      /3.?.?.A(A%g&MM}5u%	
 k7SS )Bs   A"A A
A"r#   c                     t        j                  dt        j                  |      i      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||      S )z{
        Internal helper for update operation

        Returns:
            tuple: (payload, status_code, headers)
        
IsReserved!application/x-www-form-urlencodedContent-Typer   r   POSTr   r   r   r   )r   r   r   boolean_to_stringr4   update_with_response_infor|   r-   r#   r   r   s       r/   _updatezPhoneNumberContext._update  ss     yyi99+F

 ))B-"E.}}66tyytW 7 
 	
r0   c                     | j                  |      \  }}}t        | j                  || j                  d   | j                  d         S )rM   rN   r   r   r%   )r   r   r4   r+   r-   r#   r   r   s       r/   rO   zPhoneNumberContext.update  sI     =A"MM}5u%	
 	
r0   c                     | j                  |      \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S )a  
        Update the PhoneNumberInstance and return response metadata

        :param is_reserved: Whether the phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.

        :returns: ApiResponse with instance, status code, and headers
        rN   r   r   r%   r   )r   r   r4   r+   r   r-   r#   r   r   r   r   s         r/   rV   z(PhoneNumberContext.update_with_http_info  sX     )-(M%g&MM}5u%	
 k7SSr0   c                   K   t        j                  dt        j                  |      i      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||       d{   S 7 w)	z
        Internal async helper for update operation

        Returns:
            tuple: (payload, status_code, headers)
        r   r   r   r   r   r   r   N)r   r   r   r   r4   update_with_response_info_asyncr|   r   s       r/   _update_asyncz PhoneNumberContext._update_async  s      yyi99+F

 ))B-"E.]]BBtyytW C 
 
 	
 
s   A6A?8A=9A?c                    K   | j                  |       d{   \  }}}t        | j                  || j                  d   | j                  d         S 7 ;w)rR   rN   Nr   r   r%   )r   r   r4   r+   r   s       r/   rS   zPhoneNumberContext.update_async  sY      #00[0IIA"MM}5u%	
 	
 Js   AA<Ac                    K   | j                  |       d{   \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S 7 Iw)a  
        Asynchronous coroutine to update the PhoneNumberInstance and return response metadata

        :param is_reserved: Whether the phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.

        :returns: ApiResponse with instance, status code, and headers
        rN   Nr   r   r%   r   )r   r   r4   r+   r   r   s         r/   rX   z.PhoneNumberContext.update_with_http_info_async  sq      /3.@.@# /A /
 )
%g 'MM}5u%	
 k7SS)
s   A$A"A
A$c                     dj                  d | j                  j                         D              }dj                  |      S )rZ   r[   c              3   F   K   | ]  \  }}d j                  ||        ywr]   r^   r`   s      r/   rd   z.PhoneNumberContext.__repr__.<locals>.<genexpr>  re   rf   z'<Twilio.Proxy.V1.PhoneNumberContext {}>rg   rj   s     r/   rl   zPhoneNumberContext.__repr__  s6     ((SDNN<P<P<RSS8??HHr0   )"rm   rn   ro   r   rq   r'   tupler   rs   r9   r   r?   r   r<   rA   r   r   rD   rI   r   rG   rK   r   rt   r   ru   r   rO   rV   r   rS   rX   rl   rv   rw   s   @r/   r3   r3      s   
 
c 
 
&
 
 S{ S
U 
D S; S
 
 
* 
Tk T 
E 
 
#6 
T+ T  :@ 
5v#6 
% 
0 28
 v.
	
& 28T v.T	T( 28
 v.
	
4 28
 v.
	
& 28T v.T	T*I# Ir0   r3   c                   2    e Zd Zdeeef   defdZdefdZy)PhoneNumberPager   r1   c                 L    t        | j                  || j                  d         S )zq
        Build an instance of PhoneNumberInstance

        :param payload: Payload response from the API
        r   r   )r   r4   r+   )r-   r   s     r/   get_instancezPhoneNumberPage.get_instance#  s%     #MM7}0M
 	
r0   c                      y)rZ   z!<Twilio.Proxy.V1.PhoneNumberPage>rz   r5   s    r/   rl   zPhoneNumberPage.__repr__-       3r0   N)	rm   rn   ro   r   rq   r   r   r   rl   rz   r0   r/   r   r   !  s*    
DcN 
7J 
3# 3r0   r   c            	           e Zd Zdedef fdZej                  ej                  ej                  fdeee	f   deee	f   dee
e	f   defdZej                  ej                  ej                  fdeee	f   deee	f   dee
e	f   defd	Zej                  ej                  ej                  fdeee	f   deee	f   dee
e	f   defd
Zej                  ej                  ej                  fdeee	f   deee	f   dee
e	f   defdZej                  ej                  ej                  fdeee	f   deee	f   dee
e	f   defdZej                  ej                  ej                  fdeee	f   deee	f   dee
e	f   defdZ	 	 d$dee   dee   dee   fdZ	 	 d$dee   dee   dee   fdZ	 	 d$dee   dee   defdZ	 	 d$dee   dee   defdZ	 	 d$dee   dee   dee   fdZ	 	 d$dee   dee   dee   fdZ	 	 d$dee   dee   defdZ	 	 d$dee   dee   defdZ ej                  ej                  ej                  fdeee	f   deee	f   deee	f   de!fdZ"ej                  ej                  ej                  fdeee	f   deee	f   deee	f   de!fdZ#ej                  ej                  ej                  fdeee	f   deee	f   deee	f   defdZ$ej                  ej                  ej                  fdeee	f   deee	f   deee	f   defdZ%dede!fdZ&dede!fd Z'dede(fd!Z)dede(fd"Z*defd#Z+ xZ,S )%PhoneNumberListr   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the PhoneNumberList

        :param version: Version that contains the resource
        :param service_sid: The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the PhoneNumber resources to read.

        r   z$/Services/{service_sid}/PhoneNumbersNrz   r{   )r-   r   r   r.   s      r/   r'   zPhoneNumberList.__init__8  sA     	! ;
 B:AASDNNS	r0   r   r   r#   r1   c                     t        j                  ||t        j                  |      d      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||      S )z{
        Internal helper for create operation

        Returns:
            tuple: (payload, status_code, headers)
        SidPhoneNumberr   r   r   r   r   r   r   )r   r   r   r   r4   create_with_response_infor|   r-   r   r   r#   r   r   s         r/   _createzPhoneNumberList._createH  s~     yy+'99+F
 ))^-PQR"E.}}66tyytW 7 
 	
r0   c                 |    | j                  |||      \  }}}t        | j                  || j                  d         S )aB  
        Create the PhoneNumberInstance

        :param sid: The SID of a Twilio [IncomingPhoneNumber](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource) resource that represents the Twilio Number you would like to assign to your Proxy Service.
        :param phone_number: The phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format.  E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.
        :param is_reserved: Whether the new phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.

        :returns: The created PhoneNumberInstance
        r   r   r#   r   r   )r   r   r4   r+   r-   r   r   r#   r   r   s         r/   createzPhoneNumberList.createf  sG     ,K % 
A #MM7}0M
 	
r0   c                     | j                  |||      \  }}}t        | j                  || j                  d         }t	        |||      S )as  
        Create the PhoneNumberInstance and return response metadata

        :param sid: The SID of a Twilio [IncomingPhoneNumber](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource) resource that represents the Twilio Number you would like to assign to your Proxy Service.
        :param phone_number: The phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format.  E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.
        :param is_reserved: Whether the new phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.

        :returns: ApiResponse with instance, status code, and headers
        r   r   r   r   )r   r   r4   r+   r   r-   r   r   r#   r   r   r   r   s           r/   create_with_http_infoz%PhoneNumberList.create_with_http_info|  sV     )-,K )5 )
%g 'MM7}0M
 k7SSr0   c                 
  K   t        j                  ||t        j                  |      d      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||       d{   S 7 w)	z
        Internal async helper for create operation

        Returns:
            tuple: (payload, status_code, headers)
        r   r   r   r   r   r   r   N)r   r   r   r   r4   create_with_response_info_asyncr|   r   s         r/   _create_asynczPhoneNumberList._create_async  s      yy+'99+F
 ))^-PQR"E.]]BBtyytW C 
 
 	
 
s   A:B<B=Bc                    K   | j                  |||       d{   \  }}}t        | j                  || j                  d         S 7 -w)aQ  
        Asynchronously create the PhoneNumberInstance

        :param sid: The SID of a Twilio [IncomingPhoneNumber](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource) resource that represents the Twilio Number you would like to assign to your Proxy Service.
        :param phone_number: The phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format.  E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.
        :param is_reserved: Whether the new phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.

        :returns: The created PhoneNumberInstance
        r   Nr   r   )r   r   r4   r+   r   s         r/   create_asynczPhoneNumberList.create_async  sW      #00,K 1 
 
A #MM7}0M
 	

s   A
A.A
c                    K   | j                  |||       d{   \  }}}t        | j                  || j                  d         }t	        |||      S 7 ;w)a  
        Asynchronously create the PhoneNumberInstance and return response metadata

        :param sid: The SID of a Twilio [IncomingPhoneNumber](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource) resource that represents the Twilio Number you would like to assign to your Proxy Service.
        :param phone_number: The phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format.  E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.
        :param is_reserved: Whether the new phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.

        :returns: ApiResponse with instance, status code, and headers
        r   Nr   r   r   )r   r   r4   r+   r   r   s           r/   create_with_http_info_asyncz+PhoneNumberList.create_with_http_info_async  sg      /3.@.@,K /A /
 )
%g 'MM7}0M
 k7SS)
s   AA<Alimit	page_sizec                     | j                   j                  ||      }| j                  |d         }| j                   j                  ||d         S )aa  
        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 limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param 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
        r   r   r   )r4   read_limitspagestreamr-   r   r   limitsr   s        r/   r   zPhoneNumberList.stream  sJ    ( **5)<yy6+#6y7}}##D&/::r0   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)ap  
        Asynchronously 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 limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param 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
        r   r   Nr   )r4   r   
page_asyncstream_asyncr   s        r/   r   zPhoneNumberList.stream_async  sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                     | j                   j                  ||      }| j                  |d         }| j                   j                  |j                  |d         }||j
                  |j                  fS )a  
        Streams PhoneNumberInstance and returns headers from first page


        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param 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: tuple of (generator, status_code, headers) where generator yields instances
        r   r   r   )r4   r   page_with_http_infor   r   r   r   r-   r   r   r   page_response	generators         r/   stream_with_http_infoz%PhoneNumberList.stream_with_http_info  sk    $ **5)<006+;N0OMM((););VG_M	=44m6K6KLLr0   c                   K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  |j                  |d         }||j
                  |j                  fS 7 Fw)a  
        Asynchronously streams PhoneNumberInstance and returns headers from first page


        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param 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: tuple of (generator, status_code, headers) where generator yields instances
        r   r   Nr   )r4   r   page_with_http_info_asyncr   r   r   r   r   s         r/   stream_with_http_info_asyncz+PhoneNumberList.stream_with_http_info_async(  s     $ **5)<"<<[) = 
 
 MM..}/A/A6'?S	=44m6K6KLL
s   5B A>AB c                 :    t        | j                  ||            S )a  
        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 limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param 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: list that will contain up to limit results
        r   r   )listr   )r-   r   r   s      r/   r   zPhoneNumberList.listB  s(    & KK#  
 	
r0   c                 z   K   | j                  ||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)a  
        Asynchronously 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 limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param 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: list that will contain up to limit results
        r   N)r   )r-   r   r   records       r/   
list_asynczPhoneNumberList.list_async\  sT     * '+&7&7# '8 ' !
 
 !
 
 	
 
s0   ;.;620
26;26;c                 b    | j                  ||      \  }}}t        |      }t        |||      S )a  
        Lists PhoneNumberInstance and returns headers from first page


        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param 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: ApiResponse with list of instances, status code, and headers
        r   r   )r   r   r   )r-   r   r   r   r   r   ri   s          r/   list_with_http_infoz#PhoneNumberList.list_with_http_infow  sA    $ +/*D*D +E +
'	; Y;PPr0   c                    K   | j                  ||       d{   \  }}}|2 cg c3 d{   }|7 7 	6 nc c}w }}t        |||      S w)a  
        Asynchronously lists PhoneNumberInstance and returns headers from first page


        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param 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: ApiResponse with list of instances, status code, and headers
        r   Nr   )r   r   )r-   r   r   r   r   r   r   ri   s           r/   list_with_http_info_asyncz)PhoneNumberList.list_with_http_info_async  sf     $ 150P0P 1Q 1
 +
'	; -666&	+
 7666;PPs4   A4A:86
8:A8:A
page_tokenpage_numberc                     t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                        S )a{  
        Retrieve a single page of PhoneNumberInstance records from the API.
        Request is executed immediately

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

        :returns: Page of PhoneNumberInstance
        	PageTokenr   PageSizer   r   r   r   r   r   r   paramsr   )r   r   r4   r   r|   r   r+   r-   r   r   r   r   r   responses          r/   r   zPhoneNumberList.page  s      yy'#%
 ))^-PQR.==%%diig & 
 t}}hGGr0   c                   K   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                        S 7 %w)	a  
        Asynchronously retrieve a single page of PhoneNumberInstance records from the API.
        Request is executed immediately

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

        :returns: Page of PhoneNumberInstance
        r   r   r   r   r   r   r   N)r   r   r4   r   r|   r   r+   r  s          r/   r   zPhoneNumberList.page_async  s       yy'#%
 ))^-PQR.11diig 2 
 
 t}}hGG
s   A"B$B
%&Bc                 $   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      \  }}}t        | j                  || j                        }	t        |	||      S )	a]  
        Retrieve a single page with response metadata


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

        :returns: ApiResponse with PhoneNumberPage, status code, and headers
        r   r   r   r   r   r   r   r   )r   r   r4   page_with_response_infor|   r   r+   r   
r-   r   r   r   r   r   r  r   response_headersr   s
             r/   r   z#PhoneNumberList.page_with_http_info  s      yy'#%
 ))^-PQR.26--2W2Wdiig 3X 3
/+/ t}}hG+GWXXr0   c                 @  K   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   \  }}}t        | j                  || j                        }	t        |	||	      S 7 7w)
al  
        Asynchronously retrieve a single page with response metadata


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

        :returns: ApiResponse with PhoneNumberPage, status code, and headers
        r   r   r   r   r   r   r   Nr   )r   r   r4   page_with_response_info_asyncr|   r   r+   r   r  s
             r/   r   z)PhoneNumberList.page_with_http_info_async  s       yy'#%
 ))^-PQR. --==$))D' >   	0+/
 t}}hG+GWXXs   A"B$B%8B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )z
        Retrieve a specific page of PhoneNumberInstance records from the API.
        Request is executed immediately

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

        :returns: Page of PhoneNumberInstance
        r   )r4   domaintwiliorequestr   r+   r-   r
  r  s      r/   get_pagezPhoneNumberList.get_page1  s=     ==''..66ujIt}}hGGr0   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)a
  
        Asynchronously retrieve a specific page of PhoneNumberInstance records from the API.
        Request is executed immediately

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

        :returns: Page of PhoneNumberInstance
        r   N)r4   r  r  request_asyncr   r+   r  s      r/   get_page_asynczPhoneNumberList.get_page_async=  sJ      --44BB5*UUt}}hGG Vs   4AA&Ac                 L    t        | j                  | j                  d   |      S z
        Constructs a PhoneNumberContext

        :param sid: The Twilio-provided string that uniquely identifies the PhoneNumber resource to update.
        r   r%   r3   r4   r+   r-   r   s     r/   r(   zPhoneNumberList.getI  %     "MMt~~m'D#
 	
r0   c                 L    t        | j                  | j                  d   |      S r  r  r  s     r/   __call__zPhoneNumberList.__call__S  r  r0   c                      y)rZ   z!<Twilio.Proxy.V1.PhoneNumberList>rz   r5   s    r/   rl   zPhoneNumberList.__repr__]  r   r0   )NN)-rm   rn   ro   r   rq   r'   r   rt   r   ru   rs   r   r   r   r   r   r   r   r   r   r   intr	   r   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r3   r(   r  rl   rv   rw   s   @r/   r   r   6  s   T Tc T$ #),,+1<<+1<<	
3;
 CK(
 4<(	

 

@ #),,+1<<+1<<	
3;
 CK(
 4<(	

 

0 #),,+1<<+1<<	T3;T CK(T 4<(	T
 
T2 #),,+1<<+1<<	
3;
 CK(
 4<(	

 

@ #),,+1<<+1<<	
3;
 CK(
 4<(	

 

0 #),,+1<<+1<<	T3;T CK(T 4<(	T
 
T2  $#';}; C=; 
%	&	;6  $#'A}A C=A 
*	+	A6  $#'M}M C=M 
	M4  $#'M}M C=M 
	M8  $#'
}
 C=
 
!	"	
8  $#'
}
 C=
 
!	"	
:  $#'Q}Q C=Q 
	Q6  $#'Q}Q C=Q 
	Q6 *0*0,,(.	H#v+&H 3;'H f%	H
 
HF *0*0,,(.	H#v+&H 3;'H f%	H
 
HF *0*0,,(.	 Y#v+& Y 3;' Y f%	 Y
 
 YH *0*0,,(.	"Y#v+&"Y 3;'"Y f%	"Y
 
"YH
H3 
H? 
H
Hs 
H 
H
s 
1 

C 
$6 
3# 3r0   r   N)rp   r   typingr   r   r   r   r   r	   r
   twilio.baser   r   r   twilio.base.api_responser   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r3   r   r   rz   r0   r/   <module>r%     sm     L L L 6 6 0 8 : 2 ' !GJ* GJTzI zIz	3d 3*m3l m3r0   