U
    ^g%iE                     @   s   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
 d
eZG dd deZG dd deZdS )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                       s   e Zd ZG dd deZG dd deZG dd deZdeee	e
f e	e	ee	 d fd	d
ZeddddZdd dddZdd dddZe	dddZ  ZS )TranscriptionInstancec                   @   s   e Zd ZdZdZdS )zTranscriptionInstance.Statuszin-progressstoppedN)__name__
__module____qualname__ZIN_PROGRESSSTOPPED r   r   o/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/api/v2010/account/call/transcription.pyStatus   s   r   c                   @   s   e Zd ZdZdZdZdS )TranscriptionInstance.TrackZinbound_trackZoutbound_trackZboth_tracksN)r   r   r   ZINBOUND_TRACKZOUTBOUND_TRACKZBOTH_TRACKSr   r   r   r   Track   s   r   c                   @   s   e Zd ZdZdS )"TranscriptionInstance.UpdateStatusr   N)r   r   r   r   r   r   r   r   UpdateStatus#   s   r   N)versionpayloadaccount_sidcall_sidsidc                    s   t  | |d| _|d| _|d| _|d| _|d| _t	|d| _
|d| _|||pr| jd| _d | _d S )	Nr   r   r   namestatusdate_updatedurir   r   r   )super__init__getr   r   r   r    r!   r   Zrfc2822_datetimer"   r#   	_solution_context)selfr   r   r   r   r   	__class__r   r   r&   0   s    zTranscriptionInstance.__init__TranscriptionContextreturnc                 C   s6   | j dkr0t| j| jd | jd | 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: TranscriptionContext for this TranscriptionInstance
        Nr   r   r   r$   )r)   r-   _versionr(   r*   r   r   r   _proxyK   s    
zTranscriptionInstance._proxyr   r!   r/   c                 C   s   | j j|dS )
        Update the TranscriptionInstance

        :param status:

        :returns: The updated TranscriptionInstance
        r!   )r2   updater*   r!   r   r   r   r6   \   s    
zTranscriptionInstance.updatec                    s   | j j|dI dH S )
        Asynchronous coroutine to update the TranscriptionInstance

        :param status:

        :returns: The updated TranscriptionInstance
        r5   N)r2   update_asyncr7   r   r   r   r9   j   s    
z"TranscriptionInstance.update_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     z1TranscriptionInstance.__repr__.<locals>.<genexpr>z+<Twilio.Api.V2010.TranscriptionInstance {}>joinr(   itemsr>   r*   contextr   r   r   __repr__x   s    zTranscriptionInstance.__repr__)N)r   r   r   objectr   r   r   r   r   strr   r   r&   propertyr2   r6   r9   rI   __classcell__r   r   r+   r   r      s(    
r   c                       sV   e Zd Zeeeed fddZdedddZdeddd	Zed
ddZ	  Z
S )r-   )r   r   r   r   c                    s.   t  | |||d| _djf | j| _dS )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
        r$   zB/Accounts/{account_sid}/Calls/{call_sid}/Transcriptions/{sid}.jsonNr%   r&   r(   r>   _uri)r*   r   r   r   r   r+   r   r   r&      s    	zTranscriptionContext.__init__r   r3   c                 C   sd   t d|i}t i }d|d< d|d< | jjd| j||d}t| j|| jd | jd	 | jd
 dS )r4   r   !application/x-www-form-urlencodedContent-Typeapplication/jsonAcceptPOSTmethodr#   dataheadersr   r   r   r$   )r	   ofr0   r6   rO   r   r(   r*   r!   rW   rX   r   r   r   r   r6      s*     
   zTranscriptionContext.updatec                    sj   t d|i}t i }d|d< d|d< | jjd| j||dI dH }t| j|| jd	 | jd
 | jd dS )r8   r   rP   rQ   rR   rS   rT   rU   Nr   r   r   r$   )r	   rY   r0   r9   rO   r   r(   rZ   r   r   r   r9      s*     
   z!TranscriptionContext.update_asyncr.   c                 C   s$   d dd | j D }d|S )r:   r;   c                 s   s   | ]\}}d  ||V  qdS r<   r=   r?   r   r   r   rC      s     z0TranscriptionContext.__repr__.<locals>.<genexpr>z*<Twilio.Api.V2010.TranscriptionContext {}>rD   rG   r   r   r   rI      s    zTranscriptionContext.__repr__)r   r   r   r   rK   r&   r   r6   r9   rI   rM   r   r   r+   r   r-      s   #"r-   c                       s  e Zd Zeeed fd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eee	f ede	f eee	f eee	f eee	f eee	f ee
e	f eee	f eee	f ee
e	f eee	f eee	f ee
e	f eee	f edd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eee	f ede	f eee	f eee	f eee	f eee	f ee
e	f eee	f eee	f ee
e	f eee	f eee	f ee
e	f eee	f eddd	Zeed
ddZeed
ddZedddZ  ZS )TranscriptionList)r   r   r   c                    s,   t  | ||d| _djf | j| _dS )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.jsonNrN   )r*   r   r   r   r+   r   r   r&      s    	zTranscriptionList.__init__r   )r    track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                 C   s   t ||||||t|||	t|
||t||d}t ddi}d|d< d|d< | jjd| j||d}t| j|| jd | jd	 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   ZStatusCallbackUrlZStatusCallbackMethodZInboundTrackLabelZOutboundTrackLabelZPartialResultsZLanguageCodeZTranscriptionEngineZProfanityFilterZSpeechModelZHintsZEnableAutomaticPunctuationZIntelligenceServicerQ   rP   rR   rS   rT   rU   r   r   r\   )	r	   rY   r   boolean_to_stringr0   createrO   r   r(   r*   r    r]   r^   r_   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rW   rX   r   r   r   r   rm     sD    &   zTranscriptionList.createc                    s   t ||||||t|||	t|
||t||d}t ddi}d|d< d|d< | jjd| j||dI dH }t| j|| jd	 | jd
 dS )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
        rj   rQ   rP   rR   rS   rT   rU   Nr   r   r\   )	r	   rY   r   rl   r0   create_asyncrO   r   r(   rn   r   r   r   ro   L  sD    &   zTranscriptionList.create_async)r   r/   c                 C   s   t | j| jd | jd |dS z
        Constructs a TranscriptionContext

        :param sid: The SID of the Transcription resource, or the `name` used when creating the resource
        r   r   r$   r-   r0   r(   r*   r   r   r   r   r'     s    zTranscriptionList.getc                 C   s   t | j| jd | jd |dS rp   rq   rr   r   r   r   __call__  s    zTranscriptionList.__call__r.   c                 C   s   dS )r:   z$<Twilio.Api.V2010.TranscriptionList>r   r1   r   r   r   rI     s    zTranscriptionList.__repr__)r   r   r   r   rK   r&   r	   unsetr   rJ   boolr   rm   ro   r-   r'   rs   rI   rM   r   r   r+   r   r[      s   













M













Kr[   N)__doc__r   typingr   r   r   r   Ztwilio.baser   r   r	   Ztwilio.base.instance_contextr
   Ztwilio.base.instance_resourcer   Ztwilio.base.list_resourcer   Ztwilio.base.versionr   r   r-   r[   r   r   r   r   <module>   s   jg