
    piS                         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e      Z G d de      Z G d de      Z G d de      Zy)a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Video
    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            
            e Zd Z G d de      Z	 	 ddedeeef   dede	e   f fdZ
edd	       Zdd
ZddZej                   fdedef   dd fdZej                   fdedef   dd fdZdefdZ xZS )TranscriptionsInstancec                       e Zd ZdZdZdZy)TranscriptionsInstance.StatusstartedstoppedfailedN)__name__
__module____qualname__STARTEDSTOPPEDFAILED     j/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/video/v1/room/transcriptions.pyStatusr      s    r!   r#   versionpayloadroom_sidttidc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _	        t        j                  |j                  d            | _
        t        j                  |j                  d            | _        t        j                  |j                  d            | _        t        j                  |j                  d	            | _        |j                  d
      | _        |j                  d      | _        ||xs | j                  d| _        d | _        y )Nr'   account_sidr&   statusdate_createddate_updated
start_timeend_timedurationurlconfigurationr&   r'   )super__init__getr'   r)   r&   r*   r   iso8601_datetimer+   r,   r-   r.   integerr/   r0   r1   	_solution_context)selfr$   r%   r&   r'   	__class__s        r"   r4   zTranscriptionsInstance.__init__.   s4    	!#*;;v#6	*1++m*D'.{{:'>AHXAV0;0L0LKK'1
 1<0L0LKK'1
 /:.J.JKK%/
 -8,H,HKK
#-
 (3':':7;;z;R'S")++e"4:A++o:V !%DII
 :>r!   returnc                     | j                   7t        | j                  | j                  d   | 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: TranscriptionsContext for this TranscriptionsInstance
        r&   r'   r2   )r9   TranscriptionsContext_versionr8   r:   s    r"   _proxyzTranscriptionsInstance._proxyQ   sE     == 1
3^^F+DM
 }}r!   c                 6    | j                   j                         S )i
        Fetch the TranscriptionsInstance


        :returns: The fetched TranscriptionsInstance
        )rA   fetchr@   s    r"   rD   zTranscriptionsInstance.fetcha   s     {{  ""r!   c                 R   K   | j                   j                          d{   S 7 w)
        Asynchronous coroutine to fetch the TranscriptionsInstance


        :returns: The fetched TranscriptionsInstance
        N)rA   fetch_asyncr@   s    r"   rG   z"TranscriptionsInstance.fetch_asyncj   s!      [[,,....s   '%'r*   r   c                 :    | j                   j                  |      S )
        Update the TranscriptionsInstance

        :param status:

        :returns: The updated TranscriptionsInstance
        r*   )rA   updater:   r*   s     r"   rK   zTranscriptionsInstance.updates   s#     {{!! " 
 	
r!   c                 V   K   | j                   j                  |       d{   S 7 w)
        Asynchronous coroutine to update the TranscriptionsInstance

        :param status:

        :returns: The updated TranscriptionsInstance
        rJ   N)rA   update_asyncrL   s     r"   rO   z#TranscriptionsInstance.update_async   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>z2TranscriptionsInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z+<Twilio.Video.V1.TranscriptionsInstance {}>joinr8   itemsrV   r:   contexts     r"   __repr__zTranscriptionsInstance.__repr__   s6     ((SDNN<P<P<RSS<CCGLLr!   )N)r<   r>   )r<   r   )r   r   r   objectr#   r   r   strr   r   r4   propertyrA   rD   rG   r   unsetr   rK   rO   rc   __classcell__r;   s   @r"   r   r      s     
& #!>!> c3h!> 	!>
 sm!>F  #/ HN||
;VCD
	!
 HN||
;VCD
	!
M# Mr!   r   c                        e Zd Zdededef fdZdefdZdefdZe	j                  fded	ef   defd
Ze	j                  fded	ef   defdZdefdZ xZS )r>   r$   r&   r'   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)a  
        Initialize the TranscriptionsContext

        :param version: Version that contains the resource
        :param room_sid: The SID of the room with the transcriptions resource to update.
        :param ttid: The Twilio type id of the transcriptions resource to update.
        r2   z'/Rooms/{room_sid}/Transcriptions/{ttid}Nr    r3   r4   r8   rV   _uri)r:   r$   r&   r'   r;   s       r"   r4   zTranscriptionsContext.__init__   sB     	! !
 E=DDVt~~V	r!   r<   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d   | j                  d         S )rC   application/jsonAcceptGETmethoduriheadersr&   r'   r2   )r   ofr?   rD   rm   r   r8   r:   ru   r%   s      r"   rD   zTranscriptionsContext.fetch   si     ))B-.--%%U		7%S%MM^^J/'	
 	
r!   c                   K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  || j                  d   | j                  d         S 7 7w)	rF   ro   rp   rq   rr   Nr&   r'   r2   )r   rv   r?   rG   rm   r   r8   rw   s      r"   rG   z!TranscriptionsContext.fetch_async   s~      ))B-.11dii 2 
 
 &MM^^J/'	
 	
	
s   ABB 	8Br*   r   c                 &   t        j                  d|i      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                  d   | j                  d	   
      S )rI   r#   !application/x-www-form-urlencodedContent-Typero   rp   POSTrs   rt   dataru   r&   r'   r2   )r   rv   r?   rK   rm   r   r8   r:   r*   r~   ru   r%   s        r"   rK   zTranscriptionsContext.update   s     yy&

 ))B-"E.--&&tyytW ' 
 &MM^^J/'	
 	
r!   c                 B  K   t        j                  d|i      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                  d	   | j                  d
         S 7 7w)rN   r#   rz   r{   ro   rp   r|   r}   Nr&   r'   r2   )r   rv   r?   rO   rm   r   r8   r   s        r"   rO   z"TranscriptionsContext.update_async   s      yy&

 ))B-"E.22tyytW 3 
 
 &MM^^J/'	
 	
	
s   A#B%B&8Bc                     dj                  d | j                  j                         D              }dj                  |      S )rQ   rR   c              3   F   K   | ]  \  }}d j                  ||        ywrT   rU   rW   s      r"   r[   z1TranscriptionsContext.__repr__.<locals>.<genexpr>   r\   r]   z*<Twilio.Video.V1.TranscriptionsContext {}>r^   ra   s     r"   rc   zTranscriptionsContext.__repr__  s6     ((SDNN<P<P<RSS;BB7KKr!   )r   r   r   r   re   r4   r   rD   rG   r   rg   r   rd   rK   rO   rc   rh   ri   s   @r"   r>   r>      s    W W3 Wc W"
- 
*
#9 
0 HN||
;VCD
	
D HN||
;VCD
	
BL# Lr!   r>   c                   2    e Zd Zdeeef   defdZdefdZy)TranscriptionsPager%   r<   c                 L    t        | j                  || j                  d         S )zt
        Build an instance of TranscriptionsInstance

        :param payload: Payload response from the API
        r&   r&   )r   r?   r8   )r:   r%   s     r"   get_instancezTranscriptionsPage.get_instance&  s%     &MM7T^^J-G
 	
r!   c                      y)rQ   z$<Twilio.Video.V1.TranscriptionsPage>r    r@   s    r"   rc   zTranscriptionsPage.__repr__0       6r!   N)	r   r   r   r   re   r   r   r   rc   r    r!   r"   r   r   $  s*    
DcN 
7M 
6# 6r!   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dee   d	ee   dee
   fd
Z	 	 ddee   d	ee   dee
   fdZ	 	 ddee   d	ee   dee
   fdZ	 	 ddee   d	ee   dee
   fdZej                  ej                  ej                  fdeee	f   deee	f   d	eee	f   defdZej                  ej                  ej                  fdeee	f   deee	f   d	eee	f   defdZdedefdZdedefdZdedefdZdedefdZdefdZ xZS )TranscriptionsListr$   r&   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the TranscriptionsList

        :param version: Version that contains the resource
        :param room_sid: The SID of the room with the transcriptions resources to read.

        r&   z /Rooms/{room_sid}/TranscriptionsNr    rl   )r:   r$   r&   r;   s      r"   r4   zTranscriptionsList.__init__;  s@     	! 
 >6==OO	r!   r1   r<   c                 4   t        j                  dt        j                  |      i      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                  d   	      S )
z
        Create the TranscriptionsInstance

        :param configuration: A collection of properties that describe transcription behaviour.

        :returns: The created TranscriptionsInstance
        Configurationr{   rz   ro   rp   r|   r}   r&   r   )	r   rv   r   rd   r?   createrm   r   r8   r:   r1   r~   ru   r%   s        r"   r   zTranscriptionsList.createK  s     yy!1!1-!@

 ))^-PQR"E.--&&tyytW ' 
 &MM7T^^J-G
 	
r!   c                 P  K   t        j                  dt        j                  |      i      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                  d	   
      S 7 )w)z
        Asynchronously create the TranscriptionsInstance

        :param configuration: A collection of properties that describe transcription behaviour.

        :returns: The created TranscriptionsInstance
        r   r{   rz   ro   rp   r|   r}   Nr&   r   )	r   rv   r   rd   r?   create_asyncrm   r   r8   r   s        r"   r   zTranscriptionsList.create_asynci  s      yy!1!1-!@

 ))^-PQR"E.22tyytW 3 
 
 &MM7T^^J-G
 	
	
s   A8B&:B$;*B&limit	page_sizec                     | j                   j                  ||      }| j                  |d         }| j                   j                  ||d         S )ad  
        Streams TranscriptionsInstance 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   )r?   read_limitspagestreamr:   r   r   limitsr   s        r"   r   zTranscriptionsList.stream  sJ    ( **5)<yy6+#6y7}}##D&/::r!   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)as  
        Asynchronously streams TranscriptionsInstance 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   )r?   r   
page_asyncstream_asyncr   s        r"   r   zTranscriptionsList.stream_async  sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                 :    t        | j                  ||            S )a  
        Lists TranscriptionsInstance 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   )r:   r   r   s      r"   r   zTranscriptionsList.list  s(    & KK#  
 	
r!   c                 z   K   | j                  ||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)a  
        Asynchronously lists TranscriptionsInstance 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   N)r   )r:   r   r   records       r"   
list_asynczTranscriptionsList.list_async  sT     * '+&7&7# '8 ' !
 
 !
 
 	
 
s0   ;.;620
26;26;
page_tokenpage_numberc                     t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                        S )a  
        Retrieve a single page of TranscriptionsInstance 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 TranscriptionsInstance
        	PageTokenr   PageSizer{   rz   ro   rp   rq   rs   rt   paramsru   )r   rv   r?   r   rm   r   r8   r:   r   r   r   r~   ru   responses          r"   r   zTranscriptionsList.page  s      yy'#%
 ))^-PQR.==%%diig & 
 "$--4>>JJr!   c                   K   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                        S 7 %w)	a  
        Asynchronously retrieve a single page of TranscriptionsInstance 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 TranscriptionsInstance
        r   r{   rz   ro   rp   rq   r   N)r   rv   r?   r   rm   r   r8   r   s          r"   r   zTranscriptionsList.page_async  s       yy'#%
 ))^-PQR.11diig 2 
 
 "$--4>>JJ
s   A"B$B
%&B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )a  
        Retrieve a specific page of TranscriptionsInstance records from the API.
        Request is executed immediately

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

        :returns: Page of TranscriptionsInstance
        rq   )r?   domaintwiliorequestr   r8   r:   r   r   s      r"   get_pagezTranscriptionsList.get_page0  s=     ==''..66ujI!$--4>>JJr!   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)a  
        Asynchronously retrieve a specific page of TranscriptionsInstance records from the API.
        Request is executed immediately

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

        :returns: Page of TranscriptionsInstance
        rq   N)r?   r   r   request_asyncr   r8   r   s      r"   get_page_asyncz!TranscriptionsList.get_page_async<  sJ      --44BB5*UU!$--4>>JJ Vs   4AA&Ar'   c                 L    t        | j                  | j                  d   |      S z
        Constructs a TranscriptionsContext

        :param ttid: The Twilio type id of the transcriptions resource to update.
        r&   r2   r>   r?   r8   r:   r'   s     r"   r5   zTranscriptionsList.getH  %     %MMDNN:$>T
 	
r!   c                 L    t        | j                  | j                  d   |      S r   r   r   s     r"   __call__zTranscriptionsList.__call__R  r   r!   c                      y)rQ   z$<Twilio.Video.V1.TranscriptionsList>r    r@   s    r"   rc   zTranscriptionsList.__repr__\  r   r!   )NN) r   r   r   r   re   r4   r   rg   r   rd   r   r   r   r   intr	   r   r
   r   r   r   r   r   r   r   r   r   r>   r5   r   rc   rh   ri   s   @r"   r   r   9  sp   P P3 P" 6<\\
"66>2
	
> 6<\\
"66>2
	
@  $#';}; C=; 
(	)	;6  $#'A}A C=A 
-	.	A6  $#'
}
 C=
 
$	%	
8  $#'
}
 C=
 
$	%	
: *0*0,,(.	K#v+&K 3;'K f%	K
 
KF *0*0,,(.	K#v+&K 3;'K f%	K
 
KB
K3 
K+= 
K
Ks 
K7I 
K
 
 5 

S 
%: 
6# 6r!   r   N)__doc__r   typingr   r   r   r   r   r	   r
   twilio.baser   r   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r>   r   r   r    r!   r"   <module>r      sj     L L L 6 6 8 : 2 ' !}M- }M@HLO HLV6 6*i6 i6r!   