U
    ^g%i                    @   s  d Z ddlmZ G dd deZG dd deZG dd deZG d	d
 d
eZG dd deZG dd deZG dd deZ	G dd deZ
G dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd  d eZG d!d" d"eZG d#d$ d$eZG d%d& d&eZG d'd( d(eZG d)d* d*eZG d+d, d,eZG d-d. d.eZG d/d0 d0eZG d1d2 d2eZG d3d4 d4eZG d5d6 d6eZG d7d8 d8eZG d9d: d:eZG d;d< d<eZG d=d> d>eZ G d?d@ d@eZ!G dAdB dBeZ"G dCdD dDeZ#G dEdF dFeZ$G dGdH dHeZ%G dIdJ dJeZ&G dKdL dLeZ'G dMdN dNeZ(G dOdP dPeZ)G dQdR dReZ*G dSdT dTeZ+G dUdV dVeZ,G dWdX dXeZ-G dYdZ dZeZ.G d[d\ d\eZ/G d]d^ d^eZ0G d_d` d`eZ1G dadb dbeZ2G dcdd ddeZ3G dedf dfeZ4G dgdh dheZ5G didj djeZ6G dkdl dleZ7G dmdn dneZ8G dodp dpeZ9G dqdr dreZ:G dsdt dteZ;duS )vza
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
    )TwiMLc                       s   e Zd ZdZ fddZd-ddZd.ddZd	d
 Zd/ddZd0ddZ	dd Z
dd Zd1ddZd2ddZd3ddZd4ddZd5ddZd6ddZd7dd Zd8d!d"Zd9d#d$Zd:d%d&Zd;d'd(Zd)d* Zd<d+d,Z  ZS )=VoiceResponsez<Response> TwiML for Voicec                    s   t t| jf | d| _d S )NResponse)superr   __init__nameselfkwargs	__class__ Z/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/twiml/voice_response.pyr      s    zVoiceResponse.__init__Nc                 K   s   |  tf ||d|S )z
        Create a <Connect> element

        :param action: Action URL
        :param method: Action URL method
        :param kwargs: additional attributes

        :returns: <Connect> element
        actionmethod)nestConnectr	   r   r   r
   r   r   r   connect   s    
zVoiceResponse.connectc                 K   s<   |  tf |||||||||	|
|||||||||d|S )a  
        Create a <Dial> element

        :param number: Phone number to dial
        :param action: Action URL
        :param method: Action URL method
        :param timeout: Time to wait for answer
        :param hangup_on_star: Hangup call on star press
        :param time_limit: Max time length
        :param caller_id: Caller ID to display
        :param record: Record the call
        :param trim: Trim the recording
        :param recording_status_callback: Recording status callback URL
        :param recording_status_callback_method: Recording status callback URL method
        :param recording_status_callback_event: Recording status callback events
        :param answer_on_bridge: Preserve the ringing behavior of the inbound call until the Dialed call picks up
        :param ring_tone: Ringtone allows you to override the ringback tone that Twilio will play back to the caller while executing the Dial
        :param recording_track: To indicate which audio track should be recorded
        :param sequential: Used to determine if child TwiML nouns should be dialed in order, one after the other (sequential) or dial all at once (parallel). Default is false, parallel
        :param refer_url: Webhook that will receive future SIP REFER requests
        :param refer_method: The HTTP method to use for the refer Webhook
        :param events: Subscription to events
        :param kwargs: additional attributes

        :returns: <Dial> element
        )numberr   r   timeouthangup_on_star
time_limit	caller_idrecordtrimrecording_status_callback recording_status_callback_methodrecording_status_callback_eventanswer_on_bridge	ring_tonerecording_track
sequential	refer_urlrefer_methodevents)r   Dial)r	   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r
   r   r   r   dial!   s2    1zVoiceResponse.dialc                 K   s   |  tf |S )zy
        Create a <Echo> element

        :param kwargs: additional attributes

        :returns: <Echo> element
        )r   Echor   r   r   r   echok   s    zVoiceResponse.echoc           	      K   s$   |  tf |||||||d|S )a  
        Create a <Enqueue> element

        :param name: Friendly name
        :param action: Action URL
        :param max_queue_size: Maximum size of queue
        :param method: Action URL method
        :param wait_url: Wait URL
        :param wait_url_method: Wait URL method
        :param workflow_sid: TaskRouter Workflow SID
        :param kwargs: additional attributes

        :returns: <Enqueue> element
        )r   r   max_queue_sizer   wait_urlwait_url_methodworkflow_sid)r   Enqueue)	r	   r   r   r+   r   r,   r-   r.   r
   r   r   r   enqueueu   s    zVoiceResponse.enqueuec                 K   s:   |  tf |||||||||	|
||||||||d|S )a  
        Create a <Gather> element

        :param input: Input type Twilio should accept
        :param action: Action URL
        :param method: Action URL method
        :param timeout: Time to wait to gather input
        :param speech_timeout: Time to wait to gather speech input and it should be either auto or a positive integer.
        :param max_speech_time: Max allowed time for speech input
        :param profanity_filter: Profanity Filter on speech
        :param finish_on_key: Finish gather on key
        :param num_digits: Number of digits to collect
        :param partial_result_callback: Partial result callback URL
        :param partial_result_callback_method: Partial result callback URL method
        :param language: Language to use
        :param hints: Speech recognition hints
        :param barge_in: Stop playing media upon speech
        :param debug: Allow debug for gather
        :param action_on_empty_result: Force webhook to the action URL event if there is no input
        :param speech_model: Specify the model that is best suited for your use case
        :param enhanced: Use enhanced speech model
        :param kwargs: additional attributes

        :returns: <Gather> element
        )inputr   r   r   speech_timeoutmax_speech_timeprofanity_filterfinish_on_key
num_digitspartial_result_callbackpartial_result_callback_methodlanguagehintsbarge_indebugaction_on_empty_resultspeech_modelenhanced)r   Gather)r	   r1   r   r   r   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r
   r   r   r   gather   s0    /zVoiceResponse.gatherc                 K   s   |  tf |S )z}
        Create a <Hangup> element

        :param kwargs: additional attributes

        :returns: <Hangup> element
        )r   Hangupr   r   r   r   hangup   s    zVoiceResponse.hangupc                 K   s   |  tf |S )z{
        Create a <Leave> element

        :param kwargs: additional attributes

        :returns: <Leave> element
        )r   Leaver   r   r   r   leave   s    zVoiceResponse.leavec                 K   s   |  tf d|i|S z
        Create a <Pause> element

        :param length: Length in seconds to pause
        :param kwargs: additional attributes

        :returns: <Pause> element
        lengthr   Pauser	   rG   r
   r   r   r   pause   s    	zVoiceResponse.pausec                 K   s   |  tf |||d|S z
        Create a <Play> element

        :param url: Media URL
        :param loop: Times to loop media
        :param digits: Play DTMF tones for digits
        :param kwargs: additional attributes

        :returns: <Play> element
        )urlloopdigitsr   Playr	   rM   rN   rO   r
   r   r   r   play  s    zVoiceResponse.playc              	   K   s    |  t|f||||d|S a]  
        Create a <Queue> element

        :param name: Queue name
        :param url: Action URL
        :param method: Action URL method
        :param reservation_sid: TaskRouter Reservation SID
        :param post_work_activity_sid: TaskRouter Activity SID
        :param kwargs: additional attributes

        :returns: <Queue> element
        )rM   r   reservation_sidpost_work_activity_sidr   Queuer	   r   rM   r   rU   rV   r
   r   r   r   queue  s    zVoiceResponse.queuec                 K   s.   |  tf |||||||||	|
||d|S )a  
        Create a <Record> element

        :param action: Action URL
        :param method: Action URL method
        :param timeout: Timeout to begin recording
        :param finish_on_key: Finish recording on key
        :param max_length: Max time to record in seconds
        :param play_beep: Play beep
        :param trim: Trim the recording
        :param recording_status_callback: Status callback URL
        :param recording_status_callback_method: Status callback URL method
        :param recording_status_callback_event: Recording status callback events
        :param transcribe: Transcribe the recording
        :param transcribe_callback: Transcribe callback URL
        :param kwargs: additional attributes

        :returns: <Record> element
        )r   r   r   r5   
max_length	play_beepr   r   r   r   
transcribetranscribe_callback)r   Record)r	   r   r   r   r5   r[   r\   r   r   r   r   r]   r^   r
   r   r   r   r   .  s$    #zVoiceResponse.recordc                 K   s   |  t|fd|i|S )z
        Create a <Redirect> element

        :param url: Redirect URL
        :param method: Redirect URL method
        :param kwargs: additional attributes

        :returns: <Redirect> element
        r   )r   Redirect)r	   rM   r   r
   r   r   r   redirectc  s    
zVoiceResponse.redirectc                 K   s   |  tf d|i|S )z
        Create a <Reject> element

        :param reason: Rejection reason
        :param kwargs: additional attributes

        :returns: <Reject> element
        reason)r   Reject)r	   rb   r
   r   r   r   rejecto  s    	zVoiceResponse.rejectc              	   K   s   |  tf ||||d|S a  
        Create a <Say> element

        :param message: Message to say
        :param voice: Voice to use
        :param loop: Times to loop message
        :param language: Message language
        :param kwargs: additional attributes

        :returns: <Say> element
        )messagevoicerN   r9   r   Sayr	   rf   rg   rN   r9   r
   r   r   r   sayz  s    zVoiceResponse.sayc              
   K   s"   |  t|f|||||d|S )ay  
        Create a <Sms> element

        :param message: Message body
        :param to: Number to send message to
        :param from: Number to send message from
        :param action: Action URL
        :param method: Action URL method
        :param status_callback: Status callback URL
        :param kwargs: additional attributes

        :returns: <Sms> element
        )tofrom_r   r   status_callback)r   Sms)r	   rf   rl   rm   r   r   rn   r
   r   r   r   sms  s    zVoiceResponse.smsc                 K   s:   |  tf |||||||||	|
||||||||d|S )a  
        Create a <Pay> element

        :param input: Input type Twilio should accept
        :param action: Action URL
        :param bank_account_type: Bank account type for ach transactions. If set, payment method attribute must be provided and value should be set to ach-debit. defaults to consumer-checking
        :param status_callback: Status callback URL
        :param status_callback_method: Status callback method
        :param timeout: Time to wait to gather input
        :param max_attempts: Maximum number of allowed retries when gathering input
        :param security_code: Prompt for security code
        :param postal_code: Prompt for postal code and it should be true/false or default postal code
        :param min_postal_code_length: Prompt for minimum postal code length
        :param payment_connector: Unique name for payment connector
        :param payment_method: Payment method to be used. defaults to credit-card
        :param token_type: Type of token
        :param charge_amount: Amount to process. If value is greater than 0 then make the payment else create a payment token
        :param currency: Currency of the amount attribute
        :param description: Details regarding the payment
        :param valid_card_types: Comma separated accepted card types
        :param language: Language to use
        :param kwargs: additional attributes

        :returns: <Pay> element
        )r1   r   bank_account_typern   status_callback_methodr   max_attemptssecurity_codepostal_codemin_postal_code_lengthpayment_connectorpayment_method
token_typecharge_amountcurrencydescriptionvalid_card_typesr9   )r   Pay)r	   r1   r   rq   rn   rr   r   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r9   r
   r   r   r   pay  s0    /zVoiceResponse.payc              
   K   s    |  tf |||||d|S a  
        Create a <Prompt> element

        :param for_: Name of the payment source data element
        :param error_type: Type of error
        :param card_type: Type of the credit card
        :param attempt: Current attempt count
        :param require_matching_inputs: Require customer to input requested information twice and verify matching.
        :param kwargs: additional attributes

        :returns: <Prompt> element
        )for_
error_type	card_typeattemptrequire_matching_inputsr   Promptr	   r   r   r   r   r   r
   r   r   r   prompt  s    zVoiceResponse.promptc                 K   s   |  tf ||d|S )z
        Create a <Start> element

        :param action: Action URL
        :param method: Action URL method
        :param kwargs: additional attributes

        :returns: <Start> element
        r   )r   Startr   r   r   r   start  s    
zVoiceResponse.startc                 K   s   |  tf |S )zy
        Create a <Stop> element

        :param kwargs: additional attributes

        :returns: <Stop> element
        )r   Stopr   r   r   r   stop   s    zVoiceResponse.stopc                 K   s   |  tf ||d|S )z
        Create a <Refer> element

        :param action: Action URL
        :param method: Action URL method
        :param kwargs: additional attributes

        :returns: <Refer> element
        r   )r   Referr   r   r   r   refer*  s    
zVoiceResponse.refer)NN)NNNNNNNNNNNNNNNNNNN)NNNNNNN)NNNNNNNNNNNNNNNNNN)N)NNN)NNNN)NNNNNNNNNNNN)N)N)NNNN)NNNNN)NNNNNNNNNNNNNNNNNN)NNNNN)NN)NN)__name__
__module____qualname____doc__r   r   r(   r*   r0   rA   rC   rE   rK   rS   rZ   r   ra   rd   rk   rp   r   r   r   r   r   __classcell__r   r   r   r   r      s   
                   
J       
(                  
G



    
"            
5


     
%                  
I     
 

r   c                       s(   e Zd ZdZ fddZdd Z  ZS )r   z<Refer> TwiML Verbc                    s   t t| jf | d| _d S )Nr   )r   r   r   r   r   r   r   r   r   :  s    zRefer.__init__c                 K   s   |  t|f|S )z
        Create a <Sip> element

        :param sip_url: SIP URL
        :param kwargs: additional attributes

        :returns: <Sip> element
        )r   ReferSipr	   sip_urlr
   r   r   r   sip>  s    	z	Refer.sip)r   r   r   r   r   r   r   r   r   r   r   r   7  s   r   c                       s    e Zd ZdZ fddZ  ZS )r   z <Sip> TwiML Noun used in <Refer>c                    s"   t t| jf | d| _|| _d S NSip)r   r   r   r   valuer   r   r   r   r   M  s    zReferSip.__init__r   r   r   r   r   r   r   r   r   r   r   J  s   r   c                       s>   e Zd ZdZ fddZdddZdddZdd	d
Z  ZS )r   z<Stop> TwiML Verbc                    s   t t| jf | d| _d S )Nr   )r   r   r   r   r   r   r   r   r   V  s    zStop.__init__Nc                 K   s"   |  tf ||||||d|S a  
        Create a <Stream> element

        :param name: Friendly name given to the Stream
        :param connector_name: Unique name for Stream Connector
        :param url: URL of the remote service where the Stream is routed
        :param track: Track to be streamed to remote service
        :param status_callback: Status Callback URL
        :param status_callback_method: Status Callback URL method
        :param kwargs: additional attributes

        :returns: <Stream> element
        )r   connector_namerM   trackrn   rr   r   Streamr	   r   r   rM   r   rn   rr   r
   r   r   r   streamZ  s    zStop.streamc              
   K   s    |  tf |||||d|S a  
        Create a <Siprec> element

        :param name: Friendly name given to SIPREC
        :param connector_name: Unique name for Connector
        :param track: Track to be streamed to remote service
        :param status_callback: Status Callback URL
        :param status_callback_method: Status Callback URL method
        :param kwargs: additional attributes

        :returns: <Siprec> element
        )r   r   r   rn   rr   r   Siprecr	   r   r   r   rn   rr   r
   r   r   r   siprec}  s    zStop.siprecc                 K   s2   |  tf |||||||||	|
||||d|S a  
        Create a <Transcription> element

        :param name: Friendly name given to the Transcription
        :param track: Track to be analyze by the provider
        :param status_callback_url: Status Callback URL
        :param status_callback_method: Status Callback URL method
        :param inbound_track_label: Friendly name given to the Inbound Track
        :param outbound_track_label: Friendly name given to the Outbound Track Label
        :param partial_results: Indicates if partial results are going to be send to the customer
        :param language_code: Language Code used by the transcription engine
        :param transcription_engine: Transcription Engine to be used
        :param profanity_filter: Enable Profanity Filter
        :param speech_model: Speech Model used by the transcription engine
        :param hints: Hints to be provided to the transcription engine
        :param enable_automatic_punctuation: Enable Automatic Punctuation
        :param intelligence_service: The SID or the unique name of the Intelligence Service to be used
        :param kwargs: additional attributes

        :returns: <Transcription> element
        )r   r   status_callback_urlrr   inbound_track_labeloutbound_track_labelpartial_resultslanguage_codetranscription_enginer4   r>   r:   enable_automatic_punctuationintelligence_servicer   Transcriptionr	   r   r   r   rr   r   r   r   r   r   r4   r>   r:   r   r   r
   r   r   r   transcription  s(    'zStop.transcription)NNNNNN)NNNNN)NNNNNNNNNNNNNN)	r   r   r   r   r   r   r   r   r   r   r   r   r   r   S  s<         
%     
"              r   c                       s4   e Zd ZdZ fddZd	ddZd
ddZ  ZS )r   z<Transcription> TwiML Nounc                    s   t t| jf | d| _d S )Nr   )r   r   r   r   r   r   r   r   r     s    zTranscription.__init__Nc                 K   s   |  tf ||d|S z
        Create a <Config> element

        :param name: The name of the custom config
        :param value: The value of the custom config
        :param kwargs: additional attributes

        :returns: <Config> element
        r   r   r   Configr	   r   r   r
   r   r   r   config  s    
zTranscription.configc                 K   s   |  tf ||d|S z
        Create a <Parameter> element

        :param name: The name of the custom parameter
        :param value: The value of the custom parameter
        :param kwargs: additional attributes

        :returns: <Parameter> element
        r   r   	Parameterr   r   r   r   	parameter  s    
zTranscription.parameter)NN)NNr   r   r   r   r   r   r   r   r   r   r   r   r     s   
r   c                       s    e Zd ZdZ fddZ  ZS )r   z<Parameter> TwiML Nounc                    s   t t| jf | d| _d S )Nr   )r   r   r   r   r   r   r   r   r     s    zParameter.__init__r   r   r   r   r   r     s   r   c                       s    e Zd ZdZ fddZ  ZS )r   z<Config> TwiML Nounc                    s   t t| jf | d| _d S )Nr   )r   r   r   r   r   r   r   r   r     s    zConfig.__init__r   r   r   r   r   r     s   r   c                       s*   e Zd ZdZ fddZdddZ  ZS )r   z<Siprec> TwiML Nounc                    s   t t| jf | d| _d S )Nr   )r   r   r   r   r   r   r   r   r     s    zSiprec.__init__Nc                 K   s   |  tf ||d|S r   r   r   r   r   r   r     s    
zSiprec.parameter)NNr   r   r   r   r   r   r   r   r   r   r   r   	  s   r   c                       s*   e Zd ZdZ fddZdddZ  ZS )r   z<Stream> TwiML Nounc                    s   t t| jf | d| _d S )Nr   )r   r   r   r   r   r   r   r   r      s    zStream.__init__Nc                 K   s   |  tf ||d|S r   r   r   r   r   r   r   $  s    
zStream.parameter)NNr   r   r   r   r   r     s   r   c                       sH   e Zd ZdZ fddZdddZdddZdd	d
ZdddZ  Z	S )r   z<Start> TwiML Verbc                    s   t t| jf | d| _d S )Nr   )r   r   r   r   r   r   r   r   r   4  s    zStart.__init__Nc                 K   s"   |  tf ||||||d|S r   r   r   r   r   r   r   8  s    zStart.streamc              
   K   s    |  tf |||||d|S r   r   r   r   r   r   r   [  s    zStart.siprecc                 K   s2   |  tf |||||||||	|
||||d|S r   r   r   r   r   r   r   {  s(    'zStart.transcriptionc                 K   s"   |  tf ||||||d|S )a)  
        Create a <Recording> element

        :param recording_status_callback: Recording Status Callback URL
        :param recording_status_callback_method: Recording Status Callback URL method
        :param recording_status_callback_event: Recording Status Callback Events
        :param trim: Trim the recording
        :param track: To indicate which audio track should be recorded
        :param channels: The recording channels for the final recording
        :param kwargs: additional attributes

        :returns: <Recording> element
        )r   r   r   r   r   channels)r   	Recording)r	   r   r   r   r   r   r   r
   r   r   r   	recording  s    zStart.recording)NNNNNN)NNNNN)NNNNNNNNNNNNNN)NNNNNN)
r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   1  sJ         
%     
"              
=      r   c                       s    e Zd ZdZ fddZ  ZS )r   z<Recording> TwiML Nounc                    s   t t| jf | d| _d S )Nr   )r   r   r   r   r   r   r   r   r     s    zRecording.__init__r   r   r   r   r   r     s   r   c                       s>   e Zd ZdZ fddZdddZdddZdd	d
Z  ZS )r   z<Prompt> Twiml Verbc                    s   t t| jf | d| _d S )Nr   )r   r   r   r   r   r   r   r   r     s    zPrompt.__init__Nc              	   K   s   |  tf ||||d|S re   rh   rj   r   r   r   rk     s    z
Prompt.sayc                 K   s   |  tf |||d|S rL   rP   rR   r   r   r   rS     s    zPrompt.playc                 K   s   |  tf d|i|S rF   rH   rJ   r   r   r   rK     s    	zPrompt.pause)NNNN)NNN)N)	r   r   r   r   r   rk   rS   rK   r   r   r   r   r   r     s
   

r   c                       s    e Zd ZdZ fddZ  ZS )rI   z<Pause> TwiML Verbc                    s   t t| jf | d| _d S )NrI   )r   rI   r   r   r   r   r   r   r     s    zPause.__init__r   r   r   r   r   rI     s   rI   c                       s"   e Zd ZdZd fdd	Z  ZS )rQ   z<Play> TwiML VerbNc                    s&   t t| jf | d| _|r"|| _d S )NrQ   )r   rQ   r   r   r   r	   rM   r
   r   r   r   r     s    zPlay.__init__)Nr   r   r   r   r   rQ     s   rQ   c                       s   e Zd ZdZd fdd	ZdddZdddZdd	d
ZdddZdddZ	dddZ
d ddZd!ddZd"ddZd#ddZ  ZS )$ri   z<Say> TwiML VerbNc                    s&   t t| jf | d| _|r"|| _d S )Nri   )r   ri   r   r   r   r	   rf   r
   r   r   r   r   '  s    zSay.__init__c                 K   s   |  tf ||d|S a4  
        Create a <Break> element

        :param strength: Set a pause based on strength
        :param time: Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms
        :param kwargs: additional attributes

        :returns: <Break> element
        )strengthtimer   	SsmlBreakr	   r   r   r
   r   r   r   break_-  s    
z
Say.break_c                 K   s   |  tf ||d|S z
        Create a <Emphasis> element

        :param words: Words to emphasize
        :param level: Specify the degree of emphasis
        :param kwargs: additional attributes

        :returns: <Emphasis> element
        )wordslevelr   SsmlEmphasisr	   r   r   r
   r   r   r   emphasis9  s    
zSay.emphasisc                 K   s   |  tf ||d|S z
        Create a <Lang> element

        :param words: Words to speak
        :param xml:lang: Specify the language
        :param kwargs: additional attributes

        :returns: <Lang> element
        )r   xml_langr   SsmlLangr	   r   r   r
   r   r   r   langE  s    
zSay.langc                 K   s   |  tf d|i|S z
        Create a <P> element

        :param words: Words to speak
        :param kwargs: additional attributes

        :returns: <P> element
        r   r   SsmlPr	   r   r
   r   r   r   pQ  s    	zSay.pc                 K   s   |  t|f||d|S a  
        Create a <Phoneme> element

        :param words: Words to speak
        :param alphabet: Specify the phonetic alphabet
        :param ph: Specifiy the phonetic symbols for pronunciation
        :param kwargs: additional attributes

        :returns: <Phoneme> element
        )alphabetphr   SsmlPhonemer	   r   r   r   r
   r   r   r   phoneme\  s    zSay.phonemec              	   K   s   |  tf ||||d|S a  
        Create a <Prosody> element

        :param words: Words to speak
        :param volume: Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB
        :param rate: Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%
        :param pitch: Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%
        :param kwargs: additional attributes

        :returns: <Prosody> element
        )r   volumeratepitchr   SsmlProsodyr	   r   r   r   r   r
   r   r   r   prosodyi  s    zSay.prosodyc                 K   s   |  tf d|i|S z
        Create a <S> element

        :param words: Words to speak
        :param kwargs: additional attributes

        :returns: <S> element
        r   r   SsmlSr   r   r   r   sy  s    	zSay.sc                 K   s   |  t|f||d|S aD  
        Create a <Say-As> element

        :param words: Words to be interpreted
        :param interpret-as: Specify the type of words are spoken
        :param format: Specify the format of the date when interpret-as is set to date
        :param kwargs: additional attributes

        :returns: <Say-As> element
        )interpret_asformatr   	SsmlSayAsr	   r   r   r   r
   r   r   r   say_as  s    z
Say.say_asc                 K   s   |  t|fd|i|S a  
        Create a <Sub> element

        :param words: Words to be substituted
        :param alias: Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation
        :param kwargs: additional attributes

        :returns: <Sub> element
        aliasr   SsmlSubr	   r   r   r
   r   r   r   sub  s    
zSay.subc                 K   s   |  tf ||d|S u  
        Create a <W> element

        :param words: Words to speak
        :param role: Customize the pronunciation of words by specifying the word’s part of speech or alternate meaning
        :param kwargs: additional attributes

        :returns: <W> element
        )r   roler   SsmlWr	   r   r  r
   r   r   r   w  s    
zSay.w)N)NN)NN)NN)N)NN)NNNN)N)NN)N)NNr   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r   r   r   r   r   ri   $  s   








ri   c                       s^   e Zd ZdZd fdd	ZdddZdddZdd	d
ZdddZdddZ	dddZ
  ZS )r  z>Improving Pronunciation by Specifying Parts of Speech in <Say>Nc                    s&   t t| jf | d| _|r"|| _d S )Nr  )r   r  r   r   r   r   r   r   r   r     s    zSsmlW.__init__c                 K   s   |  tf ||d|S r   r   r   r   r   r   r     s    
zSsmlW.break_c                 K   s   |  tf ||d|S r   r   r   r   r   r   r     s    
zSsmlW.emphasisc                 K   s   |  t|f||d|S r   r   r   r   r   r   r     s    zSsmlW.phonemec              	   K   s   |  tf ||||d|S r   r   r   r   r   r   r     s    zSsmlW.prosodyc                 K   s   |  t|f||d|S r   r   r   r   r   r   r     s    zSsmlW.say_asc                 K   s   |  t|fd|i|S r   r   r   r   r   r   r     s    
z	SsmlW.sub)N)NN)NN)NN)NNNN)NN)N)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    s   




r  c                       s    e Zd ZdZ fddZ  ZS )r   z/Pronouncing Acronyms and Abbreviations in <Say>c                    s"   t t| jf | d| _|| _d S )Nr   )r   r   r   r   r   r   r   r   r   r   	  s    zSsmlSub.__init__r   r   r   r   r   r     s   r   c                       s    e Zd ZdZ fddZ  ZS )r   z:Controlling How Special Types of Words Are Spoken in <Say>c                    s"   t t| jf | d| _|| _d S )Nzsay-as)r   r   r   r   r   r   r   r   r   r     s    zSsmlSayAs.__init__r   r   r   r   r   r     s   r   c                       s   e Zd ZdZd fdd	ZdddZdddZdd	d
ZdddZdddZ	dddZ
d ddZd!ddZd"ddZd#ddZ  ZS )$r   z4Controling Volume, Speaking Rate, and Pitch in <Say>Nc                    s&   t t| jf | d| _|r"|| _d S )Nr   )r   r   r   r   r   r   r   r   r   r     s    zSsmlProsody.__init__c                 K   s   |  tf ||d|S r   r   r   r   r   r   r   !  s    
zSsmlProsody.break_c                 K   s   |  tf ||d|S r   r   r   r   r   r   r   -  s    
zSsmlProsody.emphasisc                 K   s   |  tf ||d|S r   r   r   r   r   r   r   9  s    
zSsmlProsody.langc                 K   s   |  tf d|i|S r   r   r   r   r   r   r   E  s    	zSsmlProsody.pc                 K   s   |  t|f||d|S r   r   r   r   r   r   r   P  s    zSsmlProsody.phonemec              	   K   s   |  tf ||||d|S r   r   r   r   r   r   r   ]  s    zSsmlProsody.prosodyc                 K   s   |  tf d|i|S r   r   r   r   r   r   r   m  s    	zSsmlProsody.sc                 K   s   |  t|f||d|S r   r   r   r   r   r   r   x  s    zSsmlProsody.say_asc                 K   s   |  t|fd|i|S r   r   r   r   r   r   r     s    
zSsmlProsody.subc                 K   s   |  tf ||d|S r   r  r  r   r   r   r    s    
zSsmlProsody.w)N)NN)NN)NN)N)NN)NNNN)N)NN)N)NNr  r   r   r   r   r     s   








r   c                       sr   e Zd ZdZd fdd	ZdddZdddZdd	d
ZdddZdddZ	dddZ
dddZdddZ  ZS )r   z)Adding A Pause Between Sentences in <Say>Nc                    s&   t t| jf | d| _|r"|| _d S )Nr   )r   r   r   r   r   r   r   r   r   r     s    zSsmlS.__init__c                 K   s   |  tf ||d|S r   r   r   r   r   r   r     s    
zSsmlS.break_c                 K   s   |  tf ||d|S r   r   r   r   r   r   r     s    
zSsmlS.emphasisc                 K   s   |  tf ||d|S r   r   r   r   r   r   r     s    
z
SsmlS.langc                 K   s   |  t|f||d|S r   r   r   r   r   r   r     s    zSsmlS.phonemec              	   K   s   |  tf ||||d|S r   r   r   r   r   r   r     s    zSsmlS.prosodyc                 K   s   |  t|f||d|S r   r   r   r   r   r   r     s    zSsmlS.say_asc                 K   s   |  t|fd|i|S r   r   r   r   r   r   r     s    
z	SsmlS.subc                 K   s   |  tf ||d|S r   r  r  r   r   r   r    s    
zSsmlS.w)N)NN)NN)NN)NN)NNNN)NN)N)NNr   r   r   r   r   r   r   r   r   r   r   r   r  r   r   r   r   r   r     s   






r   c                       s    e Zd ZdZ fddZ  ZS )r   z%Using Phonetic Pronunciation in <Say>c                    s"   t t| jf | d| _|| _d S )Nr   )r   r   r   r   r   r   r   r   r   r     s    zSsmlPhoneme.__init__r   r   r   r   r   r     s   r   c                       s   e Zd ZdZd fdd	ZdddZdddZdd	d
ZdddZdddZ	dddZ
d ddZd!ddZd"ddZd#ddZ  ZS )$r   z7Specifying Another Language for Specific Words in <Say>Nc                    s&   t t| jf | d| _|r"|| _d S )Nr   )r   r   r   r   r   r   r   r   r   r     s    zSsmlLang.__init__c                 K   s   |  tf ||d|S r   r   r   r   r   r   r   $  s    
zSsmlLang.break_c                 K   s   |  tf ||d|S r   r   r   r   r   r   r   0  s    
zSsmlLang.emphasisc                 K   s   |  tf ||d|S r   r   r   r   r   r   r   <  s    
zSsmlLang.langc                 K   s   |  tf d|i|S r   r   r   r   r   r   r   H  s    	z
SsmlLang.pc                 K   s   |  t|f||d|S r   r   r   r   r   r   r   S  s    zSsmlLang.phonemec              	   K   s   |  tf ||||d|S r   r   r   r   r   r   r   `  s    zSsmlLang.prosodyc                 K   s   |  tf d|i|S r   r   r   r   r   r   r   p  s    	z
SsmlLang.sc                 K   s   |  t|f||d|S r   r   r   r   r   r   r   {  s    zSsmlLang.say_asc                 K   s   |  t|fd|i|S r   r   r   r   r   r   r     s    
zSsmlLang.subc                 K   s   |  tf ||d|S r   r  r  r   r   r   r    s    
z
SsmlLang.w)N)NN)NN)NN)N)NN)NNNN)N)NN)N)NNr  r   r   r   r   r     s   








r   c                       s|   e Zd ZdZd fdd	ZdddZdddZdd	d
ZdddZdddZ	dddZ
dddZdddZd ddZ  ZS )!r   z*Adding a Pause Between Paragraphs in <Say>Nc                    s&   t t| jf | d| _|r"|| _d S )Nr   )r   r   r   r   r   r   r   r   r   r     s    zSsmlP.__init__c                 K   s   |  tf ||d|S r   r   r   r   r   r   r     s    
zSsmlP.break_c                 K   s   |  tf ||d|S r   r   r   r   r   r   r     s    
zSsmlP.emphasisc                 K   s   |  tf ||d|S r   r   r   r   r   r   r     s    
z
SsmlP.langc                 K   s   |  t|f||d|S r   r   r   r   r   r   r     s    zSsmlP.phonemec              	   K   s   |  tf ||||d|S r   r   r   r   r   r   r     s    zSsmlP.prosodyc                 K   s   |  tf d|i|S r   r   r   r   r   r   r     s    	zSsmlP.sc                 K   s   |  t|f||d|S r   r   r   r   r   r   r     s    zSsmlP.say_asc                 K   s   |  t|fd|i|S r   r   r   r   r   r   r     s    
z	SsmlP.subc                 K   s   |  tf ||d|S r   r  r  r   r   r   r    s    
zSsmlP.w)N)NN)NN)NN)NN)NNNN)N)NN)N)NN)r   r   r   r   r   r   r   r   r   r   r   r   r   r  r   r   r   r   r   r     s   







r   c                       sr   e Zd ZdZd fdd	ZdddZdddZdd	d
ZdddZdddZ	dddZ
dddZdddZ  ZS )r   zEmphasizing Words in <Say>Nc                    s&   t t| jf | d| _|r"|| _d S )Nr   )r   r   r   r   r   r   r   r   r   r   #  s    zSsmlEmphasis.__init__c                 K   s   |  tf ||d|S r   r   r   r   r   r   r   )  s    
zSsmlEmphasis.break_c                 K   s   |  tf ||d|S r   r   r   r   r   r   r   5  s    
zSsmlEmphasis.emphasisc                 K   s   |  tf ||d|S r   r   r   r   r   r   r   A  s    
zSsmlEmphasis.langc                 K   s   |  t|f||d|S r   r   r   r   r   r   r   M  s    zSsmlEmphasis.phonemec              	   K   s   |  tf ||||d|S r   r   r   r   r   r   r   Z  s    zSsmlEmphasis.prosodyc                 K   s   |  t|f||d|S r   r   r   r   r   r   r   j  s    zSsmlEmphasis.say_asc                 K   s   |  t|fd|i|S r   r   r   r   r   r   r   y  s    
zSsmlEmphasis.subc                 K   s   |  tf ||d|S r   r  r  r   r   r   r    s    
zSsmlEmphasis.w)N)NN)NN)NN)NN)NNNN)NN)N)NNr  r   r   r   r   r      s   






r   c                       s    e Zd ZdZ fddZ  ZS )r   zAdding a Pause in <Say>c                    s   t t| jf | d| _d S )Nbreak)r   r   r   r   r   r   r   r   r     s    zSsmlBreak.__init__r   r   r   r   r   r     s   r   c                       s4   e Zd ZdZ fddZd	ddZd
ddZ  ZS )r~   z<Pay> Twiml Verbc                    s   t t| jf | d| _d S )Nr~   )r   r~   r   r   r   r   r   r   r     s    zPay.__init__Nc              
   K   s    |  tf |||||d|S r   r   r   r   r   r   r     s    z
Pay.promptc                 K   s   |  tf ||d|S r   r   r   r   r   r   r     s    
zPay.parameter)NNNNN)NN)r   r   r   r   r   r   r   r   r   r   r   r   r~     s        
 r~   c                       s    e Zd ZdZ fddZ  ZS )ro   z<Sms> TwiML Nounc                    s"   t t| jf | d| _|| _d S )Nro   )r   ro   r   r   r   r   r   r   r   r     s    zSms.__init__r   r   r   r   r   ro     s   ro   c                       s*   e Zd ZdZ fddZdddZ  ZS )rc   z<Reject> TwiML Verbc                    s   t t| jf | d| _d S )Nrc   )r   rc   r   r   r   r   r   r   r     s    zReject.__init__Nc                 K   s   |  tf ||d|S r   r   r   r   r   r   r     s    
zReject.parameter)NNr   r   r   r   r   rc     s   rc   c                       s    e Zd ZdZ fddZ  ZS )r`   z<Redirect> TwiML Verbc                    s"   t t| jf | d| _|| _d S )Nr`   )r   r`   r   r   r   r   r   r   r   r     s    zRedirect.__init__r   r   r   r   r   r`     s   r`   c                       s    e Zd ZdZ fddZ  ZS )r_   z<Record> TwiML Verbc                    s   t t| jf | d| _d S )Nr_   )r   r_   r   r   r   r   r   r   r     s    zRecord.__init__r   r   r   r   r   r_     s   r_   c                       s    e Zd ZdZ fddZ  ZS )rX   z<Queue> TwiML Nounc                    s"   t t| jf | d| _|| _d S )NrX   )r   rX   r   r   r   r	   r   r
   r   r   r   r     s    zQueue.__init__r   r   r   r   r   rX     s   rX   c                       s    e Zd ZdZ fddZ  ZS )rD   z<Leave> TwiML Verbc                    s   t t| jf | d| _d S )NrD   )r   rD   r   r   r   r   r   r   r     s    zLeave.__init__r   r   r   r   r   rD     s   rD   c                       s*   e Zd ZdZ fddZdddZ  ZS )rB   z<Hangup> TwiML Verbc                    s   t t| jf | d| _d S )NrB   )r   rB   r   r   r   r   r   r   r     s    zHangup.__init__Nc                 K   s   |  tf ||d|S r   r   r   r   r   r   r     s    
zHangup.parameter)NNr   r   r   r   r   rB     s   rB   c                       s>   e Zd ZdZ fddZdddZdddZdd	d
Z  ZS )r@   z<Gather> TwiML Verbc                    s   t t| jf | d| _d S )Nr@   )r   r@   r   r   r   r   r   r   r   $  s    zGather.__init__Nc              	   K   s   |  tf ||||d|S re   rh   rj   r   r   r   rk   (  s    z
Gather.sayc                 K   s   |  tf d|i|S rF   rH   rJ   r   r   r   rK   8  s    	zGather.pausec                 K   s   |  tf |||d|S rL   rP   rR   r   r   r   rS   C  s    zGather.play)NNNN)N)NNN)	r   r   r   r   r   rk   rK   rS   r   r   r   r   r   r@   !  s
   

r@   c                       s,   e Zd ZdZd fdd	ZdddZ  ZS )	r/   z<Enqueue> TwiML NounNc                    s&   t t| jf | d| _|r"|| _d S )Nr/   )r   r/   r   r   r   r	  r   r   r   r   T  s    zEnqueue.__init__c                 K   s   |  t|f||d|S )a  
        Create a <Task> element

        :param body: TaskRouter task attributes
        :param priority: Task priority
        :param timeout: Timeout associated with task
        :param kwargs: additional attributes

        :returns: <Task> element
        )priorityr   )r   Task)r	   bodyr
  r   r
   r   r   r   taskZ  s    zEnqueue.task)N)NN)r   r   r   r   r   r  r   r   r   r   r   r/   Q  s   r/   c                       s    e Zd ZdZ fddZ  ZS )r  z<Task> TwiML Nounc                    s"   t t| jf | d| _|| _d S )Nr  )r   r  r   r   r   )r	   r  r
   r   r   r   r   k  s    zTask.__init__r   r   r   r   r   r  h  s   r  c                       s    e Zd ZdZ fddZ  ZS )r)   z<Echo> TwiML Verbc                    s   t t| jf | d| _d S )Nr)   )r   r)   r   r   r   r   r   r   r   t  s    zEcho.__init__r   r   r   r   r   r)   q  s   r)   c                       sp   e Zd ZdZd fdd	ZdddZdddZdd	d
ZdddZdd Z	dddZ
dddZdddZ  ZS )r'   z<Dial> TwiML VerbNc                    s&   t t| jf | d| _|r"|| _d S )Nr'   )r   r'   r   r   r   )r	   r   r
   r   r   r   r   |  s    zDial.__init__c                 K   s"   |  tf ||||||d|S )a  
        Create a <Client> element

        :param identity: Client identity
        :param url: Client URL
        :param method: Client URL Method
        :param status_callback_event: Events to trigger status callback
        :param status_callback: Status Callback URL
        :param status_callback_method: Status Callback URL Method
        :param kwargs: additional attributes

        :returns: <Client> element
        )identityrM   r   status_callback_eventrn   rr   )r   Client)r	   r  rM   r   r  rn   rr   r
   r   r   r   client  s    zDial.clientc                 K   s@   |  t|f||||||||	|
|||||||||||d|S )a.  
        Create a <Conference> element

        :param name: Conference name
        :param muted: Join the conference muted
        :param beep: Play beep when joining
        :param start_conference_on_enter: Start the conference on enter
        :param end_conference_on_exit: End the conferenceon exit
        :param wait_url: Wait URL
        :param wait_method: Wait URL method
        :param max_participants: Maximum number of participants
        :param record: Record the conference
        :param region: Conference region
        :param coach: Call coach
        :param trim: Trim the conference recording
        :param status_callback_event: Events to call status callback URL
        :param status_callback: Status callback URL
        :param status_callback_method: Status callback URL method
        :param recording_status_callback: Recording status callback URL
        :param recording_status_callback_method: Recording status callback URL method
        :param recording_status_callback_event: Recording status callback events
        :param event_callback_url: Event callback URL
        :param jitter_buffer_size: Size of jitter buffer for participant
        :param participant_label: A label for participant
        :param kwargs: additional attributes

        :returns: <Conference> element
        )mutedbeepstart_conference_on_enterend_conference_on_exitr,   wait_methodmax_participantsr   regioncoachr   r  rn   rr   r   r   r   event_callback_urljitter_buffer_sizeparticipant_label)r   
Conference)r	   r   r  r  r  r  r,   r  r  r   r  r  r   r  rn   rr   r   r   r   r  r  r  r
   r   r   r   
conference  s8    5zDial.conferencec                 K   s4   |  t|f||||||||	|
|||||d|S )a  
        Create a <Number> element

        :param phone_number: Phone Number to dial
        :param send_digits: DTMF tones to play when the call is answered
        :param url: TwiML URL
        :param method: TwiML URL method
        :param status_callback_event: Events to call status callback
        :param status_callback: Status callback URL
        :param status_callback_method: Status callback URL method
        :param byoc: BYOC trunk SID (Beta)
        :param machine_detection: Enable machine detection or end of greeting detection
        :param amd_status_callback_method: HTTP Method to use with amd_status_callback
        :param amd_status_callback: The URL we should call to send amd status information to your application
        :param machine_detection_timeout: Number of seconds to wait for machine detection
        :param machine_detection_speech_threshold: Number of milliseconds for measuring stick for the length of the speech activity
        :param machine_detection_speech_end_threshold: Number of milliseconds of silence after speech activity
        :param machine_detection_silence_timeout: Number of milliseconds of initial silence
        :param kwargs: additional attributes

        :returns: <Number> element
        )send_digitsrM   r   r  rn   rr   byocmachine_detectionamd_status_callback_methodamd_status_callbackmachine_detection_timeout"machine_detection_speech_threshold&machine_detection_speech_end_threshold!machine_detection_silence_timeout)r   Number)r	   phone_numberr  rM   r   r  rn   rr   r   r!  r"  r#  r$  r%  r&  r'  r
   r   r   r   r     s,    )zDial.numberc              	   K   s    |  t|f||||d|S rT   rW   rY   r   r   r   rZ   3	  s    z
Dial.queuec                 K   s   |  t|f|S )z
        Create a <Sim> element

        :param sim_sid: SIM SID
        :param kwargs: additional attributes

        :returns: <Sim> element
        )r   Simr	   Zsim_sidr
   r   r   r   simS	  s    	zDial.simc                 K   s4   |  t|f||||||||	|
|||||d|S )a  
        Create a <Sip> element

        :param sip_url: SIP URL
        :param username: SIP Username
        :param password: SIP Password
        :param url: Action URL
        :param method: Action URL method
        :param status_callback_event: Status callback events
        :param status_callback: Status callback URL
        :param status_callback_method: Status callback URL method
        :param machine_detection: Enable machine detection or end of greeting detection
        :param amd_status_callback_method: HTTP Method to use with amd_status_callback
        :param amd_status_callback: The URL we should call to send amd status information to your application
        :param machine_detection_timeout: Number of seconds to wait for machine detection
        :param machine_detection_speech_threshold: Number of milliseconds for measuring stick for the length of the speech activity
        :param machine_detection_speech_end_threshold: Number of milliseconds of silence after speech activity
        :param machine_detection_silence_timeout: Number of milliseconds of initial silence
        :param kwargs: additional attributes

        :returns: <Sip> element
        )usernamepasswordrM   r   r  rn   rr   r!  r"  r#  r$  r%  r&  r'  )r   r   )r	   r   r-  r.  rM   r   r  rn   rr   r!  r"  r#  r$  r%  r&  r'  r
   r   r   r   r   ^	  s,    )zDial.sipc	           
      K   s&   |  tf ||||||||d|	S )a  
        Create a <Application> element

        :param application_sid: Application sid
        :param url: TwiML URL
        :param method: TwiML URL Method
        :param status_callback_event: Events to trigger status callback
        :param status_callback: Status Callback URL
        :param status_callback_method: Status Callback URL Method
        :param customer_id: Identity of the customer calling application
        :param copy_parent_to: Copy parent call To field to called application side, otherwise use the application sid as To field
        :param kwargs: additional attributes

        :returns: <Application> element
        )application_sidrM   r   r  rn   rr   customer_idcopy_parent_to)r   Application)
r	   r/  rM   r   r  rn   rr   r0  r1  r
   r   r   r   application	  s    	zDial.applicationc              
   K   s"   |  t|f|||||d|S )a  
        Create a <WhatsApp> element

        :param phone_number: WhatsApp Phone Number to dial
        :param url: TwiML URL
        :param method: TwiML URL Method
        :param status_callback_event: Events to trigger status callback
        :param status_callback: Status Callback URL
        :param status_callback_method: Status Callback URL Method
        :param kwargs: additional attributes

        :returns: <WhatsApp> element
        )rM   r   r  rn   rr   )r   WhatsApp)r	   r)  rM   r   r  rn   rr   r
   r   r   r   	whats_app	  s    zDial.whats_app)N)NNNNNN)NNNNNNNNNNNNNNNNNNNN)NNNNNNNNNNNNNN)NNNN)NNNNNNNNNNNNNN)NNNNNNNN)NNNNN)r   r   r   r   r   r  r  r   rZ   r,  r   r3  r5  r   r   r   r   r   r'   y  s         
&                    
S              
A    
               
@        
,     r'   c                       s    e Zd ZdZ fddZ  ZS )r4  z<WhatsApp> TwiML Nounc                    s"   t t| jf | d| _|| _d S )Nr4  )r   r4  r   r   r   r	   r)  r
   r   r   r   r   	  s    zWhatsApp.__init__r   r   r   r   r   r4  	  s   r4  c                       s4   e Zd ZdZd	 fdd	Zdd Zd
ddZ  ZS )r2  z<Application> TwiML NounNc                    s&   t t| jf | d| _|r"|| _d S )Nr2  )r   r2  r   r   r   )r	   r/  r
   r   r   r   r   	  s    zApplication.__init__c                 K   s   |  t|f|S )z
        Create a <ApplicationSid> element

        :param sid: Application sid to dial
        :param kwargs: additional attributes

        :returns: <ApplicationSid> element
        )r   ApplicationSidr	   Zsidr
   r   r   r   r/  	  s    	zApplication.application_sidc                 K   s   |  tf ||d|S r   r   r   r   r   r   r   
  s    
zApplication.parameter)N)NN)r   r   r   r   r   r/  r   r   r   r   r   r   r2  	  s   r2  c                       s    e Zd ZdZ fddZ  ZS )r7  z<ApplicationSid> TwiML Nounc                    s"   t t| jf | d| _|| _d S )Nr7  )r   r7  r   r   r   r8  r   r   r   r   
  s    zApplicationSid.__init__r   r   r   r   r   r7  
  s   r7  c                       s    e Zd ZdZ fddZ  ZS )r   z<Sip> TwiML Nounc                    s"   t t| jf | d| _|| _d S r   )r   r   r   r   r   r   r   r   r   r   
  s    zSip.__init__r   r   r   r   r   r   
  s   r   c                       s    e Zd ZdZ fddZ  ZS )r*  z<Sim> TwiML Nounc                    s"   t t| jf | d| _|| _d S )Nr*  )r   r*  r   r   r   r+  r   r   r   r   (
  s    zSim.__init__r   r   r   r   r   r*  %
  s   r*  c                       s    e Zd ZdZ fddZ  ZS )r(  z<Number> TwiML Nounc                    s"   t t| jf | d| _|| _d S )Nr(  )r   r(  r   r   r   r6  r   r   r   r   1
  s    zNumber.__init__r   r   r   r   r   r(  .
  s   r(  c                       s    e Zd ZdZ fddZ  ZS )r  z<Conference> TwiML Nounc                    s"   t t| jf | d| _|| _d S )Nr  )r   r  r   r   r   r	  r   r   r   r   :
  s    zConference.__init__r   r   r   r   r   r  7
  s   r  c                       s4   e Zd ZdZd	 fdd	Zdd Zd
ddZ  ZS )r  z<Client> TwiML NounNc                    s&   t t| jf | d| _|r"|| _d S )Nr  )r   r  r   r   r   )r	   r  r
   r   r   r   r   C
  s    zClient.__init__c                 K   s   |  t|f|S )z
        Create a <Identity> element

        :param client_identity: Identity of the client to dial
        :param kwargs: additional attributes

        :returns: <Identity> element
        )r   Identityr	   Zclient_identityr
   r   r   r   r  I
  s    	zClient.identityc                 K   s   |  tf ||d|S r   r   r   r   r   r   r   T
  s    
zClient.parameter)N)NN)r   r   r   r   r   r  r   r   r   r   r   r   r  @
  s   r  c                       s    e Zd ZdZ fddZ  ZS )r9  z<Identity> TwiML Nounc                    s"   t t| jf | d| _|| _d S )Nr9  )r   r9  r   r   r   r:  r   r   r   r   d
  s    zIdentity.__init__r   r   r   r   r   r9  a
  s   r9  c                       sx   e Zd ZdZ fddZdddZdd Zdd	d
ZdddZdddZ	dddZ
dddZdddZdddZ  ZS )r   z<Connect> TwiML Verbc                    s   t t| jf | d| _d S )Nr   )r   r   r   r   r   r   r   r   r   m
  s    zConnect.__init__Nc                 K   s   |  t|fd|i|S )z
        Create a <Room> element

        :param name: Room name
        :param participant_identity: Participant identity when connecting to the Room
        :param kwargs: additional attributes

        :returns: <Room> element
        participant_identity)r   Room)r	   r   r;  r
   r   r   r   roomq
  s    
zConnect.roomc                 K   s   |  t|f|S )z
        Create a <Autopilot> element

        :param name: Autopilot assistant sid or unique name
        :param kwargs: additional attributes

        :returns: <Autopilot> element
        )r   	Autopilotr	  r   r   r   	autopilot
  s    	zConnect.autopilotc                 K   s"   |  tf ||||||d|S r   r   r   r   r   r   r   
  s    zConnect.streamc              
   K   s    |  tf |||||d|S )a5  
        Create a <VirtualAgent> element

        :param connector_name: Defines the conversation profile Dialogflow needs to use
        :param language: Language to be used by Dialogflow to transcribe speech
        :param sentiment_analysis: Whether sentiment analysis needs to be enabled or not
        :param status_callback: URL to post status callbacks from Twilio
        :param status_callback_method: HTTP method to use when requesting the status callback URL
        :param kwargs: additional attributes

        :returns: <VirtualAgent> element
        )r   r9   sentiment_analysisrn   rr   )r   VirtualAgent)r	   r   r9   r@  rn   rr   r
   r   r   r   virtual_agent
  s    zConnect.virtual_agentc                 K   s2   |  tf |||||||||	|
||||d|S )a  
        Create a <Conversation> element

        :param service_instance_sid: Service instance Sid
        :param inbound_autocreation: Inbound autocreation
        :param routing_assignment_timeout: Routing assignment timeout
        :param inbound_timeout: Inbound timeout
        :param url: TwiML URL
        :param method: TwiML URL method
        :param record: Record
        :param trim: Trim
        :param recording_status_callback: Recording status callback URL
        :param recording_status_callback_method: Recording status callback URL method
        :param recording_status_callback_event: Recording status callback events
        :param status_callback: Status callback URL
        :param status_callback_method: Status callback URL method
        :param status_callback_event: Events to call status callback URL
        :param kwargs: additional attributes

        :returns: <Conversation> element
        )service_instance_sidinbound_autocreationrouting_assignment_timeoutinbound_timeoutrM   r   r   r   r   r   r   rn   rr   r  )r   Conversation)r	   rC  rD  rE  rF  rM   r   r   r   r   r   r   rn   rr   r  r
   r   r   r   conversation
  s(    'zConnect.conversationc                 K   s@   |  tf |||||||||	|
|||||||||||d|S )a(	  
        Create a <ConversationRelay> element

        :param url: URL of the remote service where the session is connected to
        :param language: Language to be used for both text-to-speech and transcription
        :param tts_language: Language to be used for text-to-speech
        :param transcription_language: Language to be used for transcription
        :param tts_provider: Provider to be used for text-to-speech
        :param voice: Voice to be used for text-to-speech
        :param transcription_provider: Provider to be used for transcription
        :param speech_model: Speech model to be used for transcription
        :param profanity_filter: Whether profanities should be filtered out of the speech transcription
        :param dtmf_detection: Whether DTMF tones should be detected and reported in speech transcription
        :param welcome_greeting: The sentence to be played automatically when the session is connected
        :param partial_prompts: Whether partial prompts should be reported to WebSocket server before the caller finishes speaking
        :param welcome_greeting_interruptible: "Whether and how the input from a caller, such as speaking or DTMF can interrupt the welcome greeting
        :param interruptible: Whether and how the input from a caller, such as speaking or DTMF can interrupt the play of text-to-speech
        :param preemptible: Whether subsequent text-to-speech or play media can interrupt the on-going play of text-to-speech or media
        :param hints: Phrases to help better accuracy in speech recognition of these pharases
        :param intelligence_service: The Conversational Intelligence Service id or unique name to be used for the session
        :param report_input_during_agent_speech: Whether prompts should be reported to WebSocket server when text-to-speech playing and interrupt is disabled
        :param elevenlabs_text_normalization: When using ElevenLabs as TTS provider, this parameter allows you to enable or disable its text normalization feature
        :param interrupt_sensitivity: Set the sensitivity of the interrupt feature for speech. The value can be low, medium, or high
        :param debug: Multiple debug options to be used for troubleshooting
        :param kwargs: additional attributes

        :returns: <ConversationRelay> element
        )rM   r9   tts_languagetranscription_languagetts_providerrg   transcription_providerr>   r4   dtmf_detectionwelcome_greetingpartial_promptswelcome_greeting_interruptibleinterruptiblepreemptibler:   r    report_input_during_agent_speechelevenlabs_text_normalizationinterrupt_sensitivityr<   )r   ConversationRelay)r	   rM   r9   rI  rJ  rK  rg   rL  r>   r4   rM  rN  rO  rP  rQ  rR  r:   r   rS  rT  rU  r<   r
   r   r   r   conversation_relay  s6    5zConnect.conversation_relayc                 K   s@   |  tf |||||||||	|
|||||||||||d|S )a 	  
        Create a <Assistant> element

        :param id: The assistant ID of the AI Assistant
        :param language: Language to be used for both text-to-speech and transcription
        :param tts_language: Language to be used for text-to-speech
        :param transcription_language: Language to be used for transcription
        :param tts_provider: Provider to be used for text-to-speech
        :param voice: Voice to be used for text-to-speech
        :param transcription_provider: Provider to be used for transcription
        :param speech_model: Speech model to be used for transcription
        :param profanity_filter: Whether profanities should be filtered out of the speech transcription
        :param dtmf_detection: Whether DTMF tones should be detected and reported in speech transcription
        :param welcome_greeting: The sentence to be played automatically when the session is connected
        :param partial_prompts: Whether partial prompts should be reported to WebSocket server before the caller finishes speaking
        :param welcome_greeting_interruptible: "Whether and how the input from a caller, such as speaking or DTMF can interrupt the welcome greeting
        :param interruptible: Whether and how the input from a caller, such as speaking or DTMF can interrupt the play of text-to-speech
        :param preemptible: Whether subsequent text-to-speech or play media can interrupt the on-going play of text-to-speech or media
        :param hints: Phrases to help better accuracy in speech recognition of these pharases
        :param intelligence_service: The Conversational Intelligence Service id or unique name to be used for the session
        :param report_input_during_agent_speech: Whether prompts should be reported to WebSocket server when text-to-speech playing and interrupt is disabled
        :param elevenlabs_text_normalization: When using ElevenLabs as TTS provider, this parameter allows you to enable or disable its text normalization feature
        :param interrupt_sensitivity: Set the sensitivity of the interrupt feature for speech. The value can be low, medium, or high
        :param debug: Multiple debug options to be used for troubleshooting
        :param kwargs: additional attributes

        :returns: <Assistant> element
        )idr9   rI  rJ  rK  rg   rL  r>   r4   rM  rN  rO  rP  rQ  rR  r:   r   rS  rT  rU  r<   )r   	Assistant)r	   rX  r9   rI  rJ  rK  rg   rL  r>   r4   rM  rN  rO  rP  rQ  rR  r:   r   rS  rT  rU  r<   r
   r   r   r   	assistantX  s6    5zConnect.assistantc                 K   s   |  tf ||d|S )ar  
        Create a <AiSession> element

        :param ai_connector: The unique name or installed add-on sid that identifies the installed addon resource for the AI Connector
        :param ai_session_configuration: The unique name or id of the AiSession Configuration resource.
        :param kwargs: additional attributes

        :returns: <AiSession> element
        )ai_connectorai_session_configuration)r   	AiSession)r	   r[  r\  r
   r   r   r   
ai_session  s    
zConnect.ai_sessionc                 K   s   |  tf ||d|S )a  
        Create a <ConversationRelaySession> element

        :param connector: The unique name or installed add-on sid that identifies the installed addon resource for the ConversationRelaySession Connector
        :param session_configuration: The unique name or id of the ConversationRelaySession  Configuration resource.
        :param kwargs: additional attributes

        :returns: <ConversationRelaySession> element
        )	connectorsession_configuration)r   ConversationRelaySession)r	   r_  r`  r
   r   r   r   conversation_relay_session  s    z"Connect.conversation_relay_session)N)NNNNNN)NNNNN)NNNNNNNNNNNNNN)NNNNNNNNNNNNNNNNNNNNN)NNNNNNNNNNNNNNNNNNNNN)NN)NN)r   r   r   r   r   r=  r?  r   rB  rH  rW  rZ  r^  rb  r   r   r   r   r   r   j
  s   
      
%     
"              
=                     
R                     
P
   r   c                       s    e Zd ZdZ fddZ  ZS )ra  z%<ConversationRelaySession> TwiML Nounc                    s   t t| jf | d| _d S )Nra  )r   ra  r   r   r   r   r   r   r     s    z!ConversationRelaySession.__init__r   r   r   r   r   ra    s   ra  c                       s    e Zd ZdZ fddZ  ZS )r]  z<AiSession> TwiML Nounc                    s   t t| jf | d| _d S )Nr]  )r   r]  r   r   r   r   r   r   r     s    zAiSession.__init__r   r   r   r   r   r]    s   r]  c                       s4   e Zd ZdZ fddZd	ddZd
ddZ  ZS )rY  z<Assistant> TwiML Nounc                    s   t t| jf | d| _d S )NrY  )r   rY  r   r   r   r   r   r   r     s    zAssistant.__init__Nc              
   K   s    |  tf |||||d|S a  
        Create a <Language> element

        :param code: Language code of this language setting is for
        :param tts_provider: Provider to be used for text-to-speech of this language
        :param voice: Voice to be used for text-to-speech of this language
        :param transcription_provider: Provider to be used for transcription of this language
        :param speech_model: Speech model to be used for transcription of this language
        :param kwargs: additional attributes

        :returns: <Language> element
        )coderK  rg   rL  r>   r   Languager	   rd  rK  rg   rL  r>   r
   r   r   r   r9     s    zAssistant.languagec                 K   s   |  tf ||d|S r   r   r   r   r   r   r     s    
zAssistant.parameter)NNNNN)NNr   r   r   r   r   r9   r   r   r   r   r   r   rY    s        
 rY  c                       s    e Zd ZdZ fddZ  ZS )rf  z<Language> TwiML Nounc                    s   t t| jf | d| _d S )Nrf  )r   rf  r   r   r   r   r   r   r     s    zLanguage.__init__r   r   r   r   r   rf    s   rf  c                       s4   e Zd ZdZ fddZd	ddZd
ddZ  ZS )rV  z<ConversationRelay> TwiML Nounc                    s   t t| jf | d| _d S )NrV  )r   rV  r   r   r   r   r   r   r     s    zConversationRelay.__init__Nc              
   K   s    |  tf |||||d|S rc  re  rg  r   r   r   r9   "  s    zConversationRelay.languagec                 K   s   |  tf ||d|S r   r   r   r   r   r   r   B  s    
zConversationRelay.parameter)NNNNN)NNrh  r   r   r   r   rV    s        
 rV  c                       s    e Zd ZdZ fddZ  ZS )rG  z<Conversation> TwiML Nounc                    s   t t| jf | d| _d S )NrG  )r   rG  r   r   r   r   r   r   r   R  s    zConversation.__init__r   r   r   r   r   rG  O  s   rG  c                       s4   e Zd ZdZ fddZd	ddZd
ddZ  ZS )rA  z<VirtualAgent> TwiML Nounc                    s   t t| jf | d| _d S )NrA  )r   rA  r   r   r   r   r   r   r   Z  s    zVirtualAgent.__init__Nc                 K   s   |  tf ||d|S r   r   r   r   r   r   r   ^  s    
zVirtualAgent.configc                 K   s   |  tf ||d|S r   r   r   r   r   r   r   j  s    
zVirtualAgent.parameter)NN)NNr   r   r   r   r   rA  W  s   
rA  c                       s    e Zd ZdZ fddZ  ZS )r>  z<Autopilot> TwiML Nounc                    s"   t t| jf | d| _|| _d S )Nr>  )r   r>  r   r   r   r	  r   r   r   r   z  s    zAutopilot.__init__r   r   r   r   r   r>  w  s   r>  c                       s    e Zd ZdZ fddZ  ZS )r<  z<Room> TwiML Nounc                    s"   t t| jf | d| _|| _d S )Nr<  )r   r<  r   r   r   r	  r   r   r   r     s    zRoom.__init__r   r   r   r   r   r<    s   r<  N)<r   Ztwilio.twimlr   r   r   r   r   r   r   r   r   r   r   r   r   rI   rQ   ri   r  r   r   r   r   r   r   r   r   r   r~   ro   rc   r`   r_   rX   rD   rB   r@   r/   r  r)   r'   r4  r2  r7  r   r*  r(  r  r  r9  r   ra  r]  rY  rf  rV  rG  rA  r>  r<  r   r   r   r   <module>   s       -	   *0
 	Z		 	r	 	}r4			0	  r	!					!	  g44 	