
    d{iL                         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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)ApiResponse)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      c/home/sas/my/fyp/ringai/.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_instanceH   s     %T]]G<<r)   c                      y)r,   z%<Twilio.Content.V1.LegacyContentPage>r-   r.   s    r(   r/   zLegacyContentPage.__repr__P        7r)   N)	r0   r1   r2   r   r4   r   r   r;   r/   r-   r)   r(   r8   r8   F   s*    =DcN =7L =7# 7r)   r8   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fdZ	 	 ddee   de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fdZ	 	 ddee   dee   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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__[   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
        rC   rC   rB   )r:   read_limitspagestreamr&   rB   rC   limitsrG   s        r(   rH   zLegacyContentList.streamf   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
        rC   rE   NrB   )r:   rF   
page_asyncstream_asyncrI   s        r(   rM   zLegacyContentList.stream_async   sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                     | j                   j                  ||      }| j                  |d         }| j                   j                  |j                  |d         }||j
                  |j                  fS )a  
        Streams LegacyContentInstance and returns headers from first page


        :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: tuple of (generator, status_code, headers) where generator yields instances
        rC   rE   rB   )r:   rF   page_with_http_inforH   datastatus_codeheadersr&   rB   rC   rJ   page_response	generators         r(   stream_with_http_infoz'LegacyContentList.stream_with_http_info   sk    $ **5)<006+;N0OMM((););VG_M	=44m6K6KLLr)   c                   K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  |j                  |d         }||j
                  |j                  fS 7 Fw)a  
        Asynchronously streams LegacyContentInstance and returns headers from first page


        :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: tuple of (generator, status_code, headers) where generator yields instances
        rC   rE   NrB   )r:   rF   page_with_http_info_asyncrM   rP   rQ   rR   rS   s         r(   stream_with_http_info_asyncz-LegacyContentList.stream_with_http_info_async   s     $ **5)<"<<[) = 
 
 MM..}/A/A6'?S	=44m6K6KLL
s   5B A>AB 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
        rB   rC   )listrH   )r&   rB   rC   s      r(   r\   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
        r[   N)rM   )r&   rB   rC   records       r(   
list_asynczLegacyContentList.list_async   sT     * '+&7&7# '8 ' !
 
 !
 
 	
 
s0   ;.;620
26;26;c                 b    | j                  ||      \  }}}t        |      }t        |||      S )a  
        Lists LegacyContentInstance and returns headers from first page


        :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: ApiResponse with list of instances, status code, and headers
        r[   rP   rQ   rR   )rV   r\   r   )r&   rB   rC   rU   rQ   rR   itemss          r(   list_with_http_infoz%LegacyContentList.list_with_http_info   sA    $ +/*D*D +E +
'	; Y;PPr)   c                    K   | j                  ||       d{   \  }}}|2 cg c3 d{   }|7 7 	6 nc c}w }}t        |||      S w)a  
        Asynchronously lists LegacyContentInstance and returns headers from first page


        :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: ApiResponse with list of instances, status code, and headers
        r[   Nra   )rY   r   )r&   rB   rC   rU   rQ   rR   r^   rb   s           r(   list_with_http_info_asyncz+LegacyContentList.list_with_http_info_async  sf     $ 150P0P 1Q 1
 +
'	; -666&	+
 7666;PPs4   A4A:86
8:A8:A
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paramsrR   )r   ofr:   rG   rA   r8   r&   rf   rg   rC   rP   rR   responses          r(   rG   zLegacyContentList.page1  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
        ri   rl   rm   rn   ro   rp   rq   N)r   ru   r:   rL   rA   r8   rv   s          r(   rL   zLegacyContentList.page_asyncR  s       yy'#%
 ))^-PQR.11diig 2 
 
 !99
s   A"B$A?%Bc                    t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      \  }}}t        | j                  |      }	t        |	||      S )	a_  
        Retrieve a single page with response metadata


        :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: ApiResponse with LegacyContentPage, status code, and headers
        ri   rl   rm   rn   ro   rp   rq   ra   )r   ru   r:   page_with_response_inforA   r8   r   
r&   rf   rg   rC   rP   rR   rw   rQ   response_headersrG   s
             r(   rO   z%LegacyContentList.page_with_http_infos  s      yy'#%
 ))^-PQR.26--2W2Wdiig 3X 3
/+/ !9+GWXXr)   c                 *  K   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   \  }}}t        | j                  |      }	t        |	||	      S 7 ,w)
an  
        Asynchronously retrieve a single page with response metadata


        :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: ApiResponse with LegacyContentPage, status code, and headers
        ri   rl   rm   rn   ro   rp   rq   Nra   )r   ru   r:   page_with_response_info_asyncrA   r8   r   r{   s
             r(   rX   z+LegacyContentList.page_with_http_info_async  s       yy'#%
 ))^-PQR. --==$))D' >   	0+/
 !9+GWXXs   A"B$B%-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
        rp   )r:   domaintwiliorequestr8   r&   r   rw   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
        rp   N)r:   r   r   request_asyncr8   r   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)#r0   r1   r2   r   r#   r   intr	   r   rH   r
   rM   tuplerV   rY   r   r\   r_   r   rc   re   r   unsetr   r4   objectr8   rG   rL   rO   rX   r   r   r/   r5   r6   s   @r(   r?   r?   Y   sy   	% 	%  $#';}; C=; 
'	(	;6  $#'A}A C=A 
,	-	A6  $#'M}M C=M 
	M4  $#'M}M C=M 
	M8  $#'
}
 C=
 
#	$	
8  $#'
}
 C=
 
#	$	
:  $#'Q}Q C=Q 
	Q6  $#'Q}Q C=Q 
	Q6 *0*0,,(.	:#v+&: 3;': f%	:
 
:F *0*0,,(.	:#v+&: 3;': f%	:
 
:F *0*0,,(.	 Y#v+& Y 3;' Y f%	 Y
 
 YH *0*0,,(.	"Y#v+&"Y 3;'"Y f%	"Y
 
"YH
:3 
:+< 
:
:s 
:7H 
:7# 7r)   r?   N)r3   r   typingr   r   r   r   r   r	   r
   twilio.baser   r   twilio.base.api_responser   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r8   r?   r-   r)   r(   <module>r      sR     L L L + 0 : 2 ' !);, );X7 7&~7 ~7r)   