
    i?1i6^                         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 )CertificateInstancea  
    :ivar sid: Contains a 34 character string that uniquely identifies this Certificate credential resource.
    :ivar url: Contains an absolute URL for this Certificate credential resource.
    :ivar friendly_name: Contains a human readable descriptive text for this Certificate credential, up to 256 characters long.
    :ivar fleet_sid: Specifies the unique string identifier of the Fleet that the given Certificate credential belongs to.
    :ivar account_sid: Specifies the unique string identifier of the Account responsible for this Certificate credential.
    :ivar device_sid: Specifies the unique string identifier of a Device authenticated with this Certificate credential.
    :ivar thumbprint: Contains a unique hash of the payload of this Certificate credential, used to authenticate the Device.
    :ivar date_created: Specifies the date this Certificate credential was created, given in UTC ISO 8601 format.
    :ivar date_updated: Specifies the date this Certificate 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
thumbprint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        /home/www/therecruiter.miabetepe.com/venv/lib/python3.12/site-packages/twilio/rest/preview/deployed_devices/fleet/certificate.pyr"   zCertificateInstance.__init__(   s     	!")++e"4")++e"4,3KK,H(/K(@*1++m*D)0\)B)0\)B0;0L0LKK'1
 1<0L0LKK'1

 #?$((
 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: CertificateContext for this CertificateInstance
        r   r   r    )r&   CertificateContext_versionr%   r'   s    r)   _proxyzCertificateInstance._proxyE   sE     == ...5NN5)DM
 }}r*   c                 6    | j                   j                         S )n
        Deletes the CertificateInstance


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


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


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


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

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

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

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

        :returns: The updated CertificateInstance
        r@   N)r0   update_asyncrB   s      r)   rE   z CertificateInstance.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/CertificateInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z7<Twilio.Preview.DeployedDevices.CertificateInstance {}>joinr%   itemsrL   r'   contexts     r)   __repr__zCertificateInstance.__repr__   s7     ((SDNN<P<P<RSSHOOPWXXr*   )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   
" ";; c3h; 	;
 c];:  $ $0D 0#/ -3LL)/
S&[)
 #v+&
 
	
( -3LL)/
S&[)
 #v+&
 
	
$Y# Y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)a  
        Initialize the CertificateContext

        :param version: Version that contains the resource
        :param fleet_sid:
        :param sid: Provides a 34 character string that uniquely identifies the requested Certificate credential resource.
        r    z&/Fleets/{fleet_sid}/Certificates/{sid}N r!   r"   r%   rL   _uri)r'   r   r   r   r(   s       r)   r"   zCertificateContext.__init__   sB     	! #
 D<CCUdnnU	r*   r+   c                 P    | j                   j                  d| j                        S )r2   DELETEmethoduri)r.   r3   ri   r/   s    r)   r3   zCertificateContext.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CertificateContext.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CertificateContext.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CertificateContext.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CertificateContext.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CertificateContext.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.CertificateContext.__repr__.<locals>.<genexpr>A  rR   rS   z6<Twilio.Preview.DeployedDevices.CertificateContext {}>rT   rW   s     r)   rY   zCertificateContext.__repr__;  s6     ((SDNN<P<P<RSSGNNwWWr*   )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    V VC Vc V"

 



D 


* 
(
#6 
, -3LL)/
S&[)
 #v+&
 
	
F -3LL)/
S&[)
 #v+&
 
	
BX# Xr*   r-   c                   2    e Zd Zdeeef   defdZdefdZy)CertificatePager   r+   c                 L    t        | j                  || j                  d         S )zq
        Build an instance of CertificateInstance

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

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

        r   z /Fleets/{fleet_sid}/CertificatesNrg   rh   )r'   r   r   r(   s      r)   r"   zCertificateList.__init__Z  s@     	! 
 >6==OO	r*   certificate_datar   r   r+   c                     t        j                  |||d      }| j                  j                  d| j                  |      }t        | j                  || j                  d         S )a  
        Create the CertificateInstance

        :param certificate_data: Provides a URL encoded representation of the public certificate in PEM format.
        :param friendly_name: Provides a human readable descriptive text for this Certificate credential, up to 256 characters long.
        :param device_sid: Provides the unique string identifier of an existing Device to become authenticated with this Certificate credential.

        :returns: The created CertificateInstance
        CertificateDatarv   rw   rx   ry   r   r   )r   r{   r.   createri   r   r%   r'   r   r   r   rz   r   s         r)   r   zCertificateList.createj  sk     yy#3 -'
 --&&		 ' 
 #MM7dnn[.I
 	
r*   c                    K   t        j                  |||d      }| j                  j                  d| j                  |       d{   }t        | j                  || j                  d         S 7 )w)a  
        Asynchronously create the CertificateInstance

        :param certificate_data: Provides a URL encoded representation of the public certificate in PEM format.
        :param friendly_name: Provides a human readable descriptive text for this Certificate credential, up to 256 characters long.
        :param device_sid: Provides the unique string identifier of an existing Device to become authenticated with this Certificate credential.

        :returns: The created CertificateInstance
        r   rx   ry   Nr   r   )r   r{   r.   create_asyncri   r   r%   r   s         r)   r   zCertificateList.create_async  sy      yy#3 -'
 22		 3 
 
 #MM7dnn[.I
 	

s   AA3A1*A3Nlimit	page_sizec                     | j                   j                  ||      }| j                  ||d         }| j                   j                  ||d         S )a  
        Streams CertificateInstance 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 Certificates 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CertificateList.stream  sL    , **5)<yyJ&:MyN}}##D&/::r*   c                    K   | j                   j                  ||      }| j                  ||d          d{   }| j                   j                  ||d         S 7 #w)a  
        Asynchronously streams CertificateInstance 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 Certificates 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CertificateList.stream_async  sb     , **5)<__!VK-@ % 
 
 }}))$w@@	
s   6AA$Ac                 <    t        | j                  |||            S )a  
        Lists CertificateInstance 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 Certificates 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CertificateList.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 CertificateInstance 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 Certificates 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CertificateList.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 CertificateInstance records from the API.
        Request is executed immediately

        :param device_sid: Filters the resulting list of Certificates 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 CertificateInstance
        rw   	PageTokenr   PageSizerq   rm   rn   params)r   r{   r.   r   ri   r   r%   r'   r   r   r   r   rz   responses          r)   r   zCertificateList.page  s[    $ 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 CertificateInstance records from the API.
        Request is executed immediately

        :param device_sid: Filters the resulting list of Certificates 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 CertificateInstance
        r   rq   r   N)r   r{   r.   r   ri   r   r%   r   s          r)   r   zCertificateList.page_async=  sp     $ yy''#%	
 11dii 2 
 
 t}}hGG
s   AA0A.	&A0
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )z
        Retrieve a specific page of CertificateInstance records from the API.
        Request is executed immediately

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

        :returns: Page of CertificateInstance
        rq   )r.   domaintwiliorequestr   r%   r'   r   r   s      r)   get_pagezCertificateList.get_page]  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 CertificateInstance records from the API.
        Request is executed immediately

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

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

        :param sid: Provides a 34 character string that uniquely identifies the requested Certificate credential resource.
        r   r    r-   r.   r%   r'   r   s     r)   r#   zCertificateList.getu  %     "MMT^^K%@c
 	
r*   c                 L    t        | j                  | j                  d   |      S r   r   r   s     r)   __call__zCertificateList.__call__  r   r*   c                      y)rG   z0<Twilio.Preview.DeployedDevices.CertificateList>rg   r/   s    r)   rY   zCertificateList.__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  s]   P PC P& -3LL)/	

 S&[)
 #v+&	

 

H -3LL)/	

 S&[)
 #v+&	

 

F *0##'	;#v+&; }; C=	;
 
%	&;: *0##'	A#v+&A }A C=	A
 
*	+A> *0##'	
#v+&
 }
 C=	

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

 
!	"
@ *0)/*0,,(.H#v+&H #v+&H 3;'	H
 f%H 
H@ *0)/*0,,(.H#v+&H #v+&H 3;'	H
 f%H 
H@
H3 
H? 
H
Hs 
H 
H
s 
1 

C 
$6 
B# B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      sk     L L L + 8 : 2 ' !JY* JYZ[X [X|Bd B(vBl vBr*   