o
    e/=                     @   s   d 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 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 )za
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
    )deserialize)	serialize)values)InstanceContext)InstanceResource)ListResource)Pagec                       st   e Zd Z fddZejfddZdddZddd	Zejejejfd
dZ	dd Z
dd Zdd Zdd Z  ZS )SupportingDocumentListc                    s.   t t| | i | _djdi | j| _dS )a$  
        Initialize the SupportingDocumentList

        :param Version version: Version that contains the resource

        :returns: twilio.rest.trusthub.v1.supporting_document.SupportingDocumentList
        :rtype: twilio.rest.trusthub.v1.supporting_document.SupportingDocumentList
        z/SupportingDocumentsN )superr	   __init__	_solutionformat_uri)selfversion	__class__r
   ^/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/trusthub/v1/supporting_document.pyr      s   	zSupportingDocumentList.__init__c                 C   s8   t ||t|d}| jjd| j|d}t| j|S )a  
        Create the SupportingDocumentInstance

        :param unicode friendly_name: The string that you assigned to describe the resource
        :param unicode type: The type of the Supporting Document
        :param dict attributes: The set of parameters that compose the Supporting Documents resource

        :returns: The created SupportingDocumentInstance
        :rtype: twilio.rest.trusthub.v1.supporting_document.SupportingDocumentInstance
        )FriendlyNameType
AttributesPOSTmethoduridata)r   ofr   object_versioncreater   SupportingDocumentInstance)r   friendly_nametype
attributesr   payloadr
   r
   r   r    #   s   zSupportingDocumentList.createNc                 C   s0   | j ||}| j|d d}| j ||d S )a  
        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 int limit: Upper limit for the number of records to return. stream()
                          guarantees to never return more than limit.  Default is no limit
        :param int 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
        :rtype: list[twilio.rest.trusthub.v1.supporting_document.SupportingDocumentInstance]
        	page_size)r&   limit)r   read_limitspagestream)r   r'   r&   limitsr)   r
   r
   r   r*   8   s   zSupportingDocumentList.streamc                 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 int limit: Upper limit for the number of records to return. list() guarantees
                          never to return more than limit.  Default is no limit
        :param int 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: Generator that will yield up to limit results
        :rtype: list[twilio.rest.trusthub.v1.supporting_document.SupportingDocumentInstance]
        )r'   r&   )listr*   )r   r'   r&   r
   r
   r   r,   O   s   zSupportingDocumentList.listc                 C   s6   t |||d}| jjd| j|d}t| j|| jS )a  
        Retrieve a single page of SupportingDocumentInstance records from the API.
        Request is executed immediately

        :param str page_token: PageToken provided by the API
        :param int page_number: Page Number, this value is simply for client state
        :param int page_size: Number of records to return, defaults to 50

        :returns: Page of SupportingDocumentInstance
        :rtype: twilio.rest.trusthub.v1.supporting_document.SupportingDocumentPage
        )	PageTokenr   PageSizeGET)r   r   params)r   r   r   r)   r   SupportingDocumentPager   )r   
page_tokenpage_numberr&   r   responser
   r
   r   r)   a   s   zSupportingDocumentList.pagec                 C   s"   | j jjd|}t| j || jS )a`  
        Retrieve a specific page of SupportingDocumentInstance records from the API.
        Request is executed immediately

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

        :returns: Page of SupportingDocumentInstance
        :rtype: twilio.rest.trusthub.v1.supporting_document.SupportingDocumentPage
        r/   )r   domaintwiliorequestr1   r   )r   
target_urlr4   r
   r
   r   get_paget   s
   

zSupportingDocumentList.get_pagec                 C      t | j|dS a+  
        Constructs a SupportingDocumentContext

        :param sid: The unique string that identifies the resource

        :returns: twilio.rest.trusthub.v1.supporting_document.SupportingDocumentContext
        :rtype: twilio.rest.trusthub.v1.supporting_document.SupportingDocumentContext
        sidSupportingDocumentContextr   r   r=   r
   r
   r   get      	zSupportingDocumentList.getc                 C   r:   r;   r>   r@   r
   r
   r   __call__   rB   zSupportingDocumentList.__call__c                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z+<Twilio.Trusthub.V1.SupportingDocumentList>r
   r   r
   r
   r   __repr__      zSupportingDocumentList.__repr__)NN)__name__
__module____qualname__r   r   unsetr    r*   r,   r)   r9   rA   rC   rG   __classcell__r
   r
   r   r   r	      s    


r	   c                       s,   e Zd Z fddZdd Zdd Z  ZS )r1   c                    s   t t| || || _dS )a\  
        Initialize the SupportingDocumentPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API

        :returns: twilio.rest.trusthub.v1.supporting_document.SupportingDocumentPage
        :rtype: twilio.rest.trusthub.v1.supporting_document.SupportingDocumentPage
        N)r   r1   r   r   )r   r   r4   solutionr   r
   r   r      s   

zSupportingDocumentPage.__init__c                 C   s   t | j|S )a.  
        Build an instance of SupportingDocumentInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.trusthub.v1.supporting_document.SupportingDocumentInstance
        :rtype: twilio.rest.trusthub.v1.supporting_document.SupportingDocumentInstance
        )r!   r   r   r%   r
   r
   r   get_instance   s   	z#SupportingDocumentPage.get_instancec                 C   rD   )rE   z+<Twilio.Trusthub.V1.SupportingDocumentPage>r
   rF   r
   r
   r   rG      rH   zSupportingDocumentPage.__repr__)rI   rJ   rK   r   rP   rG   rM   r
   r
   r   r   r1      s    r1   c                       sF   e Zd Z fddZdd ZejejfddZdd Zd	d
 Z	  Z
S )r?   c                    s2   t t| | d|i| _djdi | j| _dS )ap  
        Initialize the SupportingDocumentContext

        :param Version version: Version that contains the resource
        :param sid: The unique string that identifies the resource

        :returns: twilio.rest.trusthub.v1.supporting_document.SupportingDocumentContext
        :rtype: twilio.rest.trusthub.v1.supporting_document.SupportingDocumentContext
        r=   z/SupportingDocuments/{sid}Nr
   )r   r?   r   r   r   r   )r   r   r=   r   r
   r   r      s   

z"SupportingDocumentContext.__init__c                 C   s(   | j jd| jd}t| j || jd dS )
        Fetch the SupportingDocumentInstance

        :returns: The fetched SupportingDocumentInstance
        :rtype: twilio.rest.trusthub.v1.supporting_document.SupportingDocumentInstance
        r/   r   r   r=   r<   )r   fetchr   r!   r   rO   r
   r
   r   rS      s   zSupportingDocumentContext.fetchc                 C   s@   t |t|d}| jjd| j|d}t| j|| jd dS )  
        Update the SupportingDocumentInstance

        :param unicode friendly_name: The string that you assigned to describe the resource
        :param dict attributes: The set of parameters that compose the Supporting Document resource

        :returns: The updated SupportingDocumentInstance
        :rtype: twilio.rest.trusthub.v1.supporting_document.SupportingDocumentInstance
        )r   r   r   r   r=   r<   )	r   r   r   r   r   updater   r!   r   )r   r"   r$   r   r%   r
   r
   r   rU      s   
z SupportingDocumentContext.updatec                 C   s   | j jd| jdS )
        Deletes the SupportingDocumentInstance

        :returns: True if delete succeeds, False otherwise
        :rtype: bool
        DELETErR   )r   deleter   rF   r
   r
   r   rX      s   z SupportingDocumentContext.deletec                 C   $   d dd | j D }d|S )rE    c                 s        | ]\}}d  ||V  qdS z{}={}Nr   .0kvr
   r
   r   	<genexpr>      z5SupportingDocumentContext.__repr__.<locals>.<genexpr>z1<Twilio.Trusthub.V1.SupportingDocumentContext {}>joinr   itemsr   r   contextr
   r
   r   rG        
z"SupportingDocumentContext.__repr__)rI   rJ   rK   r   rS   r   rL   rU   rX   rG   rM   r
   r
   r   r   r?      s    	r?   c                       s   e Zd ZG dd deZd$ fdd	Zedd Zedd	 Zed
d Z	edd Z
edd Zedd Zedd Zedd Zedd Zedd Zedd Zdd ZejejfddZd d! Zd"d# Z  ZS )%r!   c                   @   s$   e Zd ZdZdZdZdZdZdZdS )z!SupportingDocumentInstance.Statusdraftzpending-reviewrejectedapprovedexpiredzprovisionally-approvedN)	rI   rJ   rK   DRAFTPENDING_REVIEWREJECTEDAPPROVEDEXPIREDPROVISIONALLY_APPROVEDr
   r
   r
   r   Status  s    rt   Nc                    s   t t| | |d|d|d|d|d|d|dt|dt|d	|d
d
| _d| _d|pD| jd i| _dS )z
        Initialize the SupportingDocumentInstance

        :returns: twilio.rest.trusthub.v1.supporting_document.SupportingDocumentInstance
        :rtype: twilio.rest.trusthub.v1.supporting_document.SupportingDocumentInstance
        r=   account_sidr"   	mime_typestatusr#   r$   date_createddate_updatedurl)
r=   ru   r"   rv   rw   r#   r$   rx   ry   rz   N)	r   r!   r   rA   r   iso8601_datetime_properties_contextr   )r   r   r%   r=   r   r
   r   r     s   z#SupportingDocumentInstance.__init__c                 C   s&   | j du rt| j| jd d| _ | j S )aV  
        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
        :rtype: twilio.rest.trusthub.v1.supporting_document.SupportingDocumentContext
        Nr=   r<   )r}   r?   r   r   rF   r
   r
   r   _proxy1  s   
	z!SupportingDocumentInstance._proxyc                 C   
   | j d S )zb
        :returns: The unique string that identifies the resource
        :rtype: unicode
        r=   r|   rF   r
   r
   r   r=   >     
zSupportingDocumentInstance.sidc                 C   r   )zd
        :returns: The SID of the Account that created the resource
        :rtype: unicode
        ru   r   rF   r
   r
   r   ru   F  r   z&SupportingDocumentInstance.account_sidc                 C   r   )zi
        :returns: The string that you assigned to describe the resource
        :rtype: unicode
        r"   r   rF   r
   r
   r   r"   N  r   z(SupportingDocumentInstance.friendly_namec                 C   r   )zN
        :returns: The image type of the file
        :rtype: unicode
        rv   r   rF   r
   r
   r   rv   V  r   z$SupportingDocumentInstance.mime_typec                 C   r   )z
        :returns: The verification status of the Supporting Document resource
        :rtype: SupportingDocumentInstance.Status
        rw   r   rF   r
   r
   r   rw   ^  r   z!SupportingDocumentInstance.statusc                 C   r   )zW
        :returns: The type of the Supporting Document
        :rtype: unicode
        r#   r   rF   r
   r
   r   r#   f  r   zSupportingDocumentInstance.typec                 C   r   )zu
        :returns: The set of parameters that compose the Supporting Documents resource
        :rtype: dict
        r$   r   rF   r
   r
   r   r$   n  r   z%SupportingDocumentInstance.attributesc                 C   r   )zt
        :returns: The ISO 8601 date and time in GMT when the resource was created
        :rtype: datetime
        rx   r   rF   r
   r
   r   rx   v  r   z'SupportingDocumentInstance.date_createdc                 C   r   )zy
        :returns: The ISO 8601 date and time in GMT when the resource was last updated
        :rtype: datetime
        ry   r   rF   r
   r
   r   ry   ~  r   z'SupportingDocumentInstance.date_updatedc                 C   r   )zh
        :returns: The absolute URL of the Supporting Document resource
        :rtype: unicode
        rz   r   rF   r
   r
   r   rz     r   zSupportingDocumentInstance.urlc                 C   
   | j  S )rQ   )r~   rS   rF   r
   r
   r   rS        
z SupportingDocumentInstance.fetchc                 C   s   | j j||dS )rT   )r"   r$   )r~   rU   )r   r"   r$   r
   r
   r   rU     s   
z!SupportingDocumentInstance.updatec                 C   r   )rV   )r~   rX   rF   r
   r
   r   rX     r   z!SupportingDocumentInstance.deletec                 C   rY   )rE   rZ   c                 s   r[   r\   r]   r^   r
   r
   r   rb     rc   z6SupportingDocumentInstance.__repr__.<locals>.<genexpr>z2<Twilio.Trusthub.V1.SupportingDocumentInstance {}>rd   rg   r
   r
   r   rG     ri   z#SupportingDocumentInstance.__repr__)N)rI   rJ   rK   r   rt   r   propertyr~   r=   ru   r"   rv   rw   r#   r$   rx   ry   rz   rS   r   rL   rU   rX   rG   rM   r
   r
   r   r   r!     s:    










		r!   N)__doc__twilio.baser   r   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r	   r1   r?   r!   r
   r
   r
   r   <module>   s    &A