
    ga                         S r SSKJr  SSKJrJrJrJrJrJrJ	r	  SSK
JrJrJr  SSKJr  SSKJr  SSKJr  SSKJr  SS	KJr   " S
 S\5      r " S S\5      r " S S\5      r " S S\5      rg)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)InstanceContext)InstanceResource)ListResource)Version)Pagec            
         ^  \ rS rSrSr SS\S\\\4   S\S\	\   4U 4S jjjr
\SS	 j5       rS\4S
 jrS\4S jrSS jrSS jr\R&                  4S\\\4   SS 4S jjr\R&                  4S\\\4   SS 4S jjrS\4S jrSrU =r$ )PhoneNumberInstance   a  
: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U ]  U5        UR                  S5      U l        UR                  S5      U l        UR                  S5      U l        [        R                  " UR                  S5      5      U l        [        R                  " UR                  S5      5      U l	        UR                  S5      U l
        UR                  S5      U l        UR                  S5      U l        UR                  S	5      U l        UR                  S
5      U l        UR                  S5      U l        [        R                   " UR                  S5      5      U l        UU=(       d    U R                  S.U l        S U l        g )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        q/Users/Alptekin/Desktop/izin_takip/venv/lib/python3.13/site-packages/twilio/rest/proxy/v1/service/phone_number.pyr'   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                     U R                   c4  [        U R                  U R                  S   U R                  S   S9U l         U R                   $ )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/   _proxyPhoneNumberInstance._proxyI   sE     == . NN=9NN5)DM
 }}r1   c                 6    U R                   R                  5       $ )V
Deletes the PhoneNumberInstance


:returns: True if delete succeeds, False otherwise
)r7   deleter6   s    r/   r;   PhoneNumberInstance.deleteY   s     {{!!##r1   c                 R   #    U R                   R                  5       I Sh  vN $  N7f)r
Asynchronous coroutine that deletes the PhoneNumberInstance


:returns: True if delete succeeds, False otherwise
N)r7   delete_asyncr6   s    r/   r?    PhoneNumberInstance.delete_asyncb   s       [[--////   '%'c                 6    U R                   R                  5       $ )K
Fetch the PhoneNumberInstance


:returns: The fetched PhoneNumberInstance
)r7   fetchr6   s    r/   rD   PhoneNumberInstance.fetchk   s     {{  ""r1   c                 R   #    U R                   R                  5       I Sh  vN $  N7f)e
Asynchronous coroutine to fetch the PhoneNumberInstance


:returns: The fetched PhoneNumberInstance
N)r7   fetch_asyncr6   s    r/   rH   PhoneNumberInstance.fetch_asynct   s       [[,,....rA   r#   c                 4    U R                   R                  US9$ )6  
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#   )r7   updater-   r#   s     r/   rM   PhoneNumberInstance.update}   s#     {{!!# " 
 	
r1   c                 P   #    U R                   R                  US9I Sh  vN $  N7f)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
rL   N)r7   update_asyncrN   s     r/   rR    PhoneNumberInstance.update_async   s0      [[--# . 
 
 	
 
s   &$&c                     SR                  S U R                  R                  5        5       5      nSR                  U5      $ )N
Provide a friendly representation

:returns: Machine friendly representation
 c              3   H   #    U  H  u  pS R                  X5      v   M     g7fz{}={}Nformat.0kvs      r/   	<genexpr>/PhoneNumberInstance.__repr__.<locals>.<genexpr>         S<RDA7>>!//<R    "z(<Twilio.Proxy.V1.PhoneNumberInstance {}>joinr+   itemsrZ   r-   contexts     r/   __repr__PhoneNumberInstance.__repr__   s6     ((SDNN<P<P<RSS9@@IIr1   )r,   r+   r   r!   r   r   r   r$   r#   r    r   r   r   r"   )N)r2   r4   )r2   r   )__name__
__module____qualname____firstlineno____doc__r   r   strr   r   r'   propertyr7   boolr;   r?   rD   rH   r   unsetr   objectrM   rR   rh   __static_attributes____classcell__r.   s   @r/   r   r      s    ( ";; c3h; 	;
 c]; ;@  $ $0D 0#/ 28
 v.
	
 28
 v.
	
J# J Jr1   r   c                      ^  \ rS rSrS\S\S\4U 4S jjrS\4S jrS\4S jr	S\
4S	 jrS\
4S
 jr\R                  4S\\\4   S\
4S jjr\R                  4S\\\4   S\
4S jjrS\4S jrSrU =r$ )r4      r   r   r   c                 z   > [         TU ]  U5        UUS.U l        SR                  " S0 U R                  D6U l        g)aE  
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+   rZ   _uri)r-   r   r   r   r.   s       r/   r'   PhoneNumberContext.__init__   sD     	! '
 AGG 
nn
	r1   r2   c                 x    [         R                  " 0 5      nU R                  R                  SU R                  US9$ )r:   DELETEmethoduriheaders)r   ofr5   r;   r|   r-   r   s     r/   r;   PhoneNumberContext.delete   s1     ))B-}}##8G#TTr1   c                    #    [         R                  " 0 5      nU R                  R                  SU R                  US9I Sh  vN $  N7f)r>   r   r   N)r   r   r5   r?   r|   r   s     r/   r?   PhoneNumberContext.delete_async   sE      ))B-]]//G 0 
 
 	
 
s   ?AAAc                     [         R                  " 0 5      nSUS'   U R                  R                  SU R                  US9n[        U R                  UU R                  S   U R                  S   S9$ )rC   application/jsonAcceptGETr   r   r   r%   )r   r   r5   rD   r|   r   r+   r-   r   r   s      r/   rD   PhoneNumberContext.fetch   si     ))B-.--%%U		7%S"MM}5u%	
 	
r1   c                    #    [         R                  " 0 5      nSUS'   U R                  R                  SU R                  US9I Sh  vN n[        U R                  UU R                  S   U R                  S   S9$  N47f)	rG   r   r   r   r   Nr   r   r%   )r   r   r5   rH   r|   r   r+   r   s      r/   rH   PhoneNumberContext.fetch_async   s}      ))B-.11dii 2 
 
 #MM}5u%	
 	
	
s   AA=A;5A=r#   c                 D   [         R                  " S[        R                  " U5      05      n[         R                  " 0 5      nSUS'   SUS'   U R                  R                  SU R                  X#S9n[        U R                  UU R                  S   U R                  S	   S
9$ )rK   
IsReserved!application/x-www-form-urlencodedContent-Typer   r   POSTr   r   datar   r   r   r%   )	r   r   r   boolean_to_stringr5   rM   r|   r   r+   r-   r#   r   r   r   s        r/   rM   PhoneNumberContext.update   s     yyi99+F

 ))B-"E.--&&tyyt ' 
 #MM}5u%	
 	
r1   c                 `  #    [         R                  " S[        R                  " U5      05      n[         R                  " 0 5      nSUS'   SUS'   U R                  R                  SU R                  X#S9I Sh  vN n[        U R                  UU R                  S	   U R                  S
   S9$  N47f)rQ   r   r   r   r   r   r   r   Nr   r   r%   )	r   r   r   r   r5   rR   r|   r   r+   r   s        r/   rR   PhoneNumberContext.update_async  s      yyi99+F

 ))B-"E.22tyyt 3 
 
 #MM}5u%	
 	
	
s   A5B.7B,85B.c                     SR                  S U R                  R                  5        5       5      nSR                  U5      $ )rU   rV   c              3   H   #    U  H  u  pS R                  X5      v   M     g7frX   rY   r[   s      r/   r_   .PhoneNumberContext.__repr__.<locals>.<genexpr>F  ra   rb   z'<Twilio.Proxy.V1.PhoneNumberContext {}>rc   rf   s     r/   rh   PhoneNumberContext.__repr__@  s6     ((SDNN<P<P<RSS8??HHr1   r+   r|   )rj   rk   rl   rm   r   ro   r'   rq   r;   r?   r   rD   rH   r   rr   r   rs   rM   rR   rh   rt   ru   rv   s   @r/   r4   r4      s    
 
c 
 
&
U 
U
D 

* 
*
#6 
0 28
 v.
	
D 28
 v.
	
BI# I Ir1   r4   c                   >    \ rS rSrS\\\4   S\4S jrS\4S jr	Sr
g)PhoneNumberPageiJ  r   r2   c                 D    [        U R                  XR                  S   S9$ )zY
Build an instance of PhoneNumberInstance

:param payload: Payload response from the API
r   r   )r   r5   r+   )r-   r   s     r/   get_instancePhoneNumberPage.get_instanceL  s#     #MM7}0M
 	
r1   c                     g)rU   z!<Twilio.Proxy.V1.PhoneNumberPage>rz   r6   s    r/   rh   PhoneNumberPage.__repr__V       3r1   rz   N)rj   rk   rl   rm   r   ro   r   r   r   rh   rt   rz   r1   r/   r   r   J  s*    
DcN 
7J 
3# 3r1   r   c            	       B  ^  \ rS rSrS\S\4U 4S jjr\R                  \R                  \R                  4S\	\\
4   S\	\\
4   S\	\\
4   S\4S	 jjr\R                  \R                  \R                  4S\	\\
4   S\	\\
4   S\	\\
4   S\4S
 jjr  SS\\   S\\   S\\   4S jjr  SS\\   S\\   S\\   4S jjr  SS\\   S\\   S\\   4S jjr  SS\\   S\\   S\\   4S jjr\R                  \R                  \R                  4S\	\\
4   S\	\\
4   S\	\\
4   S\4S jjr\R                  \R                  \R                  4S\	\\
4   S\	\\
4   S\	\\
4   S\4S jjrS\S\4S jrS\S\4S jrS\S\4S jrS\S\4S jrS\4S jr Sr!U =r"$ )PhoneNumberListi_  r   r   c                 x   > [         TU ]  U5        SU0U l        SR                  " S0 U R                  D6U l        g)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'   PhoneNumberList.__init__a  s=     	! ;
 ;AASDNNS	r1   r   r   r#   r2   c                 .   [         R                  " UU[        R                  " U5      S.5      n[         R                  " SS05      nSUS'   SUS'   U R                  R                  SU R                  XES9n[        U R                  X`R                  S   S	9$ )
a  
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PhoneNumberr   r   r   r   r   r   r   r   r   )	r   r   r   r   r5   creater|   r   r+   r-   r   r   r#   r   r   r   s          r/   r   PhoneNumberList.createq  s      yy+'99+F
 ))^-PQR"E.--&&tyyt ' 
 #MM7}0M
 	
r1   c                 J  #    [         R                  " UU[        R                  " U5      S.5      n[         R                  " SS05      nSUS'   SUS'   U R                  R                  SU R                  XES9I Sh  vN n[        U R                  X`R                  S	   S
9$  N%7f)a!  
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   r   r   r   r   r   r   Nr   r   )	r   r   r   r   r5   create_asyncr|   r   r+   r   s          r/   r   PhoneNumberList.create_async  s       yy+'99+F
 ))^-PQR"E.22tyyt 3 
 
 #MM7}0M
 	
	
s   A9B#;B!<&B#limit	page_sizec                     U R                   R                  X5      nU R                  US   S9nU R                   R                  XCS   5      $ )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 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   )r5   read_limitspagestreamr-   r   r   limitsr   s        r/   r   PhoneNumberList.stream  sF    ( **5<yy6+#6y7}}##D/::r1   c                    #    U R                   R                  X5      nU R                  US   S9I Sh  vN nU R                   R                  XCS   5      $  N"7f)a  
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   )r5   r   
page_asyncstream_asyncr   s        r/   r   PhoneNumberList.stream_async  sR     ( **5<__vk/B_CC}}))$w@@ Ds   1AA#Ac                 4    [        U R                  UUS95      $ )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   PhoneNumberList.list  s(    & KK#  
 	
r1   c                 v   #    U R                  UUS9I Sh  vN  Vs/ s Sh  vN nUPM   N N

 sn$ s  snf 7f)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_asyncPhoneNumberList.list_async  sQ     * '+&7&7# '8 ' ! !
 
 !
 	
 
s0   9,940.
049049
page_tokenpage_numberc                     [         R                  " UUUS.5      n[         R                  " SS05      nSUS'   U R                  R                  SU R                  XES9n[        U R                  X`R                  5      $ )aC  
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   r5   r   r|   r   r+   r-   r   r   r   r   r   responses          r/   r   PhoneNumberList.page"  s{      yy'#%
 ))^-PQR.==%%dii & 
 t}}hGGr1   c                   #    [         R                  " UUUS.5      n[         R                  " SS05      nSUS'   U R                  R                  SU R                  XES9I Sh  vN n[        U R                  X`R                  5      $  N$7f)	aR  
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   r5   r   r|   r   r+   r   s          r/   r   PhoneNumberList.page_asyncC  s       yy'#%
 ))^-PQR.11dii 2 
 
 t}}hGG
s   A B	"B#%B	
target_urlc                     U R                   R                  R                  R                  SU5      n[	        U R                   X R
                  5      $ )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   )r5   domaintwiliorequestr   r+   r-   r   r   s      r/   get_pagePhoneNumberList.get_paged  s;     ==''..66ujIt}}hGGr1   c                    #    U R                   R                  R                  R                  SU5      I Sh  vN n[	        U R                   X R
                  5      $  N$7f)z
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)r5   r   r   request_asyncr   r+   r   s      r/   get_page_asyncPhoneNumberList.get_page_asyncp  sG      --44BB5*UUt}}hGG Vs   4AA%Ac                 F    [        U R                  U R                  S   US9$ z
Constructs a PhoneNumberContext

:param sid: The Twilio-provided string that uniquely identifies the PhoneNumber resource to update.
r   r%   r4   r5   r+   r-   r   s     r/   r(   PhoneNumberList.get|  %     "MMt~~m'D#
 	
r1   c                 F    [        U R                  U R                  S   US9$ r   r   r   s     r/   __call__PhoneNumberList.__call__  r   r1   c                     g)rU   z!<Twilio.Proxy.V1.PhoneNumberList>rz   r6   s    r/   rh   PhoneNumberList.__repr__  r   r1   r   )NN)#rj   rk   rl   rm   r   ro   r'   r   rr   r   rs   rq   r   r   r   r   intr	   r   r
   r   r   r   r   r   r   r   r   r   r4   r(   r   rh   rt   ru   rv   s   @r/   r   r   _  s   T Tc T$ #),,+1<<+1<<	#
3;#
 CK(#
 4<(	#

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

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