
    i?1iN                         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defdZ xZS )FieldInstancea  
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Field 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 field_type: The Field Type of the field. Can be: a [Built-in Field Type](https://www.twilio.com/docs/autopilot/built-in-field-types), the unique_name, or the SID of a custom Field Type.
    :ivar task_sid: The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with this Field.
    :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 Field resource.
    :ivar unique_name: An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource.
    :ivar url: The absolute URL of the Field resource.
    versionpayloadassistant_sidtask_sidsidc                 <   t         |   |       |j                  d      | _        t	        j
                  |j                  d            | _        t	        j
                  |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_updated
field_typer   r   r   unique_nameurlr   r   r   )super__init__getr   r   iso8601_datetimer   r   r   r   r   r   r   r   	_solution_context)selfr   r   r   r   r   	__class__s         w/home/www/therecruiter.miabetepe.com/venv/lib/python3.12/site-packages/twilio/rest/autopilot/v1/assistant/task/field.pyr"   zFieldInstance.__init__(   s     	!*1++m*D0;0L0LKK'1
 1<0L0LKK'1
 *1\)B'.{{:'>,3KK,H")++e"4*1++m*D")++e"4 + ?$((

 15    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: FieldContext for this FieldInstance
        r   r   r   r    )r&   FieldContext_versionr%   r'   s    r)   _proxyzFieldInstance._proxyG   sQ     == ("nn_=
3NN5)	DM }}r*   c                 6    | j                   j                         S )h
        Deletes the FieldInstance


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


        :returns: True if delete succeeds, False otherwise
        N)r0   delete_asyncr/   s    r)   r6   zFieldInstance.delete_asynca   s!      [[--////   '%'c                 6    | j                   j                         S )W
        Fetch the FieldInstance


        :returns: The fetched FieldInstance
        )r0   fetchr/   s    r)   r:   zFieldInstance.fetchj   s     {{  ""r*   c                 R   K   | j                   j                          d{   S 7 w)q
        Asynchronous coroutine to fetch the FieldInstance


        :returns: The fetched FieldInstance
        N)r0   fetch_asyncr/   s    r)   r=   zFieldInstance.fetch_asyncs   s!      [[,,....r7   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)FieldInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z&<Twilio.Autopilot.V1.FieldInstance {}>joinr%   itemsrD   r'   contexts     r)   __repr__zFieldInstance.__repr__|   s6     ((SDNN<P<P<RSS7>>wGGr*   )N)r+   r-   )r+   r   )__name__
__module____qualname____doc__r   r   strr   r   r"   propertyr0   boolr3   r6   r:   r=   rQ   __classcell__r(   s   @r)   r   r      s    
$ "55 c3h5 	5
 5 c]5>   $ $0D 0#/H# Hr*   r   c                   l     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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 FieldContext

        :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 fetch.
        :param task_sid: The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the Field resource to fetch.
        :param sid: The Twilio-provided string that uniquely identifies the Field resource to fetch.
        r    z9/Assistants/{assistant_sid}/Tasks/{task_sid}/Fields/{sid}N r!   r"   r%   rD   _uri)r'   r   r   r   r   r(   s        r)   r"   zFieldContext.__init__   sJ     	! + 

 WOVV 
nn
	r*   r+   c                 P    | j                   j                  d| j                        S )r2   DELETEmethoduri)r.   r3   r_   r/   s    r)   r3   zFieldContext.delete   s*     }}##		 $ 
 	
r*   c                 l   K   | j                   j                  d| j                         d{   S 7 w)r5   ra   rb   N)r.   r6   r_   r/   s    r)   r6   zFieldContext.delete_async   s8      ]]//		 0 
 
 	
 
s   +424c                     | j                   j                  d| j                        }t        | j                   || j                  d   | j                  d   | j                  d         S )r9   GETrb   r   r   r   r    )r.   r:   r_   r   r%   r'   r   s     r)   r:   zFieldContext.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<   rg   rb   Nr   r   r   r    )r.   r=   r_   r   r%   rh   s     r)   r=   zFieldContext.fetch_async   sr      11		 2 
 

 MM..9^^J/u%
 	

s   +A5A3AA5c                     dj                  d | j                  j                         D              }dj                  |      S )r?   r@   c              3   F   K   | ]  \  }}d j                  ||        ywrB   rC   rE   s      r)   rI   z(FieldContext.__repr__.<locals>.<genexpr>   rJ   rK   z%<Twilio.Autopilot.V1.FieldContext {}>rL   rO   s     r)   rQ   zFieldContext.__repr__   s6     ((SDNN<P<P<RSS6==gFFr*   )rR   rS   rT   r   rV   r"   rX   r3   r6   r   r:   r=   rQ   rY   rZ   s   @r)   r-   r-      sc    
 
 
s 
QT 
*

 



D 


} 
*
= 
*G# Gr*   r-   c                   2    e Zd Zdeeef   defdZdefdZy)	FieldPager   r+   c                 h    t        | j                  || j                  d   | j                  d         S )zk
        Build an instance of FieldInstance

        :param payload: Payload response from the API
        r   r   r   r   )r   r.   r%   rh   s     r)   get_instancezFieldPage.get_instance   s3     MM..9^^J/	
 	
r*   c                      y)r?   z<Twilio.Autopilot.V1.FieldPage>r]   r/   s    r)   rQ   zFieldPage.__repr__        1r*   N)	rR   rS   rT   r   rV   r   r   rp   rQ   r]   r*   r)   rm   rm      s)    
DcN 
} 
1# 1r*   rm   c            	       D    e Zd Zdededef fdZdededefdZdede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 )	FieldListr   r   r   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)a  
        Initialize the FieldList

        :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) resource associated with the Field resources to read.

        ro   z3/Assistants/{assistant_sid}/Tasks/{task_sid}/FieldsNr]   r^   )r'   r   r   r   r(   s       r)   r"   zFieldList.__init__   sG     	! + 
 QIPP 
nn
	r*   r   r   r+   c                     t        j                  ||d      }| j                  j                  d| j                  |      }t        | j                  || j                  d   | j                  d         S )a'  
        Create the FieldInstance

        :param field_type: The Field Type of the new field. Can be: a [Built-in Field Type](https://www.twilio.com/docs/autopilot/built-in-field-types), the `unique_name`, or the `sid` of a custom Field Type.
        :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 FieldInstance
        	FieldType
UniqueNamePOSTrc   rd   datar   r   ro   )r   ofr.   creater_   r   r%   r'   r   r   r|   r   s        r)   r~   zFieldList.create  sv     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)a6  
        Asynchronously create the FieldInstance

        :param field_type: The Field Type of the new field. Can be: a [Built-in Field Type](https://www.twilio.com/docs/autopilot/built-in-field-types), the `unique_name`, or the `sid` of a custom Field Type.
        :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 FieldInstance
        rw   rz   r{   Nr   r   ro   )r   r}   r.   create_asyncr_   r   r%   r   s        r)   r   zFieldList.create_async1  s      yy')
 22		 3 
 
 MM..9^^J/	
 	

s   AB A>8B limit	page_sizec                     | j                   j                  ||      }| j                  |d         }| j                   j                  ||d         S )a[  
        Streams FieldInstance 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FieldList.streamN  sJ    ( **5)<yy6+#6y7}}##D&/::r*   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)aj  
        Asynchronously streams FieldInstance 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FieldList.stream_asyncg  sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                 :    t        | j                  ||            S )a  
        Lists FieldInstance 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FieldList.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 FieldInstance 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FieldList.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 )ao  
        Retrieve a single page of FieldInstance 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 FieldInstance
        	PageTokenr   PageSizerg   rc   rd   params)r   r}   r.   r   r_   rm   r%   r'   r   r   r   r|   responses         r)   r   zFieldList.page  sX      yy'#%
 ==%%U		$%O$..AAr*   c                    K   t        j                  |||d      }| j                  j                  d| j                  |       d{   }t        | j                  || j                        S 7 %w)a~  
        Asynchronously retrieve a single page of FieldInstance 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 FieldInstance
        r   rg   r   N)r   r}   r.   r   r_   rm   r%   r   s         r)   r   zFieldList.page_async  sm       yy'#%
 11dii 2 
 
 $..AA
s   AA/A-&A/
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )z
        Retrieve a specific page of FieldInstance records from the API.
        Request is executed immediately

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

        :returns: Page of FieldInstance
        rg   )r.   domaintwiliorequestrm   r%   r'   r   r   s      r)   get_pagezFieldList.get_page  s=     ==''..66ujI$..AAr*   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)z
        Asynchronously retrieve a specific page of FieldInstance records from the API.
        Request is executed immediately

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

        :returns: Page of FieldInstance
        rg   N)r.   r   r   request_asyncrm   r%   r   s      r)   get_page_asynczFieldList.get_page_async  sJ      --44BB5*UU$..AA Vs   4AA&Ar   c                 h    t        | j                  | j                  d   | j                  d   |      S z
        Constructs a FieldContext

        :param sid: The Twilio-provided string that uniquely identifies the Field resource to fetch.
        r   r   r    r-   r.   r%   r'   r   s     r)   r#   zFieldList.get  3     MM..9^^J/	
 	
r*   c                 h    t        | j                  | j                  d   | j                  d   |      S r   r   r   s     r)   __call__zFieldList.__call__  r   r*   c                      y)r?   z<Twilio.Autopilot.V1.FieldList>r]   r/   s    r)   rQ   zFieldList.__repr__  rr   r*   )NN) rR   rS   rT   r   rV   r"   r   r~   r   r   intr	   r   r
   r   r   r   r   r   unsetr   objectrm   r   r   r   r   r-   r#   r   rQ   rY   rZ   s   @r)   rt   rt      sO   
 
 
s 
(
 
3 
= 
:
S 
s 
} 
>  $#';}; C=; 
-	 	;6  $#'A}A C=A 
}	%	A6  $#'
}
 C=
 
m		
8  $#'
}
 C=
 
m		
: *0*0,,(.	B#v+&B 3;'B f%	B
 
B: *0*0,,(.	B#v+&B 3;'B f%	B
 
B:
B3 
B9 
B
Bs 
By 
B
s 
| 

C 
L 
1# 1r*   rt   N)rU   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-   rm   rt   r]   r*   r)   <module>r      sg     L L L + 8 : 2 ' !iH$ iHX_G? _GD1 1.f1 f1r*   