o
    lWi                     @   s   d dl Z d dlmZ ddlmZ ddlmZ ddlmZm	Z	 ddl
mZmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ e e jdZG dd dZG dd dZdS )    N)JSONDecodeError   )core)ApiError)AsyncClientWrapperSyncClientWrapper)AsyncHttpResponseHttpResponse)jsonable_encoder)RequestOptions)construct_type)UnprocessableEntityError)HttpValidationError))RequestPvcManualVerificationResponseModel.c                   @   X   e Zd ZdefddZedddedeje	j
 deje d	eje d
ee f
ddZdS )RawVerificationClientclient_wrapperc                C   
   || _ d S N_client_wrapperselfr    r   q/var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/elevenlabs/voices/pvc/verification/raw_client.py__init__      
zRawVerificationClient.__init__N
extra_textrequest_optionsvoice_idfilesr   r   returnc             	   C   s   | j jjdt| ddd|id|i|tdd}z>d|j  kr$d	k r9n nttt	t|
 d
}t||dW S |jdkrQtt|jttt	t|
 d
d|
 }W n tyi   t|jt|j|jdw t|jt|j|d)a  
        Request manual verification for a PVC voice.

        Parameters
        ----------
        voice_id : str
            Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.

        files : typing.List[core.File]
            See core.File for more documentation

        extra_text : typing.Optional[str]
            Extra text to be used in the manual verification process.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[RequestPvcManualVerificationResponseModel]
            Successful Response
        v1/voices/pvc//verificationPOSTr   r!   Tmethoddatar!   r   omitforce_multipart   ,  type_object_responser(     headersbodystatus_coder4   r5   )r   httpx_clientrequestr
   OMITr7   typingcastr   r   jsonr	   r   dictr4   r   r   r   textr   r    r!   r   r   	_response_data_response_jsonr   r   r   r9      sJ   

zRawVerificationClient.request)__name__
__module____qualname__r   r   r:   strr;   Listr   FileOptionalr   r	   r   r9   r   r   r   r   r          
r   c                   @   r   )AsyncRawVerificationClientr   c                C   r   r   r   r   r   r   r   r   `   r   z#AsyncRawVerificationClient.__init__Nr   r    r!   r   r   r"   c             	      s   | j jjdt| ddd|id|i|tddI dH }z>d	|j  kr(d
k r=n nttt	t|
 d}t||dW S |jdkrUtt|jttt	t|
 dd|
 }W n tym   t|jt|j|jdw t|jt|j|d)a  
        Request manual verification for a PVC voice.

        Parameters
        ----------
        voice_id : str
            Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.

        files : typing.List[core.File]
            See core.File for more documentation

        extra_text : typing.Optional[str]
            Extra text to be used in the manual verification process.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[RequestPvcManualVerificationResponseModel]
            Successful Response
        r#   r$   r%   r   r!   Tr&   Nr+   r,   r-   r0   r2   r3   r6   )r   r8   r9   r
   r:   r7   r;   r<   r   r   r=   r   r   r>   r4   r   r   r   r?   r@   r   r   r   r9   c   sL   

z"AsyncRawVerificationClient.request)rD   rE   rF   r   r   r:   rG   r;   rH   r   rI   rJ   r   r   r   r9   r   r   r   r   rL   _   rK   rL   )r;   json.decoderr    r   core.api_errorr   core.client_wrapperr   r   core.http_responser   r	   core.jsonable_encoderr
   core.request_optionsr   core.unchecked_base_modelr   !errors.unprocessable_entity_errorr   types.http_validation_errorr   4types.request_pvc_manual_verification_response_modelr   r<   Anyr:   r   rL   r   r   r   r   <module>   s   J