
    i?1iF                         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 - Serverless
    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                   z     e Zd ZdZ	 ddedeeef   dededee   f
 fdZ	e
dd	       Zdd
ZddZdefdZ xZS )DeploymentInstanceaJ  
    :ivar sid: The unique string that we created to identify the Deployment resource.
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Deployment resource.
    :ivar service_sid: The SID of the Service that the Deployment resource is associated with.
    :ivar environment_sid: The SID of the Environment for the Deployment.
    :ivar build_sid: The SID of the Build for the deployment.
    :ivar date_created: The date and time in GMT when the Deployment resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
    :ivar date_updated: The date and time in GMT when the Deployment resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
    :ivar url: The absolute URL of the Deployment resource.
    versionpayloadservice_sidenvironment_sidsidc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _
        t        j                  |j                  d            | _        |j                  d      | _        |||xs | j                  d	| _        d | _        y )
Nr   account_sidr   r   	build_siddate_createddate_updatedurlr   r   r   )super__init__getr   r   r   r   r   r   iso8601_datetimer   r   r   	_solution_context)selfr   r   r   r   r   	__class__s         /home/www/therecruiter.miabetepe.com/venv/lib/python3.12/site-packages/twilio/rest/serverless/v1/service/environment/deployment.pyr!   zDeploymentInstance.__init__'   s     	!")++e"4*1++m*D*1++m*D.5kk:K.L(/K(@0;0L0LKK'1
 1<0L0LKK'1
 #*++e"4 '.?$((

 6:    returnc                     | j                   Et        | j                  | j                  d   | 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   )r%   DeploymentContext_versionr$   r&   s    r(   _proxyzDeploymentInstance._proxyE   sR     == - NN=9 $/@ ANN5)	DM }}r)   c                 6    | j                   j                         S )a
        Fetch the DeploymentInstance


        :returns: The fetched DeploymentInstance
        )r/   fetchr.   s    r(   r2   zDeploymentInstance.fetchV   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(   r5   zDeploymentInstance.fetch_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.DeploymentInstance.__repr__.<locals>.<genexpr>n        SDAq7>>!Q/S   !z,<Twilio.Serverless.V1.DeploymentInstance {}>joinr$   itemsr<   r&   contexts     r(   __repr__zDeploymentInstance.__repr__h   s6     ((SDNN<P<P<RSS=DDWMMr)   )N)r*   r,   )r*   r   )__name__
__module____qualname____doc__r   r   strr   r   r!   propertyr/   r2   r5   rI   __classcell__r'   s   @r(   r   r      sz    	" ":: c3h: 	:
 : c]:<   #/N# Nr)   r   c                   T     e Zd Zde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	 xZ
S )
r,   r   r   r   r   c                 |    t         |   |       |||d| _         dj                  di | j                  | _        y)ar  
        Initialize the DeploymentContext

        :param version: Version that contains the resource
        :param service_sid: The SID of the Service to fetch the Deployment resource from.
        :param environment_sid: The SID of the Environment used by the Deployment to fetch.
        :param sid: The SID that identifies the Deployment resource to fetch.
        r   zH/Services/{service_sid}/Environments/{environment_sid}/Deployments/{sid}N r    r!   r$   r<   _uri)r&   r   r   r   r   r'   s        r(   r!   zDeploymentContext.__init__s   sJ     	! '.

 f^ee 
nn
	r)   r*   c                     | j                   j                  d| j                        }t        | j                   || j                  d   | j                  d   | j                  d         S )r1   GETmethodurir   r   r   r   )r-   r2   rV   r   r$   r&   r   s     r(   r2   zDeploymentContext.fetch   se     --%%		 & 

 "MM}5 NN+<=u%
 	
r)   c                    K   | j                   j                  d| j                         d{   }t        | j                   || j                  d   | j                  d   | j                  d         S 7 Ew)r4   rX   rY   Nr   r   r   r   )r-   r5   rV   r   r$   r\   s     r(   r5   zDeploymentContext.fetch_async   ss      11		 2 
 

 "MM}5 NN+<=u%
 	

s   +A5A3AA5c                     dj                  d | j                  j                         D              }dj                  |      S )r7   r8   c              3   F   K   | ]  \  }}d j                  ||        ywr:   r;   r=   s      r(   rA   z-DeploymentContext.__repr__.<locals>.<genexpr>   rB   rC   z+<Twilio.Serverless.V1.DeploymentContext {}>rD   rG   s     r(   rI   zDeploymentContext.__repr__   s6     ((SDNN<P<P<RSS<CCGLLr)   )rJ   rK   rL   r   rN   r!   r   r2   r5   rI   rP   rQ   s   @r(   r,   r,   r   sP    

-0
CF
MP
.
) 
*
#5 
*M# M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                 h    t        | j                  || j                  d   | j                  d         S )zp
        Build an instance of DeploymentInstance

        :param payload: Payload response from the API
        r   r   r   r   )r   r-   r$   r\   s     r(   get_instancezDeploymentPage.get_instance   s4     "MM}5 NN+<=	
 	
r)   c                      y)r7   z%<Twilio.Serverless.V1.DeploymentPage>rT   r.   s    r(   rI   zDeploymentPage.__repr__        7r)   N)	rJ   rK   rL   r   rN   r   r   rd   rI   rT   r)   r(   ra   ra      s*    
DcN 
7I 
7# 7r)   ra   c            	           e Zd Zdededef fdZej                  fdeee	f   de
fdZej                  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   r   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)a+  
        Initialize the DeploymentList

        :param version: Version that contains the resource
        :param service_sid: The SID of the Service to read the Deployment resources from.
        :param environment_sid: The SID of the Environment used by the Deployment resources to read.

        rc   zB/Services/{service_sid}/Environments/{environment_sid}/DeploymentsNrT   rU   )r&   r   r   r   r'   s       r(   r!   zDeploymentList.__init__   sJ     	! '.

 XPWW .. 		r)   r   r*   c                     t        j                  d|i      }| j                  j                  d| j                  |      }t        | j                  || j                  d   | j                  d         S )z
        Create the DeploymentInstance

        :param build_sid: The SID of the Build for the Deployment.

        :returns: The created DeploymentInstance
        BuildSidPOSTrZ   r[   datar   r   rc   )r   ofr-   createrV   r   r$   r&   r   rn   r   s       r(   rp   zDeploymentList.create   sv     yyI
 --&&		 ' 
 "MM}5 NN+<=	
 	
r)   c                   K   t        j                  d|i      }| j                  j                  d| j                  |       d{   }t        | j                  || j                  d   | j                  d         S 7 7w)z
        Asynchronously create the DeploymentInstance

        :param build_sid: The SID of the Build for the Deployment.

        :returns: The created DeploymentInstance
        rk   rl   rm   Nr   r   rc   )r   ro   r-   create_asyncrV   r   r$   rq   s       r(   rs   zDeploymentList.create_async	  s      yyI
 22		 3 
 
 "MM}5 NN+<=	
 	

s   AA?A=8A?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
        ru   ru   rt   )r-   read_limitspagestreamr&   rt   ru   limitsry   s        r(   rz   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
        ru   rw   Nrt   )r-   rx   
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
        rt   ru   )listrz   )r&   rt   ru   s      r(   r   zDeploymentList.listX  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&   rt   ru   records       r(   
list_asynczDeploymentList.list_asyncr  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   PageSizerX   rZ   r[   params)r   ro   r-   ry   rV   ra   r$   r&   r   r   ru   rn   responses         r(   ry   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   rX   r   N)r   ro   r-   r~   rV   ra   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
        rX   )r-   domaintwiliorequestra   r$   r&   r   r   s      r(   get_pagezDeploymentList.get_page  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
        rX   N)r-   r   r   request_asyncra   r$   r   s      r(   get_page_asynczDeploymentList.get_page_async  sJ      --44BB5*UUdmmXt~~FF Vs   4AA&Ar   c                 h    t        | j                  | j                  d   | j                  d   |      S z
        Constructs a DeploymentContext

        :param sid: The SID that identifies the Deployment resource to fetch.
        r   r   r   r,   r-   r$   r&   r   s     r(   r"   zDeploymentList.get  4     !MM}5 NN+<=	
 	
r)   c                 h    t        | j                  | j                  d   | j                  d   |      S r   r   r   s     r(   __call__zDeploymentList.__call__  r   r)   c                      y)r7   z%<Twilio.Serverless.V1.DeploymentList>rT   r.   s    r(   rI   zDeploymentList.__repr__  rf   r)   )NN) rJ   rK   rL   r   rN   r!   r   unsetr   objectr   rp   rs   r   intr	   rz   r
   r   r   r   r   ra   ry   r~   r   r   r,   r"   r   rI   rP   rQ   s   @r(   rh   rh      so   
 
c 
C 
. /5ll
sF{+
	
< /5ll
sF{+
	
>  $#';}; 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 
7# 7r)   rh   N)rM   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,   ra   rh   rT   r)   r(   <module>r      sg     L L L + 8 : 2 ' !UN) UNpIM IMX7T 7.h7\ h7r)   