
    piR                         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	e      Z G d
 de
      Z G d de      Zy)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                        e Zd ZdZdedeeef   def fdZe	dd       Z
ej                  fdeeef   dd fd	Zej                  fdeeef   dd fd
ZdefdZ x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                     t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        d|i| _        d | _	        y )Naccount_sid	media_urlservice_sidr   url)
super__init__getr   r   r   r   r   	_solution_context)selfr   r   r   	__class__s       n/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/intelligence/v2/transcript/media.pyr   zMediaInstance.__init__    s{    !*1++m*D(/K(@*1++m*D")++e"4")++e"4 3
 15    returnc                     | j                   )t        | j                  | j                  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
        r   r   )r   MediaContext_versionr   r   s    r   _proxyzMediaInstance._proxy.   s9     == (NN5)DM }}r   redactedc                 :    | j                   j                  |      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'   s     r   r+   zMediaInstance.fetch=   s#     {{   ! 
 	
r   c                 V   K   | j                   j                  |       d{   S 7 w)  
        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,   s     r   r/   zMediaInstance.fetch_asyncI   s1      [[,, - 
 
 	
 
s    )')c                     dj                  d | j                  j                         D              }dj                  |      S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c              3   F   K   | ]  \  }}d j                  ||        ywz{}={}Nformat.0kvs      r   	<genexpr>z)MediaInstance.__repr__.<locals>.<genexpr>]        SDAq7>>!Q/S   !z)<Twilio.Intelligence.V2.MediaInstance {}>joinr   itemsr6   r   contexts     r   __repr__zMediaInstance.__repr__W   s6     ((SDNN<P<P<RSS:AA'JJr   )r    r#   )__name__
__module____qualname____doc__r   r   strr   r   propertyr&   r   unsetr   boolobjectr+   r/   rC   __classcell__r   s   @r   r   r      s    5 5$sCx. 5s 5   5;LL 

eD&L1 

_ 

 /5ll
dFl+
	
K# Kr   r   c                        e Zd Zdedef fdZej                  fdee	e
f   defdZej                  fdee	e
f   defdZdefdZ xZS )	r#   r   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)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   r6   _urir   r   r   r   s      r   r   zMediaContext.__init__c   s@     	! 3
 6.55GG	r   r'   r    c                 &   t        j                  dt        j                  |      i      }t        j                  i       }d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                  d         S )r)   Redactedapplication/jsonAcceptGETmethoduriparamsheadersr   r"   )	r   ofr   boolean_to_stringr$   r+   rR   r   r   r   r'   r\   r]   r   s        r   r+   zMediaContext.fetchr   s     I77A
 ))B-.--%%dii & 
 MMu%
 	
r   c                 B  K   t        j                  dt        j                  |      i      }t        j                  i       }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                  d         S 7 )w)	r.   rU   rV   rW   rX   rY   Nr   r"   )	r   r^   r   r_   r$   r/   rR   r   r   r`   s        r   r/   zMediaContext.fetch_async   s      I77A
 ))B-.11dii 2 
 
 MMu%
 	
	
s   A1B3B4*Bc                     dj                  d | j                  j                         D              }dj                  |      S )r1   r2   c              3   F   K   | ]  \  }}d j                  ||        ywr4   r5   r7   s      r   r;   z(MediaContext.__repr__.<locals>.<genexpr>   r<   r=   z(<Twilio.Intelligence.V2.MediaContext {}>r>   rA   s     r   rC   zMediaContext.__repr__   s6     ((SDNN<P<P<RSS9@@IIr   )rD   rE   rF   r   rH   r   r   rJ   r   rK   rL   r   r+   r/   rC   rM   rN   s   @r   r#   r#   a   ss    H Hc H 5;LL 
eD&L1 
] 
< /5ll
dFl+
	
>J# Jr   r#   c                   L     e Zd Zdedef fdZdefdZdefdZdefdZ	 xZ
S )	MediaListr   r   c                 6    t         |   |       d|i| _        y)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   rS   s      r   r   zMediaList.__init__   s"     	! 3
r   r    c                 J    t        | j                  | j                  d         S z,
        Constructs a MediaContext

        r   r"   r#   r$   r   r%   s    r   r   zMediaList.get       
 DMMt~~e/DEEr   c                 J    t        | j                  | j                  d         S rh   ri   r%   s    r   __call__zMediaList.__call__   rj   r   c                      y)r1   z"<Twilio.Intelligence.V2.MediaList>rQ   r%   s    r   rC   zMediaList.__repr__   s     4r   )rD   rE   rF   r   rH   r   r#   r   rl   rC   rM   rN   s   @r   re   re      s>    
 
c 
F\ FF, F4# 4r   re   N)rG   typingr   r   r   r   twilio.baser   r   twilio.base.instance_contextr	   twilio.base.instance_resourcer
   twilio.base.list_resourcer   twilio.base.versionr   r   r#   re   rQ   r   r   <module>rt      sP    . - ) 8 : 2 'GK$ GKTTJ? TJn%4 %4r   