
    pi0                         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  G d	 d
e      Z G d de      Z G d de      Zy)a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Content
    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)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 )LegacyContentInstancea  
    :ivar date_created: The date and time in GMT that 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 that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
    :ivar sid: The unique string that that we created to identify the Content resource.
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/usage/api/account) that created Content resource.
    :ivar friendly_name: A string name used to describe the Content resource. Not visible to the end recipient.
    :ivar language: Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in.
    :ivar variables: Defines the default placeholder values for variables included in the Content resource. e.g. {"1": "Customer_Name"}.
    :ivar types: The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource.
    :ivar legacy_template_name: The string name of the legacy content template associated with this Content resource, unique across all template names for its account.  Only lowercase letters, numbers and underscores are allowed
    :ivar legacy_body: The string body field of the legacy content template associated with this Content resource
    :ivar url: The URL of the resource, relative to `https://content.twilio.com`.
    versionpayloadc                 T   t         |   |       t        j                  |j	                  d            | _        t        j                  |j	                  d            | _        |j	                  d      | _        |j	                  d      | _        |j	                  d      | _	        |j	                  d      | _
        |j	                  d      | _        |j	                  d      | _        |j	                  d	      | _        |j	                  d
      | _        |j	                  d      | _        y )Ndate_createddate_updatedsidaccount_sidfriendly_namelanguage	variablestypeslegacy_template_namelegacy_bodyurl)super__init__r   iso8601_datetimegetr   r   r   r   r   r   r   r   r   r   r    )selfr   r   	__class__s      g/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/content/v1/legacy_content.pyr"   zLegacyContentInstance.__init__(   s    !0;0L0LKK'1
 1<0L0LKK'1
 #*++e"4*1++m*D,3KK,H'.{{:'>6=kk+6N29++g2F
3:;;?U3V!*1++m*D")++e"4    returnc                      y)f
        Provide a friendly representation

        :returns: Machine friendly representation
        z)<Twilio.Content.V1.LegacyContentInstance> r%   s    r'   __repr__zLegacyContentInstance.__repr__;   s     ;r(   )__name__
__module____qualname____doc__r   r   strr   r"   r.   __classcell__r&   s   @r'   r   r      s/    5 5$sCx. 5&;# ;r(   r   c                   2    e Zd Zdeeef   defdZdefdZy)LegacyContentPager   r)   c                 .    t        | j                  |      S )zs
        Build an instance of LegacyContentInstance

        :param payload: Payload response from the API
        )r   _version)r%   r   s     r'   get_instancezLegacyContentPage.get_instanceG   s     %T]]G<<r(   c                      y)r+   z%<Twilio.Content.V1.LegacyContentPage>r,   r-   s    r'   r.   zLegacyContentPage.__repr__O        7r(   N)	r/   r0   r1   r   r3   r   r   r:   r.   r,   r(   r'   r7   r7   E   s*    =DcN =7L =7# 7r(   r7   c            	           e Zd Zdef 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fdZ xZS )LegacyContentListr   c                 2    t         |   |       d| _        y)zo
        Initialize the LegacyContentList

        :param version: Version that contains the resource

        z/LegacyContentN)r!   r"   _uri)r%   r   r&   s     r'   r"   zLegacyContentList.__init__Z   s     	!$	r(   limit	page_sizer)   c                     | j                   j                  ||      }| j                  |d         }| j                   j                  ||d         S )ac  
        Streams LegacyContentInstance 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
        rB   rB   rA   )r9   read_limitspagestreamr%   rA   rB   limitsrF   s        r'   rG   zLegacyContentList.streame   sJ    ( **5)<yy6+#6y7}}##D&/::r(   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)ar  
        Asynchronously streams LegacyContentInstance 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
        rB   rD   NrA   )r9   rE   
page_asyncstream_asyncrH   s        r'   rL   zLegacyContentList.stream_async~   sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                 :    t        | j                  ||            S )a   
        Lists LegacyContentInstance 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
        rA   rB   )listrG   )r%   rA   rB   s      r'   rO   zLegacyContentList.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 LegacyContentInstance 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
        rN   N)rL   )r%   rA   rB   records       r'   
list_asynczLegacyContentList.list_async   sT     * '+&7&7# '8 ' !
 
 !
 
 	
 
s0   ;.;620
26;26;
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 LegacyContentInstance 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 LegacyContentInstance
        	PageTokenr   PageSizeContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptGETmethoduriparamsheaders)r   ofr9   rF   r@   r7   r%   rS   rT   rB   datarb   responses          r'   rF   zLegacyContentList.page   sy      yy'#%
 ))^-PQR.==%%diig & 
 !99r(   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 LegacyContentInstance 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 LegacyContentInstance
        rV   rY   rZ   r[   r\   r]   r^   N)r   rc   r9   rK   r@   r7   rd   s          r'   rK   zLegacyContentList.page_async   s       yy'#%
 ))^-PQR.11diig 2 
 
 !99
s   A"B$A?%B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   |      S )z
        Retrieve a specific page of LegacyContentInstance records from the API.
        Request is executed immediately

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

        :returns: Page of LegacyContentInstance
        r]   )r9   domaintwiliorequestr7   r%   rh   rf   s      r'   get_pagezLegacyContentList.get_page  s7     ==''..66ujI 99r(   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   |      S 7 w)a  
        Asynchronously retrieve a specific page of LegacyContentInstance records from the API.
        Request is executed immediately

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

        :returns: Page of LegacyContentInstance
        r]   N)r9   rj   rk   request_asyncr7   rm   s      r'   get_page_asyncz LegacyContentList.get_page_async  sD      --44BB5*UU 99 Vs   4AAAc                      y)r+   z%<Twilio.Content.V1.LegacyContentList>r,   r-   s    r'   r.   zLegacyContentList.__repr__&  r<   r(   )NN)r/   r0   r1   r   r"   r   intr	   r   rG   r
   rL   r   rO   rR   r   unsetr   r3   objectr7   rF   rK   rn   rq   r.   r4   r5   s   @r'   r>   r>   X   s   	% 	%  $#';}; C=; 
'	(	;6  $#'A}A C=A 
,	-	A6  $#'
}
 C=
 
#	$	
8  $#'
}
 C=
 
#	$	
: *0*0,,(.	:#v+&: 3;': f%	:
 
:F *0*0,,(.	:#v+&: 3;': f%	:
 
:B
:3 
:+< 
:
:s 
:7H 
:7# 7r(   r>   N)r2   r   typingr   r   r   r   r   r	   r
   twilio.baser   r   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r7   r>   r,   r(   r'   <module>r|      sO     L L L + : 2 ' !);, );X7 7&T7 T7r(   