
    pi/                         d Z ddlmZmZmZmZmZ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y)a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Verify
    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.
    )AnyDictListOptionalUnionIteratorAsyncIterator)values)InstanceResource)ListResource)Version)Pagec                   B     e Zd ZdZdedeeef   f fdZdefdZ	 xZ
S )TemplateInstanceai  
    :ivar sid: A 34 character string that uniquely identifies a Verification Template.
    :ivar account_sid: The unique SID identifier of the Account.
    :ivar friendly_name: A descriptive string that you create to describe a Template. It can be up to 32 characters long.
    :ivar channels: A list of channels that support the Template. Can include: sms, voice.
    :ivar translations: An object that contains the different translations of the template. Every translation is identified by the language short name and contains its respective information as the approval status, text and created/modified date.
    versionpayloadc                     t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        y )Nsidaccount_sidfriendly_namechannelstranslations)super__init__getr   r   r   r   r   )selfr   r   	__class__s      `/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/verify/v2/template.pyr   zTemplateInstance.__init__!   sc    !")++e"4*1++m*D,3KK,H-4[[-D9@^9T    returnc                      y)f
        Provide a friendly representation

        :returns: Machine friendly representation
        z#<Twilio.Verify.V2.TemplateInstance> r   s    r   __repr__zTemplateInstance.__repr__*   s     5r   )__name__
__module____qualname____doc__r   r   strr   r   r%   __classcell__r   s   @r   r   r      s2    U U$sCx. U5# 5r   r   c                   2    e Zd Zdeeef   defdZdefdZy)TemplatePager   r    c                 .    t        | j                  |      S )zn
        Build an instance of TemplateInstance

        :param payload: Payload response from the API
        )r   _version)r   r   s     r   get_instancezTemplatePage.get_instance6   s      w77r   c                      y)r"   z<Twilio.Verify.V2.TemplatePage>r#   r$   s    r   r%   zTemplatePage.__repr__>        1r   N)	r&   r'   r(   r   r*   r   r   r1   r%   r#   r   r   r.   r.   4   s*    8DcN 87G 81# 1r   r.   c                       e Zd Zdef 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fdZ xZS )TemplateListr   c                 2    t         |   |       d| _        y)zj
        Initialize the TemplateList

        :param version: Version that contains the resource

        z
/TemplatesN)r   r   _uri)r   r   r   s     r   r   zTemplateList.__init__I   s     	! 	r   Nr   limit	page_sizer    c                     | j                   j                  ||      }| j                  ||d         }| j                   j                  ||d         S )a  
        Streams TemplateInstance 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 friendly_name: String filter used to query templates with a given friendly name.
        :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
        r9   r   r9   r8   )r0   read_limitspagestreamr   r   r8   r9   limitsr=   s         r   r>   zTemplateList.streamT   sL    , **5)<yy}{@SyT}}##D&/::r   c                    K   | j                   j                  ||      }| j                  ||d          d{   }| j                   j                  ||d         S 7 #w)a  
        Asynchronously streams TemplateInstance 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 friendly_name: String filter used to query templates with a given friendly name.
        :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
        r9   r;   Nr8   )r0   r<   
page_asyncstream_asyncr?   s         r   rC   zTemplateList.stream_asynco   sb     , **5)<__'6+3F % 
 
 }}))$w@@	
s   6AA$Ac                 <    t        | j                  |||            S )a_  
        Lists TemplateInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str friendly_name: String filter used to query templates with a given friendly name.
        :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   r8   r9   )listr>   )r   r   r8   r9   s       r   rF   zTemplateList.list   s+    * KK+#  
 	
r   c                 |   K   | j                  |||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)an  
        Asynchronously lists TemplateInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str friendly_name: String filter used to query templates with a given friendly name.
        :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
        rE   N)rC   )r   r   r8   r9   records        r   
list_asynczTemplateList.list_async   sW     . '+&7&7+# '8 ' !
 
 !
 
 	
 
s0   </<731
37<37<
page_tokenpage_numberc                     t        j                  ||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }t        | j                  |      S )a  
        Retrieve a single page of TemplateInstance records from the API.
        Request is executed immediately

        :param friendly_name: String filter used to query templates with a given friendly name.
        :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 TemplateInstance
        FriendlyName	PageTokenr   PageSizeContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptGETmethoduriparamsheaders)r
   ofr0   r=   r7   r.   r   r   rJ   rK   r9   datarZ   responses           r   r=   zTemplateList.page   s|    $ yy -'#%	
 ))^-PQR.==%%diig & 
 DMM844r   c                   K   t        j                  ||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  |      S 7 w)	a  
        Asynchronously retrieve a single page of TemplateInstance records from the API.
        Request is executed immediately

        :param friendly_name: String filter used to query templates with a given friendly name.
        :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 TemplateInstance
        rM   rQ   rR   rS   rT   rU   rV   N)r
   r[   r0   rB   r7   r.   r\   s           r   rB   zTemplateList.page_async   s     $ yy -'#%	
 ))^-PQR.11diig 2 
 
 DMM844
s   A#B%B &B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   |      S )z
        Retrieve a specific page of TemplateInstance records from the API.
        Request is executed immediately

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

        :returns: Page of TemplateInstance
        rU   )r0   domaintwiliorequestr.   r   r`   r^   s      r   get_pagezTemplateList.get_page  s7     ==''..66ujIDMM844r   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   |      S 7 w)a  
        Asynchronously retrieve a specific page of TemplateInstance records from the API.
        Request is executed immediately

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

        :returns: Page of TemplateInstance
        rU   N)r0   rb   rc   request_asyncr.   re   s      r   get_page_asynczTemplateList.get_page_async  sD      --44BB5*UUDMM844 Vs   4AAAc                      y)r"   z<Twilio.Verify.V2.TemplateList>r#   r$   s    r   r%   zTemplateList.__repr__'  r3   r   )r&   r'   r(   r   r   r
   unsetr   r*   objectr   intr   r   r>   r	   rC   r   rF   rI   r.   r=   rB   rf   ri   r%   r+   r,   s   @r   r5   r5   G   s{   	! 	! -3LL##'	;S&[); }; C=	;
 
"	#;: -3LL##'	AS&[)A }A C=	A
 
'	(A> -3LL##'	
S&[)
 }
 C=	

 
	
> -3LL##'	
S&[)
 }
 C=	

 
	
@ -3LL)/*0,,(."5S&[)"5 #v+&"5 3;'	"5
 f%"5 
"5L -3LL)/*0,,(."5S&[)"5 #v+&"5 3;'	"5
 f%"5 
"5H
53 
5< 
5
5s 
5| 
51# 1r   r5   N)r)   typingr   r   r   r   r   r   r	   twilio.baser
   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r.   r5   r#   r   r   <module>rt      sL    M L L  : 2 ' !5' 5814 1&f1< f1r   