o
    e)&                     @   s8   d dl mZmZmZmZmZ d dlT G dd deZdS )    )PlivoXMLElementmap_typeSpeakElementPlayElementWaitElement)*c                       s  e Zd ZdZg dZedd Zejdd Zee	e
jgddd Zed	d
 Zejdd
 Zee	e
jgddd Zedd Zejdd Zee	e
jgddd Zedd Zejdd Zee	e
j gddd Zedd Zejdd Zee	e
j gddd Zedd Zejdd Zee	e
j gdd d! Zed"d# Zejd$d# Zee	e
jgdd%d& Zed'd( Zejd)d( Zee	e
j gdd*d+ Zed,d- Zejd.d- Zee	e
jgdd/d0 Zed1d2 Zejd3d2 Zee	e
jgdd4d5 Zed6d7 Z e jd8d7 Z ee	e
jgdd9d: Z!ed;d< Z"e"jd=d< Z"ee	e
jgdd>d? Z#ed@dA Z$e$jdBdA Z$ee	e
jgddCdD Z%edEdF Z&e&jdGdF Z&ee'e(gddHdI Z)edJdK Z*e*jdLdK Z*ee'e(gddMdN Z+edOdP Z,e,jdQdP Z,ee'e(gddRdS Z-	T	T	T	T	T	T	T	T	T	T	T	T	T	T	T	Td_ fdUdV	Z.dWdX Z/	T	T	Td`dYdZZ0	Tdad[d\Z1	T	T	T	Tdbd]d^Z2  Z3S )cGetInputElementGetInput)SpeakPlayWaitc                 C      | j S N)_GetInputElement__actionself r   L/var/www/html/venv/lib/python3.10/site-packages/plivo/xml/getInputElement.pyaction      zGetInputElement.actionc                 C   "   |d urt || _d S d | _d S r   )six	text_typer   r   valuer   r   r   r         ")r   c                 C   
   || _ | S r   )r   r   r   r   r   
set_action      zGetInputElement.set_actionc                 C   r   r   )_GetInputElement__methodr   r   r   r   method"   r   zGetInputElement.methodc                 C   r   r   )r   r   r   r   r   r   r   r    &   r   c                 C   r   r   )r    r   r   r   r   
set_method*   r   zGetInputElement.set_methodc                 C   r   r   )_GetInputElement__input_typer   r   r   r   
input_type1   r   zGetInputElement.input_typec                 C   r   r   )r   r   r"   r   r   r   r   r#   5   r   c                 C   r   r   )r#   r   r   r   r   set_input_type9   r   zGetInputElement.set_input_typec                 C   r   r   )#_GetInputElement__execution_timeoutr   r   r   r   execution_timeout@   r   z!GetInputElement.execution_timeoutc                 C       |d urt || _d S d | _d S r   )intr%   r   r   r   r   r&   D       c                 C   r   r   )r&   r   r   r   r   set_execution_timeoutH   r   z%GetInputElement.set_execution_timeoutc                 C   r   r   )#_GetInputElement__digit_end_timeoutr   r   r   r   digit_end_timeoutO   r   z!GetInputElement.digit_end_timeoutc                 C   r'   r   )r(   r+   r   r   r   r   r,   S   r)   c                 C   r   r   )r,   r   r   r   r   set_digit_end_timeoutW   r   z%GetInputElement.set_digit_end_timeoutc                 C   r   r   )$_GetInputElement__speech_end_timeoutr   r   r   r   speech_end_timeout^   r   z"GetInputElement.speech_end_timeoutc                 C   r'   r   )r(   r.   r   r   r   r   r/   b   r)   c                 C   r   r   )r/   r   r   r   r   set_speech_end_timeoutf   r   z&GetInputElement.set_speech_end_timeoutc                 C   r   r   )_GetInputElement__finish_on_keyr   r   r   r   finish_on_keym   r   zGetInputElement.finish_on_keyc                 C   r   r   )r   r   r1   r   r   r   r   r2   q      
c                 C   r   r   )r2   r   r   r   r   set_finish_on_keyv   r   z!GetInputElement.set_finish_on_keyc                 C   r   r   )_GetInputElement__num_digitsr   r   r   r   
num_digits}   r   zGetInputElement.num_digitsc                 C   r'   r   )r(   r5   r   r   r   r   r6      r)   c                 C   r   r   )r6   r   r   r   r   set_num_digits   r   zGetInputElement.set_num_digitsc                 C   r   r   )_GetInputElement__speech_modelr   r   r   r   speech_model   r   zGetInputElement.speech_modelc                 C   r   r   )r   r   r8   r   r   r   r   r9      r3   c                 C   r   r   )r9   r   r   r   r   set_speech_model   r   z GetInputElement.set_speech_modelc                 C   r   r   )_GetInputElement__hintsr   r   r   r   hints   r   zGetInputElement.hintsc                 C   r   r   )r   r   r;   r   r   r   r   r<      r3   c                 C   r   r   )r<   r   r   r   r   	set_hints   r   zGetInputElement.set_hintsc                 C   r   r   )_GetInputElement__languager   r   r   r   language   r   zGetInputElement.languagec                 C   r   r   )r   r   r>   r   r   r   r   r?      r3   c                 C   r   r   )r?   r   r   r   r   set_language   r   zGetInputElement.set_languagec                 C   r   r   )1_GetInputElement__interim_speech_results_callbackr   r   r   r   interim_speech_results_callback   r   z/GetInputElement.interim_speech_results_callbackc                 C   r   r   )r   r   rA   r   r   r   r   rB      r3   c                 C   r   r   )rB   r   r   r   r   #set_interim_speech_results_callback   r   z3GetInputElement.set_interim_speech_results_callbackc                 C   r   r   )8_GetInputElement__interim_speech_results_callback_methodr   r   r   r   &interim_speech_results_callback_method   r   z6GetInputElement.interim_speech_results_callback_methodc                 C   r   r   )r   r   rD   r   r   r   r   rE      r3   c                 C   r   r   )rE   r   r   r   r   *set_interim_speech_results_callback_method   r   z:GetInputElement.set_interim_speech_results_callback_methodc                 C   r   r   )_GetInputElement__logr   r   r   r   log   r   zGetInputElement.logc                 C   r'   r   )boolrG   r   r   r   r   rH      r)   c                 C   r   r   )rH   r   r   r   r   set_log   r   zGetInputElement.set_logc                 C   r   r   )_GetInputElement__redirectr   r   r   r   redirect   r   zGetInputElement.redirectc                 C   r'   r   )rI   rK   r   r   r   r   rL      r)   c                 C   r   r   )rL   r   r   r   r   set_redirect   r   zGetInputElement.set_redirectc                 C   r   r   )"_GetInputElement__profanity_filterr   r   r   r   profanity_filter   r   z GetInputElement.profanity_filterc                 C   r'   r   )rI   rN   r   r   r   r   rO      r)   c                 C   r   r   )rO   r   r   r   r   set_profanity_filter  r   z$GetInputElement.set_profanity_filterNc                    sr   t t|   || _|| _|| _|| _|| _|| _|| _	|| _
|	| _|
| _|| _|| _|| _|| _|| _|| _d S r   )superr   __init__r   r    r#   r&   r,   r/   r2   r6   r9   r<   r?   rB   rE   rH   rL   rO   )r   r   r    r#   r&   r,   r/   r2   r6   r9   r<   r?   rB   rE   rH   rL   rO   	__class__r   r   rR   	  s"   
zGetInputElement.__init__c                 C   s   i d| j d| jd| jd| jd| jd| jd| jd| jd	| jd
| j	d| j
d| jd| jd| jd| jd| j}dd | D S )Nr   r    	inputTypeexecutionTimeoutdigitEndTimeoutspeechEndTimeoutfinishOnKey	numDigitsspeechModelr<   r?   interimSpeechResultsCallback"interimSpeechResultsCallbackMethodrH   rL   profanityFilterc                 S   s(   i | ]\}}|d ur|t t|qS r   )r   r   r   ).0kvr   r   r   
<dictcomp>B  s    z+GetInputElement.to_dict.<locals>.<dictcomp>)r   r    r#   r&   r,   r/   r2   r6   r9   r<   r?   rB   rE   rH   rL   rO   items)r   dr   r   r   to_dict/  sH   	
zGetInputElement.to_dictc                 C      |  t||||d | S )N)contentvoicer?   loop)addr   )r   rg   rh   r?   ri   r   r   r   	add_speakG  s   zGetInputElement.add_speakc                 C   s   |  t||d | S )N)rg   ri   )rj   r   )r   rg   ri   r   r   r   add_playW  s
   zGetInputElement.add_playc                 C   rf   )N)lengthsilencemin_silencebeep)rj   r   )r   rm   rn   ro   rp   r   r   r   add_waitb  s   zGetInputElement.add_wait)NNNNNNNNNNNNNNNN)NNNr   )NNNN)4__name__
__module____qualname___name	_nestablepropertyr   settervalidate_argsof_typer   r   r   r    r!   r#   r$   r&   integer_typesr*   r,   r-   r/   r0   r2   r4   r6   r7   r9   r:   r<   r=   r?   r@   rB   rC   rE   rF   rH   of_type_exactrI   rJ   rL   rM   rO   rP   rR   re   rk   rl   rq   __classcell__r   r   rS   r   r      s@   




























































&

r   N)	plivo.xmlr   r   r   r   r   plivo.utils.validatorsr   r   r   r   r   <module>   s    