
    b6i                         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      Z G d d      Zy)    N)JSONDecodeError   )ApiError)AsyncClientWrapperSyncClientWrapper)AsyncHttpResponseHttpResponse)RequestOptions)construct_type)UnprocessableEntityError)HttpValidationError)(WorkspaceServiceAccountListResponseModelc                   N    e Zd ZdefdZdddej                  e   dee	   fdZ
y)RawServiceAccountsClientclient_wrapperc                    || _         y N_client_wrapperselfr   s     q/root/.openclaw/workspace/visionaryfx/venv/lib/python3.12/site-packages/elevenlabs/service_accounts/raw_client.py__init__z!RawServiceAccountsClient.__init__   
    -    Nrequest_optionsr   returnc                   | j                   j                  j                  dd|      }	 d|j                  cxk  rdk  rGn nDt	        j
                  t        t        t        |j                                     }t        ||      S |j                  dk(  rUt        t        |j                        t	        j
                  t        t        t        |j                                     	      |j                         }t        |j                  t        |j                        |
      # t        $ r6 t        |j                  t        |j                        |j                   
      w xY w)aI  
        List all service accounts in the workspace

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

        Returns
        -------
        HttpResponse[WorkspaceServiceAccountListResponseModel]
            Successful Response
        v1/service-accountsGETmethodr      ,  type_object_responsedata  headersbodystatus_coder.   r/   )r   httpx_clientrequestr1   typingcastr   r   jsonr	   r   dictr.   r   r   r   textr   r   	_response_data_response_jsons        r   listzRawServiceAccountsClient.list   s4     ((55==!+ > 
	
	ti++1c1<"F ) 0 $YUCC$$+. !2!23+&"5$-NN$4	 	 '^^-N 9#8#8$yGXGXBY`noo  	ty'<'<d9K\K\F]dmdrdrss	ts   AD% A4D% %?E$)__name__
__module____qualname__r   r   r4   Optionalr
   r	   r   r=    r   r   r   r      s=    .*; . EI-p"(//."A-p	>	?-pr   r   c                   N    e Zd ZdefdZdddej                  e   dee	   fdZ
y)AsyncRawServiceAccountsClientr   c                    || _         y r   r   r   s     r   r   z&AsyncRawServiceAccountsClient.__init__E   r   r   Nr   r   r   c                  K   | j                   j                  j                  dd|       d{   }	 d|j                  cxk  rdk  rGn nDt	        j
                  t        t        t        |j                                     }t        ||      S |j                  d	k(  rUt        t        |j                        t	        j
                  t        t        t        |j                                     
      |j                         }t        |j                  t        |j                        |      7 # t        $ r6 t        |j                  t        |j                        |j                         w xY ww)aN  
        List all service accounts in the workspace

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

        Returns
        -------
        AsyncHttpResponse[WorkspaceServiceAccountListResponseModel]
            Successful Response
        r    r!   r"   Nr$   r%   r&   r)   r,   r-   r0   )r   r2   r3   r1   r4   r5   r   r   r6   r   r   r7   r.   r   r   r   r8   r9   s        r   r=   z"AsyncRawServiceAccountsClient.listH   sB      ..;;CC!+ D 
 
	
	ti++1c1<"F ) 0 ))%HH$$+. !2!23+&"5$-NN$4	 	 '^^-N 9#8#8$yGXGXBY`noo;
6  	ty'<'<d9K\K\F]dmdrdrss	ts4   ,E4D/E4AD2 E4A4D2 ,E42?E11E4)r>   r?   r@   r   r   r4   rA   r
   r   r   r=   rB   r   r   rD   rD   D   s=    .*< . EI-p"(//."A-p	C	D-pr   rD   )r4   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   3types.workspace_service_account_list_response_modelr   r   rD   rB   r   r   <module>rP      s>     ( % G @ 1 6 H = j1p 1ph1p 1pr   