
    b6i
                     b   d dl Z 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 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% ddl&m'Z' ddl(m)Z)  ejT                  ejV                  d      Z, G d d      Z- G d d      Z.y)    N)JSONDecodeError   )core)ApiError)AsyncClientWrapperSyncClientWrapper)AsyncHttpResponseHttpResponse)jsonable_encoder)RequestOptions)'convert_and_respect_annotation_metadata)construct_type)UnprocessableEntityError)'AddPronunciationDictionaryResponseModel)1GetPronunciationDictionariesMetadataResponseModel)*GetPronunciationDictionaryMetadataResponse)0GetPronunciationDictionaryWithRulesResponseModel)HttpValidationError   )SBodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem)YBodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostWorkspaceAccess)=PronunciationDictionariesCreateFromFileRequestWorkspaceAccess)(PronunciationDictionariesListRequestSort.c                   X   e Zd ZdefdZeeedddedej                  e	j                     dej                  e   dej                  e   d	ej                  e   d
ee   fdZeedddej                   e   dedej                  e   dej                  e   d	ej                  e   d
ee   fdZddded	ej                  e   d
ee   fdZeedddedej                  e   dej                  e   d	ej                  e   d
ee   f
dZej4                  dddeded	ej                  e   d
ej6                  eej6                  e         fd       Zdddddddej                  e   dej                  e   dej                  e   dej                  e   d	ej                  e   d
ee    fdZ!y)"RawPronunciationDictionariesClientclient_wrapperc                    || _         y N_client_wrapperselfr   s     {/root/.openclaw/workspace/visionaryfx/venv/lib/python3.12/site-packages/elevenlabs/pronunciation_dictionaries/raw_client.py__init__z+RawPronunciationDictionariesClient.__init__)   
    -    Nfiledescriptionworkspace_accessrequest_optionsnamer(   r)   r*   r+   returnc                   | j                   j                  j                  dd|||di |d|ini |t        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)au  
        Creates a new pronunciation dictionary from a lexicon .PLS file

        Parameters
        ----------
        name : str
            The name of the pronunciation dictionary, used for identification only.

        file : typing.Optional[core.File]
            See core.File for more documentation

        description : typing.Optional[str]
            A description of the pronunciation dictionary, used for identification only.

        workspace_access : typing.Optional[PronunciationDictionariesCreateFromFileRequestWorkspaceAccess]
            Should be one of 'admin', 'editor' or 'viewer'. If not provided, defaults to no access.

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

        Returns
        -------
        HttpResponse[AddPronunciationDictionaryResponseModel]
            Successful Response
        +v1/pronunciation-dictionaries/add-from-filePOSTr,   r)   r*   r(   Tmethoddatafilesr+   omitforce_multipart   ,  type_object_responser4     headersbodystatus_coderA   rB   )r    httpx_clientrequestOMITrD   typingcastr   r   jsonr
   r   dictrA   r   r   r   text	r"   r,   r(   r)   r*   r+   	_response_data_response_jsons	            r#   create_from_filez3RawPronunciationDictionariesClient.create_from_file,   sc   D ((55==9*$4
%)%5FD>2 ,  > 
		ti++1c1;"E ) 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D9 A4D9 9?E8r)   r*   r+   rulesc                ,   | j                   j                  j                  ddt        |t        j
                  t           d      |||dddi|t              }	 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)a  
        Creates a new pronunciation dictionary from provided rules.

        Parameters
        ----------
        rules : typing.Sequence[BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem]
            List of pronunciation rules. Rule can be either:
                an alias rule: {'string_to_replace': 'a', 'type': 'alias', 'alias': 'b', }
                or a phoneme rule: {'string_to_replace': 'a', 'type': 'phoneme', 'phoneme': 'b', 'alphabet': 'ipa' }

        name : str
            The name of the pronunciation dictionary, used for identification only.

        description : typing.Optional[str]
            A description of the pronunciation dictionary, used for identification only.

        workspace_access : typing.Optional[BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostWorkspaceAccess]
            Should be one of 'admin', 'editor' or 'viewer'. If not provided, defaults to no access.

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

        Returns
        -------
        HttpResponse[AddPronunciationDictionaryResponseModel]
            Successful Response
        ,v1/pronunciation-dictionaries/add-from-rulesr0   writer<   
annotation	directionrS   r,   r)   r*   content-typeapplication/jsonr3   rJ   rA   r+   r6   r8   r9   r:   r=   r?   r@   rC   )r    rE   rF   r   rH   Sequencer   rG   rD   rI   r   r   rJ   r
   r   rK   rA   r   r   r   rL   	r"   rS   r,   r)   r*   r+   rN   rO   rP   s	            r#   create_from_rulesz4RawPronunciationDictionariesClient.create_from_rulesw   sv   L ((55==:@!%k  & *$4  2 ,' > 
	*	ti++1c1;"E ) 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E 5A4E ?Fr+   pronunciation_dictionary_idc                   | j                   j                  j                  dt        |       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)a  
        Get metadata for a pronunciation dictionary

        Parameters
        ----------
        pronunciation_dictionary_id : str
            The id of the pronunciation dictionary

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

        Returns
        -------
        HttpResponse[GetPronunciationDictionaryWithRulesResponseModel]
            Successful Response
        v1/pronunciation-dictionaries/GETr3   r+   r8   r9   r:   r=   r?   r@   rC   )r    rE   rF   r   rD   rH   rI   r   r   rJ   r
   r   rK   rA   r   r   r   rL   r"   rb   r+   rN   rO   rP   s         r#   getz&RawPronunciationDictionariesClient.get   sC   & ((55==,-=>Y-Z,[\+ > 
	
	ti++1c1D"N ) 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D1 A4D1 1?E0archivedr,   r+   rj   c                   | j                   j                  j                  dt        |       d||dddi|t              }	 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)a  
        Partially update the pronunciation dictionary without changing the version

        Parameters
        ----------
        pronunciation_dictionary_id : str
            The id of the pronunciation dictionary

        archived : typing.Optional[bool]
            Whether to archive the pronunciation dictionary.

        name : typing.Optional[str]
            The name of the pronunciation dictionary, used for identification only.

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

        Returns
        -------
        HttpResponse[GetPronunciationDictionaryMetadataResponse]
            Successful Response
        rd   PATCHrj   r,   r[   r\   r]   r8   r9   r:   r=   r?   r@   rC   )r    rE   rF   r   rG   rD   rH   rI   r   r   rJ   r
   r   rK   rA   r   r   r   rL   r"   rb   rj   r,   r+   rN   rO   rP   s           r#   updatez)RawPronunciationDictionariesClient.update   s`   < ((55==,-=>Y-Z,[\$
  2 , > 
		ti++1c1>"H ) 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<dictionary_id
version_idc             #     K   | j                   j                  j                  dt        |       dt        |       dd      5 dt        t
        j                  t              ffd} |        ddd       y# 1 sw Y   yxY ww)	a  
        Get a PLS file with a pronunciation dictionary version rules

        Parameters
        ----------
        dictionary_id : str
            The id of the pronunciation dictionary

        version_id : str
            The id of the pronunciation dictionary version

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.

        Returns
        -------
        typing.Iterator[HttpResponse[typing.Iterator[bytes]]]
            The PLS file containing pronunciation dictionary rules
        rd   /	/downloadre   rf   r-   c                     	 dj                   cxk  rdk  r=n n:j                  dd      nd} t        d j                  |       D              S j	                          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)Nr8   r9   
chunk_size   c              3       K   | ]  }|  y wr    .0_chunks     r#   	<genexpr>zORawPronunciationDictionariesClient.download.<locals>._stream.<locals>.<genexpr>e  s     5xf5xs   rv   r=   r?   r:   r@   rC   )rD   rh   r
   
iter_bytesreadr   rK   rA   rH   rI   r   r   rJ   r   r   rL   _chunk_sizerP   rN   r+   s     r#   _streamz<RawPronunciationDictionariesClient.download.<locals>._stream`  s#   i339c9Q`Qlo&9&9,&Mrv+%.5x9K_K_kvK_Kw5x   NN$ ,,36$():):$;!' 3 .*=,5NN,<!""	 	 &/^^%5N
 9+@+@$yO`O`Jahvww	 ' "$-$9$94	HYHYCZajaoao s   AD BD ?EN)r    rE   streamr   r
   rH   Iteratorbytesr"   rp   rq   r+   r   rN   s      ` @r#   downloadz+RawPronunciationDictionariesClient.downloadC  s     . !!..55,-=m-L,MQO_`jOkNlluv+ 6 
  	 x\&//%*@A x4 )OA 	  	  	s   AB
/A>5	B
>BB
cursor	page_sizesortsort_directionr+   r   r   r   r   c                   | 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                        |      # t        $ r6 t        |j                  t        |j                        |j                         w xY w)a  
        Get a list of the pronunciation dictionaries you have access to and their metadata

        Parameters
        ----------
        cursor : typing.Optional[str]
            Used for fetching next page. Cursor is returned in the response.

        page_size : typing.Optional[int]
            How many pronunciation dictionaries to return at maximum. Can not exceed 100, defaults to 30.

        sort : typing.Optional[PronunciationDictionariesListRequestSort]
            Which field to sort by, one of 'created_at_unix' or 'name'.

        sort_direction : typing.Optional[str]
            Which direction to sort the voices in. 'ascending' or 'descending'.

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

        Returns
        -------
        HttpResponse[GetPronunciationDictionariesMetadataResponseModel]
            Successful Response
        v1/pronunciation-dictionariesre   r   r   r   r   r3   paramsr+   r8   r9   r:   r=   r?   r@   rC   )r    rE   rF   rD   rH   rI   r   r   rJ   r
   r   rK   rA   r   r   r   rL   	r"   r   r   r   r   r+   rN   rO   rP   s	            r#   listz'RawPronunciationDictionariesClient.list|  sH   D ((55==+ &"0	 , > 

		ti++1c1E"O ) 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$   rG   strrH   Optionalr   Filer   r   r
   r   rQ   r^   r   r   r`   r   rh   boolr   ro   
contextlibcontextmanagerr   r   r   intr   r   r   ry   r&   r#   r   r   (   s   .*; . ,0,0ko;?Ip Ip oodii(	Ip
 __S)Ip !//*ghIp  8Ip 
=	>Ip` -1 ;?Sp rsSp 	Sp
 __S)Sp !//e
Sp  8Sp 
=	>Spl gk0p+.0pDJOOTbDc0p	F	G0pl +/%);?Cp%(Cp //$'	Cp
 ooc"Cp  8Cp 
@	ACpJ im6 6.16GMWeGf6	fooe&<=	>6 6v (,*.JN/3;?Ep $Ep ??3'	Ep
 ooFGEp ,Ep  8Ep 
G	HEpr&   r   c                   X   e Zd ZdefdZeeedddedej                  e	j                     dej                  e   dej                  e   d	ej                  e   d
ee   fdZeedddej                   e   dedej                  e   dej                  e   d	ej                  e   d
ee   fdZddded	ej                  e   d
ee   fdZeedddedej                  e   dej                  e   d	ej                  e   d
ee   f
dZej4                  dddeded	ej                  e   d
ej6                  eej6                  e         fd       Zdddddddej                  e   dej                  e   dej                  e   dej                  e   d	ej                  e   d
ee    fdZ!y)'AsyncRawPronunciationDictionariesClientr   c                    || _         y r   r   r!   s     r#   r$   z0AsyncRawPronunciationDictionariesClient.__init__  r%   r&   Nr'   r,   r(   r)   r*   r+   r-   c                  K   | j                   j                  j                  dd|||di |d|ini |t        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)az  
        Creates a new pronunciation dictionary from a lexicon .PLS file

        Parameters
        ----------
        name : str
            The name of the pronunciation dictionary, used for identification only.

        file : typing.Optional[core.File]
            See core.File for more documentation

        description : typing.Optional[str]
            A description of the pronunciation dictionary, used for identification only.

        workspace_access : typing.Optional[PronunciationDictionariesCreateFromFileRequestWorkspaceAccess]
            Should be one of 'admin', 'editor' or 'viewer'. If not provided, defaults to no access.

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

        Returns
        -------
        AsyncHttpResponse[AddPronunciationDictionaryResponseModel]
            Successful Response
        r/   r0   r1   Nr(   Tr2   r8   r9   r:   r=   r?   r@   rC   )r    rE   rF   rG   rD   rH   rI   r   r   rJ   r	   r   rK   rA   r   r   r   rL   rM   s	            r#   rQ   z8AsyncRawPronunciationDictionariesClient.create_from_file  ss    D ..;;CC9*$4
%)%5FD>2 ,  D 
 
		ti++1c1;"E ) 0 ))%HH$$+. !2!23+&"5$-NN$4	 	 '^^-N 9#8#8$yGXGXBY`nooO
J  	ty'<'<d9K\K\F]dmdrdrss	ts8   A FEFAE #F$A4E ,F?FFrR   rS   c                J  K   | j                   j                  j                  ddt        |t        j
                  t           d      |||dddi|t               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)a  
        Creates a new pronunciation dictionary from provided rules.

        Parameters
        ----------
        rules : typing.Sequence[BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostRulesItem]
            List of pronunciation rules. Rule can be either:
                an alias rule: {'string_to_replace': 'a', 'type': 'alias', 'alias': 'b', }
                or a phoneme rule: {'string_to_replace': 'a', 'type': 'phoneme', 'phoneme': 'b', 'alphabet': 'ipa' }

        name : str
            The name of the pronunciation dictionary, used for identification only.

        description : typing.Optional[str]
            A description of the pronunciation dictionary, used for identification only.

        workspace_access : typing.Optional[BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPostWorkspaceAccess]
            Should be one of 'admin', 'editor' or 'viewer'. If not provided, defaults to no access.

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

        Returns
        -------
        AsyncHttpResponse[AddPronunciationDictionaryResponseModel]
            Successful Response
        rU   r0   rV   rW   rZ   r[   r\   r]   Nr8   r9   r:   r=   r?   r@   rC   )r    rE   rF   r   rH   r^   r   rG   rD   rI   r   r   rJ   r	   r   rK   rA   r   r   r   rL   r_   s	            r#   r`   z9AsyncRawPronunciationDictionariesClient.create_from_rules  s    L ..;;CC:@!%k  & *$4  2 ,' D 
 
	*	ti++1c1;"E ) 0 ))%HH$$+. !2!23+&"5$-NN$4	 	 '^^-N 9#8#8$yGXGXBY`noo[
V  	ty'<'<d9K\K\F]dmdrdrss	ts8   AF#EF##AE! >F#?A4E! 3,F#!?F  F#ra   rb   c                  K   | j                   j                  j                  dt        |       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)a  
        Get metadata for a pronunciation dictionary

        Parameters
        ----------
        pronunciation_dictionary_id : str
            The id of the pronunciation dictionary

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

        Returns
        -------
        AsyncHttpResponse[GetPronunciationDictionaryWithRulesResponseModel]
            Successful Response
        rd   re   rf   Nr8   r9   r:   r=   r?   r@   rC   )r    rE   rF   r   rD   rH   rI   r   r   rJ   r	   r   rK   rA   r   r   r   rL   rg   s         r#   rh   z+AsyncRawPronunciationDictionariesClient.geth  sQ    & ..;;CC,-=>Y-Z,[\+ D 
 
	
	ti++1c1D"N ) 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s5   8F D;F  AD> F A4D> ,F >?E==F ri   rj   c                  K   | j                   j                  j                  dt        |       d||dddi|t               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)a  
        Partially update the pronunciation dictionary without changing the version

        Parameters
        ----------
        pronunciation_dictionary_id : str
            The id of the pronunciation dictionary

        archived : typing.Optional[bool]
            Whether to archive the pronunciation dictionary.

        name : typing.Optional[str]
            The name of the pronunciation dictionary, used for identification only.

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

        Returns
        -------
        AsyncHttpResponse[GetPronunciationDictionaryMetadataResponse]
            Successful Response
        rd   rl   rm   r[   r\   r]   Nr8   r9   r:   r=   r?   r@   rC   )r    rE   rF   r   rG   rD   rH   rI   r   r   rJ   r	   r   rK   rA   r   r   r   rL   rn   s           r#   ro   z.AsyncRawPronunciationDictionariesClient.update  sp    < ..;;CC,-=>Y-Z,[\$
  2 , D 
 
		ti++1c1>"H ) 0 ))%HH$$+. !2!23+&"5$-NN$4	 	 '^^-N 9#8#8$yGXGXBY`nooK
F  	ty'<'<d9K\K\F]dmdrdrss	ts8   AFEFAE
 'F(A4E
 ,F
?F		Frp   rq   c               h  K   | j                   j                  j                  dt        |       dt        |       dd      4 d{   dt        t
        j                  t              ffd} |        d{    ddd      d{    y7 L7 7 	# 1 d{  7  sw Y   yxY ww)	a  
        Get a PLS file with a pronunciation dictionary version rules

        Parameters
        ----------
        dictionary_id : str
            The id of the pronunciation dictionary

        version_id : str
            The id of the pronunciation dictionary version

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.

        Returns
        -------
        typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]
            The PLS file containing pronunciation dictionary rules
        rd   rs   rt   re   rf   Nr-   c                    K   	 dj                   cxk  rdk  r=n n:j                  dd      nd} t        d j                  |       2              S j	                          d {    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)Nr8   r9   rv   rw   c                2   K   | 3 d {   }| 7 
6 y wr   ry   rz   s     r#   r}   zTAsyncRawPronunciationDictionariesClient.download.<locals>._stream.<locals>.<genexpr>  s     !k!k6&!k!ks   r~   r=   r?   r:   r@   rC   )rD   rh   r	   aiter_bytesareadr   rK   rA   rH   rI   r   r   rJ   r   r   rL   r   s     r#   r   zAAsyncRawPronunciationDictionariesClient.download.<locals>._stream  s1    i339c9Q`Qlo&9&9,&Mrv0%.!kY=R=R^i=R=j!k   $//+++ ,,36$():):$;!' 3 .*=,5NN,<!""	 	 &/^^%5N
 9+@+@$yO`O`Jahvww# , ' "$-$9$94	HYHYCZajaoao s<   EAD ED *D+A8D #+ED ?EE)r    rE   r   r   r	   rH   AsyncIteratorr   r   s      ` @r#   r   z0AsyncRawPronunciationDictionariesClient.download  s     . ''44;;,-=m-L,MQO_`jOkNlluv+ < 
 !	" !	" x#4V5I5I%5P#Q x6  	/!C!	" !	" !	"B "C!	" !	" !	" !	"sZ   AB2
BB20B>B?BB2BB2BB2B/#B&$B/+B2r   r   r   r   r   c                  K   | j                   j                  j                  d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)a  
        Get a list of the pronunciation dictionaries you have access to and their metadata

        Parameters
        ----------
        cursor : typing.Optional[str]
            Used for fetching next page. Cursor is returned in the response.

        page_size : typing.Optional[int]
            How many pronunciation dictionaries to return at maximum. Can not exceed 100, defaults to 30.

        sort : typing.Optional[PronunciationDictionariesListRequestSort]
            Which field to sort by, one of 'created_at_unix' or 'name'.

        sort_direction : typing.Optional[str]
            Which direction to sort the voices in. 'ascending' or 'descending'.

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

        Returns
        -------
        AsyncHttpResponse[GetPronunciationDictionariesMetadataResponseModel]
            Successful Response
        r   re   r   r   Nr8   r9   r:   r=   r?   r@   rC   )r    rE   rF   rD   rH   rI   r   r   rJ   r	   r   rK   rA   r   r   r   rL   r   s	            r#   r   z,AsyncRawPronunciationDictionariesClient.list  sX    D ..;;CC+ &"0	 , D 

 

		ti++1c1E"O ) 0 ))%HH$$+. !2!23+&"5$-NN$4	 	 '^^-N 9#8#8$yGXGXBY`nooG

B  	ty'<'<d9K\K\F]dmdrdrss	ts4   2E:D5E:AD8 E:A4D8 
,E:8?E77E:)"r   r   r   r   r$   rG   r   rH   r   r   r   r   r   r	   r   rQ   r^   r   r   r`   r   rh   r   r   ro   r   asynccontextmanagerr   r   r   r   r   r   r   ry   r&   r#   r   r     s   .*< . ,0,0ko;?Ip Ip oodii(	Ip
 __S)Ip !//*ghIp  8Ip 
B	CIp` -1 ;?Sp rsSp 	Sp
 __S)Sp !//e
Sp  8Sp 
B	CSpl gk0p+.0pDJOOTbDc0p	K	L0pl +/%);?Cp%(Cp //$'	Cp
 ooc"Cp  8Cp 
E	FCpJ ##im7" 7".17"GMWeGf7"			/0D0DU0KL	M7" $7"x (,*.JN/3;?Ep $Ep ??3'	Ep
 ooFGEp ,Ep  8Ep 
L	MEpr&   r   )/r   rH   json.decoderr    r   core.api_errorr   core.client_wrapperr   r   core.http_responser	   r
   core.jsonable_encoderr   core.request_optionsr   core.serializationr   core.unchecked_base_modelr   !errors.unprocessable_entity_errorr   1types.add_pronunciation_dictionary_response_modelr   <types.get_pronunciation_dictionaries_metadata_response_modelr   4types.get_pronunciation_dictionary_metadata_responser   <types.get_pronunciation_dictionary_with_rules_response_modelr   types.http_validation_errorr   gtypes.body_add_a_pronunciation_dictionary_v_1_pronunciation_dictionaries_add_from_rules_post_rules_itemr   mtypes.body_add_a_pronunciation_dictionary_v_1_pronunciation_dictionaries_add_from_rules_post_workspace_accessr   Jtypes.pronunciation_dictionaries_create_from_file_request_workspace_accessr   2types.pronunciation_dictionaries_list_request_sortr   rI   AnyrG   r   r   ry   r&   r#   <module>r      s      (  % G @ 4 1 H 6 H g n > i v{{6::s#Yp YpxZp Zpr&   