
    i?1iV                         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 )DeploymentInstancea`  
    :ivar sid: Contains a 34 character string that uniquely identifies this Deployment resource.
    :ivar url: Contains an absolute URL for this Deployment resource.
    :ivar friendly_name: Contains a human readable descriptive text for this Deployment, up to 64 characters long
    :ivar fleet_sid: Specifies the unique string identifier of the Fleet that the given Deployment belongs to.
    :ivar account_sid: Specifies the unique string identifier of the Account responsible for this Deployment.
    :ivar sync_service_sid: Specifies the unique string identifier of the Twilio Sync service instance linked to and accessible by this Deployment.
    :ivar date_created: Specifies the date this Deployment was created, given in UTC ISO 8601 format.
    :ivar date_updated: Specifies the date this Deployment 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      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _        ||xs | j                  d	| _        d | _        y )
Nr   urlfriendly_namer   account_sidsync_service_siddate_createddate_updatedr   r   )super__init__getr   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/deployment.pyr!   zDeploymentInstance.__init__'   s     	!")++e"4")++e"4,3KK,H(/K(@*1++m*D/6{{;M/N0;0L0LKK'1
 1<0L0LKK'1

 #?$((
 6:    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: DeploymentContext for this DeploymentInstance
        r   r   r   )r%   DeploymentContext_versionr$   r&   s    r(   _proxyzDeploymentInstance._proxyC   sE     == -..5NN5)DM
 }}r)   c                 6    | j                   j                         S )m
        Deletes the DeploymentInstance


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


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


        :returns: The fetched DeploymentInstance
        )r/   fetchr.   s    r(   r9   zDeploymentInstance.fetche   s     {{  ""r)   c                 R   K   | j                   j                          d{   S 7 w){
        Asynchronous coroutine to fetch the DeploymentInstance


        :returns: The fetched DeploymentInstance
        N)r/   fetch_asyncr.   s    r(   r<   zDeploymentInstance.fetch_asyncn   s!      [[,,....r6   r   r   c                 <    | j                   j                  ||      S )~  
        Update the DeploymentInstance

        :param friendly_name: Provides a human readable descriptive text for this Deployment, up to 64 characters long
        :param sync_service_sid: Provides the unique string identifier of the Twilio Sync service instance that will be linked to and accessible by this Deployment.

        :returns: The updated DeploymentInstance
        r   r   )r/   updater&   r   r   s      r(   r@   zDeploymentInstance.updatew   s&     {{!!'- " 
 	
r)   c                 X   K   | j                   j                  ||       d{   S 7 w)  
        Asynchronous coroutine to update the DeploymentInstance

        :param friendly_name: Provides a human readable descriptive text for this Deployment, up to 64 characters long
        :param sync_service_sid: Provides the unique string identifier of the Twilio Sync service instance that will be linked to and accessible by this Deployment.

        :returns: The updated DeploymentInstance
        r?   N)r/   update_asyncrA   s      r(   rD   zDeploymentInstance.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.DeploymentInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z6<Twilio.Preview.DeployedDevices.DeploymentInstance {}>joinr$   itemsrK   r&   contexts     r(   __repr__zDeploymentInstance.__repr__   s6     ((SDNN<P<P<RSSGNNwWWr)   )N)r*   r,   )r*   r   )__name__
__module____qualname____doc__r   r   strr   r   r!   propertyr/   boolr2   r5   r9   r<   r   unsetr   objectr@   rD   rX   __classcell__r'   s   @r(   r   r      s   	  ":: c3h: 	:
 c]:8  $ $0D 0#/ -3LL/5||
S&[)
  V,
 
	
( -3LL/5||
S&[)
  V,
 
	
$X# X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 DeploymentContext

        :param version: Version that contains the resource
        :param fleet_sid:
        :param sid: Provides a 34 character string that uniquely identifies the requested Deployment resource.
        r   z%/Fleets/{fleet_sid}/Deployments/{sid}N r    r!   r$   rK   _uri)r&   r   r   r   r'   s       r(   r!   zDeploymentContext.__init__   sB     	! #
 C;BBTT^^T	r)   r*   c                 P    | j                   j                  d| j                        S )r1   DELETEmethoduri)r-   r2   rh   r.   s    r(   r2   zDeploymentContext.delete   s*     }}##		 $ 
 	
r)   c                 l   K   | j                   j                  d| j                         d{   S 7 w)r4   rj   rk   N)r-   r5   rh   r.   s    r(   r5   zDeploymentContext.delete_async   s8      ]]//		 0 
 
 	
 
s   +424c                     | j                   j                  d| j                        }t        | j                   || j                  d   | j                  d         S )r8   GETrk   r   r   r   )r-   r9   rh   r   r$   r&   r   s     r(   r9   zDeploymentContext.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;   rp   rk   Nr   r   r   )r-   r<   rh   r   r$   rq   s     r(   r<   zDeploymentContext.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SyncServiceSidPOSTrl   rm   datar   r   r   )r   ofr-   r@   rh   r   r$   r&   r   r   ry   r   s        r(   r@   zDeploymentContext.update   sv     yy -"2
 --&&		 ' 
 "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)rC   rt   rw   rx   Nr   r   r   )r   rz   r-   rD   rh   r   r$   r{   s        r(   rD   zDeploymentContext.update_async  s      yy -"2
 22		 3 
 
 "MMnn[1u%	
 	

s   AB A>8B c                     dj                  d | j                  j                         D              }dj                  |      S )rF   rG   c              3   F   K   | ]  \  }}d j                  ||        ywrI   rJ   rL   s      r(   rP   z-DeploymentContext.__repr__.<locals>.<genexpr>?  rQ   rR   z5<Twilio.Preview.DeployedDevices.DeploymentContext {}>rS   rV   s     r(   rX   zDeploymentContext.__repr__9  s6     ((SDNN<P<P<RSSFMMgVVr)   )rY   rZ   r[   r   r]   r!   r_   r2   r5   r   r9   r<   r   r`   r   ra   r@   rD   rX   rb   rc   s   @r(   r,   r,      s    U UC Uc U"

 



D 


) 
(
#5 
, -3LL/5||
S&[)
  V,
 
	
F -3LL/5||
S&[)
  V,
 
	
BW# Wr)   r,   c                   2    e Zd Zdeeef   defdZdefdZy)DeploymentPager   r*   c                 L    t        | j                  || j                  d         S )zp
        Build an instance of DeploymentInstance

        :param payload: Payload response from the API
        r   r   )r   r-   r$   rq   s     r(   get_instancezDeploymentPage.get_instanceD  s%     "MM7dnn[.I
 	
r)   c                      y)rF   z/<Twilio.Preview.DeployedDevices.DeploymentPage>rf   r.   s    r(   rX   zDeploymentPage.__repr__N       Ar)   N)	rY   rZ   r[   r   r]   r   r   r   rX   rf   r)   r(   r   r   C  s,    
DcN 
7I 
A# A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	 	 dd	ee   d
ee   dee
   fdZ	 	 dd	ee   d
ee   dee
   fdZ	 	 dd	ee   d
ee   dee
   fdZ	 	 dd	ee   d
ee   dee
   fdZej                  ej                  ej                  fdeee	f   deee	f   d
eee	f   defdZej                  ej                  ej                  fdeee	f   deee	f   d
eee	f   defdZdedefdZdedefdZdedefdZdedefdZdefdZ xZS )DeploymentListr   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the DeploymentList

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

        r   z/Fleets/{fleet_sid}/DeploymentsNrf   rg   )r&   r   r   r'   s      r(   r!   zDeploymentList.__init__X  s@     	! 
 =5<<Nt~~N	r)   r   r   r*   c                     t        j                  ||d      }| j                  j                  d| j                  |      }t        | j                  || j                  d         S )a  
        Create the DeploymentInstance

        :param friendly_name: Provides a human readable descriptive text for this Deployment, up to 256 characters long.
        :param sync_service_sid: Provides the unique string identifier of the Twilio Sync service instance that will be linked to and accessible by this Deployment.

        :returns: The created DeploymentInstance
        rt   rw   rx   r   r   )r   rz   r-   createrh   r   r$   r{   s        r(   r   zDeploymentList.createh  sh     yy -"2
 --&&		 ' 
 "MM7dnn[.I
 	
r)   c                    K   t        j                  ||d      }| j                  j                  d| j                  |       d{   }t        | j                  || j                  d         S 7 )w)a  
        Asynchronously create the DeploymentInstance

        :param friendly_name: Provides a human readable descriptive text for this Deployment, up to 256 characters long.
        :param sync_service_sid: Provides the unique string identifier of the Twilio Sync service instance that will be linked to and accessible by this Deployment.

        :returns: The created DeploymentInstance
        rt   rw   rx   Nr   r   )r   rz   r-   create_asyncrh   r   r$   r{   s        r(   r   zDeploymentList.create_async  sv      yy -"2
 22		 3 
 
 "MM7dnn[.I
 	

s   AA2A0*A2limit	page_sizec                     | j                   j                  ||      }| j                  |d         }| j                   j                  ||d         S )a`  
        Streams DeploymentInstance 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   )r-   read_limitspagestreamr&   r   r   limitsr   s        r(   r   zDeploymentList.stream  sJ    ( **5)<yy6+#6y7}}##D&/::r)   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)ao  
        Asynchronously streams DeploymentInstance 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   )r-   r   
page_asyncstream_asyncr   s        r(   r   zDeploymentList.stream_async  sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                 :    t        | j                  ||            S )a  
        Lists DeploymentInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, list() will attempt to read the limit
                          with the most efficient page size, i.e. min(limit, 1000)

        :returns: list that will contain up to limit results
        r   r   )listr   )r&   r   r   s      r(   r   zDeploymentList.list  s(    & KK#  
 	
r)   c                 z   K   | j                  ||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)a  
        Asynchronously lists DeploymentInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, list() will attempt to read the limit
                          with the most efficient page size, i.e. min(limit, 1000)

        :returns: list that will contain up to limit results
        r   N)r   )r&   r   r   records       r(   
list_asynczDeploymentList.list_async  sT     * '+&7&7# '8 ' !
 
 !
 
 	
 
s0   ;.;620
26;26;
page_tokenpage_numberc                     t        j                  |||d      }| j                  j                  d| j                  |      }t        | j                  || j                        S )ay  
        Retrieve a single page of DeploymentInstance 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 DeploymentInstance
        	PageTokenr   PageSizerp   rl   rm   params)r   rz   r-   r   rh   r   r$   r&   r   r   r   ry   responses         r(   r   zDeploymentList.page  sX      yy'#%
 ==%%U		$%OdmmXt~~FFr)   c                    K   t        j                  |||d      }| j                  j                  d| j                  |       d{   }t        | j                  || j                        S 7 %w)a  
        Asynchronously retrieve a single page of DeploymentInstance 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 DeploymentInstance
        r   rp   r   N)r   rz   r-   r   rh   r   r$   r   s         r(   r   zDeploymentList.page_async&  sm       yy'#%
 11dii 2 
 
 dmmXt~~FF
s   AA/A-&A/
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )z
        Retrieve a specific page of DeploymentInstance records from the API.
        Request is executed immediately

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

        :returns: Page of DeploymentInstance
        rp   )r-   domaintwiliorequestr   r$   r&   r   r   s      r(   get_pagezDeploymentList.get_pageC  s=     ==''..66ujIdmmXt~~FFr)   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)a  
        Asynchronously retrieve a specific page of DeploymentInstance records from the API.
        Request is executed immediately

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

        :returns: Page of DeploymentInstance
        rp   N)r-   r   r   request_asyncr   r$   r   s      r(   get_page_asynczDeploymentList.get_page_asyncO  sJ      --44BB5*UUdmmXt~~FF Vs   4AA&Ar   c                 L    t        | j                  | j                  d   |      S z
        Constructs a DeploymentContext

        :param sid: Provides a 34 character string that uniquely identifies the requested Deployment resource.
        r   r   r,   r-   r$   r&   r   s     r(   r"   zDeploymentList.get[  %     !MMT^^K%@c
 	
r)   c                 L    t        | j                  | j                  d   |      S r   r   r   s     r(   __call__zDeploymentList.__call__e  r   r)   c                      y)rF   z/<Twilio.Preview.DeployedDevices.DeploymentList>rf   r.   s    r(   rX   zDeploymentList.__repr__o  r   r)   )NN) rY   rZ   r[   r   r]   r!   r   r`   r   ra   r   r   r   r   intr	   r   r
   r   r   r   r   r   r   r   r   r   r,   r"   r   rX   rb   rc   s   @r(   r   r   W  s   O OC O$ -3LL/5||
S&[)
  V,
 
	
@ -3LL/5||
S&[)
  V,
 
	
@  $#';}; C=; 
$	%	;6  $#'A}A C=A 
)	*	A6  $#'
}
 C=
 
 	!	
8  $#'
}
 C=
 
 	!	
: *0*0,,(.	G#v+&G 3;'G f%	G
 
G: *0*0,,(.	G#v+&G 3;'G f%	G
 
G:
G3 
G> 
G
Gs 
G~ 
G
s 
0 

C 
$5 
A# A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   rf   r)   r(   <module>r      sk     L L L + 8 : 2 ' !HX) HXV[W [W|AT A(^A\ ^Ar)   