U
    ^g%i/                     @   s   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
 d
eZG dd deZG dd deZdS )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                       s>   e Zd ZdZeeeef d fddZedddZ	  Z
S )ContentAndApprovalsInstancea{  
    :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 approval_requests: The submitted information and approval request status of the Content resource.
    )versionpayloadc                    s   t  | t|d| _t|d| _|d| _|d| _|d| _	|d| _
|d| _|d| _|d	| _d S )
Ndate_createddate_updatedsidaccount_sidfriendly_namelanguage	variablestypesapproval_requests)super__init__r
   Ziso8601_datetimegetr   r   r   r   r   r   r   r   r   )selfr   r   	__class__ k/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/content/v1/content_and_approvals.pyr   &   s     z$ContentAndApprovalsInstance.__init__returnc                 C   s   dS )f
        Provide a friendly representation

        :returns: Machine friendly representation
        z/<Twilio.Content.V1.ContentAndApprovalsInstance>r"   r   r"   r"   r#   __repr__9   s    z$ContentAndApprovalsInstance.__repr__)__name__
__module____qualname____doc__r   r   strr   r   r(   __classcell__r"   r"   r    r#   r      s   r   c                   @   s2   e Zd Zeeef edddZedddZdS )ContentAndApprovalsPage)r   r%   c                 C   s   t | j|S )zy
        Build an instance of ContentAndApprovalsInstance

        :param payload: Payload response from the API
        )r   _version)r   r   r"   r"   r#   get_instanceE   s    z$ContentAndApprovalsPage.get_instancer$   c                 C   s   dS )r&   z+<Twilio.Content.V1.ContentAndApprovalsPage>r"   r'   r"   r"   r#   r(   M   s    z ContentAndApprovalsPage.__repr__N)	r)   r*   r+   r   r-   r   r   r1   r(   r"   r"   r"   r#   r/   C   s   r/   c                       sD  e Zd Zed fddZdee ee ee dddZ	dee ee e
e ddd	Zdee ee ee dd
dZdee ee ee dddZejejejfeeef eeef eeef edddZejejejfeeef eeef eeef edddZeedddZeedddZedddZ  ZS )ContentAndApprovalsList)r   c                    s   t  | d| _dS )zu
        Initialize the ContentAndApprovalsList

        :param version: Version that contains the resource

        z/ContentAndApprovalsN)r   r   _uri)r   r   r    r"   r#   r   X   s    z ContentAndApprovalsList.__init__N)limit	page_sizer%   c                 C   s0   | j ||}| j|d d}| j ||d S )ai  
        Streams ContentAndApprovalsInstance 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
        r5   r5   r4   )r0   read_limitspagestreamr   r4   r5   Zlimitsr8   r"   r"   r#   r9   c   s    zContentAndApprovalsList.streamc                    s6   | j ||}| j|d dI dH }| j ||d S )ax  
        Asynchronously streams ContentAndApprovalsInstance 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
        r5   r6   Nr4   )r0   r7   
page_asyncstream_asyncr:   r"   r"   r#   r<   |   s    z$ContentAndApprovalsList.stream_asyncc                 C   s   t | j||dS )a  
        Lists ContentAndApprovalsInstance 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
        r4   r5   )listr9   r   r4   r5   r"   r"   r#   r>      s    zContentAndApprovalsList.listc                    s$   dd | j ||dI dH 2 I dH S )a  
        Asynchronously lists ContentAndApprovalsInstance 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
        c                    s   g | z3 d H W }|q6 S )Nr"   ).0recordr"   r"   r#   
<listcomp>   s   z6ContentAndApprovalsList.list_async.<locals>.<listcomp>r=   N)r<   r?   r"   r"   r#   
list_async   s    
z"ContentAndApprovalsList.list_async)
page_tokenpage_numberr5   r%   c                 C   sJ   t |||d}t ddi}d|d< | jjd| j||d}t| j|S )a  
        Retrieve a single page of ContentAndApprovalsInstance 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 ContentAndApprovalsInstance
        Z	PageTokenr   ZPageSizeContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptGETmethoduriparamsheaders)r   ofr0   r8   r3   r/   r   rD   rE   r5   datarP   responser"   r"   r#   r8      s       zContentAndApprovalsList.pagec                    sP   t |||d}t ddi}d|d< | jjd| j||dI dH }t| j|S )	a  
        Asynchronously retrieve a single page of ContentAndApprovalsInstance 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 ContentAndApprovalsInstance
        rF   rG   rH   rI   rJ   rK   rL   N)r   rQ   r0   r;   r3   r/   rR   r"   r"   r#   r;      s       z"ContentAndApprovalsList.page_async)
target_urlr%   c                 C   s   | j jjd|}t| j |S )a  
        Retrieve a specific page of ContentAndApprovalsInstance records from the API.
        Request is executed immediately

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

        :returns: Page of ContentAndApprovalsInstance
        rK   )r0   domaintwiliorequestr/   r   rU   rT   r"   r"   r#   get_page  s    	z ContentAndApprovalsList.get_pagec                    s$   | j jjd|I dH }t| j |S )a  
        Asynchronously retrieve a specific page of ContentAndApprovalsInstance records from the API.
        Request is executed immediately

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

        :returns: Page of ContentAndApprovalsInstance
        rK   N)r0   rV   rW   Zrequest_asyncr/   rY   r"   r"   r#   get_page_async  s    	z&ContentAndApprovalsList.get_page_asyncr$   c                 C   s   dS )r&   z+<Twilio.Content.V1.ContentAndApprovalsList>r"   r'   r"   r"   r#   r(   $  s    z ContentAndApprovalsList.__repr__)NN)NN)NN)NN)r)   r*   r+   r   r   r   intr   r   r9   r	   r<   r   r>   rC   r   unsetr   r-   objectr/   r8   r;   rZ   r[   r(   r.   r"   r"   r    r#   r2   V   sd           


#


!r2   N)r,   r   typingr   r   r   r   r   r   r	   Ztwilio.baser
   r   Ztwilio.base.instance_resourcer   Ztwilio.base.list_resourcer   Ztwilio.base.versionr   Ztwilio.base.pager   r   r/   r2   r"   r"   r"   r#   <module>   s   $*