o
    lWieK                     @  s   d dl mZ d dl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mZ ejrUddlmZmZ eejdZG dd dZ G dd dZ!dS )    )annotationsN   )AsyncClientWrapperSyncClientWrapper)RequestOptions)AddChapterResponseModel)ChapterContentInputModel)ChapterWithContentResponseModel)ConvertChapterResponseModel)DeleteChapterResponseModel)EditChapterResponseModel)GetChaptersResponse   )AsyncRawChaptersClientRawChaptersClient)AsyncSnapshotsClientSnapshotsClient.c                   @     e Zd Zd+ddZed,ddZd	d
d-ddZed	dd.ddZd	d
d/ddZ	eed	dd0d!d"Z
d	d
d1d$d%Zd	d
d2d'd(Zed)d* Zd	S )3ChaptersClientclient_wrapperr   c                C     t |d| _|| _d | _d S Nr   )r   _raw_client_client_wrapper
_snapshotsselfr    r   n/var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/elevenlabs/studio/projects/chapters/client.py__init__      
zChaptersClient.__init__returnr   c                 C     | j S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawChaptersClient
        r   r   r   r   r   with_raw_response      	z ChaptersClient.with_raw_responseNrequest_options
project_idstrr)   typing.Optional[RequestOptions]r   c                C  s   | j j||d}|jS )an  
        Returns a list of a Studio project's chapters.

        Parameters
        ----------
        project_id : str
            The ID of the Studio project.

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

        Returns
        -------
        GetChaptersResponse
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.studio.projects.chapters.list(
            project_id="21m00Tcm4TlvDq8ikWAM",
        )
        r(   r   listdatar   r*   r)   	_responser   r   r   r.   )   s   zChaptersClient.listfrom_urlr)   namer3   typing.Optional[str]r   c                C  s   | j j||||d}|jS )a)  
        Creates a new chapter either as blank or from a URL.

        Parameters
        ----------
        project_id : str
            The ID of the Studio project.

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

        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.

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

        Returns
        -------
        AddChapterResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.studio.projects.chapters.create(
            project_id="21m00Tcm4TlvDq8ikWAM",
            name="Chapter 1",
        )
        r4   r3   r)   r   creater/   r   r*   r4   r3   r)   r1   r   r   r   r8   H   s   *zChaptersClient.create
chapter_idr	   c                C     | j j|||d}|jS )a  
        Returns information about a specific chapter.

        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.

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

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

        Returns
        -------
        ChapterWithContentResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.studio.projects.chapters.get(
            project_id="21m00Tcm4TlvDq8ikWAM",
            chapter_id="21m00Tcm4TlvDq8ikWAM",
        )
        r(   r   getr/   r   r*   r:   r)   r1   r   r   r   r=   u      "zChaptersClient.getr4   contentr)   rA   )typing.Optional[ChapterContentInputModel]r   c                C  s   | j j|||||d}|jS )a  
        Updates a chapter.

        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.

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

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

        content : typing.Optional[ChapterContentInputModel]
            The chapter content to use.

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

        Returns
        -------
        EditChapterResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.studio.projects.chapters.update(
            project_id="21m00Tcm4TlvDq8ikWAM",
            chapter_id="21m00Tcm4TlvDq8ikWAM",
        )
        r@   r   updater/   r   r*   r:   r4   rA   r)   r1   r   r   r   rD      s   .
zChaptersClient.updater   c                C  r;   )a  
        Deletes a chapter.

        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.

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

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

        Returns
        -------
        DeleteChapterResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.studio.projects.chapters.delete(
            project_id="21m00Tcm4TlvDq8ikWAM",
            chapter_id="21m00Tcm4TlvDq8ikWAM",
        )
        r(   r   deleter/   r>   r   r   r   rG      r?   zChaptersClient.deleter
   c                C  r;   )a  
        Starts conversion of a specific chapter.

        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.

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

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

        Returns
        -------
        ConvertChapterResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.studio.projects.chapters.convert(
            project_id="21m00Tcm4TlvDq8ikWAM",
            chapter_id="21m00Tcm4TlvDq8ikWAM",
        )
        r(   r   convertr/   r>   r   r   r   rI      r?   zChaptersClient.convertc                 C  *   | j d u rddlm} || jd| _ | j S )Nr   )r   r   )r   snapshots.clientr   r   )r   r   r   r   r   	snapshots     
zChaptersClient.snapshots)r   r   )r"   r   r*   r+   r)   r,   r"   r   
r*   r+   r4   r+   r3   r5   r)   r,   r"   r   r*   r+   r:   r+   r)   r,   r"   r	   r*   r+   r:   r+   r4   r5   rA   rB   r)   r,   r"   r   r*   r+   r:   r+   r)   r,   r"   r   r*   r+   r:   r+   r)   r,   r"   r
   __name__
__module____qualname__r    propertyr&   r.   OMITr8   r=   rD   rG   rI   rL   r   r   r   r   r      s(    

$.*4&%r   c                   @  r   )3AsyncChaptersClientr   r   c                C  r   r   )r   r   r   r   r   r   r   r   r    !  r!   zAsyncChaptersClient.__init__r"   r   c                 C  r#   )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawChaptersClient
        r$   r%   r   r   r   r&   &  r'   z%AsyncChaptersClient.with_raw_responseNr(   r*   r+   r)   r,   r   c                  s   | j j||dI dH }|jS )a  
        Returns a list of a Studio project's chapters.

        Parameters
        ----------
        project_id : str
            The ID of the Studio project.

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

        Returns
        -------
        GetChaptersResponse
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


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


        asyncio.run(main())
        r(   Nr-   r0   r   r   r   r.   1  s   &zAsyncChaptersClient.listr2   r4   r3   r5   r   c                  s"   | j j||||dI dH }|jS )a  
        Creates a new chapter either as blank or from a URL.

        Parameters
        ----------
        project_id : str
            The ID of the Studio project.

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

        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.

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

        Returns
        -------
        AddChapterResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.studio.projects.chapters.create(
                project_id="21m00Tcm4TlvDq8ikWAM",
                name="Chapter 1",
            )


        asyncio.run(main())
        r6   Nr7   r9   r   r   r   r8   Z  s
   2zAsyncChaptersClient.creater:   r	   c                      | j j|||dI dH }|jS )aa  
        Returns information about a specific chapter.

        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.

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

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

        Returns
        -------
        ChapterWithContentResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


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


        asyncio.run(main())
        r(   Nr<   r>   r   r   r   r=        *zAsyncChaptersClient.getr@   rA   rB   r   c                  s$   | j j|||||dI dH }|jS )a  
        Updates a chapter.

        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.

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

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

        content : typing.Optional[ChapterContentInputModel]
            The chapter content to use.

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

        Returns
        -------
        EditChapterResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


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


        asyncio.run(main())
        r@   NrC   rE   r   r   r   rD     s
   6
zAsyncChaptersClient.updater   c                  r[   )aD  
        Deletes a chapter.

        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.

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

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

        Returns
        -------
        DeleteChapterResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


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


        asyncio.run(main())
        r(   NrF   r>   r   r   r   rG     r\   zAsyncChaptersClient.deleter
   c                  r[   )a\  
        Starts conversion of a specific chapter.

        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.

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

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

        Returns
        -------
        ConvertChapterResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


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


        asyncio.run(main())
        r(   NrH   r>   r   r   r   rI   &  r\   zAsyncChaptersClient.convertc                 C  rJ   )Nr   )r   r   )r   rK   r   r   )r   r   r   r   r   rL   S  rM   zAsyncChaptersClient.snapshots)r   r   )r"   r   rN   rO   rP   rQ   rR   rS   rT   r   r   r   r   rZ      s*    
.82<.-rZ   )"
__future__r   typingcore.client_wrapperr   r   core.request_optionsr    types.add_chapter_response_modelr   !types.chapter_content_input_modelr   )types.chapter_with_content_response_modelr	   $types.convert_chapter_response_modelr
   #types.delete_chapter_response_modelr   !types.edit_chapter_response_modelr   types.get_chapters_responser   
raw_clientr   r   TYPE_CHECKINGrK   r   r   castAnyrY   r   rZ   r   r   r   r   <module>   s&     
