
    pi                       d Z ddlmZ  G d de      Z G d de      Z G d de      Z G d	 d
e      Z G d de      Z G d de      Z G d de      Z	 G d de      Z
 G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d d e      Z G d! d"e      Z G d# d$e      Z G d% d&e      Z G d' d(e      Z G d) d*e      Z G d+ d,e      Z G d- d.e      Z G d/ d0e      Z G d1 d2e      Z G d3 d4e      Z G d5 d6e      Z G d7 d8e      Z G d9 d:e      Z G d; d<e      Z G d= d>e      Z  G d? d@e      Z! G dA dBe      Z" G dC dDe      Z# G dE dFe      Z$ G dG dHe      Z% G dI dJe      Z& G dK dLe      Z' G dM dNe      Z( G dO dPe      Z) G dQ dRe      Z* G dS dTe      Z+ G dU dVe      Z, G dW dXe      Z- G dY dZe      Z. G d[ d\e      Z/ G d] d^e      Z0 G d_ d`e      Z1 G da dbe      Z2 G dc dde      Z3 G de dfe      Z4 G dg dhe      Z5 G di dje      Z6 G dk dle      Z7 G dm dne      Z8 G do dpe      Z9 G dq dre      Z: G ds dte      Z;yu)vza
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
    )TwiMLc                   j    e Zd ZdZ fdZddZ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZd Z	 	 	 	 	 	 	 ddZ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	d Z
d	 Zdd
ZddZ	 	 	 	 ddZ	 	 	 	 	 	 	 	 	 	 	 	 ddZddZddZddZ	 	 	 	 	 ddZ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	 	 	 	 	 ddZddZd ZddZ xZS ) VoiceResponsez<Response> TwiML for Voicec                 :    t        t        | 
  di | d| _        y )NResponse )superr   __init__nameselfkwargs	__class__s     ]/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/twiml/voice_response.pyr
   zVoiceResponse.__init__   s    mT+5f5	    c                 <    | j                  t        d||d|      S )z
        Create a <Connect> element

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

        :returns: <Connect> element
        actionmethodr   )nestConnectr   r   r   r   s       r   connectzVoiceResponse.connect   s"     yyHvHHIIr   c                     | j                  t        di d|d|d|d|d|d|d|d|d	|	d
|
d|d|d|d|d|d|d|d|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eventsr   )r   Dial)r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r   s                        r   dialzVoiceResponse.dial!   s    b yy    	
  . & $   +D 2R 1P "2 $ !0  &!" $#$ *%& )
 	
r   c                 6    | j                  t        di |      S )zy
        Create a <Echo> element

        :param kwargs: additional attributes

        :returns: <Echo> element
        r   )r   Echor   r   s     r   echozVoiceResponse.echok        yy((r   c                 F    | j                  t        d|||||||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_sidr   )r   Enqueue)	r   r   r   r4   r   r5   r6   r7   r   s	            r   enqueuezVoiceResponse.enqueueu   sA    2 yy 	-! /)	 	
 	
r   c                     | j                  t        di d|d|d|d|d|d|d|d|d	|	d
|
d|d|d|d|d|d|d|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enhancedr   )r   Gather)r   r;   r   r   r   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   r   s                       r   gatherzVoiceResponse.gather   s    ^ yy    	
  . !0 "2 , & )@ 0N "  "   (>!" *#$ "'
 	
r   c                 6    | j                  t        di |      S )z}
        Create a <Hangup> element

        :param kwargs: additional attributes

        :returns: <Hangup> element
        r   )r   Hangupr0   s     r   hangupzVoiceResponse.hangup   s     yy)&)**r   c                 6    | j                  t        di |      S )z{
        Create a <Leave> element

        :param kwargs: additional attributes

        :returns: <Leave> element
        r   )r   Leaver0   s     r   leavezVoiceResponse.leave   s     yy))r   c                 :    | j                  t        dd|i|      S z
        Create a <Pause> element

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

        :returns: <Pause> element
        lengthr   r   Pauser   rT   r   s      r   pausezVoiceResponse.pause         yy7f7788r   c           	      >    | j                  t        d|||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digitsr   r   Playr   r\   r]   r^   r   s        r   playzVoiceResponse.play  $     yyJ#DJ6JKKr   c           
      B    | j                  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
        )r\   r   reservation_sidpost_work_activity_sidr   Queuer   r   r\   r   rf   rg   r   s          r   queuezVoiceResponse.queue  ;    * yy /'= 	
 		
r   c                 P    | j                  t        d|||||||||	|
||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   r?   
max_length	play_beepr!   r"   r#   r$   
transcribetranscribe_callbackr   )r   Record)r   r   r   r   r?   rn   ro   r!   r"   r#   r$   rp   rq   r   s                 r   r    zVoiceResponse.record.  sQ    F yy +%#*C1Q0O%$7 
 	
r   c                 <    | j                  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   r\   r   r   s       r   redirectzVoiceResponse.redirectc  s"     yy#?f??@@r   c                 :    | j                  t        dd|i|      S )z
        Create a <Reject> element

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

        :returns: <Reject> element
        reasonr   )r   Reject)r   rw   r   s      r   rejectzVoiceResponse.rejecto  s      yy8v8899r   c           
      @    | j                  t        d||||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voicer]   rC   r   r   Sayr   r|   r}   r]   rC   r   s         r   sayzVoiceResponse.sayz  +     yyUu4(UfU
 	
r   c                 D    | j                  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   r|   r   r   r   r   r   r   s           r   smszVoiceResponse.sms  s>    . yy / 

 
	
r   c                     | j                  t        di d|d|d|d|d|d|d|d|d	|	d
|
d|d|d|d|d|d|d|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
        r;   r   bank_account_typer   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_typesrC   r   )r   Pay)r   r;   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rC   r   s                       r   payzVoiceResponse.pay  s    ^ yy  #4 !0	
 (>   * , ( (> #4  . & , "  (!" "2#$ "'
 	
r   c                 B    | j                  t        d|||||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_inputsr   r   Promptr   r   r   r   r   r   r   s          r   promptzVoiceResponse.prompt  ;    * yy %#(? 	
 		
r   c                 <    | j                  t        d||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   )r   Startr   s       r   startzVoiceResponse.start  "     yyFfVFvFGGr   c                 6    | j                  t        di |      S )zy
        Create a <Stop> element

        :param kwargs: additional attributes

        :returns: <Stop> element
        r   )r   Stopr0   s     r   stopzVoiceResponse.stop   r2   r   c                 <    | j                  t        d||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   )r   Referr   s       r   referzVoiceResponse.refer*  r   r   NN)NNNNNNNNNNNNNNNNNNN)NNNNNNN)NNNNNNNNNNNNNNNNNNNNNNNNNN)NNNNNNNNNNNNNNNNN)__name__
__module____qualname____doc__r
   r   r-   r1   r9   rK   rN   rQ   rX   rb   rk   r    ru   ry   r   r   r   r   r   r   r   __classcell__r   s   @r   r   r      s   $
J "&)-(,)H
T) $
P  $'+#'E
N+*	9L  #
D "&)-(, 3
j
A	:
& !
J ##'E
R  $
@
H)
Hr   r   c                   (     e Zd ZdZ fdZd Z xZS )r   z<Refer> TwiML Verbc                 :    t        t        | 
  di | d| _        y )Nr   r   )r	   r   r
   r   r   s     r   r
   zRefer.__init__:      eT#-f-	r   c                 8    | j                  t        |fi |      S )z
        Create a <Sip> element

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

        :returns: <Sip> element
        )r   ReferSip)r   sip_urlr   s      r   sipz	Refer.sip>  s     yy'4V455r   )r   r   r   r   r
   r   r   r   s   @r   r   r   7  s    	6r   r   c                   "     e Zd ZdZ fdZ xZS )r   z <Sip> TwiML Noun used in <Refer>c                 H    t        t        | 
  di | d| _        || _        y NSipr   )r	   r   r
   r   valuer   r   r   r   s      r   r
   zReferSip.__init__M  s#    h&00	
r   r   r   r   r   r
   r   r   s   @r   r   r   J  s    * r   r   c                   l     e Zd ZdZ fdZ	 	 	 	 	 	 ddZ	 	 	 	 	 ddZ	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ xZS )	r   z<Stop> TwiML Verbc                 :    t        t        | 
  di | d| _        y )Nr   r   )r	   r   r
   r   r   s     r   r
   zStop.__init__V      dD",V,	r   c                 D    | j                  t        d||||||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_namer\   trackr   r   r   r   Streamr   r   r   r\   r   r   r   r   s           r   streamzStop.streamZ  >    . yy - /'= 

 
	
r   c                 B    | j                  t        d|||||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   r   r   r   r   Siprecr   r   r   r   r   r   r   s          r   sipreczStop.siprec}  ;    * yy - /'= 	
 		
r   c                 T    | j                  t        d|||||||||	|
||||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_urlr   inbound_track_labeloutbound_track_labelpartial_resultslanguage_codetranscription_enginer>   rH   rD   enable_automatic_punctuationintelligence_servicer   r   Transcriptionr   r   r   r   r   r   r   r   r   r   r>   rH   rD   r   r   r   s                   r   transcriptionzStop.transcription  W    N yy $7'=$7%9 /+%9!1)-I%9 
 	
r   NNNNNNr   NNNNNNNNNNNNNN)	r   r   r   r   r
   r   r   r   r   r   s   @r   r   r   S  sm     #!
J #
D  # !!%)!9
r   r   c                   2     e Zd ZdZ fdZddZddZ xZS )r   z<Transcription> TwiML Nounc                 :    t        t        | 
  di | d| _        y )Nr   r   )r	   r   r
   r   r   s     r   r
   zTranscription.__init__  s    mT+5f5#	r   c                 <    | j                  t        d||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   r   Configr   r   r   r   s       r   configzTranscription.config  "     yyATA&ABBr   c                 <    | j                  t        d||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   r   	Parameterr   s       r   	parameterzTranscription.parameter  "     yyDEDVDEEr   r   r   r   r   r   r
   r   r   r   r   s   @r   r   r     s    $$
C
Fr   r   c                   "     e Zd ZdZ fdZ xZS )r   z<Parameter> TwiML Nounc                 :    t        t        | 
  di | d| _        y )Nr   r   )r	   r   r
   r   r   s     r   r
   zParameter.__init__      i'1&1	r   r   r   s   @r   r   r             r   r   c                   "     e Zd ZdZ fdZ xZS )r   z<Config> TwiML Nounc                 :    t        t        | 
  di | d| _        y )Nr   r   )r	   r   r
   r   r   s     r   r
   zConfig.__init__      fd$.v.	r   r   r   s   @r   r   r          r   r   c                   *     e Zd ZdZ fdZddZ xZS )r   z<Siprec> TwiML Nounc                 :    t        t        | 
  di | d| _        y )Nr   r   )r	   r   r
   r   r   s     r   r
   zSiprec.__init__  r  r   c                 <    | j                  t        d||d|      S r   r   r   s       r   r   zSiprec.parameter  r   r   r   r   r   r   r   r
   r   r   r   s   @r   r   r   	      
Fr   r   c                   *     e Zd ZdZ fdZddZ xZS )r   z<Stream> TwiML Nounc                 :    t        t        | 
  di | d| _        y )Nr   r   )r	   r   r
   r   r   s     r   r
   zStream.__init__   r  r   c                 <    | j                  t        d||d|      S r   r   r   s       r   r   zStream.parameter$  r   r   r   r  r   s   @r   r   r     r	  r   r   c                        e Zd ZdZ fdZ	 	 	 	 	 	 ddZ	 	 	 	 	 ddZ	 	 	 	 	 	 	 	 	 	 	 	 	 	 d	dZ	 	 	 	 	 	 ddZ xZ	S )
r   z<Start> TwiML Verbc                 :    t        t        | 
  di | d| _        y )Nr   r   )r	   r   r
   r   r   s     r   r
   zStart.__init__4  r   r   c                 D    | j                  t        d||||||d|      S r   r   r   s           r   r   zStart.stream8  r   r   c                 B    | j                  t        d|||||d|      S r   r   r   s          r   r   zStart.siprec[  r   r   c                 T    | j                  t        d|||||||||	|
||||d|      S r   r   r   s                   r   r   zStart.transcription{  r   r   c                 D    | j                  t        d||||||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   channelsr   )r   	Recording)r   r"   r#   r$   r!   r   r  r   s           r   	recordingzStart.recording  s>    . yy *C1Q0O! 

 
	
r   r   r   r   )
r   r   r   r   r
   r   r   r   r  r   r   s   @r   r   r   1  s     #!
J #
D  # !!%)!9
z #')-(,!
r   r   c                   "     e Zd ZdZ fdZ xZS )r  z<Recording> TwiML Nounc                 :    t        t        | 
  di | d| _        y )Nr  r   )r	   r  r
   r   r   s     r   r
   zRecording.__init__  r   r   r   r   s   @r   r  r    r   r   r  c                   :     e Zd ZdZ fdZddZddZddZ xZS )	r   z<Prompt> Twiml Verbc                 :    t        t        | 
  di | d| _        y )Nr   r   )r	   r   r
   r   r   s     r   r
   zPrompt.__init__  r  r   c           
      @    | j                  t        d||||d|      S r{   r~   r   s         r   r   z
Prompt.say  r   r   c           	      >    | j                  t        d|||d|      S r[   r_   ra   s        r   rb   zPrompt.play  rc   r   c                 :    | j                  t        dd|i|      S rS   rU   rW   s      r   rX   zPrompt.pause  rY   r   r   r   r   )	r   r   r   r   r
   r   rb   rX   r   r   s   @r   r   r     s    
 L	9r   r   c                   "     e Zd ZdZ fdZ xZS )rV   z<Pause> TwiML Verbc                 :    t        t        | 
  di | d| _        y )NrV   r   )r	   rV   r
   r   r   s     r   r
   zPause.__init__  r   r   r   r   s   @r   rV   rV          r   rV   c                   $     e Zd ZdZd fd	Z xZS )r`   z<Play> TwiML Verbc                 N    t        t        | 
  di | d| _        |r|| _        y y )Nr`   r   )r	   r`   r
   r   r   r   r\   r   r   s      r   r
   zPlay.__init__  s+    dD",V,	DJ r   r   r   r   s   @r   r`   r`     s     r   r`   c                   t     e Zd ZdZd fd	ZddZddZddZddZddZ	ddZ
dd	Zdd
ZddZddZ xZS )r   z<Say> TwiML Verbc                 N    t        t        | 
  di | d| _        |r|| _        y y )Nr   r   )r	   r   r
   r   r   r   r|   r   r   s      r   r
   zSay.__init__'  s+    c4!+F+	 DJ r   c                 <    | j                  t        d||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timer   r   	SsmlBreakr   r(  r)  r   s       r   break_z
Say.break_-  "     yyJH4J6JKKr   c                 <    | j                  t        d||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levelr   r   SsmlEmphasisr   r1  r2  r   s       r   emphasiszSay.emphasis9  "     yyIEI&IJJr   c                 <    | j                  t        d||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
        )r1  xml_langr   r   SsmlLangr   r1  r:  r   s       r   langzSay.langE  "     yyKKFKLLr   c                 :    | j                  t        dd|i|      S z
        Create a <P> element

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

        :returns: <P> element
        r1  r   r   SsmlPr   r1  r   s      r   pzSay.pQ        yy5U5f566r   c                 >    | j                  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   r1  rI  rJ  r   s        r   phonemezSay.phoneme\  $     yyUOX"OOPPr   c           
      @    | j                  t        d||||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
        )r1  volumeratepitchr   r   SsmlProsodyr   r1  rR  rS  rT  r   s         r   prosodyzSay.prosodyi  +     yyUeFUUfU
 	
r   c                 :    | j                  t        dd|i|      S z
        Create a <S> element

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

        :returns: <S> element
        r1  r   r   SsmlSrD  s      r   szSay.sy  rF  r   c                 >    | j                  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   r1  ra  rb  r   s        r   say_asz
Say.say_as  )     yyeP,vPP
 	
r   c                 <    | j                  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   r1  rj  r   s       r   subzSay.sub  "     yy>e>v>??r   c                 <    | j                  t        d||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
        )r1  roler   r   SsmlWr   r1  rr  r   s       r   wzSay.w  "     yy@U@@AAr   r   r   r   r   r   r   r   r
   r-  r6  r>  rE  rN  rX  r^  rf  rn  rv  r   r   s   @r   r   r   $  sC    !
L
K
M	7Q
 	7

@
Br   r   c                   T     e Zd ZdZd	 fd	Zd
dZd
dZd
dZddZd
dZ	d	dZ
 xZS )rt  z>Improving Pronunciation by Specifying Parts of Speech in <Say>c                 N    t        t        | 
  di | d| _        |r|| _        y y )Nrv  r   )r	   rt  r
   r   r   r   r1  r   r   s      r   r
   zSsmlW.__init__  +    eT#-f-	DJ r   c                 <    | j                  t        d||d|      S r'  r*  r,  s       r   r-  zSsmlW.break_  r.  r   c                 <    | j                  t        d||d|      S r0  r3  r5  s       r   r6  zSsmlW.emphasis  r7  r   c                 >    | j                  t        |f||d|      S rH  rK  rM  s        r   rN  zSsmlW.phoneme  rO  r   c           
      @    | j                  t        d||||d|      S rQ  rU  rW  s         r   rX  zSsmlW.prosody  rY  r   c                 >    | j                  t        |f||d|      S r`  rc  re  s        r   rf  zSsmlW.say_as  rg  r   c                 <    | j                  t        |fd|i|      S ri  rk  rm  s       r   rn  z	SsmlW.sub  ro  r   r   r   r   )r   r   r   r   r
   r-  r6  rN  rX  rf  rn  r   r   s   @r   rt  rt    s-    H
L
KQ
 

@r   rt  c                   "     e Zd ZdZ fdZ xZS )rl  z/Pronouncing Acronyms and Abbreviations in <Say>c                 H    t        t        | 
  di | d| _        || _        y )Nrn  r   )r	   rl  r
   r   r   r{  s      r   r
   zSsmlSub.__init__	  s#    gt%//	
r   r   r   s   @r   rl  rl    s    9 r   rl  c                   "     e Zd ZdZ fdZ xZS )rd  z:Controlling How Special Types of Words Are Spoken in <Say>c                 H    t        t        | 
  di | d| _        || _        y )Nzsay-asr   )r	   rd  r
   r   r   r{  s      r   r
   zSsmlSayAs.__init__  s#    i'1&1	
r   r   r   s   @r   rd  rd    s    D r   rd  c                   t     e Zd ZdZd fd	ZddZddZddZddZddZ	ddZ
dd	Zdd
ZddZddZ xZS )rV  z4Controling Volume, Speaking Rate, and Pitch in <Say>c                 N    t        t        | 
  di | d| _        |r|| _        y y )NrX  r   )r	   rV  r
   r   r   r{  s      r   r
   zSsmlProsody.__init__  s+    k4)3F3	DJ r   c                 <    | j                  t        d||d|      S r'  r*  r,  s       r   r-  zSsmlProsody.break_!  r.  r   c                 <    | j                  t        d||d|      S r0  r3  r5  s       r   r6  zSsmlProsody.emphasis-  r7  r   c                 <    | j                  t        d||d|      S r9  r;  r=  s       r   r>  zSsmlProsody.lang9  r?  r   c                 :    | j                  t        dd|i|      S rA  rB  rD  s      r   rE  zSsmlProsody.pE  rF  r   c                 >    | j                  t        |f||d|      S rH  rK  rM  s        r   rN  zSsmlProsody.phonemeP  rO  r   c           
      @    | j                  t        d||||d|      S rQ  rU  rW  s         r   rX  zSsmlProsody.prosody]  rY  r   c                 :    | j                  t        dd|i|      S r[  r\  rD  s      r   r^  zSsmlProsody.sm  rF  r   c                 >    | j                  t        |f||d|      S r`  rc  re  s        r   rf  zSsmlProsody.say_asx  rg  r   c                 <    | j                  t        |fd|i|      S ri  rk  rm  s       r   rn  zSsmlProsody.sub  ro  r   c                 <    | j                  t        d||d|      S rq  rs  ru  s       r   rv  zSsmlProsody.w  rw  r   r   r   r   rx  r   s   @r   rV  rV    sC    >
L
K
M	7Q
 	7

@
Br   rV  c                   d     e Zd ZdZd fd	ZddZddZddZddZddZ	ddZ
dd	Zdd
Z xZS )r]  z)Adding A Pause Between Sentences in <Say>c                 N    t        t        | 
  di | d| _        |r|| _        y y )Nr^  r   )r	   r]  r
   r   r   r{  s      r   r
   zSsmlS.__init__  r|  r   c                 <    | j                  t        d||d|      S r'  r*  r,  s       r   r-  zSsmlS.break_  r.  r   c                 <    | j                  t        d||d|      S r0  r3  r5  s       r   r6  zSsmlS.emphasis  r7  r   c                 <    | j                  t        d||d|      S r9  r;  r=  s       r   r>  z
SsmlS.lang  r?  r   c                 >    | j                  t        |f||d|      S rH  rK  rM  s        r   rN  zSsmlS.phoneme  rO  r   c           
      @    | j                  t        d||||d|      S rQ  rU  rW  s         r   rX  zSsmlS.prosody  rY  r   c                 >    | j                  t        |f||d|      S r`  rc  re  s        r   rf  zSsmlS.say_as  rg  r   c                 <    | j                  t        |fd|i|      S ri  rk  rm  s       r   rn  z	SsmlS.sub  ro  r   c                 <    | j                  t        d||d|      S rq  rs  ru  s       r   rv  zSsmlS.w  rw  r   r   r   r   r   r   r   r   r
   r-  r6  r>  rN  rX  rf  rn  rv  r   r   s   @r   r]  r]    s9    3
L
K
MQ
 

@
Br   r]  c                   "     e Zd ZdZ fdZ xZS )rL  z%Using Phonetic Pronunciation in <Say>c                 H    t        t        | 
  di | d| _        || _        y )NrN  r   )r	   rL  r
   r   r   r{  s      r   r
   zSsmlPhoneme.__init__  s#    k4)3F3	
r   r   r   s   @r   rL  rL    s    / r   rL  c                   t     e Zd ZdZd fd	ZddZddZddZddZddZ	ddZ
dd	Zdd
ZddZddZ xZS )r<  z7Specifying Another Language for Specific Words in <Say>c                 N    t        t        | 
  di | d| _        |r|| _        y y )Nr>  r   )r	   r<  r
   r   r   r{  s      r   r
   zSsmlLang.__init__  s+    h&00	DJ r   c                 <    | j                  t        d||d|      S r'  r*  r,  s       r   r-  zSsmlLang.break_$  r.  r   c                 <    | j                  t        d||d|      S r0  r3  r5  s       r   r6  zSsmlLang.emphasis0  r7  r   c                 <    | j                  t        d||d|      S r9  r;  r=  s       r   r>  zSsmlLang.lang<  r?  r   c                 :    | j                  t        dd|i|      S rA  rB  rD  s      r   rE  z
SsmlLang.pH  rF  r   c                 >    | j                  t        |f||d|      S rH  rK  rM  s        r   rN  zSsmlLang.phonemeS  rO  r   c           
      @    | j                  t        d||||d|      S rQ  rU  rW  s         r   rX  zSsmlLang.prosody`  rY  r   c                 :    | j                  t        dd|i|      S r[  r\  rD  s      r   r^  z
SsmlLang.sp  rF  r   c                 >    | j                  t        |f||d|      S r`  rc  re  s        r   rf  zSsmlLang.say_as{  rg  r   c                 <    | j                  t        |fd|i|      S ri  rk  rm  s       r   rn  zSsmlLang.sub  ro  r   c                 <    | j                  t        d||d|      S rq  rs  ru  s       r   rv  z
SsmlLang.w  rw  r   r   r   r   rx  r   s   @r   r<  r<    sC    A
L
K
M	7Q
 	7

@
Br   r<  c                   l     e Zd ZdZd fd	ZddZddZddZddZddZ	ddZ
dd	Zdd
ZddZ xZS )rC  z*Adding a Pause Between Paragraphs in <Say>c                 N    t        t        | 
  di | d| _        |r|| _        y y )NrE  r   )r	   rC  r
   r   r   r{  s      r   r
   zSsmlP.__init__  r|  r   c                 <    | j                  t        d||d|      S r'  r*  r,  s       r   r-  zSsmlP.break_  r.  r   c                 <    | j                  t        d||d|      S r0  r3  r5  s       r   r6  zSsmlP.emphasis  r7  r   c                 <    | j                  t        d||d|      S r9  r;  r=  s       r   r>  z
SsmlP.lang  r?  r   c                 >    | j                  t        |f||d|      S rH  rK  rM  s        r   rN  zSsmlP.phoneme  rO  r   c           
      @    | j                  t        d||||d|      S rQ  rU  rW  s         r   rX  zSsmlP.prosody  rY  r   c                 :    | j                  t        dd|i|      S r[  r\  rD  s      r   r^  zSsmlP.s  rF  r   c                 >    | j                  t        |f||d|      S r`  rc  re  s        r   rf  zSsmlP.say_as  rg  r   c                 <    | j                  t        |fd|i|      S ri  rk  rm  s       r   rn  z	SsmlP.sub  ro  r   c                 <    | j                  t        d||d|      S rq  rs  ru  s       r   rv  zSsmlP.w  rw  r   r   r   r   )r   r   r   r   r
   r-  r6  r>  rN  rX  r^  rf  rn  rv  r   r   s   @r   rC  rC    s>    4
L
K
MQ
 	7

@
Br   rC  c                   d     e Zd ZdZd fd	ZddZddZddZddZddZ	ddZ
dd	Zdd
Z xZS )r4  zEmphasizing Words in <Say>c                 N    t        t        | 
  di | d| _        |r|| _        y y )Nr6  r   )r	   r4  r
   r   r   r{  s      r   r
   zSsmlEmphasis.__init__#  s+    lD*4V4	DJ r   c                 <    | j                  t        d||d|      S r'  r*  r,  s       r   r-  zSsmlEmphasis.break_)  r.  r   c                 <    | j                  t        d||d|      S r0  r3  r5  s       r   r6  zSsmlEmphasis.emphasis5  r7  r   c                 <    | j                  t        d||d|      S r9  r;  r=  s       r   r>  zSsmlEmphasis.langA  r?  r   c                 >    | j                  t        |f||d|      S rH  rK  rM  s        r   rN  zSsmlEmphasis.phonemeM  rO  r   c           
      @    | j                  t        d||||d|      S rQ  rU  rW  s         r   rX  zSsmlEmphasis.prosodyZ  rY  r   c                 >    | j                  t        |f||d|      S r`  rc  re  s        r   rf  zSsmlEmphasis.say_asj  rg  r   c                 <    | j                  t        |fd|i|      S ri  rk  rm  s       r   rn  zSsmlEmphasis.suby  ro  r   c                 <    | j                  t        d||d|      S rq  rs  ru  s       r   rv  zSsmlEmphasis.w  rw  r   r   r   r   r  r   s   @r   r4  r4     s9    $
L
K
MQ
 

@
Br   r4  c                   "     e Zd ZdZ fdZ xZS )r+  zAdding a Pause in <Say>c                 :    t        t        | 
  di | d| _        y )Nbreakr   )r	   r+  r
   r   r   s     r   r
   zSsmlBreak.__init__  s    i'1&1	r   r   r   s   @r   r+  r+    s    ! r   r+  c                   <     e Zd ZdZ fdZ	 	 	 	 	 ddZddZ xZS )r   z<Pay> Twiml Verbc                 :    t        t        | 
  di | d| _        y )Nr   r   )r	   r   r
   r   r   s     r   r
   zPay.__init__  s    c4!+F+	r   c                 B    | j                  t        d|||||d|      S r   r   r   s          r   r   z
Pay.prompt  r   r   c                 <    | j                  t        d||d|      S r   r   r   s       r   r   zPay.parameter  r   r   r   r   )r   r   r   r   r
   r   r   r   r   s   @r   r   r     s(      $
@
Fr   r   c                   "     e Zd ZdZ fdZ xZS )r   z<Sms> TwiML Nounc                 H    t        t        | 
  di | d| _        || _        y )Nr   r   )r	   r   r
   r   r   r%  s      r   r
   zSms.__init__  #    c4!+F+	
r   r   r   s   @r   r   r          r   r   c                   *     e Zd ZdZ fdZddZ xZS )rx   z<Reject> TwiML Verbc                 :    t        t        | 
  di | d| _        y )Nrx   r   )r	   rx   r
   r   r   s     r   r
   zReject.__init__  r  r   c                 <    | j                  t        d||d|      S r   r   r   s       r   r   zReject.parameter  r   r   r   r  r   s   @r   rx   rx     r	  r   rx   c                   "     e Zd ZdZ fdZ xZS )rt   z<Redirect> TwiML Verbc                 H    t        t        | 
  di | d| _        || _        y )Nrt   r   )r	   rt   r
   r   r   r"  s      r   r
   zRedirect.__init__  s#    h&00	
r   r   r   s   @r   rt   rt     s     r   rt   c                   "     e Zd ZdZ fdZ xZS )rr   z<Record> TwiML Verbc                 :    t        t        | 
  di | d| _        y )Nrr   r   )r	   rr   r
   r   r   s     r   r
   zRecord.__init__  r  r   r   r   s   @r   rr   rr     r  r   rr   c                   "     e Zd ZdZ fdZ xZS )ri   z<Queue> TwiML Nounc                 H    t        t        | 
  di | d| _        || _        y )Nri   r   )r	   ri   r
   r   r   r   r   r   r   s      r   r
   zQueue.__init__  s#    eT#-f-	
r   r   r   s   @r   ri   ri     s     r   ri   c                   "     e Zd ZdZ fdZ xZS )rP   z<Leave> TwiML Verbc                 :    t        t        | 
  di | d| _        y )NrP   r   )r	   rP   r
   r   r   s     r   r
   zLeave.__init__  r   r   r   r   s   @r   rP   rP     r  r   rP   c                   *     e Zd ZdZ fdZddZ xZS )rM   z<Hangup> TwiML Verbc                 :    t        t        | 
  di | d| _        y )NrM   r   )r	   rM   r
   r   r   s     r   r
   zHangup.__init__  r  r   c                 <    | j                  t        d||d|      S r   r   r   s       r   r   zHangup.parameter  r   r   r   r  r   s   @r   rM   rM     r	  r   rM   c                   :     e Zd ZdZ fdZddZddZddZ xZS )	rJ   z<Gather> TwiML Verbc                 :    t        t        | 
  di | d| _        y )NrJ   r   )r	   rJ   r
   r   r   s     r   r
   zGather.__init__$  r  r   c           
      @    | j                  t        d||||d|      S r{   r~   r   s         r   r   z
Gather.say(  r   r   c                 :    | j                  t        dd|i|      S rS   rU   rW   s      r   rX   zGather.pause8  rY   r   c           	      >    | j                  t        d|||d|      S r[   r_   ra   s        r   rb   zGather.playC  rc   r   r   r   r   )	r   r   r   r   r
   r   rX   rb   r   r   s   @r   rJ   rJ   !  s    
 	9Lr   rJ   c                   ,     e Zd ZdZd fd	ZddZ xZS )r8   z<Enqueue> TwiML Nounc                 N    t        t        | 
  di | d| _        |r|| _        y y )Nr8   r   )r	   r8   r
   r   r   r  s      r   r
   zEnqueue.__init__T  s+    gt%//	DJ r   c                 >    | j                  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   s        r   taskzEnqueue.taskZ  s$     yydQXwQ&QRRr   r   r   )r   r   r   r   r
   r  r   r   s   @r   r8   r8   Q  s    Sr   r8   c                   "     e Zd ZdZ fdZ xZS )r  z<Task> TwiML Nounc                 H    t        t        | 
  di | d| _        || _        y )Nr  r   )r	   r  r
   r   r   )r   r  r   r   s      r   r
   zTask.__init__k  #    dD",V,	
r   r   r   s   @r   r  r  h       r   r  c                   "     e Zd ZdZ fdZ xZS )r/   z<Echo> TwiML Verbc                 :    t        t        | 
  di | d| _        y )Nr/   r   )r	   r/   r
   r   r   s     r   r
   zEcho.__init__t  r   r   r   r   s   @r   r/   r/   q  s     r   r/   c                        e Zd ZdZd fd	Z	 	 	 	 	 	 ddZ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	 	 	 	 ddZd Z		 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ
	 	 	 	 	 	 	 	 dd	Z	 	 	 	 	 dd
Z xZS )r,   z<Dial> TwiML Verbc                 N    t        t        | 
  di | d| _        |r|| _        y y )Nr,   r   )r	   r,   r
   r   r   )r   r   r   r   s      r   r
   zDial.__init__|  s+    dD",V,	DJ r   c                 D    | j                  t        d||||||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
        )identityr\   r   status_callback_eventr   r   r   )r   Client)r   r  r\   r   r  r   r   r   s           r   clientzDial.client  s>    . yy !&; /'= 

 
	
r   c                     | j                  t        |fi d|d|d|d|d|d|d|d|	d	|
d
|d|d|d|d|d|d|d|d|d|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_exitr5   wait_methodmax_participantsr    regioncoachr!   r  r   r   r"   r#   r$   event_callback_urljitter_buffer_sizeparticipant_label)r   
Conference)r   r   r  r  r  r  r5   r  r  r    r  r  r!   r  r   r   r"   r#   r$   r  r  r  r   s                          r   
conferencezDial.conference  s    j yy  +D	
 (> " ( "2     '< !0 (>  +D!" 2R#$ 1P%& $6'( $6)* #4-
 	
r   c                 V    | j                  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_digitsr\   r   r  r   r   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  r\   r   r  r   r   r  r  r  r  r  r	  r
  r  r   s                    r   r   zDial.number  sZ    R yy'&; /'="3+E$7*C3U7]2S  !
 	
r   c           
      B    | j                  t        |f||||d|      S re   rh   rj   s          r   rk   z
Dial.queue3	  rl   r   c                 8    | j                  t        |fi |      S )z
        Create a <Sim> element

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

        :returns: <Sim> element
        )r   Sim)r   sim_sidr   s      r   simzDial.simS	  s     yyW//00r   c                 V    | j                  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passwordr\   r   r  r   r   r  r  r  r  r	  r
  r  )r   r   )r   r   r  r  r\   r   r  r   r   r  r  r  r  r	  r
  r  r   s                    r   r   zDial.sip^	  sZ    R yy!!&; /'="3+E$7*C3U7]2S  !
 	
r   c	                 H    | j                  t        d||||||||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_sidr\   r   r  r   r   customer_idcopy_parent_tor   )r   Application)
r   r  r\   r   r  r   r   r  r  r   s
             r   applicationzDial.application	  sD    6 yy 
 /&; /'='-
 

 	
r   c                 D    | j                  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
        )r\   r   r  r   r   )r   WhatsApp)r   r  r\   r   r  r   r   r   s           r   	whats_appzDial.whats_app	  s>    . yy&; /'= 

 
	
r   r   r   )NNNNNNNNNNNNNNNNNNNNr   r   )NNNNNNNNr   )r   r   r   r   r
   r  r  r   rk   r  r   r  r  r   r   s   @r   r,   r,   y  s     "#!
L "&#"#"&)-(,-N
f "##' "&+//3*.!<
B #
@	1 "##' "&+//3*.!<
@ "#'
X "#!
r   r,   c                   "     e Zd ZdZ fdZ xZS )r  z<WhatsApp> TwiML Nounc                 H    t        t        | 
  di | d| _        || _        y )Nr  r   )r	   r  r
   r   r   r   r  r   r   s      r   r
   zWhatsApp.__init__	  s#    h&00	!
r   r   r   s   @r   r  r  	  s    " "r   r  c                   2     e Zd ZdZd fd	Zd ZddZ xZS )r  z<Application> TwiML Nounc                 N    t        t        | 
  di | d| _        |r|| _        y y )Nr  r   )r	   r  r
   r   r   )r   r  r   r   s      r   r
   zApplication.__init__	  s+    k4)3F3!	(DJ r   c                 8    | j                  t        |fi |      S )z
        Create a <ApplicationSid> element

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

        :returns: <ApplicationSid> element
        )r   ApplicationSid)r   sidr   s      r   r  zApplication.application_sid	  s     yy6v677r   c                 <    | j                  t        d||d|      S r   r   r   s       r   r   zApplication.parameter
  r   r   r   r   )r   r   r   r   r
   r  r   r   r   s   @r   r  r  	  s    ")	8
Fr   r  c                   "     e Zd ZdZ fdZ xZS )r%  z<ApplicationSid> TwiML Nounc                 H    t        t        | 
  di | d| _        || _        y )Nr%  r   )r	   r%  r
   r   r   )r   r&  r   r   s      r   r
   zApplicationSid.__init__
  s#    nd,6v6$	
r   r   r   s   @r   r%  r%  
  s    % r   r%  c                   "     e Zd ZdZ fdZ xZS )r   z<Sip> TwiML Nounc                 H    t        t        | 
  di | d| _        || _        y r   )r	   r   r
   r   r   r   s      r   r
   zSip.__init__
  r  r   r   r   s   @r   r   r   
  r  r   r   c                   "     e Zd ZdZ fdZ xZS )r  z<Sim> TwiML Nounc                 H    t        t        | 
  di | d| _        || _        y )Nr  r   )r	   r  r
   r   r   )r   r  r   r   s      r   r
   zSim.__init__(
  r  r   r   r   s   @r   r  r  %
  r  r   r  c                   "     e Zd ZdZ fdZ xZS )r  z<Number> TwiML Nounc                 H    t        t        | 
  di | d| _        || _        y )Nr  r   )r	   r  r
   r   r   r!  s      r   r
   zNumber.__init__1
  s#    fd$.v.	!
r   r   r   s   @r   r  r  .
  s    " "r   r  c                   "     e Zd ZdZ fdZ xZS )r   z<Conference> TwiML Nounc                 H    t        t        | 
  di | d| _        || _        y )Nr   r   )r	   r   r
   r   r   r  s      r   r
   zConference.__init__:
  s#    j$(262 	
r   r   r   s   @r   r   r   7
  s    ! r   r   c                   2     e Zd ZdZd fd	Zd ZddZ xZS )r  z<Client> TwiML Nounc                 N    t        t        | 
  di | d| _        |r|| _        y y )Nr  r   )r	   r  r
   r   r   )r   r  r   r   s      r   r
   zClient.__init__C
  s+    fd$.v.	!DJ r   c                 8    | j                  t        |fi |      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   client_identityr   s      r   r  zClient.identityI
  s     yy/<V<==r   c                 <    | j                  t        d||d|      S r   r   r   s       r   r   zClient.parameterT
  r   r   r   r   )r   r   r   r   r
   r  r   r   r   s   @r   r  r  @
  s    "	>
Fr   r  c                   "     e Zd ZdZ fdZ xZS )r5  z<Identity> TwiML Nounc                 H    t        t        | 
  di | d| _        || _        y )Nr5  r   )r	   r5  r
   r   r   )r   r6  r   r   s      r   r
   zIdentity.__init__d
  s#    h&00	$
r   r   r   s   @r   r5  r5  a
  s    % %r   r5  c                        e Zd ZdZ fdZddZd Z	 	 	 	 	 	 ddZ	 	 	 	 	 ddZ	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ
	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd	Zdd
Z	 ddZ xZS )r   z<Connect> TwiML Verbc                 :    t        t        | 
  di | d| _        y )Nr   r   )r	   r   r
   r   r   s     r   r
   zConnect.__init__m
  s    gt%//	r   c                 <    | j                  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   s       r   roomzConnect.roomq
  s(     yyK,@KFK
 	
r   c                 8    | j                  t        |fi |      S )z
        Create a <Autopilot> element

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

        :returns: <Autopilot> element
        )r   	Autopilot)r   r   r   s      r   	autopilotzConnect.autopilot
  s     yy426233r   c                 D    | j                  t        d||||||d|      S r   r   r   s           r   r   zConnect.stream
  r   r   c                 B    | j                  t        d|||||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   rC   sentiment_analysisr   r   r   )r   VirtualAgent)r   r   rC   rE  r   r   r   s          r   virtual_agentzConnect.virtual_agent
  s;    * yy -!#5 /'= 	
 		
r   c                 T    | j                  t        d|||||||||	|
||||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_timeoutr\   r   r    r!   r"   r#   r$   r   r   r  r   )r   Conversation)r   rI  rJ  rK  rL  r\   r   r    r!   r"   r#   r$   r   r   r  r   s                   r   conversationzConnect.conversation
  sW    N yy %9%9+E /*C1Q0O /'=&; 
 	
r   c                     | j                  t        di d|d|d|d|d|d|d|d|d	|	d
|
d|d|d|d|d|d|d|d|d|d|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
        r\   rC   tts_languagetranscription_languagetts_providerr}   transcription_providerrH   r>   dtmf_detectionwelcome_greetingpartial_promptswelcome_greeting_interruptibleinterruptiblepreemptiblerD   r    report_input_during_agent_speechelevenlabs_text_normalizationinterrupt_sensitivityrF   r   )r   ConversationRelay)r   r\   rC   rP  rQ  rR  r}   rS  rH   r>   rT  rU  rV  rW  rX  rY  rD   r   rZ  r[  r\  rF   r   s                          r   conversation_relayzConnect.conversation_relay  s    j yy ! * (>	
 *  (> * "2  . "2 !0 0N , (  !" &:#$ 2R%& /L'( '<)* -
 	
r   c                     | j                  t        di d|d|d|d|d|d|d|d|d	|	d
|
d|d|d|d|d|d|d|d|d|d|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
        idrC   rP  rQ  rR  r}   rS  rH   r>   rT  rU  rV  rW  rX  rY  rD   r   rZ  r[  r\  rF   r   )r   	Assistant)r   r`  rC   rP  rQ  rR  r}   rS  rH   r>   rT  rU  rV  rW  rX  rY  rD   r   rZ  r[  r\  rF   r   s                          r   	assistantzConnect.assistantX  s    j yy ! * (>	
 *  (> * "2  . "2 !0 0N , (  !" &:#$ 2R%& /L'( '<)* -
 	
r   c                 <    | j                  t        d||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_configurationr   )r   	AiSession)r   rd  re  r   s       r   
ai_sessionzConnect.ai_session  s2     yy ))A 
 	
r   c                 <    | j                  t        d||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_configurationr   )r   ConversationRelaySession)r   ri  rj  r   s       r   conversation_relay_sessionz"Connect.conversation_relay_session  s2     yy$ #&; 
 	
r   r   r   r   r   )NNNNNNNNNNNNNNNNNNNNNr   )r   r   r   r   r
   r?  rB  r   rG  rN  r^  rb  rg  rl  r   r   s   @r   r   r   j
  s   
	4 #!
J #
D "!#'"&)-(,#"9
z ##'+!)-&*"-N
d ##'+!)-&*"-N
`
& 59
r   r   c                   "     e Zd ZdZ fdZ xZS )rk  z%<ConversationRelaySession> TwiML Nounc                 :    t        t        | 
  di | d| _        y )Nrk  r   )r	   rk  r
   r   r   s     r   r
   z!ConversationRelaySession.__init__  s    &6@@.	r   r   r   s   @r   rk  rk    s    // /r   rk  c                   "     e Zd ZdZ fdZ xZS )rf  z<AiSession> TwiML Nounc                 :    t        t        | 
  di | d| _        y )Nrf  r   )r	   rf  r
   r   r   s     r   r
   zAiSession.__init__  r   r   r   r   s   @r   rf  rf    r   r   rf  c                   <     e Zd ZdZ fdZ	 	 	 	 	 ddZddZ xZS )ra  z<Assistant> TwiML Nounc                 :    t        t        | 
  di | d| _        y )Nra  r   )r	   ra  r
   r   r   s     r   r
   zAssistant.__init__  r   r   c                 B    | j                  t        d|||||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
        )coderR  r}   rS  rH   r   r   Languager   ru  rR  r}   rS  rH   r   s          r   rC   zAssistant.language  ;    * yy )'=) 	
 		
r   c                 <    | j                  t        d||d|      S r   r   r   s       r   r   zAssistant.parameter  r   r   r   r   r   r   r   r   r
   rC   r   r   r   s   @r   ra  ra    s(       #
@
Fr   ra  c                   "     e Zd ZdZ fdZ xZS )rw  z<Language> TwiML Nounc                 :    t        t        | 
  di | d| _        y )Nrw  r   )r	   rw  r
   r   r   s     r   r
   zLanguage.__init__  s    h&00	r   r   r   s   @r   rw  rw    s     r   rw  c                   <     e Zd ZdZ fdZ	 	 	 	 	 ddZddZ xZS )r]  z<ConversationRelay> TwiML Nounc                 :    t        t        | 
  di | d| _        y )Nr]  r   )r	   r]  r
   r   r   s     r   r
   zConversationRelay.__init__  s    /9&9'	r   c                 B    | j                  t        d|||||d|      S rt  rv  rx  s          r   rC   zConversationRelay.language"  ry  r   c                 <    | j                  t        d||d|      S r   r   r   s       r   r   zConversationRelay.parameterB  r   r   r   r   r{  r   s   @r   r]  r]    s(    (( #
@
Fr   r]  c                   "     e Zd ZdZ fdZ xZS )rM  z<Conversation> TwiML Nounc                 :    t        t        | 
  di | d| _        y )NrM  r   )r	   rM  r
   r   r   s     r   r
   zConversation.__init__R      lD*4V4"	r   r   r   s   @r   rM  rM  O  s    ## #r   rM  c                   2     e Zd ZdZ fdZddZddZ xZS )rF  z<VirtualAgent> TwiML Nounc                 :    t        t        | 
  di | d| _        y )NrF  r   )r	   rF  r
   r   r   s     r   r
   zVirtualAgent.__init__Z  r  r   c                 <    | j                  t        d||d|      S r   r   r   s       r   r   zVirtualAgent.config^  r   r   c                 <    | j                  t        d||d|      S r   r   r   s       r   r   zVirtualAgent.parameterj  r   r   r   r   r   s   @r   rF  rF  W  s    ##
C
Fr   rF  c                   "     e Zd ZdZ fdZ xZS )rA  z<Autopilot> TwiML Nounc                 H    t        t        | 
  di | d| _        || _        y )NrA  r   )r	   rA  r
   r   r   r  s      r   r
   zAutopilot.__init__z  s#    i'1&1	
r   r   r   s   @r   rA  rA  w  s      r   rA  c                   "     e Zd ZdZ fdZ xZS )r>  z<Room> TwiML Nounc                 H    t        t        | 
  di | d| _        || _        y )Nr>  r   )r	   r>  r
   r   r   r  s      r   r
   zRoom.__init__  r  r   r   r   s   @r   r>  r>    r  r   r>  N)<r   twilio.twimlr   r   r   r   r   r   r   r   r   r   r   r  r   rV   r`   r   rt  rl  rd  rV  r]  rL  r<  rC  r4  r+  r   r   rx   rt   rr   ri   rP   rM   rJ   r8   r  r/   r,   r  r  r%  r   r  r  r   r  r5  r   rk  rf  ra  rw  r]  rM  rF  rA  r>  r   r   r   <module>r     s  
fHE fHR6E 6&u C
5 C
LFE F@   U FU F(FU F(f
E f
R   -9U -9`E 5 EB% EBPW@E W@te  EB% EBPoBE oBd% EBu EBPzBE zBzoB5 oBd 1F% 1Fh% FU F(u U E E FU F(-LU -L`Se S.5 5 m
5 m
`"u "F% FBU % % "U " FU FB%u %b
e b
J/u /   1F 1Fhu 1F 1Fh#5 #F5 F@ 5 r   