o
    f>hJ                     @   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dedeeef def fddZe	dd	d
Z
ejfdeeef dd fddZejfdeeef dd fddZdef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__ _/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/intelligence/v2/transcript/media.pyr       s   
zMediaInstance.__init__returnMediaContextc                 C   s&   | j du 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redactedc                 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   $   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s        | ]\}}d  ||V  qdS z{}={}Nformat.0kvr   r   r   	<genexpr>]       z)MediaInstance.__repr__.<locals>.<genexpr>z)<Twilio.Intelligence.V2.MediaInstance {}>joinr   itemsr1   r   contextr   r   r   __repr__W      
zMediaInstance.__repr__)r   r   )__name__
__module____qualname____doc__r   r   strr   r   propertyr#   r   unsetr   boolobjectr'   r*   r=   __classcell__r   r   r   r   r      s    " 

r   c                       st   e Zd Zdedef fddZejfdee	e
f defddZejfdee	e
f defd	d
ZdefddZ  ZS )r   r   r   c                    s.   t  | d|i| _djdi | 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}/MediaNr   )r   r   r   r1   _urir   r   r   r   r   r   r   c   s   zMediaContext.__init__r$   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'   rI   r   r   r   r$   datarS   r   r   r   r   r'   r   s   	


zMediaContext.fetchc                    sZ   t dt|i}t i }d|d< | jjd| j||dI dH }t| j|| jd dS )	r)   rK   rL   rM   rN   rO   Nr   r    )	r   rT   r   rU   r!   r*   rI   r   r   rV   r   r   r   r*      s   


zMediaContext.fetch_asyncc                 C   r+   )r,   r-   c                 s   r.   r/   r0   r2   r   r   r   r6      r7   z(MediaContext.__repr__.<locals>.<genexpr>z(<Twilio.Intelligence.V2.MediaContext {}>r8   r;   r   r   r   r=      r>   zMediaContext.__repr__)r?   r@   rA   r   rC   r   r   rE   r   rF   rG   r   r'   r*   r=   rH   r   r   r   r   r   a   s     

r   c                       sP   e Zd Zdedef fddZdefddZdefdd	Zdefd
dZ	  Z
S )	MediaListr   r   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   rJ   r   r   r   r      s   
zMediaList.__init__r   c                 C      t | j| jd dS z,
        Constructs a MediaContext

        r   r    r   r!   r   r"   r   r   r   r         zMediaList.getc                 C   rY   rZ   r[   r"   r   r   r   __call__   r\   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@   rA   r   rC   r   r   r   r]   r=   rH   r   r   r   r   rX      s
    rX   N)rB   typingr   r   r   r   twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer	   twilio.base.list_resourcer
   twilio.base.versionr   r   r   rX   r   r   r   r   <module>   s    JW