
    piE                         d Z ddlmZ ddl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  G d	 d
e      Z G d de      Z G d de      Zy)a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Api
    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OptionalUnion)deserialize	serializevalues)InstanceContext)InstanceResource)ListResource)Versionc                        e Zd Z G d de      Z G d de      Z G d de      Z	 	 ddedee	e
f   d	e	d
e	dee	   f
 fdZedd       Z	 	 	 	 ddZ	 	 	 	 ddZde	fdZ xZS )TranscriptionInstancec                       e Zd ZdZdZy)TranscriptionInstance.Statuszin-progressstoppedN)__name__
__module____qualname__IN_PROGRESSSTOPPED     r/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/api/v2010/account/call/transcription.pyStatusr      s    #r   r   c                       e Zd ZdZdZdZy)TranscriptionInstance.Trackinbound_trackoutbound_trackboth_tracksN)r   r   r   INBOUND_TRACKOUTBOUND_TRACKBOTH_TRACKSr   r   r   Trackr      s    ')#r   r%   c                       e Zd ZdZy)"TranscriptionInstance.UpdateStatusr   N)r   r   r   r   r   r   r   UpdateStatusr'   #   s    r   r(   versionpayloadaccount_sidcall_sidsidc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _
        |j                  d      | _        |||xs | j                  d| _        d | _        y )	Nr-   r+   r,   namestatusdate_updatedurir+   r,   r-   )super__init__getr-   r+   r,   r/   r0   r   rfc2822_datetimer1   r2   	_solution_context)selfr)   r*   r+   r,   r-   	__class__s         r   r5   zTranscriptionInstance.__init__0   s     	!")++e"4*1++m*D'.{{:'>#*;;v#6	@GH@U0;0L0LKK'1
 #*++e"4 ' ?$((

 9=r   returnc                     | j                   Et        | j                  | j                  d   | 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: TranscriptionContext for this TranscriptionInstance
        r+   r,   r-   r3   )r9   TranscriptionContext_versionr8   r:   s    r   _proxyzTranscriptionInstance._proxyK   sQ     == 0 NN=9
3NN5)	DM }}r   c                 :    | j                   j                  |      S )
        Update the TranscriptionInstance

        :param status:

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

        :param status:

        :returns: The updated TranscriptionInstance
        rD   N)rA   update_asyncrF   s     r   rI   z"TranscriptionInstance.update_asyncj   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>z1TranscriptionInstance.__repr__.<locals>.<genexpr>~        SDAq7>>!Q/S   !z+<Twilio.Api.V2010.TranscriptionInstance {}>joinr8   itemsrP   r:   contexts     r   __repr__zTranscriptionInstance.__repr__x   s6     ((SDNN<P<P<RSS<CCGLLr   )N)r<   r>   )r0   r'   r<   r   )r   r   r   objectr   r%   r(   r   r   strr   r   r5   propertyrA   rE   rI   r]   __classcell__r;   s   @r   r   r      s     $ $
v   "== c3h= 	=
 = c]=6   
:
	 

:
	 
M# Mr   r   c                   \     e Zd Zdedededef fdZdddefd	Zdddefd
ZdefdZ	 xZ
S )r>   r)   r+   r,   r-   c                 |    t         |   |       |||d| _         dj                  di | j                  | _        y)a  
        Initialize the TranscriptionContext

        :param version: Version that contains the resource
        :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Transcription resource.
        :param call_sid: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Transcription resource is associated with.
        :param sid: The SID of the Transcription resource, or the `name` used when creating the resource
        r3   zB/Accounts/{account_sid}/Calls/{call_sid}/Transcriptions/{sid}.jsonNr   r4   r5   r8   rP   _uri)r:   r)   r+   r,   r-   r;   s        r   r5   zTranscriptionContext.__init__   sM     	! ' 
 XPWW .. 		r   r0   r'   r<   c                 B   t        j                  d|i      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                  d   | j                  d	   | j                  d
         S )rC   r   !application/x-www-form-urlencodedContent-Typeapplication/jsonAcceptPOSTmethodr2   dataheadersr+   r,   r-   r3   )r
   ofr?   rE   rf   r   r8   r:   r0   ro   rp   r*   s        r   rE   zTranscriptionContext.update   s     yy&

 ))B-"E.--&&tyytW ' 
 %MM}5^^J/u%
 	
r   c                 ^  K   t        j                  d|i      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                  d	   | j                  d
   | j                  d         S 7 Ew)rH   r   rh   ri   rj   rk   rl   rm   Nr+   r,   r-   r3   )r
   rq   r?   rI   rf   r   r8   rr   s        r   rI   z!TranscriptionContext.update_async   s      yy&

 ))B-"E.22tyytW 3 
 
 %MM}5^^J/u%
 	
	
s   A#B-%B+&AB-c                     dj                  d | j                  j                         D              }dj                  |      S )rK   rL   c              3   F   K   | ]  \  }}d j                  ||        ywrN   rO   rQ   s      r   rU   z0TranscriptionContext.__repr__.<locals>.<genexpr>   rV   rW   z*<Twilio.Api.V2010.TranscriptionContext {}>rX   r[   s     r   r]   zTranscriptionContext.__repr__   s6     ((SDNN<P<P<RSS;BB7KKr   )r   r   r   r   r_   r5   r   rE   rI   r]   ra   rb   s   @r   r>   r>      s^    
 
c 
S 
s 
. 
: 
	 
D 
: 
	 
DL# Lr   r>   c                   d    e Zd Zdededef fdZej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  fdeee	f   dede	f   deee	f   d	eee	f   d
eee	f   deee	f   dee
e	f   deee	f   deee	f   dee
e	f   deee	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                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  fdeee	f   dede	f   deee	f   d	eee	f   d
eee	f   deee	f   dee
e	f   deee	f   deee	f   dee
e	f   deee	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fdZ xZS )TranscriptionListr)   r+   r,   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)a  
        Initialize the TranscriptionList

        :param version: Version that contains the resource
        :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Transcription resource.
        :param call_sid: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Transcription resource is associated with.

        r+   r,   z</Accounts/{account_sid}/Calls/{call_sid}/Transcriptions.jsonNr   re   )r:   r)   r+   r,   r;   s       r   r5   zTranscriptionList.__init__   sJ     	! ' 

 RJQQ .. 		r   r/   trackr   status_callback_urlstatus_callback_methodinbound_track_labeloutbound_track_labelpartial_resultslanguage_codetranscription_engineprofanity_filterspeech_modelhintsenable_automatic_punctuationintelligence_servicer<   c                    t        j                  ||||||t        j                  |      ||	t        j                  |
      ||t        j                  |      |d      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                  d   | j                  d	   
      S )a  
        Create the TranscriptionInstance

        :param name: The user-specified name of this Transcription, if one was given when the Transcription was created. This may be used to stop the Transcription.
        :param track:
        :param status_callback_url: Absolute URL of the status callback.
        :param status_callback_method: The http method for the status_callback (one of GET, POST).
        :param inbound_track_label: Friendly name given to the Inbound Track
        :param outbound_track_label: Friendly name given to the Outbound Track
        :param partial_results: Indicates if partial results are going to be sent to the customer
        :param language_code: Language code used by the transcription engine, specified in [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) format
        :param transcription_engine: Definition of the transcription engine to be used, among those supported by Twilio
        :param profanity_filter: indicates if the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks
        :param speech_model: Recognition model used by the transcription engine, among those supported by the provider
        :param hints: A Phrase contains words and phrase \"hints\" so that the speech recognition engine is more likely to recognize them.
        :param enable_automatic_punctuation: The provider will add punctuation to recognition result
        :param intelligence_service: The SID or unique name of the [Intelligence Service](https://www.twilio.com/docs/conversational-intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators .

        :returns: The created TranscriptionInstance
        Namer%   StatusCallbackUrlStatusCallbackMethodInboundTrackLabelOutboundTrackLabelPartialResultsLanguageCodeTranscriptionEngineProfanityFilterSpeechModelHintsEnableAutomaticPunctuationIntelligenceServiceri   rh   rj   rk   rl   rm   r+   r,   ry   )	r
   rq   r	   boolean_to_stringr?   createrf   r   r8   r:   r/   rz   r{   r|   r}   r~   r   r   r   r   r   r   r   r   ro   rp   r*   s                     r   r   zTranscriptionList.create  s    L yy%8(>%8&:"+"="=o"N -';#,#>#>?O#P+.7.I.I0/ (<!
( ))^-PQR"E.--&&tyytW ' 
 %MM}5^^J/	
 	
r   c                   K   t        j                  ||||||t        j                  |      ||	t        j                  |
      ||t        j                  |      |d      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                  d	   | j                  d
         S 7 7w)a  
        Asynchronously create the TranscriptionInstance

        :param name: The user-specified name of this Transcription, if one was given when the Transcription was created. This may be used to stop the Transcription.
        :param track:
        :param status_callback_url: Absolute URL of the status callback.
        :param status_callback_method: The http method for the status_callback (one of GET, POST).
        :param inbound_track_label: Friendly name given to the Inbound Track
        :param outbound_track_label: Friendly name given to the Outbound Track
        :param partial_results: Indicates if partial results are going to be sent to the customer
        :param language_code: Language code used by the transcription engine, specified in [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) format
        :param transcription_engine: Definition of the transcription engine to be used, among those supported by Twilio
        :param profanity_filter: indicates if the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks
        :param speech_model: Recognition model used by the transcription engine, among those supported by the provider
        :param hints: A Phrase contains words and phrase \"hints\" so that the speech recognition engine is more likely to recognize them.
        :param enable_automatic_punctuation: The provider will add punctuation to recognition result
        :param intelligence_service: The SID or unique name of the [Intelligence Service](https://www.twilio.com/docs/conversational-intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators .

        :returns: The created TranscriptionInstance
        r   ri   rh   rj   rk   rl   rm   Nr+   r,   ry   )	r
   rq   r	   r   r?   create_asyncrf   r   r8   r   s                     r   r   zTranscriptionList.create_asyncL  s     L yy%8(>%8&:"+"="=o"N -';#,#>#>?O#P+.7.I.I0/ (<!
( ))^-PQR"E.22tyytW 3 
 
 %MM}5^^J/	
 	
	
s   B+C'-C%.8C'r-   c                 h    t        | j                  | j                  d   | j                  d   |      S z
        Constructs a TranscriptionContext

        :param sid: The SID of the Transcription resource, or the `name` used when creating the resource
        r+   r,   r3   r>   r?   r8   r:   r-   s     r   r6   zTranscriptionList.get  3     $MM}5^^J/	
 	
r   c                 h    t        | j                  | j                  d   | j                  d   |      S r   r   r   s     r   __call__zTranscriptionList.__call__  r   r   c                      y)rK   z$<Twilio.Api.V2010.TranscriptionList>r   r@   s    r   r]   zTranscriptionList.__repr__  s     6r   )r   r   r   r   r_   r5   r
   unsetr   r^   boolr   r   r   r>   r6   r   r]   ra   rb   s   @r   rw   rw      sm   
 
c 
S 
0 $*<<>Dll28,,5;\\28,,39<</5||,2LL39<<06+1<<$*LL<BLL39<<I
CK I
 2F:;I
 #3;/	I

 !&c6k 2I
 #3;/I
 $CK0I
 tV|,I
 S&[)I
 $CK0I
  f-I
 CK(I
 S&[!I
 ',D&L&9I
 $CK0I
  
!I
Z $*<<>Dll28,,5;\\28,,39<</5||,2LL39<<06+1<<$*LL<BLL39<<I
CK I
 2F:;I
 #3;/	I

 !&c6k 2I
 #3;/I
 $CK0I
 tV|,I
 S&[)I
 $CK0I
  f-I
 CK(I
 S&[!I
 ',D&L&9I
 $CK0I
  
!I
V
s 
3 

C 
$8 
6# 6r   rw   N)__doc__r   typingr   r   r   r   twilio.baser   r	   r
   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   r>   rw   r   r   r   <module>r      sX     - - 6 6 8 : 2 'gM, gMTdL? dLNN6 N6r   