
    i?1iX                         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 - Preview
    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$                  ej$                  fdeeef   deeef   dd fdZej$                  ej$                  fdeeef   deeef   dd fdZdefdZ xZS )KeyInstancea  
    :ivar sid: Contains a 34 character string that uniquely identifies this Key credential resource.
    :ivar url: Contains an absolute URL for this Key credential resource.
    :ivar friendly_name: Contains a human readable descriptive text for this Key credential, up to 256 characters long.
    :ivar fleet_sid: Specifies the unique string identifier of the Fleet that the given Key credential belongs to.
    :ivar account_sid: Specifies the unique string identifier of the Account responsible for this Key credential.
    :ivar device_sid: Specifies the unique string identifier of a Device authenticated with this Key credential.
    :ivar secret: Contains the automatically generated secret belonging to this Key credential, used to authenticate the Device.
    :ivar date_created: Specifies the date this Key credential was created, given in UTC ISO 8601 format.
    :ivar date_updated: Specifies the date this Key credential was last updated, given in UTC ISO 8601 format.
    versionpayload	fleet_sidsidc                 :   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _	        t        j                  |j                  d            | _        t        j                  |j                  d	            | _        ||xs | j                  d
| _        d | _        y )Nr   urlfriendly_namer   account_sid
device_sidsecretdate_createddate_updatedr   r   )super__init__getr   r   r   r   r   r   r   r   iso8601_datetimer   r   	_solution_context)selfr   r   r   r   	__class__s        x/home/www/therecruiter.miabetepe.com/venv/lib/python3.12/site-packages/twilio/rest/preview/deployed_devices/fleet/key.pyr"   zKeyInstance.__init__(   s     	!")++e"4")++e"4,3KK,H(/K(@*1++m*D)0\)B%,[[%:0;0L0LKK'1
 1<0L0LKK'1

 #?$((
 /3    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: KeyContext for this KeyInstance
        r   r   r    )r&   
KeyContext_versionr%   r'   s    r)   _proxyzKeyInstance._proxyE   sE     == &..5NN5)DM
 }}r*   c                 6    | j                   j                         S )f
        Deletes the KeyInstance


        :returns: True if delete succeeds, False otherwise
        )r0   deleter/   s    r)   r3   zKeyInstance.deleteU   s     {{!!##r*   c                 R   K   | j                   j                          d{   S 7 w)
        Asynchronous coroutine that deletes the KeyInstance


        :returns: True if delete succeeds, False otherwise
        N)r0   delete_asyncr/   s    r)   r6   zKeyInstance.delete_async^   s!      [[--////   '%'c                 6    | j                   j                         S )S
        Fetch the KeyInstance


        :returns: The fetched KeyInstance
        )r0   fetchr/   s    r)   r:   zKeyInstance.fetchg   s     {{  ""r*   c                 R   K   | j                   j                          d{   S 7 w)m
        Asynchronous coroutine to fetch the KeyInstance


        :returns: The fetched KeyInstance
        N)r0   fetch_asyncr/   s    r)   r=   zKeyInstance.fetch_asyncp   s!      [[,,....r7   r   r   c                 <    | j                   j                  ||      S )Z  
        Update the KeyInstance

        :param friendly_name: Provides a human readable descriptive text for this Key credential, up to 256 characters long.
        :param device_sid: Provides the unique string identifier of an existing Device to become authenticated with this Key credential.

        :returns: The updated KeyInstance
        r   r   )r0   updater'   r   r   s      r)   rA   zKeyInstance.updatey   s&     {{!!'! " 
 	
r*   c                 X   K   | j                   j                  ||       d{   S 7 w)t  
        Asynchronous coroutine to update the KeyInstance

        :param friendly_name: Provides a human readable descriptive text for this Key credential, up to 256 characters long.
        :param device_sid: Provides the unique string identifier of an existing Device to become authenticated with this Key credential.

        :returns: The updated KeyInstance
        r@   N)r0   update_asyncrB   s      r)   rE   zKeyInstance.update_async   s4      [[--'! . 
 
 	
 
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'KeyInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z/<Twilio.Preview.DeployedDevices.KeyInstance {}>joinr%   itemsrL   r'   contexts     r)   __repr__zKeyInstance.__repr__   s6     ((SDNN<P<P<RSS@GGPPr*   )N)r+   r-   )r+   r   )__name__
__module____qualname____doc__r   r   strr   r   r"   propertyr0   boolr3   r6   r:   r=   r   unsetr   objectrA   rE   rY   __classcell__r(   s   @r)   r   r      s   
" "33 c3h3 	3
 c]3:  $ $0D 0#/ -3LL)/
S&[)
 #v+&
 
	
( -3LL)/
S&[)
 #v+&
 
	
$Q# Q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                  ej                  fd
eeef   deeef   de	fdZej                  ej                  fd
eeef   deeef   de	fdZdefdZ xZS )r-   r   r   r   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)z
        Initialize the KeyContext

        :param version: Version that contains the resource
        :param fleet_sid:
        :param sid: Provides a 34 character string that uniquely identifies the requested Key credential resource.
        r    z/Fleets/{fleet_sid}/Keys/{sid}N r!   r"   r%   rL   _uri)r'   r   r   r   r(   s       r)   r"   zKeyContext.__init__   sA     	! #
 <4;;MdnnM	r*   r+   c                 P    | j                   j                  d| j                        S )r2   DELETEmethoduri)r.   r3   ri   r/   s    r)   r3   zKeyContext.delete   s*     }}##		 $ 
 	
r*   c                 l   K   | j                   j                  d| j                         d{   S 7 w)r5   rk   rl   N)r.   r6   ri   r/   s    r)   r6   zKeyContext.delete_async   s8      ]]//		 0 
 
 	
 
s   +424c                     | j                   j                  d| j                        }t        | j                   || j                  d   | j                  d         S )r9   GETrl   r   r   r    )r.   r:   ri   r   r%   r'   r   s     r)   r:   zKeyContext.fetch   sX     --%%		 & 

 MMnn[1u%	
 	
r*   c                    K   | j                   j                  d| j                         d{   }t        | j                   || j                  d   | j                  d         S 7 7w)r<   rq   rl   Nr   r   r    )r.   r=   ri   r   r%   rr   s     r)   r=   zKeyContext.fetch_async   sf      11		 2 
 

 MMnn[1u%	
 	

s   +A'A%8A'r   r   c                     t        j                  ||d      }| j                  j                  d| j                  |      }t        | j                  || j                  d   | j                  d         S )r?   FriendlyName	DeviceSidPOSTrm   rn   datar   r   r    )r   ofr.   rA   ri   r   r%   r'   r   r   rz   r   s        r)   rA   zKeyContext.update   sv     yy -'
 --&&		 ' 
 MMnn[1u%	
 	
r*   c                   K   t        j                  ||d      }| j                  j                  d| j                  |       d{   }t        | j                  || j                  d   | j                  d         S 7 7w)rD   ru   rx   ry   Nr   r   r    )r   r{   r.   rE   ri   r   r%   r|   s        r)   rE   zKeyContext.update_async  s      yy -'
 22		 3 
 
 MMnn[1u%	
 	

s   AB A>8B c                     dj                  d | j                  j                         D              }dj                  |      S )rG   rH   c              3   F   K   | ]  \  }}d j                  ||        ywrJ   rK   rM   s      r)   rQ   z&KeyContext.__repr__.<locals>.<genexpr>A  rR   rS   z.<Twilio.Preview.DeployedDevices.KeyContext {}>rT   rW   s     r)   rY   zKeyContext.__repr__;  s6     ((SDNN<P<P<RSS?FFwOOr*   )rZ   r[   r\   r   r^   r"   r`   r3   r6   r   r:   r=   r   ra   r   rb   rA   rE   rY   rc   rd   s   @r)   r-   r-      s    N NC Nc N"

 



D 


{ 
(
; 
, -3LL)/
S&[)
 #v+&
 
	
F -3LL)/
S&[)
 #v+&
 
	
BP# Pr*   r-   c                   2    e Zd Zdeeef   defdZdefdZy)KeyPager   r+   c                 L    t        | j                  || j                  d         S )zi
        Build an instance of KeyInstance

        :param payload: Payload response from the API
        r   r   )r   r.   r%   rr   s     r)   get_instancezKeyPage.get_instanceF  s%     MM7dnn[.I
 	
r*   c                      y)rG   z(<Twilio.Preview.DeployedDevices.KeyPage>rg   r/   s    r)   rY   zKeyPage.__repr__P       :r*   N)	rZ   r[   r\   r   r^   r   r   r   rY   rg   r*   r)   r   r   E  s)    
DcN 
{ 
:# :r*   r   c                       e Zd Zdedef fdZej                  ej                  fdeee	f   deee	f   de
fdZej                  ej                  fdeee	f   deee	f   de
fdZej                  d	d	fdeee	f   d
ee   dee   dee
   fdZej                  d	d	fdeee	f   d
ee   dee   dee
   fdZej                  d	d	fdeee	f   d
ee   dee   dee
   fdZej                  d	d	fdeee	f   d
ee   dee   dee
   fdZej                  ej                  ej                  ej                  fdeee	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                  ej                  fdeee	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 )KeyListr   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the KeyList

        :param version: Version that contains the resource
        :param fleet_sid:

        r   z/Fleets/{fleet_sid}/KeysNrg   rh   )r'   r   r   r(   s      r)   r"   zKeyList.__init__Z  s@     	! 
 6.55GG	r*   r   r   r+   c                     t        j                  ||d      }| j                  j                  d| j                  |      }t        | j                  || j                  d         S )aZ  
        Create the KeyInstance

        :param friendly_name: Provides a human readable descriptive text for this Key credential, up to 256 characters long.
        :param device_sid: Provides the unique string identifier of an existing Device to become authenticated with this Key credential.

        :returns: The created KeyInstance
        ru   rx   ry   r   r   )r   r{   r.   createri   r   r%   r|   s        r)   r   zKeyList.createj  sh     yy -'
 --&&		 ' 
 MM7dnn[.I
 	
r*   c                    K   t        j                  ||d      }| j                  j                  d| j                  |       d{   }t        | j                  || j                  d         S 7 )w)ai  
        Asynchronously create the KeyInstance

        :param friendly_name: Provides a human readable descriptive text for this Key credential, up to 256 characters long.
        :param device_sid: Provides the unique string identifier of an existing Device to become authenticated with this Key credential.

        :returns: The created KeyInstance
        ru   rx   ry   Nr   r   )r   r{   r.   create_asyncri   r   r%   r|   s        r)   r   zKeyList.create_async  sv      yy -'
 22		 3 
 
 MM7dnn[.I
 	

s   AA2A0*A2Nlimit	page_sizec                     | j                   j                  ||      }| j                  ||d         }| j                   j                  ||d         S )a  
        Streams KeyInstance 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 str device_sid: Filters the resulting list of Keys by a unique string identifier of an authenticated Device.
        :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   r   )r.   read_limitspagestreamr'   r   r   r   limitsr   s         r)   r   zKeyList.stream  sL    , **5)<yyJ&:MyN}}##D&/::r*   c                    K   | j                   j                  ||      }| j                  ||d          d{   }| j                   j                  ||d         S 7 #w)a  
        Asynchronously streams KeyInstance 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 str device_sid: Filters the resulting list of Keys by a unique string identifier of an authenticated Device.
        :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   )r.   r   
page_asyncstream_asyncr   s         r)   r   zKeyList.stream_async  sb     , **5)<__!VK-@ % 
 
 }}))$w@@	
s   6AA$Ac                 <    t        | j                  |||            S )ar  
        Lists KeyInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str device_sid: Filters the resulting list of Keys by a unique string identifier of an authenticated Device.
        :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   r   )listr   )r'   r   r   r   s       r)   r   zKeyList.list  s+    * KK%#  
 	
r*   c                 |   K   | j                  |||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)a  
        Asynchronously lists KeyInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str device_sid: Filters the resulting list of Keys by a unique string identifier of an authenticated Device.
        :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   r   records        r)   
list_asynczKeyList.list_async  sW     . '+&7&7%# '8 ' !
 
 !
 
 	
 
s0   </<731
37<37<
page_tokenpage_numberc                     t        j                  ||||d      }| j                  j                  d| j                  |      }t        | j                  || j                        S )a  
        Retrieve a single page of KeyInstance records from the API.
        Request is executed immediately

        :param device_sid: Filters the resulting list of Keys by a unique string identifier of an authenticated Device.
        :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 KeyInstance
        rw   	PageTokenr   PageSizerq   rm   rn   params)r   r{   r.   r   ri   r   r%   r'   r   r   r   r   rz   responses          r)   r   zKeyList.page  s[    $ yy''#%	
 ==%%U		$%Ot}}h??r*   c                    K   t        j                  ||||d      }| j                  j                  d| j                  |       d{   }t        | j                  || j                        S 7 %w)a  
        Asynchronously retrieve a single page of KeyInstance records from the API.
        Request is executed immediately

        :param device_sid: Filters the resulting list of Keys by a unique string identifier of an authenticated Device.
        :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 KeyInstance
        r   rq   r   N)r   r{   r.   r   ri   r   r%   r   s          r)   r   zKeyList.page_async7  sp     $ yy''#%	
 11dii 2 
 
 t}}h??
s   AA0A.	&A0
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )z
        Retrieve a specific page of KeyInstance records from the API.
        Request is executed immediately

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

        :returns: Page of KeyInstance
        rq   )r.   domaintwiliorequestr   r%   r'   r   r   s      r)   get_pagezKeyList.get_pageW  s=     ==''..66ujIt}}h??r*   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)z
        Asynchronously retrieve a specific page of KeyInstance records from the API.
        Request is executed immediately

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

        :returns: Page of KeyInstance
        rq   N)r.   r   r   request_asyncr   r%   r   s      r)   get_page_asynczKeyList.get_page_asyncc  sJ      --44BB5*UUt}}h?? Vs   4AA&Ar   c                 L    t        | j                  | j                  d   |      S z
        Constructs a KeyContext

        :param sid: Provides a 34 character string that uniquely identifies the requested Key credential resource.
        r   r    r-   r.   r%   r'   r   s     r)   r#   zKeyList.geto  !     $--4>>+3NTWXXr*   c                 L    t        | j                  | j                  d   |      S r   r   r   s     r)   __call__zKeyList.__call__w  r   r*   c                      y)rG   z(<Twilio.Preview.DeployedDevices.KeyList>rg   r/   s    r)   rY   zKeyList.__repr__  r   r*   ) rZ   r[   r\   r   r^   r"   r   ra   r   rb   r   r   r   r   intr	   r   r
   r   r   r   r   r   r   r   r   r   r-   r#   r   rY   rc   rd   s   @r)   r   r   Y  sG   H HC H$ -3LL)/
S&[)
 #v+&
 
	
@ -3LL)/
S&[)
 #v+&
 
	
@ *0##'	;#v+&; }; C=	;
 
+	;: *0##'	A#v+&A }A C=	A
 
{	#A> *0##'	
#v+&
 }
 C=	

 
k	
> *0##'	
#v+&
 }
 C=	

 
k	
@ *0)/*0,,(.@#v+&@ #v+&@ 3;'	@
 f%@ 
@@ *0)/*0,,(.@#v+&@ #v+&@ 3;'	@
 f%@ 
@@
@3 
@7 
@
@s 
@w 
@Ys Yz YYC YJ Y:# :r*   r   N)r]   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   r-   r   r   rg   r*   r)   <module>r      sg     L L L + 8 : 2 ' !JQ" JQZ[P [P|:d :(l:l l:r*   