
    i?1iCY                         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 - Autopilot
    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 G d de      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&                  fdeeef   dd fdZej&                  fdeeef   dd fdZdefdZ xZS )ModelBuildInstancec                        e Zd ZdZdZdZdZdZy)ModelBuildInstance.Statusenqueuedbuilding	completedfailedcanceledN)__name__
__module____qualname__ENQUEUEDBUILDING	COMPLETEDFAILEDCANCELED     x/home/www/therecruiter.miabetepe.com/venv/lib/python3.12/site-packages/twilio/rest/autopilot/v1/assistant/model_build.pyStatusr      s    	r$   r&   versionpayloadassistant_sidsidc                    t         |   |       |j                  d      | _        t	        j
                  |j                  d            | _        t	        j
                  |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 )Naccount_siddate_createddate_updatedr)   r*   statusunique_nameurlbuild_duration
error_coder)   r*   )super__init__getr,   r   iso8601_datetimer-   r.   r)   r*   r/   r0   r1   integerr2   r3   	_solution_context)selfr'   r(   r)   r*   	__class__s        r%   r6   zModelBuildInstance.__init__/   s    	!*1++m*D0;0L0LKK'1
 1<0L0LKK'1
 -4KK,H")++e"4=D[[=R*1++m*D")++e"4-8-@-@KK().
 *5)<)<W[[=V)W +?$((
 6:r$   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: ModelBuildContext for this ModelBuildInstance
        r)   r*   r4   )r;   ModelBuildContext_versionr:   r<   s    r%   _proxyzModelBuildInstance._proxyO   sE     == -"nn_=NN5)DM
 }}r$   c                 6    | j                   j                         S )m
        Deletes the ModelBuildInstance


        :returns: True if delete succeeds, False otherwise
        )rC   deleterB   s    r%   rF   zModelBuildInstance.delete_   s     {{!!##r$   c                 R   K   | j                   j                          d{   S 7 w)
        Asynchronous coroutine that deletes the ModelBuildInstance


        :returns: True if delete succeeds, False otherwise
        N)rC   delete_asyncrB   s    r%   rI   zModelBuildInstance.delete_asynch   s!      [[--////   '%'c                 6    | j                   j                         S )a
        Fetch the ModelBuildInstance


        :returns: The fetched ModelBuildInstance
        )rC   fetchrB   s    r%   rM   zModelBuildInstance.fetchq   s     {{  ""r$   c                 R   K   | j                   j                          d{   S 7 w){
        Asynchronous coroutine to fetch the ModelBuildInstance


        :returns: The fetched ModelBuildInstance
        N)rC   fetch_asyncrB   s    r%   rP   zModelBuildInstance.fetch_asyncz   s!      [[,,....rJ   r0   c                 :    | j                   j                  |      S )\  
        Update the ModelBuildInstance

        :param unique_name: An application-defined string that uniquely identifies the resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource.

        :returns: The updated ModelBuildInstance
        r0   )rC   updater<   r0   s     r%   rT   zModelBuildInstance.update   s#     {{!!# " 
 	
r$   c                 V   K   | j                   j                  |       d{   S 7 w)v  
        Asynchronous coroutine to update the ModelBuildInstance

        :param unique_name: An application-defined string that uniquely identifies the resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource.

        :returns: The updated ModelBuildInstance
        rS   N)rC   update_asyncrU   s     r%   rX   zModelBuildInstance.update_async   s1      [[--# . 
 
 	
 
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.ModelBuildInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z+<Twilio.Autopilot.V1.ModelBuildInstance {}>joinr:   itemsr_   r<   contexts     r%   __repr__zModelBuildInstance.__repr__   s6     ((SDNN<P<P<RSS<CCGLLr$   )N)r>   r@   )r>   r   )r   r   r   objectr&   r   r   strr   r   r6   propertyrC   boolrF   rI   rM   rP   r   unsetr   rT   rX   rl   __classcell__r=   s   @r%   r   r      s     $ ":: c3h: 	:
 c]:@  $ $0D 0#/ 17
 f-
	
 17
 f-
	
M# M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                  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efdZ xZS )r@   r'   r)   r*   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)au  
        Initialize the ModelBuildContext

        :param version: Version that contains the resource
        :param assistant_sid: The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update.
        :param sid: The Twilio-provided string that uniquely identifies the ModelBuild resource to update.
        r4   z-/Assistants/{assistant_sid}/ModelBuilds/{sid}Nr#   r5   r6   r:   r_   _uri)r<   r'   r)   r*   r=   s       r%   r6   zModelBuildContext.__init__   sG     	! +
 KCJJ 
nn
	r$   r>   c                 P    | j                   j                  d| j                        S )rE   DELETEmethoduri)rA   rF   rw   rB   s    r%   rF   zModelBuildContext.delete   s*     }}##		 $ 
 	
r$   c                 l   K   | j                   j                  d| j                         d{   S 7 w)rH   ry   rz   N)rA   rI   rw   rB   s    r%   rI   zModelBuildContext.delete_async   s8      ]]//		 0 
 
 	
 
s   +424c                     | j                   j                  d| j                        }t        | j                   || j                  d   | j                  d         S )rL   GETrz   r)   r*   r4   )rA   rM   rw   r   r:   r<   r(   s     r%   rM   zModelBuildContext.fetch   sX     --%%		 & 

 "MM..9u%	
 	
r$   c                    K   | j                   j                  d| j                         d{   }t        | j                   || j                  d   | j                  d         S 7 7w)rO   r   rz   Nr)   r*   r4   )rA   rP   rw   r   r:   r   s     r%   rP   zModelBuildContext.fetch_async   sf      11		 2 
 

 "MM..9u%	
 	

s   +A'A%8A'r0   c                     t        j                  d|i      }| j                  j                  d| j                  |      }t        | j                  || j                  d   | j                  d         S )rR   
UniqueNamePOSTr{   r|   datar)   r*   r4   )r   ofrA   rT   rw   r   r:   r<   r0   r   r(   s       r%   rT   zModelBuildContext.update   su     yyk
 --&&		 ' 
 "MM..9u%	
 	
r$   c                   K   t        j                  d|i      }| j                  j                  d| j                  |       d{   }t        | j                  || j                  d   | j                  d         S 7 7w)rW   r   r   r   Nr)   r*   r4   )r   r   rA   rX   rw   r   r:   r   s       r%   rX   zModelBuildContext.update_async  s      yyk
 22		 3 
 
 "MM..9u%	
 	

s   AA?A=8A?c                     dj                  d | j                  j                         D              }dj                  |      S )rZ   r[   c              3   F   K   | ]  \  }}d j                  ||        ywr]   r^   r`   s      r%   rd   z-ModelBuildContext.__repr__.<locals>.<genexpr>=  re   rf   z*<Twilio.Autopilot.V1.ModelBuildContext {}>rg   rj   s     r%   rl   zModelBuildContext.__repr__7  s6     ((SDNN<P<P<RSS;BB7KKr$   )r   r   r   r   rn   r6   rp   rF   rI   r   rM   rP   r   rq   r   rm   rT   rX   rl   rr   rs   s   @r%   r@   r@      s    
 
 
# 
&

 



D 


) 
(
#5 
* 17
 f-
	
< 17
 f-
	
:L# Lr$   r@   c                   2    e Zd Zdeeef   defdZdefdZy)ModelBuildPager(   r>   c                 L    t        | j                  || j                  d         S )zp
        Build an instance of ModelBuildInstance

        :param payload: Payload response from the API
        r)   r)   )r   rA   r:   r   s     r%   get_instancezModelBuildPage.get_instanceB  s%     "MM7$..2Q
 	
r$   c                      y)rZ   z$<Twilio.Autopilot.V1.ModelBuildPage>r#   rB   s    r%   rl   zModelBuildPage.__repr__L       6r$   N)	r   r   r   r   rn   r   r   r   rl   r#   r$   r%   r   r   A  s*    
DcN 
7I 
6# 6r$   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 )ModelBuildListr'   r)   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)a  
        Initialize the ModelBuildList

        :param version: Version that contains the resource
        :param assistant_sid: The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read.

        r)   z'/Assistants/{assistant_sid}/ModelBuildsNr#   rv   )r<   r'   r)   r=   s      r%   r6   zModelBuildList.__init__V  sA     	! ]
 E=DDVt~~V	r$   status_callbackr0   r>   c                     t        j                  ||d      }| j                  j                  d| j                  |      }t        | j                  || j                  d         S )a  
        Create the ModelBuildInstance

        :param status_callback: The URL we should call using a POST method to send status information to your application.
        :param unique_name: An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource.

        :returns: The created ModelBuildInstance
        StatusCallbackr   r   r   r)   r   )r   r   rA   createrw   r   r:   r<   r   r0   r   r(   s        r%   r   zModelBuildList.createf  sh     yy"1)
 --&&		 ' 
 "MM7$..2Q
 	
r$   c                    K   t        j                  ||d      }| j                  j                  d| j                  |       d{   }t        | j                  || j                  d         S 7 )w)a  
        Asynchronously create the ModelBuildInstance

        :param status_callback: The URL we should call using a POST method to send status information to your application.
        :param unique_name: An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource.

        :returns: The created ModelBuildInstance
        r   r   r   Nr)   r   )r   r   rA   create_asyncrw   r   r:   r   s        r%   r   zModelBuildList.create_async  sv      yy"1)
 22		 3 
 
 "MM7$..2Q
 	

s   AA2A0*A2limit	page_sizec                     | j                   j                  ||      }| j                  |d         }| j                   j                  ||d         S )a`  
        Streams ModelBuildInstance 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   )rA   read_limitspagestreamr<   r   r   limitsr   s        r%   r   zModelBuildList.stream  sJ    ( **5)<yy6+#6y7}}##D&/::r$   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)ao  
        Asynchronously streams ModelBuildInstance 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   )rA   r   
page_asyncstream_asyncr   s        r%   r   zModelBuildList.stream_async  sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                 :    t        | j                  ||            S )a  
        Lists ModelBuildInstance 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ModelBuildList.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 ModelBuildInstance 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ModelBuildList.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 ModelBuildInstance 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 ModelBuildInstance
        	PageTokenr   PageSizer   r{   r|   params)r   r   rA   r   rw   r   r:   r<   r   r   r   r   responses         r%   r   zModelBuildList.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 ModelBuildInstance 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 ModelBuildInstance
        r   r   r   N)r   r   rA   r   rw   r   r:   r   s         r%   r   zModelBuildList.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 ModelBuildInstance records from the API.
        Request is executed immediately

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

        :returns: Page of ModelBuildInstance
        r   )rA   domaintwiliorequestr   r:   r<   r   r   s      r%   get_pagezModelBuildList.get_pageA  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 ModelBuildInstance records from the API.
        Request is executed immediately

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

        :returns: Page of ModelBuildInstance
        r   N)rA   r   r   request_asyncr   r:   r   s      r%   get_page_asynczModelBuildList.get_page_asyncM  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 ModelBuildContext

        :param sid: The Twilio-provided string that uniquely identifies the ModelBuild resource to update.
        r)   r4   r@   rA   r:   r<   r*   s     r%   r7   zModelBuildList.getY  %     !MM)Hc
 	
r$   c                 L    t        | j                  | j                  d   |      S r   r   r   s     r%   __call__zModelBuildList.__call__c  r   r$   c                      y)rZ   z$<Twilio.Autopilot.V1.ModelBuildList>r#   rB   s    r%   rl   zModelBuildList.__repr__m  r   r$   )NN) r   r   r   r   rn   r6   r   rq   r   rm   r   r   r   r   intr	   r   r
   r   r   r   r   r   r   r   r   r   r@   r7   r   rl   rr   rs   s   @r%   r   r   U  s   W W W$ /5ll*0,,
sF{+
 3;'
 
	
@ /5ll*0,,
sF{+
 3;'
 
	
@  $#';}; 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 
6# 6r$   r   N)__doc__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   r#   r$   r%   <module>r      sg     L L L + 8 : 2 ' !LM) LM^UL ULp6T 6(^6\ ^6r$   