
    i?1i\                         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 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values)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dZd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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        s/home/www/therecruiter.miabetepe.com/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._proxyK   sE     == . NN=9NN5)DM
 }}r.   c                 6    | j                   j                         S )n
        Deletes the PhoneNumberInstance


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


        :returns: True if delete succeeds, False otherwise
        N)r4   delete_asyncr3   s    r-   r:   z PhoneNumberInstance.delete_asyncd   s!      [[--////   '%'c                 6    | j                   j                         S )c
        Fetch the PhoneNumberInstance


        :returns: The fetched PhoneNumberInstance
        )r4   fetchr3   s    r-   r>   zPhoneNumberInstance.fetchm   s     {{  ""r.   c                 R   K   | j                   j                          d{   S 7 w)}
        Asynchronous coroutine to fetch the PhoneNumberInstance


        :returns: The fetched PhoneNumberInstance
        N)r4   fetch_asyncr3   s    r-   rA   zPhoneNumberInstance.fetch_asyncv   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!   )r4   updater+   r!   s     r-   rE   zPhoneNumberInstance.update   s#     {{!!# " 
 	
r.   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
        rD   N)r4   update_asyncrF   s     r-   rI   z PhoneNumberInstance.update_async   s1      [[--# . 
 
 	
 
s    )')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)   itemsrP   r+   contexts     r-   __repr__zPhoneNumberInstance.__repr__   s6     ((SDNN<P<P<RSS9@@IIr.   )N)r/   r1   )r/   r   )__name__
__module____qualname____doc__r   r   strr   r   r%   propertyr4   boolr7   r:   r>   rA   r   unsetr   objectrE   rI   r]   __classcell__r,   s   @r-   r   r      s    ( ";; c3h; 	;
 c];@  $ $0D 0#/ 28
 v.
	
 28
 v.
	
J# Jr.   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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 )r1   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)   rP   _uri)r+   r   r   r   r,   s       r-   r%   zPhoneNumberContext.__init__   sG     	! '
 H@GG 
nn
	r.   r/   c                 P    | j                   j                  d| j                        S )r6   DELETEmethoduri)r2   r7   rm   r3   s    r-   r7   zPhoneNumberContext.delete   s*     }}##		 $ 
 	
r.   c                 l   K   | j                   j                  d| j                         d{   S 7 w)r9   ro   rp   N)r2   r:   rm   r3   s    r-   r:   zPhoneNumberContext.delete_async   s8      ]]//		 0 
 
 	
 
s   +424c                     | j                   j                  d| j                        }t        | j                   || j                  d   | j                  d         S )r=   GETrp   r   r   r#   )r2   r>   rm   r   r)   r+   r   s     r-   r>   zPhoneNumberContext.fetch   sX     --%%		 & 

 #MM}5u%	
 	
r.   c                    K   | j                   j                  d| j                         d{   }t        | j                   || j                  d   | j                  d         S 7 7w)r@   ru   rp   Nr   r   r#   )r2   rA   rm   r   r)   rv   s     r-   rA   zPhoneNumberContext.fetch_async   sf      11		 2 
 

 #MM}5u%	
 	

s   +A'A%8A'r!   c                     t        j                  d|i      }| j                  j                  d| j                  |      }t        | j                  || j                  d   | j                  d         S )rC   
IsReservedPOSTrq   rr   datar   r   r#   )r   ofr2   rE   rm   r   r)   r+   r!   r|   r   s       r-   rE   zPhoneNumberContext.update   su     yyk
 --&&		 ' 
 #MM}5u%	
 	
r.   c                   K   t        j                  d|i      }| j                  j                  d| j                  |       d{   }t        | j                  || j                  d   | j                  d         S 7 7w)rH   ry   rz   r{   Nr   r   r#   )r   r}   r2   rI   rm   r   r)   r~   s       r-   rI   zPhoneNumberContext.update_async  s      yyk
 22		 3 
 
 #MM}5u%	
 	

s   AA?A=8A?c                     dj                  d | j                  j                         D              }dj                  |      S )rK   rL   c              3   F   K   | ]  \  }}d j                  ||        ywrN   rO   rQ   s      r-   rU   z.PhoneNumberContext.__repr__.<locals>.<genexpr>9  rV   rW   z'<Twilio.Proxy.V1.PhoneNumberContext {}>rX   r[   s     r-   r]   zPhoneNumberContext.__repr__3  s6     ((SDNN<P<P<RSS8??HHr.   )r^   r_   r`   r   rb   r%   rd   r7   r:   r   r>   rA   r   re   r   rf   rE   rI   r]   rg   rh   s   @r-   r1   r1      s    
 
c 
 
&

 



D 


* 
(
#6 
* 28
 v.
	
< 28
 v.
	
:I# Ir.   r1   c                   2    e Zd Zdeeef   defdZdefdZy)PhoneNumberPager   r/   c                 L    t        | j                  || j                  d         S )zq
        Build an instance of PhoneNumberInstance

        :param payload: Payload response from the API
        r   r   )r   r2   r)   rv   s     r-   get_instancezPhoneNumberPage.get_instance>  s%     #MM7}0M
 	
r.   c                      y)rK   z!<Twilio.Proxy.V1.PhoneNumberPage>rk   r3   s    r-   r]   zPhoneNumberPage.__repr__H       3r.   N)	r^   r_   r`   r   rb   r   r   r   r]   rk   r.   r-   r   r   =  s*    
DcN 
7J 
3# 3r.   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	 	 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e   fdZ	 	 dd
ee   dee   de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}/PhoneNumbersNrk   rl   )r+   r   r   r,   s      r-   r%   zPhoneNumberList.__init__R  sA     	! ;
 B:AASDNNS	r.   r   r   r!   r/   c                     t        j                  |||d      }| j                  j                  d| 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
        SidPhoneNumberry   rz   r{   r   r   )r   r}   r2   createrm   r   r)   r+   r   r   r!   r|   r   s         r-   r   zPhoneNumberList.createb  sk     yy+)
 --&&		 ' 
 #MM7}0M
 	
r.   c                    K   t        j                  |||d      }| j                  j                  d| 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   rz   r{   Nr   r   )r   r}   r2   create_asyncrm   r   r)   r   s         r-   r   zPhoneNumberList.create_async  sy      yy+)
 22		 3 
 
 #MM7}0M
 	

s   AA3A1*A3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   )r2   read_limitspagestreamr+   r   r   limitsr   s        r-   r   zPhoneNumberList.stream  sJ    ( **5)<yy6+#6y7}}##D&/::r.   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   )r2   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                 :    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.list  s(    & KK#  
 	
r.   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;
page_tokenpage_numberc                     t        j                  |||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   PageSizeru   rq   rr   params)r   r}   r2   r   rm   r   r)   r+   r   r   r   r|   responses         r-   r   zPhoneNumberList.page  sX      yy'#%
 ==%%U		$%Ot}}hGGr.   c                    K   t        j                  |||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   ru   r   N)r   r}   r2   r   rm   r   r)   r   s         r-   r   zPhoneNumberList.page_async&  sm       yy'#%
 11dii 2 
 
 t}}hGG
s   AA/A-&A/
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
        ru   )r2   domaintwiliorequestr   r)   r+   r   r   s      r-   get_pagezPhoneNumberList.get_pageC  s=     ==''..66ujIt}}hGGr.   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
        ru   N)r2   r   r   request_asyncr   r)   r   s      r-   get_page_asynczPhoneNumberList.get_page_asyncO  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#   r1   r2   r)   r+   r   s     r-   r&   zPhoneNumberList.get[  %     "MMt~~m'D#
 	
r.   c                 L    t        | j                  | j                  d   |      S r   r   r   s     r-   __call__zPhoneNumberList.__call__e  r   r.   c                      y)rK   z!<Twilio.Proxy.V1.PhoneNumberList>rk   r3   s    r-   r]   zPhoneNumberList.__repr__o  r   r.   )NN)!r^   r_   r`   r   rb   r%   r   re   r   rf   rd   r   r   r   r   intr	   r   r
   r   r   r   r   r   r   r   r   r   r1   r&   r   r]   rg   rh   s   @r-   r   r   Q  s   T Tc T$ #),,+1<<+1<<	
3;
 CK(
 4<(	

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

 

F  $#';}; C=; 
%	&	;6  $#'A}A C=A 
*	+	A6  $#'
}
 C=
 
!	"	
8  $#'
}
 C=
 
!	"	
: *0*0,,(.	H#v+&H 3;'H f%	H
 
H: *0*0,,(.	H#v+&H 3;'H f%	H
 
H:
H3 
H? 
H
Hs 
H 
H
s 
1 

C 
$6 
3# 3r.   r   N)ra   r   typingr   r   r   r   r   r	   r
   twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r1   r   r   rk   r.   r-   <module>r      sg     L L L + 8 : 2 ' !HJ* HJVUI UIp3d 3(d3l d3r.   