U
    ^g%ib[                     @   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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 de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 - Trusthub
    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	serializevalues)InstanceContext)InstanceResource)ListResource)Version)Pagec                       s   e Zd ZG dd deZdeeeef e	e d fddZ
eddd	d
ZedddZedddZd dddZd dddZejejfeeef eeef d dddZejejfeeef eeef d dddZedddZ  ZS )SupportingDocumentInstancec                   @   s$   e Zd ZdZdZdZdZdZdZdS )z!SupportingDocumentInstance.StatusDRAFTPENDING_REVIEWREJECTEDAPPROVEDEXPIREDPROVISIONALLY_APPROVEDN)	__name__
__module____qualname__r   r   r   r   r   r    r   r   j/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/trusthub/v1/supporting_document.pyStatus   s   r   N)versionpayloadsidc                    s   t  | |d| _|d| _|d| _|d| _|d| _|d| _|d| _	t
|d| _t
|d	| _|d
| _d|p| ji| _d | _d S )Nr!   account_sidfriendly_name	mime_typestatustype
attributesdate_createddate_updatedurl)super__init__getr!   r"   r#   r$   r%   r&   r'   r
   Ziso8601_datetimer(   r)   r*   	_solution_context)selfr   r    r!   	__class__r   r   r,   0   s*     z#SupportingDocumentInstance.__init__SupportingDocumentContextreturnc                 C   s&   | j dkr t| j| jd 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: SupportingDocumentContext for this SupportingDocumentInstance
        Nr!   r!   )r/   r3   _versionr.   r0   r   r   r   _proxyK   s    
z!SupportingDocumentInstance._proxyc                 C   s
   | j  S )u
        Deletes the SupportingDocumentInstance


        :returns: True if delete succeeds, False otherwise
        )r9   deleter8   r   r   r   r;   Z   s    z!SupportingDocumentInstance.deletec                    s   | j  I dH S )
        Asynchronous coroutine that deletes the SupportingDocumentInstance


        :returns: True if delete succeeds, False otherwise
        N)r9   delete_asyncr8   r   r   r   r=   c   s    z'SupportingDocumentInstance.delete_asyncc                 C   s
   | j  S )q
        Fetch the SupportingDocumentInstance


        :returns: The fetched SupportingDocumentInstance
        )r9   fetchr8   r   r   r   r?   l   s    z SupportingDocumentInstance.fetchc                    s   | j  I dH S )
        Asynchronous coroutine to fetch the SupportingDocumentInstance


        :returns: The fetched SupportingDocumentInstance
        N)r9   fetch_asyncr8   r   r   r   rA   u   s    z&SupportingDocumentInstance.fetch_asyncr#   r'   r5   c                 C   s   | j j||dS )a  
        Update the SupportingDocumentInstance

        :param friendly_name: The string that you assigned to describe the resource.
        :param attributes: The set of parameters that are the attributes of the Supporting Document resource which are derived Supporting Document Types.

        :returns: The updated SupportingDocumentInstance
        r#   r'   )r9   updater0   r#   r'   r   r   r   rE   ~   s    z!SupportingDocumentInstance.updatec                    s   | j j||dI dH S ){  
        Asynchronous coroutine to update the SupportingDocumentInstance

        :param friendly_name: The string that you assigned to describe the resource.
        :param attributes: The set of parameters that are the attributes of the Supporting Document resource which are derived Supporting Document Types.

        :returns: The updated SupportingDocumentInstance
        rD   N)r9   update_asyncrF   r   r   r   rH      s    z'SupportingDocumentInstance.update_asyncc                 C   s$   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s   s   | ]\}}d  ||V  qdS z{}={}Nformat.0kvr   r   r   	<genexpr>   s     z6SupportingDocumentInstance.__repr__.<locals>.<genexpr>z2<Twilio.Trusthub.V1.SupportingDocumentInstance {}>joinr.   itemsrM   r0   contextr   r   r   __repr__   s    z#SupportingDocumentInstance.__repr__)N)r   r   r   objectr   r   r   strr   r   r,   propertyr9   boolr;   r=   r?   rA   r   unsetr   rE   rH   rX   __classcell__r   r   r1   r   r      s8     
 			



r   c                       s   e Zd Zeed fddZedddZedddZe	dd	d
Z
e	dddZejejfeeef eeef e	dddZejejfeeef eeef e	dddZedddZ  ZS )r3   )r   r!   c                    s*   t  | d|i| _djf | j| _dS )z
        Initialize the SupportingDocumentContext

        :param version: Version that contains the resource
        :param sid: The unique string created by Twilio to identify the Supporting Document resource.
        r!   z/SupportingDocuments/{sid}N)r+   r,   r.   rM   _uri)r0   r   r!   r1   r   r   r,      s
     z"SupportingDocumentContext.__init__r4   c                 C   s   t i }| jjd| j|dS )r:   DELETEmethoduriheaders)r   ofr7   r;   r_   r0   rd   r   r   r   r;      s    
z SupportingDocumentContext.deletec                    s$   t i }| jjd| j|dI dH S )r<   r`   ra   N)r   re   r7   r=   r_   rf   r   r   r   r=      s    
  z&SupportingDocumentContext.delete_asyncc                 C   s<   t i }d|d< | jjd| j|d}t| j|| jd dS )r>   application/jsonAcceptGETra   r!   r6   )r   re   r7   r?   r_   r   r.   r0   rd   r    r   r   r   r?      s    
zSupportingDocumentContext.fetchc                    sB   t i }d|d< | jjd| j|dI dH }t| j|| jd dS )r@   rg   rh   ri   ra   Nr!   r6   )r   re   r7   rA   r_   r   r.   rj   r   r   r   rA      s    
  z%SupportingDocumentContext.fetch_asyncrB   c                 C   s\   t |t|d}t i }d|d< d|d< | jjd| j||d}t| j|| jd d	S )
rC   FriendlyName
Attributes!application/x-www-form-urlencodedContent-Typerg   rh   POSTrb   rc   datard   r!   r6   )	r   re   r   rY   r7   rE   r_   r   r.   r0   r#   r'   rr   rd   r    r   r   r   rE     s&    
     z SupportingDocumentContext.updatec                    sb   t |t|d}t i }d|d< d|d< | jjd| j||dI dH }t| j|| jd	 d
S )rG   rk   rn   ro   rg   rh   rp   rq   Nr!   r6   )	r   re   r   rY   r7   rH   r_   r   r.   rs   r   r   r   rH   #  s&    
     z&SupportingDocumentContext.update_asyncc                 C   s$   d dd | j D }d|S )rI   rJ   c                 s   s   | ]\}}d  ||V  qdS rK   rL   rN   r   r   r   rR   K  s     z5SupportingDocumentContext.__repr__.<locals>.<genexpr>z1<Twilio.Trusthub.V1.SupportingDocumentContext {}>rS   rV   r   r   r   rX   E  s    z"SupportingDocumentContext.__repr__)r   r   r   r   rZ   r,   r\   r;   r=   r   r?   rA   r   r]   r   rY   rE   rH   rX   r^   r   r   r1   r   r3      s(   

$

"r3   c                   @   s2   e Zd Zeeef edddZedddZdS )SupportingDocumentPage)r    r5   c                 C   s   t | j|S )zx
        Build an instance of SupportingDocumentInstance

        :param payload: Payload response from the API
        )r   r7   )r0   r    r   r   r   get_instanceQ  s    z#SupportingDocumentPage.get_instancer4   c                 C   s   dS )rI   z+<Twilio.Trusthub.V1.SupportingDocumentPage>r   r8   r   r   r   rX   Y  s    zSupportingDocumentPage.__repr__N)	r   r   r   r   rZ   r   r   ru   rX   r   r   r   r   rt   O  s   rt   c                       s  e Zd Zed fddZejfeeee	e	f e
dddZejfeeee	e	f 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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edddZeedd d!Zed"d#d$Z  ZS ))SupportingDocumentList)r   c                    s   t  | d| _dS )zt
        Initialize the SupportingDocumentList

        :param version: Version that contains the resource

        z/SupportingDocumentsN)r+   r,   r_   )r0   r   r1   r   r   r,   d  s    zSupportingDocumentList.__init__)r#   r&   r'   r5   c                 C   sX   t ||t|d}t ddi}d|d< d|d< | jjd| j||d}t| j|S )a  
        Create the SupportingDocumentInstance

        :param friendly_name: The string that you assigned to describe the resource.
        :param type: The type of the Supporting Document.
        :param attributes: The set of parameters that are the attributes of the Supporting Documents resource which are derived Supporting Document Types.

        :returns: The created SupportingDocumentInstance
        rl   Typerm   ro   rn   rg   rh   rp   rq   )r   re   r   rY   r7   creater_   r   r0   r#   r&   r'   rr   rd   r    r   r   r   ry   o  s        zSupportingDocumentList.createc                    s^   t ||t|d}t ddi}d|d< d|d< | jjd| j||dI dH }t| j|S )	a  
        Asynchronously create the SupportingDocumentInstance

        :param friendly_name: The string that you assigned to describe the resource.
        :param type: The type of the Supporting Document.
        :param attributes: The set of parameters that are the attributes of the Supporting Documents resource which are derived Supporting Document Types.

        :returns: The created SupportingDocumentInstance
        rw   ro   rn   rg   rh   rp   rq   N)r   re   r   rY   r7   create_asyncr_   r   rz   r   r   r   r{     s        z#SupportingDocumentList.create_asyncN)limit	page_sizer5   c                 C   s0   | j ||}| j|d d}| j ||d S )ah  
        Streams SupportingDocumentInstance 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|   )r7   read_limitspagestreamr0   r|   r}   Zlimitsr   r   r   r   r     s    zSupportingDocumentList.streamc                    s6   | j ||}| j|d dI dH }| j ||d S )aw  
        Asynchronously streams SupportingDocumentInstance 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|   )r7   r   
page_asyncstream_asyncr   r   r   r   r     s    z#SupportingDocumentList.stream_asyncc                 C   s   t | j||dS )a  
        Lists SupportingDocumentInstance 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   r0   r|   r}   r   r   r   r     s    zSupportingDocumentList.listc                    s$   dd | j ||dI dH 2 I dH S )a  
        Asynchronously lists SupportingDocumentInstance 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   )rO   recordr   r   r   
<listcomp>  s   z5SupportingDocumentList.list_async.<locals>.<listcomp>r   N)r   r   r   r   r   
list_async  s    
z!SupportingDocumentList.list_async)
page_tokenpage_numberr}   r5   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 SupportingDocumentInstance 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 SupportingDocumentInstance
        Z	PageTokenr   ZPageSizero   rn   rg   rh   ri   rb   rc   paramsrd   )r   re   r7   r   r_   rt   r0   r   r   r}   rr   rd   responser   r   r   r     s       zSupportingDocumentList.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 SupportingDocumentInstance 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 SupportingDocumentInstance
        r   ro   rn   rg   rh   ri   r   N)r   re   r7   r   r_   rt   r   r   r   r   r   =  s       z!SupportingDocumentList.page_async)
target_urlr5   c                 C   s   | j jjd|}t| j |S )a	  
        Retrieve a specific page of SupportingDocumentInstance records from the API.
        Request is executed immediately

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

        :returns: Page of SupportingDocumentInstance
        ri   )r7   domaintwiliorequestrt   r0   r   r   r   r   r   get_page^  s    	zSupportingDocumentList.get_pagec                    s$   | j jjd|I dH }t| j |S )a  
        Asynchronously retrieve a specific page of SupportingDocumentInstance records from the API.
        Request is executed immediately

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

        :returns: Page of SupportingDocumentInstance
        ri   N)r7   r   r   Zrequest_asyncrt   r   r   r   r   get_page_asyncj  s    	z%SupportingDocumentList.get_page_async)r!   r5   c                 C   s   t | j|dS z
        Constructs a SupportingDocumentContext

        :param sid: The unique string created by Twilio to identify the Supporting Document resource.
        r6   r3   r7   r0   r!   r   r   r   r-   v  s    zSupportingDocumentList.getc                 C   s   t | j|dS r   r   r   r   r   r   __call__~  s    zSupportingDocumentList.__call__r4   c                 C   s   dS )rI   z+<Twilio.Trusthub.V1.SupportingDocumentList>r   r8   r   r   r   rX     s    zSupportingDocumentList.__repr__)NN)NN)NN)NN) r   r   r   r   r,   r   r]   rZ   r   rY   r   ry   r{   r   intr   r   r	   r   r   r   r   rt   r   r   r   r   r3   r-   r   rX   r^   r   r   r1   r   rv   b  s   
'
%        


#


!rv   N)__doc__r   typingr   r   r   r   r   r   r	   Ztwilio.baser
   r   r   Ztwilio.base.instance_contextr   Ztwilio.base.instance_resourcer   Ztwilio.base.list_resourcer   Ztwilio.base.versionr   Ztwilio.base.pager   r   r3   rt   rv   r   r   r   r   <module>   s   $  $