
    b6i                         d dl Z ddlmZ ddlmZmZ ddlmZ ddlm	Z	 ddl
mZmZ  e j                  e j                  d	      Z G d
 d      Z G d d      Zy)    N   )core)AsyncClientWrapperSyncClientWrapper)RequestOptions)EditProjectResponseModel   )AsyncRawContentClientRawContentClient.c                       e Zd ZdefdZedefd       Zeeeeddde	de
j                  e	   d	e
j                  ej                     d
e
j                  e	   de
j                  e   de
j                  e   defdZy)ContentClientclient_wrapperc                &    t        |      | _        y N)r   )r   _raw_clientselfr   s     t/root/.openclaw/workspace/visionaryfx/venv/lib/python3.12/site-packages/elevenlabs/studio/projects/content/client.py__init__zContentClient.__init__   s    +>J    returnc                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawContentClient
        r   r   s    r   with_raw_responsezContentClient.with_raw_response        r   Nfrom_urlfrom_documentfrom_content_jsonauto_convertrequest_options
project_idr   r   r    r!   r"   c                \    | j                   j                  ||||||      }|j                  S )aG	  
        Updates Studio project content.

        Parameters
        ----------
        project_id : str
            The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects.

        from_url : typing.Optional[str]
            An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.

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

        from_content_json : typing.Optional[str]

                An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.

                Example:
                [{"name": "Chapter A", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "A", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "B", "type": "tts_node"}]}, {"sub_type": "h1", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "C", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "D", "type": "tts_node"}]}]}, {"name": "Chapter B", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "E", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "F", "type": "tts_node"}]}, {"sub_type": "h2", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "G", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "H", "type": "tts_node"}]}]}]


        auto_convert : typing.Optional[bool]
            Whether to auto convert the Studio project to audio or not.

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

        Returns
        -------
        EditProjectResponseModel
            Successful Response

        Examples
        --------
        from elevenlabs import ElevenLabs

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.studio.projects.content.update(
            project_id="21m00Tcm4TlvDq8ikWAM",
        )
        r   r   updatedatar   r#   r   r   r    r!   r"   	_responses           r   r&   zContentClient.update   s>    l $$++'/%+ , 
	 ~~r   )__name__
__module____qualname__r   r   propertyr   r   OMITstrtypingOptionalr   Fileboolr   r   r&    r   r   r   r      s    K*; K  #3     *.4826.2;?>> //#&	>
 tyy1> "??3/> ood+>  8> 
">r   r   c                       e Zd ZdefdZedefd       Zeeeeddde	de
j                  e	   d	e
j                  ej                     d
e
j                  e	   de
j                  e   de
j                  e   defdZy)AsyncContentClientr   c                &    t        |      | _        y r   )r
   r   r   s     r   r   zAsyncContentClient.__init__`   s    0Or   r   c                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawContentClient
        r   r   s    r   r   z$AsyncContentClient.with_raw_responsec   r   r   Nr   r#   r   r   r    r!   r"   c                x   K   | j                   j                  ||||||       d{   }|j                  S 7 w)a	  
        Updates Studio project content.

        Parameters
        ----------
        project_id : str
            The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects.

        from_url : typing.Optional[str]
            An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.

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

        from_content_json : typing.Optional[str]

                An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.

                Example:
                [{"name": "Chapter A", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "A", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "B", "type": "tts_node"}]}, {"sub_type": "h1", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "C", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "D", "type": "tts_node"}]}]}, {"name": "Chapter B", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "E", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "F", "type": "tts_node"}]}, {"sub_type": "h2", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "G", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "H", "type": "tts_node"}]}]}]


        auto_convert : typing.Optional[bool]
            Whether to auto convert the Studio project to audio or not.

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

        Returns
        -------
        EditProjectResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.studio.projects.content.update(
                project_id="21m00Tcm4TlvDq8ikWAM",
            )


        asyncio.run(main())
        r   Nr%   r(   s           r   r&   zAsyncContentClient.updaten   sL     | **11'/%+ 2 
 
	 ~~
s   %:8:)r*   r+   r,   r   r   r-   r
   r   r.   r/   r0   r1   r   r2   r3   r   r   r&   r4   r   r   r6   r6   _   s    P*< P  #8     *.4826.2;?FF //#&	F
 tyy1F "??3/F ood+F  8F 
"Fr   r6   )r0    r   core.client_wrapperr   r   core.request_optionsr   !types.edit_project_response_modelr   
raw_clientr
   r   castAnyr.   r   r6   r4   r   r   <module>rA      sJ      I 3 J ? v{{6::s#M M`U Ur   