o
    lWi                     @   sz   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 e jd	ZG d
d dZG dd dZdS )    N   )core)AsyncClientWrapperSyncClientWrapper)RequestOptions)EditProjectResponseModel   )AsyncRawContentClientRawContentClient.c                   @      e Zd ZdefddZedefd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dZdS )ContentClientclient_wrapperc                C      t |d| _d S N)r   )r
   _raw_clientselfr    r   m/var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/elevenlabs/studio/projects/content/client.py__init__      zContentClient.__init__returnc                 C      | j S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawContentClient
        r   r   r   r   r   with_raw_response      	zContentClient.with_raw_responseNfrom_urlfrom_documentfrom_content_jsonauto_convertrequest_options
project_idr   r   r    r!   r"   c                C   s   | j j||||||d}|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"   	_responser   r   r   r%      s   6zContentClient.update)__name__
__module____qualname__r   r   propertyr
   r   OMITstrtypingOptionalr   Fileboolr   r   r%   r   r   r   r   r      0    
	r   c                   @   r   )AsyncContentClientr   c                C   r   r   )r	   r   r   r   r   r   r   `   r   zAsyncContentClient.__init__r   c                 C   r   )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawContentClient
        r   r   r   r   r   r   c   r   z$AsyncContentClient.with_raw_responseNr   r#   r   r   r    r!   r"   c                   s&   | j j||||||dI dH }|jS )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'   r   r   r   r%   n   s   >zAsyncContentClient.update)r)   r*   r+   r   r   r,   r	   r   r-   r.   r/   r0   r   r1   r2   r   r   r%   r   r   r   r   r4   _   r3   r4   )r/    r   core.client_wrapperr   r   core.request_optionsr   !types.edit_project_response_modelr   
raw_clientr	   r
   castAnyr-   r   r4   r   r   r   r   <module>   s   P