o
    lWi                     @   s   d dl 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 G dd dZG dd dZdS )    N)JSONDecodeError   )ApiError)AsyncClientWrapperSyncClientWrapper)AsyncHttpResponseHttpResponse)RequestOptions)construct_type)UnprocessableEntityError)HttpValidationError)Userc                   @   <   e Zd ZdefddZdddeje dee	 fdd	Z
dS )
RawUserClientclient_wrapperc                C   
   || _ d S N_client_wrapperselfr    r   ^/var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/elevenlabs/user/raw_client.py__init__      
zRawUserClient.__init__Nrequest_optionsr   returnc             	   C   s   | j jjdd|d}z>d|j  krdk r+n ntttt| d}t	||dW S |jdkrCt
t|jtttt| dd	| }W n ty[   t|jt|j|jd
w t|jt|j|d
)a  
        Gets information about the user

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

        Returns
        -------
        HttpResponse[User]
            Successful Response
        v1/userGETmethodr      ,  type_object_responsedata  headersbodystatus_coder,   r-   )r   httpx_clientrequestr/   typingcastr   r
   jsonr   r   dictr,   r   r   r   textr   r   	_response_data_response_jsonr   r   r   get   s>   

zRawUserClient.get)__name__
__module____qualname__r   r   r2   Optionalr	   r   r   r;   r   r   r   r   r          &r   c                   @   r   )
AsyncRawUserClientr   c                C   r   r   r   r   r   r   r   r   C   r   zAsyncRawUserClient.__init__Nr   r   r   c             	      s   | j jjd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rGt
t|jtttt| dd
| }W n ty_   t|jt|j|jdw t|jt|j|d)a  
        Gets information about the user

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

        Returns
        -------
        AsyncHttpResponse[User]
            Successful Response
        r   r   r    Nr"   r#   r$   r'   r*   r+   r.   )r   r0   r1   r/   r2   r3   r   r
   r4   r   r   r5   r,   r   r   r   r6   r7   r   r   r   r;   F   s@   

zAsyncRawUserClient.get)r<   r=   r>   r   r   r2   r?   r	   r   r   r;   r   r   r   r   rA   B   r@   rA   )r2   json.decoderr   core.api_errorr   core.client_wrapperr   r   core.http_responser   r   core.request_optionsr	   core.unchecked_base_modelr
   !errors.unprocessable_entity_errorr   types.http_validation_errorr   
types.userr   r   rA   r   r   r   r   <module>   s   2