
    i?1il                         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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efd
ZdefdZddZd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d 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d fdZdefdZ xZS )SampleInstancea  
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Sample resource.
    :ivar date_created: The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
    :ivar date_updated: The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
    :ivar task_sid: The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) associated with the resource.
    :ivar language: The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the sample. For example: `en-US`.
    :ivar assistant_sid: The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resource.
    :ivar sid: The unique string that we created to identify the Sample resource.
    :ivar tagged_text: The text example of how end users might express the task. The sample can contain [Field tag blocks](https://www.twilio.com/docs/autopilot/api/task-sample#field-tagging).
    :ivar url: The absolute URL of the Sample resource.
    :ivar source_channel: The communication channel from which the sample was captured. Can be: `voice`, `sms`, `chat`, `alexa`, `google-assistant`, `slack`, or null if not included.
    versionpayloadassistant_sidtask_sidsidc                 h   t         |   |       |j                  d      | _        t	        j
                  |j                  d            | _        t	        j
                  |j                  d            | _        |j                  d      | _        |j                  d      | _	        |j                  d      | _
        |j                  d      | _        |j                  d      | _        |j                  d	      | _        |j                  d
      | _        |||xs | j                  d| _        d | _        y )Naccount_siddate_createddate_updatedr   languager   r   tagged_texturlsource_channelr   r   r   )super__init__getr   r   iso8601_datetimer   r   r   r   r   r   r   r   r    	_solution_context)selfr   r   r   r   r   	__class__s         x/home/www/therecruiter.miabetepe.com/venv/lib/python3.12/site-packages/twilio/rest/autopilot/v1/assistant/task/sample.pyr#   zSampleInstance.__init__)   s     	!*1++m*D0;0L0LKK'1
 1<0L0LKK'1
 (/{{:'>'.{{:'>,3KK,H")++e"4*1++m*D")++e"4-4[[9I-J + ?$((

 26    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: SampleContext for this SampleInstance
        r   r   r   r!   )r'   SampleContext_versionr&   r(   s    r*   _proxyzSampleInstance._proxyI   sQ     == )"nn_=
3NN5)	DM }}r+   c                 6    | j                   j                         S )i
        Deletes the SampleInstance


        :returns: True if delete succeeds, False otherwise
        )r1   deleter0   s    r*   r4   zSampleInstance.deleteZ   s     {{!!##r+   c                 R   K   | j                   j                          d{   S 7 w)
        Asynchronous coroutine that deletes the SampleInstance


        :returns: True if delete succeeds, False otherwise
        N)r1   delete_asyncr0   s    r*   r7   zSampleInstance.delete_asyncc   s!      [[--////   '%'c                 6    | j                   j                         S )Y
        Fetch the SampleInstance


        :returns: The fetched SampleInstance
        )r1   fetchr0   s    r*   r;   zSampleInstance.fetchl   s     {{  ""r+   c                 R   K   | j                   j                          d{   S 7 w)s
        Asynchronous coroutine to fetch the SampleInstance


        :returns: The fetched SampleInstance
        N)r1   fetch_asyncr0   s    r*   r>   zSampleInstance.fetch_asyncu   s!      [[,,....r8   r   r   r    c                 >    | j                   j                  |||      S )  
        Update the SampleInstance

        :param language: The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the sample. For example: `en-US`.
        :param tagged_text: The text example of how end users might express the task. The sample can contain [Field tag blocks](https://www.twilio.com/docs/autopilot/api/task-sample#field-tagging).
        :param source_channel: The communication channel from which the sample was captured. Can be: `voice`, `sms`, `chat`, `alexa`, `google-assistant`, `slack`, or null if not included.

        :returns: The updated SampleInstance
        r   r   r    )r1   updater(   r   r   r    s       r*   rB   zSampleInstance.update~   s)     {{!!#) " 
 	
r+   c                 Z   K   | j                   j                  |||       d{   S 7 w)  
        Asynchronous coroutine to update the SampleInstance

        :param language: The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the sample. For example: `en-US`.
        :param tagged_text: The text example of how end users might express the task. The sample can contain [Field tag blocks](https://www.twilio.com/docs/autopilot/api/task-sample#field-tagging).
        :param source_channel: The communication channel from which the sample was captured. Can be: `voice`, `sms`, `chat`, `alexa`, `google-assistant`, `slack`, or null if not included.

        :returns: The updated SampleInstance
        rA   N)r1   update_asyncrC   s       r*   rF   zSampleInstance.update_async   s7      [[--#) . 
 
 	
 
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*SampleInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z'<Twilio.Autopilot.V1.SampleInstance {}>joinr&   itemsrM   r(   contexts     r*   __repr__zSampleInstance.__repr__   s6     ((SDNN<P<P<RSS8??HHr+   )N)r,   r.   )r,   r   )__name__
__module____qualname____doc__r   r   strr   r   r#   propertyr1   boolr4   r7   r;   r>   r   unsetr   objectrB   rF   rZ   __classcell__r)   s   @r*   r   r      sM   & "66 c3h6 	6
 6 c]6@   $ $0D 0#/ (.||*0,,-3\\	
V$
 3;'
 c6k*	

 

. (.||*0,,-3\\	
V$
 3;'
 c6k*	

 

*I# Ir+   r   c            	       `    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
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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fdZ xZS )r.   r   r   r   r   c                 |    t         |   |       |||d| _         dj                  di | j                  | _        y)a  
        Initialize the SampleContext

        :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 Task associated with the resource to update.
        :param task_sid: The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) associated with the Sample resource to update.
        :param sid: The Twilio-provided string that uniquely identifies the Sample resource to update.
        r!   z:/Assistants/{assistant_sid}/Tasks/{task_sid}/Samples/{sid}N r"   r#   r&   rM   _uri)r(   r   r   r   r   r)   s        r*   r#   zSampleContext.__init__   sJ     	! + 

 XPWW 
nn
	r+   r,   c                 P    | j                   j                  d| j                        S )r3   DELETEmethoduri)r/   r4   rj   r0   s    r*   r4   zSampleContext.delete   s*     }}##		 $ 
 	
r+   c                 l   K   | j                   j                  d| j                         d{   S 7 w)r6   rl   rm   N)r/   r7   rj   r0   s    r*   r7   zSampleContext.delete_async   s8      ]]//		 0 
 
 	
 
s   +424c                     | j                   j                  d| j                        }t        | j                   || j                  d   | j                  d   | j                  d         S )r:   GETrm   r   r   r   r!   )r/   r;   rj   r   r&   r(   r   s     r*   r;   zSampleContext.fetch   sd     --%%		 & 

 MM..9^^J/u%
 	
r+   c                    K   | j                   j                  d| j                         d{   }t        | j                   || j                  d   | j                  d   | j                  d         S 7 Ew)r=   rr   rm   Nr   r   r   r!   )r/   r>   rj   r   r&   rs   s     r*   r>   zSampleContext.fetch_async   sr      11		 2 
 

 MM..9^^J/u%
 	

s   +A5A3AA5r   r   r    c                    t        j                  |||d      }| j                  j                  d| j                  |      }t        | j                  || j                  d   | j                  d   | j                  d         S )r@   Language
TaggedTextSourceChannelPOSTrn   ro   datar   r   r   r!   )r   ofr/   rB   rj   r   r&   r(   r   r   r    r|   r   s         r*   rB   zSampleContext.update
  s     yy$)!/
 --&&		 ' 
 MM..9^^J/u%
 	
r+   c                 "  K   t        j                  |||d      }| j                  j                  d| j                  |       d{   }t        | j                  || j                  d   | j                  d   | j                  d         S 7 Ew)	rE   rv   rz   r{   Nr   r   r   r!   )r   r}   r/   rF   rj   r   r&   r~   s         r*   rF   zSampleContext.update_async/  s      yy$)!/
 22		 3 
 
 MM..9^^J/u%
 	

s   ABBABc                     dj                  d | j                  j                         D              }dj                  |      S )rH   rI   c              3   F   K   | ]  \  }}d j                  ||        ywrK   rL   rN   s      r*   rR   z)SampleContext.__repr__.<locals>.<genexpr>Z  rS   rT   z&<Twilio.Autopilot.V1.SampleContext {}>rU   rX   s     r*   rZ   zSampleContext.__repr__T  s6     ((SDNN<P<P<RSS7>>wGGr+   )r[   r\   r]   r   r_   r#   ra   r4   r7   r   r;   r>   r   rb   r   rc   rB   rF   rZ   rd   re   s   @r*   r.   r.      s   
 
 
s 
QT 
*

 



D 


~ 
*
> 
. (.||*0,,-3\\	#
V$#
 3;'#
 c6k*	#

 
#
N (.||*0,,-3\\	#
V$#
 3;'#
 c6k*	#

 
#
JH# Hr+   r.   c                   2    e Zd Zdeeef   defdZdefdZy)
SamplePager   r,   c                 h    t        | j                  || j                  d   | j                  d         S )zl
        Build an instance of SampleInstance

        :param payload: Payload response from the API
        r   r   r   r   )r   r/   r&   rs   s     r*   get_instancezSamplePage.get_instance_  s3     MM..9^^J/	
 	
r+   c                      y)rH   z <Twilio.Autopilot.V1.SamplePage>rh   r0   s    r*   rZ   zSamplePage.__repr__l       2r+   N)	r[   r\   r]   r   r_   r   r   r   rZ   rh   r+   r*   r   r   ^  s)    
DcN 
~ 
2# 2r+   r   c                   h    e Zd Zdededef fdZej                  fdededeee	f   de
fd	Zej                  fdede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 )
SampleListr   r   r   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)a  
        Initialize the SampleList

        :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 Task associated with the resources to read.
        :param task_sid: The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) associated with the Sample resources to read.

        r   z4/Assistants/{assistant_sid}/Tasks/{task_sid}/SamplesNrh   ri   )r(   r   r   r   r)   s       r*   r#   zSampleList.__init__v  sG     	! + 
 RJQQ 
nn
	r+   r   r   r    r,   c                     t        j                  |||d      }| j                  j                  d| j                  |      }t        | j                  || j                  d   | j                  d         S )a  
        Create the SampleInstance

        :param language: The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the new sample. For example: `en-US`.
        :param tagged_text: The text example of how end users might express the task. The sample can contain [Field tag blocks](https://www.twilio.com/docs/autopilot/api/task-sample#field-tagging).
        :param source_channel: The communication channel from which the new sample was captured. Can be: `voice`, `sms`, `chat`, `alexa`, `google-assistant`, `slack`, or null if not included.

        :returns: The created SampleInstance
        rv   rz   r{   r   r   r   )r   r}   r/   createrj   r   r&   r~   s         r*   r   zSampleList.create  sy     yy$)!/
 --&&		 ' 
 MM..9^^J/	
 	
r+   c                   K   t        j                  |||d      }| j                  j                  d| j                  |       d{   }t        | j                  || j                  d   | j                  d         S 7 7w)a  
        Asynchronously create the SampleInstance

        :param language: The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the new sample. For example: `en-US`.
        :param tagged_text: The text example of how end users might express the task. The sample can contain [Field tag blocks](https://www.twilio.com/docs/autopilot/api/task-sample#field-tagging).
        :param source_channel: The communication channel from which the new sample was captured. Can be: `voice`, `sms`, `chat`, `alexa`, `google-assistant`, `slack`, or null if not included.

        :returns: The created SampleInstance
        rv   rz   r{   Nr   r   r   )r   r}   r/   create_asyncrj   r   r&   r~   s         r*   r   zSampleList.create_async  s      yy$)!/
 22		 3 
 
 MM..9^^J/	
 	

s   ABA?8BNlimit	page_sizec                     | j                   j                  ||      }| j                  ||d         }| j                   j                  ||d         S )a(  
        Streams SampleInstance 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 language: The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the sample. For example: `en-US`.
        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, stream() will attempt to read the
                          limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        r   r   r   r   )r/   read_limitspagestreamr(   r   r   r   limitsr   s         r*   r   zSampleList.stream  sL    , **5)<yy(f[6IyJ}}##D&/::r+   c                    K   | j                   j                  ||      }| j                  ||d          d{   }| j                   j                  ||d         S 7 #w)a7  
        Asynchronously streams SampleInstance 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 language: The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the sample. For example: `en-US`.
        :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SampleList.stream_async  sY     , **5)<__h&BU_VV}}))$w@@ Ws   6AA$Ac                 <    t        | j                  |||            S )a  
        Lists SampleInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str language: The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the sample. For example: `en-US`.
        :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SampleList.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 SampleInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str language: The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the sample. For example: `en-US`.
        :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SampleList.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 )a9  
        Retrieve a single page of SampleInstance records from the API.
        Request is executed immediately

        :param language: The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the sample. For example: `en-US`.
        :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 SampleInstance
        rw   	PageTokenr   PageSizerr   rn   ro   params)r   r}   r/   r   rj   r   r&   r(   r   r   r   r   r|   responses          r*   r   zSampleList.pageC  s[    $ yy$'#%	
 ==%%U		$%O$--4>>BBr+   c                    K   t        j                  ||||d      }| j                  j                  d| j                  |       d{   }t        | j                  || j                        S 7 %w)aH  
        Asynchronously retrieve a single page of SampleInstance records from the API.
        Request is executed immediately

        :param language: The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the sample. For example: `en-US`.
        :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 SampleInstance
        r   rr   r   N)r   r}   r/   r   rj   r   r&   r   s          r*   r   zSampleList.page_asynca  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 SampleInstance records from the API.
        Request is executed immediately

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

        :returns: Page of SampleInstance
        rr   )r/   domaintwiliorequestr   r&   r(   r   r   s      r*   get_pagezSampleList.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 SampleInstance records from the API.
        Request is executed immediately

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

        :returns: Page of SampleInstance
        rr   N)r/   r   r   request_asyncr   r&   r   s      r*   get_page_asynczSampleList.get_page_async  sJ      --44BB5*UU$--4>>BB Vs   4AA&Ar   c                 h    t        | j                  | j                  d   | j                  d   |      S z
        Constructs a SampleContext

        :param sid: The Twilio-provided string that uniquely identifies the Sample resource to update.
        r   r   r!   r.   r/   r&   r(   r   s     r*   r$   zSampleList.get  3     MM..9^^J/	
 	
r+   c                 h    t        | j                  | j                  d   | j                  d   |      S r   r   r   s     r*   __call__zSampleList.__call__  r   r+   c                      y)rH   z <Twilio.Autopilot.V1.SampleList>rh   r0   s    r*   rZ   zSampleList.__repr__  r   r+   ) r[   r\   r]   r   r_   r#   r   rb   r   rc   r   r   r   r   intr	   r   r
   r   r   r   r   r   r   r   r   r   r.   r$   r   rZ   rd   re   s   @r*   r   r   u  s9   
 
 
s 
0 .4\\	"
"
 "
 c6k*	"

 
"
P .4\\	"
"
 "
 c6k*	"

 
"
L (.||##'	;V$; }; C=	;
 
.	!;: (.||##'	AV$A }A C=	A
 
~	&A: (.||##'	
V$
 }
 C=	

 
n	
> (.||##'	
V$
 }
 C=	

 
n	
@ (.||)/*0,,(.CV$C #v+&C 3;'	C
 f%C 
C@ (.||)/*0,,(.CV$C #v+&C 3;'	C
 f%C 
C@
C3 
C: 
C
Cs 
Cz 
C
s 
} 

C 
M 
2# 2r+   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   rh   r+   r*   <module>r      sg     L L L + 8 : 2 ' !UI% UIpiHO iHX2 2.D2 D2r+   