U
    ^g%iR                     @   s   d Z ddl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 - Intelligence
    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.
    )AnyDictOptionalUnion)	serializevalues)InstanceContext)InstanceResource)ListResource)Versionc                       s   e Zd ZdZeeeef ed fddZe	ddddZ
ejfeeef d d	d
dZejfeeef d d	ddZedddZ  ZS )MediaInstancea5  
    :ivar account_sid: The unique SID identifier of the Account.
    :ivar media_url: Downloadable URL for media, if stored in Twilio AI.
    :ivar service_sid: The unique SID identifier of the Service.
    :ivar sid: The unique SID identifier of the Transcript.
    :ivar url: The URL of this resource.
    )versionpayloadsidc                    s\   t  | |d| _|d| _|d| _|d| _|d| _d|i| _d | _	d S )Naccount_sid	media_urlservice_sidr   url)
super__init__getr   r   r   r   r   	_solution_context)selfr   r   r   	__class__ k/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/intelligence/v2/transcript/media.pyr       s     zMediaInstance.__init__MediaContext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: MediaContext for this MediaInstance
        Nr   r   )r   r   _versionr   r   r   r   r   _proxy.   s    
zMediaInstance._proxyredactedr    c                 C   s   | j j|dS )
        Fetch the MediaInstance

        :param redacted: Grant access to PII Redacted/Unredacted Media. If redaction is enabled, the default is `true` to access redacted media.

        :returns: The fetched MediaInstance
        r&   )r$   fetchr   r&   r   r   r   r)   =   s    zMediaInstance.fetchc                    s   | j j|dI dH S )  
        Asynchronous coroutine to fetch the MediaInstance

        :param redacted: Grant access to PII Redacted/Unredacted Media. If redaction is enabled, the default is `true` to access redacted media.

        :returns: The fetched MediaInstance
        r(   N)r$   fetch_asyncr*   r   r   r   r,   I   s    
zMediaInstance.fetch_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     z)MediaInstance.__repr__.<locals>.<genexpr>z)<Twilio.Intelligence.V2.MediaInstance {}>joinr   itemsr1   r   contextr   r   r   __repr__W   s    zMediaInstance.__repr__)__name__
__module____qualname____doc__r   r   strr   r   propertyr$   r   unsetr   boolobjectr)   r,   r<   __classcell__r   r   r   r   r      s   
r   c                       sn   e Zd Zeed fddZejfee	e
f edddZejfee	e
f edddZed	d
dZ  ZS )r   r   r   c                    s*   t  | d|i| _djf | j| _dS )z
        Initialize the MediaContext

        :param version: Version that contains the resource
        :param sid: The unique SID identifier of the Transcript.
        r   z/Transcripts/{sid}/MediaN)r   r   r   r1   _urir   r   r   r   r   r   r   c   s
     zMediaContext.__init__r%   c                 C   sR   t dt|i}t i }d|d< | jjd| j||d}t| j|| jd dS )r'   Redactedapplication/jsonAcceptGETmethoduriparamsheadersr   r!   )	r   ofr   boolean_to_stringr"   r)   rH   r   r   r   r&   rQ   rR   r   r   r   r   r)   r   s$    	 
   zMediaContext.fetchc                    sX   t dt|i}t i }d|d< | jjd| j||dI dH }t| j|| jd dS )	r+   rJ   rK   rL   rM   rN   Nr   r!   )	r   rS   r   rT   r"   r,   rH   r   r   rU   r   r   r   r,      s$     
   zMediaContext.fetch_asyncr   c                 C   s$   d dd | j D }d|S )r-   r.   c                 s   s   | ]\}}d  ||V  qdS r/   r0   r2   r   r   r   r6      s     z(MediaContext.__repr__.<locals>.<genexpr>z(<Twilio.Intelligence.V2.MediaContext {}>r7   r:   r   r   r   r<      s    zMediaContext.__repr__)r=   r>   r?   r   rA   r   r   rC   r   rD   rE   r   r)   r,   r<   rF   r   r   r   r   r   a   s   
r   c                       sN   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	  Z
S )	MediaListrG   c                    s   t  | d|i| _dS )z
        Initialize the MediaList

        :param version: Version that contains the resource
        :param sid: The unique SID identifier of the Transcript.

        r   N)r   r   r   rI   r   r   r   r      s     zMediaList.__init__r   c                 C   s   t | j| jd dS z,
        Constructs a MediaContext

        r   r!   r   r"   r   r#   r   r   r   r      s    zMediaList.getc                 C   s   t | j| jd dS rW   rX   r#   r   r   r   __call__   s    zMediaList.__call__c                 C   s   dS )r-   z"<Twilio.Intelligence.V2.MediaList>r   r#   r   r   r   r<      s    zMediaList.__repr__)r=   r>   r?   r   rA   r   r   r   rY   r<   rF   r   r   r   r   rV      s   rV   N)r@   typingr   r   r   r   Ztwilio.baser   r   Ztwilio.base.instance_contextr   Ztwilio.base.instance_resourcer	   Ztwilio.base.list_resourcer
   Ztwilio.base.versionr   r   r   rV   r   r   r   r   <module>   s   JW