
    i?1i h                         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$                  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d 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d f
dZdefdZ xZS )DeviceInstanceaW  
    :ivar sid: Contains a 34 character string that uniquely identifies this Device resource.
    :ivar url: Contains an absolute URL for this Device resource.
    :ivar unique_name: Contains a unique and addressable name of this Device, assigned by the developer, up to 128 characters long.
    :ivar friendly_name: Contains a human readable descriptive text for this Device, up to 256 characters long
    :ivar fleet_sid: Specifies the unique string identifier of the Fleet that the given Device belongs to.
    :ivar enabled: Contains a boolean flag indicating whether the device is enabled or not, blocks device connectivity if set to false.
    :ivar account_sid: Specifies the unique string identifier of the Account responsible for this Device.
    :ivar identity: Contains an arbitrary string identifier representing a human user associated with this Device, assigned by the developer, up to 256 characters long.
    :ivar deployment_sid: Specifies the unique string identifier of the Deployment group that this Device is associated with.
    :ivar date_created: Specifies the date this Device was created, given in UTC ISO 8601 format.
    :ivar date_updated: Specifies the date this Device was last updated, given in UTC ISO 8601 format.
    :ivar date_authenticated: Specifies the date this Device was last authenticated, 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      | _	        |j                  d      | _
        |j                  d	      | _        t        j                  |j                  d
            | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _        ||xs | j                  d| _        d | _        y )Nr   urlunique_namefriendly_namer   enabledaccount_sididentitydeployment_siddate_createddate_updateddate_authenticatedr   r   )super__init__getr   r   r   r   r   r   r   r   r   r   iso8601_datetimer    r!   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/device.pyr%   zDeviceInstance.__init__+   s,    	!")++e"4")++e"4*1++m*D,3KK,H(/K(@'.{{9'=*1++m*D'.{{:'>-4[[9I-J0;0L0LKK'1
 1<0L0LKK'1
 7B6R6RKK,-7

 #?$((
 26    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: DeviceContext for this DeviceInstance
        r   r   r#   )r)   DeviceContext_versionr(   r*   s    r,   _proxyzDeviceInstance._proxyM   sE     == )..5NN5)DM
 }}r-   c                 6    | j                   j                         S )i
        Deletes the DeviceInstance


        :returns: True if delete succeeds, False otherwise
        )r3   deleter2   s    r,   r6   zDeviceInstance.delete]   s     {{!!##r-   c                 R   K   | j                   j                          d{   S 7 w)
        Asynchronous coroutine that deletes the DeviceInstance


        :returns: True if delete succeeds, False otherwise
        N)r3   delete_asyncr2   s    r,   r9   zDeviceInstance.delete_asyncf   s!      [[--////   '%'c                 6    | j                   j                         S )Y
        Fetch the DeviceInstance


        :returns: The fetched DeviceInstance
        )r3   fetchr2   s    r,   r=   zDeviceInstance.fetcho   s     {{  ""r-   c                 R   K   | j                   j                          d{   S 7 w)s
        Asynchronous coroutine to fetch the DeviceInstance


        :returns: The fetched DeviceInstance
        N)r3   fetch_asyncr2   s    r,   r@   zDeviceInstance.fetch_asyncx   s!      [[,,....r:   r   r   r   r   c                 @    | j                   j                  ||||      S )  
        Update the DeviceInstance

        :param friendly_name: Provides a human readable descriptive text to be assigned to this Device, up to 256 characters long.
        :param identity: Provides an arbitrary string identifier representing a human user to be associated with this Device, up to 256 characters long.
        :param deployment_sid: Specifies the unique string identifier of the Deployment group that this Device is going to be associated with.
        :param enabled:

        :returns: The updated DeviceInstance
        r   r   r   r   )r3   updater*   r   r   r   r   s        r,   rD   zDeviceInstance.update   s,    " {{!!')	 " 
 	
r-   c                 \   K   | j                   j                  ||||       d{   S 7 w)7  
        Asynchronous coroutine to update the DeviceInstance

        :param friendly_name: Provides a human readable descriptive text to be assigned to this Device, up to 256 characters long.
        :param identity: Provides an arbitrary string identifier representing a human user to be associated with this Device, up to 256 characters long.
        :param deployment_sid: Specifies the unique string identifier of the Deployment group that this Device is going to be associated with.
        :param enabled:

        :returns: The updated DeviceInstance
        rC   N)r3   update_asyncrE   s        r,   rH   zDeviceInstance.update_async   s:     " [[--')	 . 
 
 	
 
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*DeviceInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z2<Twilio.Preview.DeployedDevices.DeviceInstance {}>joinr(   itemsrO   r*   contexts     r,   __repr__zDeviceInstance.__repr__   s6     ((SDNN<P<P<RSSCJJ7SSr-   )N)r.   r0   )r.   r   )__name__
__module____qualname____doc__r   r   strr   r   r%   propertyr3   boolr6   r9   r=   r@   r   unsetr   objectrD   rH   r\   __classcell__r+   s   @r,   r   r      sw   ( " 6 6 c3h 6 	 6
 c] 6D  $ $0D 0#/ -3LL'-||-3\\'-||
S&[)
 V$
 c6k*	

 tV|$
 

4 -3LL'-||-3\\'-||
S&[)
 V$
 c6k*	

 tV|$
 

0T# T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                  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fdZ xZS )r0   r   r   r   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)z
        Initialize the DeviceContext

        :param version: Version that contains the resource
        :param fleet_sid:
        :param sid: Provides a 34 character string that uniquely identifies the requested Device resource.
        r#   z!/Fleets/{fleet_sid}/Devices/{sid}N r$   r%   r(   rO   _uri)r*   r   r   r   r+   s       r,   r%   zDeviceContext.__init__   sA     	! #
 ?7>>PP	r-   r.   c                 P    | j                   j                  d| j                        S )r5   DELETEmethoduri)r1   r6   rl   r2   s    r,   r6   zDeviceContext.delete   s*     }}##		 $ 
 	
r-   c                 l   K   | j                   j                  d| j                         d{   S 7 w)r8   rn   ro   N)r1   r9   rl   r2   s    r,   r9   zDeviceContext.delete_async   s8      ]]//		 0 
 
 	
 
s   +424c                     | j                   j                  d| j                        }t        | j                   || j                  d   | j                  d         S )r<   GETro   r   r   r#   )r1   r=   rl   r   r(   r*   r   s     r,   r=   zDeviceContext.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?   rt   ro   Nr   r   r#   )r1   r@   rl   r   r(   ru   s     r,   r@   zDeviceContext.fetch_async   sf      11		 2 
 

 MMnn[1u%	
 	

s   +A'A%8A'r   r   r   r   c                     t        j                  ||||d      }| j                  j                  d| j                  |      }t        | j                  || j                  d   | j                  d         S )rB   FriendlyNameIdentityDeploymentSidEnabledPOSTrp   rq   datar   r   r#   )r   ofr1   rD   rl   r   r(   r*   r   r   r   r   r   r   s          r,   rD   zDeviceContext.update  s|    " 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)rG   rx   r}   r~   Nr   r   r#   )r   r   r1   rH   rl   r   r(   r   s          r,   rH   zDeviceContext.update_async4  s     " yy -$!/"	
 22		 3 
 
 MMnn[1u%	
 	

s   ABB 	8Bc                     dj                  d | j                  j                         D              }dj                  |      S )rJ   rK   c              3   F   K   | ]  \  }}d j                  ||        ywrM   rN   rP   s      r,   rT   z)DeviceContext.__repr__.<locals>.<genexpr>a  rU   rV   z1<Twilio.Preview.DeployedDevices.DeviceContext {}>rW   rZ   s     r,   r\   zDeviceContext.__repr__[  s6     ((SDNN<P<P<RSSBII'RRr-   )r]   r^   r_   r   ra   r%   rc   r6   r9   r   r=   r@   r   rd   r   re   rD   rH   r\   rf   rg   s   @r,   r0   r0      sO   Q QC Qc Q"

 



D 


~ 
(
> 
, -3LL'-||-3\\'-||%
S&[)%
 V$%
 c6k*	%

 tV|$%
 
%
R -3LL'-||-3\\'-||%
S&[)%
 V$%
 c6k*	%

 tV|$%
 
%
NS# Sr-   r0   c                   2    e Zd Zdeeef   defdZdefdZy)
DevicePager   r.   c                 L    t        | j                  || j                  d         S )zl
        Build an instance of DeviceInstance

        :param payload: Payload response from the API
        r   r   )r   r1   r(   ru   s     r,   get_instancezDevicePage.get_instancef  s%     MM7dnn[.I
 	
r-   c                      y)rJ   z+<Twilio.Preview.DeployedDevices.DevicePage>rj   r2   s    r,   r\   zDevicePage.__repr__p       =r-   N)	r]   r^   r_   r   ra   r   r   r   r\   rj   r-   r,   r   r   e  s)    
DcN 
~ 
=# =r-   r   c                   t    e Zd Zdedef fdZej                  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e
e	f   d	efd
Zej                  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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 )
DeviceListr   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the DeviceList

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

        r   z/Fleets/{fleet_sid}/DevicesNrj   rk   )r*   r   r   r+   s      r,   r%   zDeviceList.__init__z  s@     	! 
 9188J4>>J	r-   r   r   r   r   r   r.   c                     t        j                  |||||d      }| j                  j                  d| j                  |      }t        | j                  || j                  d         S )a  
        Create the DeviceInstance

        :param unique_name: Provides a unique and addressable name to be assigned to this Device, to be used in addition to SID, up to 128 characters long.
        :param friendly_name: Provides a human readable descriptive text to be assigned to this Device, up to 256 characters long.
        :param identity: Provides an arbitrary string identifier representing a human user to be associated with this Device, up to 256 characters long.
        :param deployment_sid: Specifies the unique string identifier of the Deployment group that this Device is going to be associated with.
        :param enabled:

        :returns: The created DeviceInstance
        
UniqueNamery   rz   r{   r|   r}   r~   r   r   )r   r   r1   createrl   r   r(   r*   r   r   r   r   r   r   r   s           r,   r   zDeviceList.create  sq    & yy) -$!/"
 --&&		 ' 
 MM7dnn[.I
 	
r-   c                    K   t        j                  |||||d      }| j                  j                  d| j                  |       d{   }t        | j                  || j                  d         S 7 )w)a  
        Asynchronously create the DeviceInstance

        :param unique_name: Provides a unique and addressable name to be assigned to this Device, to be used in addition to SID, up to 128 characters long.
        :param friendly_name: Provides a human readable descriptive text to be assigned to this Device, up to 256 characters long.
        :param identity: Provides an arbitrary string identifier representing a human user to be associated with this Device, up to 256 characters long.
        :param deployment_sid: Specifies the unique string identifier of the Deployment group that this Device is going to be associated with.
        :param enabled:

        :returns: The created DeviceInstance
        r   r}   r~   Nr   r   )r   r   r1   create_asyncrl   r   r(   r   s           r,   r   zDeviceList.create_async  s     & yy) -$!/"
 22		 3 
 
 MM7dnn[.I
 	

s   AA5	A3
*A5Nlimit	page_sizec                     | j                   j                  ||      }| j                  ||d         }| j                   j                  ||d         S )a  
        Streams DeviceInstance 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 deployment_sid: Filters the resulting list of Devices by a unique string identifier of the Deployment they are associated with.
        :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   )r1   read_limitspagestreamr*   r   r   r   limitsr   s         r,   r   zDeviceList.stream  sL    , **5)<yy&BUyV}}##D&/::r-   c                    K   | j                   j                  ||      }| j                  ||d          d{   }| j                   j                  ||d         S 7 #w)a  
        Asynchronously streams DeviceInstance 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 deployment_sid: Filters the resulting list of Devices by a unique string identifier of the Deployment they are associated with.
        :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   )r1   r   
page_asyncstream_asyncr   s         r,   r   zDeviceList.stream_async  sb     , **5)<__)VK5H % 
 
 }}))$w@@	
s   6AA$Ac                 <    t        | j                  |||            S )a  
        Lists DeviceInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str deployment_sid: Filters the resulting list of Devices by a unique string identifier of the Deployment they are associated with.
        :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DeviceList.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 DeviceInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str deployment_sid: Filters the resulting list of Devices by a unique string identifier of the Deployment they are associated with.
        :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DeviceList.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 DeviceInstance records from the API.
        Request is executed immediately

        :param deployment_sid: Filters the resulting list of Devices by a unique string identifier of the Deployment they are associated with.
        :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 DeviceInstance
        r{   	PageTokenr   PageSizert   rp   rq   params)r   r   r1   r   rl   r   r(   r*   r   r   r   r   r   responses          r,   r   zDeviceList.pageK  s[    $ yy!/'#%	
 ==%%U		$%O$--4>>BBr-   c                    K   t        j                  ||||d      }| j                  j                  d| j                  |       d{   }t        | j                  || j                        S 7 %w)a  
        Asynchronously retrieve a single page of DeviceInstance records from the API.
        Request is executed immediately

        :param deployment_sid: Filters the resulting list of Devices by a unique string identifier of the Deployment they are associated with.
        :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 DeviceInstance
        r   rt   r   N)r   r   r1   r   rl   r   r(   r   s          r,   r   zDeviceList.page_asynci  sp     $ yy!/'#%	
 11dii 2 
 
 $--4>>BB
s   AA0A.	&A0
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )z
        Retrieve a specific page of DeviceInstance records from the API.
        Request is executed immediately

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

        :returns: Page of DeviceInstance
        rt   )r1   domaintwiliorequestr   r(   r*   r   r   s      r,   get_pagezDeviceList.get_page  s=     ==''..66ujI$--4>>BBr-   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)a   
        Asynchronously retrieve a specific page of DeviceInstance records from the API.
        Request is executed immediately

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

        :returns: Page of DeviceInstance
        rt   N)r1   r   r   request_asyncr   r(   r   s      r,   get_page_asynczDeviceList.get_page_async  sJ      --44BB5*UU$--4>>BB Vs   4AA&Ar   c                 L    t        | j                  | j                  d   |      S z
        Constructs a DeviceContext

        :param sid: Provides a 34 character string that uniquely identifies the requested Device resource.
        r   r#   r0   r1   r(   r*   r   s     r,   r&   zDeviceList.get  %     MMT^^K%@c
 	
r-   c                 L    t        | j                  | j                  d   |      S r   r   r   s     r,   __call__zDeviceList.__call__  r   r-   c                      y)rJ   z+<Twilio.Preview.DeployedDevices.DeviceList>rj   r2   s    r,   r\   zDeviceList.__repr__  r   r-   )!r]   r^   r_   r   ra   r%   r   rd   r   re   rc   r   r   r   r   intr	   r   r
   r   r   r   r   r   r   r   r   r   r0   r&   r   r\   rf   rg   s   @r,   r   r   y  s   K KC K$ +1,,,2LL'-||-3\\'-||%
3;'%
 S&[)%
 V$	%

 c6k*%
 tV|$%
 
%
R +1,,,2LL'-||-3\\'-||%
3;'%
 S&[)%
 V$	%

 c6k*%
 tV|$%
 
%
R .4\\##'	;c6k*; }; C=	;
 
.	!;: .4\\##'	Ac6k*A }A C=	A
 
~	&A> .4\\##'	
c6k*
 }
 C=	

 
n	
> .4\\##'	
c6k*
 }
 C=	

 
n	
@ .4\\)/*0,,(.Cc6k*C #v+&C 3;'	C
 f%C 
C@ .4\\)/*0,,(.Cc6k*C #v+&C 3;'	C
 f%C 
C@
C3 
C: 
C
Cs 
Cz 
C
s 
} 

C 
M 
=# =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   r0   r   r   rj   r-   r,   <module>r      sg     L L L + 8 : 2 ' !^T% ^TBgSO gST= =(B= B=r-   