o
    lWi                     @   sz   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mZ e e jd	ZG d
d dZG dd dZdS )    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions)SegmentDeleteResponse)SegmentUpdateResponse   )AsyncRawSegmentClientRawSegmentClient.c                   @      e Zd ZdefddZedefddZeeeddd	e	d
e	de	de
je de
je de
je	 de
je defddZddd	e	d
e	de
je defddZdS )SegmentClientclient_wrapperc                C      t |d| _d S N)r   )r
   _raw_clientselfr    r   n/var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/elevenlabs/dubbing/resource/segment/client.py__init__      zSegmentClient.__init__returnc                 C      | j S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawSegmentClient
        r   r   r   r   r   with_raw_response      	zSegmentClient.with_raw_responseN
start_timeend_timetextrequest_options
dubbing_id
segment_idlanguager   r   r    r!   c          	   	   C   s    | j j|||||||d}|jS )a  
        Modifies a single segment with new text and/or start/end times. Will update the values for only a specific language of a segment. Does not automatically regenerate the dub.

        Parameters
        ----------
        dubbing_id : str
            ID of the dubbing project.

        segment_id : str
            ID of the segment

        language : str
            ID of the language.

        start_time : typing.Optional[float]

        end_time : typing.Optional[float]

        text : typing.Optional[str]

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

        Returns
        -------
        SegmentUpdateResponse
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.dubbing.resource.segment.update(
            dubbing_id="dubbing_id",
            segment_id="segment_id",
            language="language",
        )
        r   r   updatedata	r   r"   r#   r$   r   r   r    r!   	_responser   r   r   r&      s   4	zSegmentClient.updater!   c                C   s   | j j|||d}|jS )a  
        Deletes a single segment from the dubbing.

        Parameters
        ----------
        dubbing_id : str
            ID of the dubbing project.

        segment_id : str
            ID of the segment

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

        Returns
        -------
        SegmentDeleteResponse
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.dubbing.resource.segment.delete(
            dubbing_id="dubbing_id",
            segment_id="segment_id",
        )
        r*   r   deleter'   r   r"   r#   r!   r)   r   r   r   r,   ]   s   "zSegmentClient.delete)__name__
__module____qualname__r   r   propertyr
   r   OMITstrtypingOptionalfloatr   r   r&   r   r,   r   r   r   r   r      sF    	

@r   c                   @   r   )AsyncSegmentClientr   c                C   r   r   )r	   r   r   r   r   r   r      r   zAsyncSegmentClient.__init__r   c                 C   r   )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawSegmentClient
        r   r   r   r   r   r      r   z$AsyncSegmentClient.with_raw_responseNr   r"   r#   r$   r   r   r    r!   c          	   	      s(   | j j|||||||dI dH }|jS )a  
        Modifies a single segment with new text and/or start/end times. Will update the values for only a specific language of a segment. Does not automatically regenerate the dub.

        Parameters
        ----------
        dubbing_id : str
            ID of the dubbing project.

        segment_id : str
            ID of the segment

        language : str
            ID of the language.

        start_time : typing.Optional[float]

        end_time : typing.Optional[float]

        text : typing.Optional[str]

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

        Returns
        -------
        SegmentUpdateResponse
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.dubbing.resource.segment.update(
                dubbing_id="dubbing_id",
                segment_id="segment_id",
                language="language",
            )


        asyncio.run(main())
        r   Nr%   r(   r   r   r   r&      s   <	zAsyncSegmentClient.updater*   c                   s    | j j|||dI dH }|jS )a8  
        Deletes a single segment from the dubbing.

        Parameters
        ----------
        dubbing_id : str
            ID of the dubbing project.

        segment_id : str
            ID of the segment

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

        Returns
        -------
        SegmentDeleteResponse
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.dubbing.resource.segment.delete(
                dubbing_id="dubbing_id",
                segment_id="segment_id",
            )


        asyncio.run(main())
        r*   Nr+   r-   r   r   r   r,      s   *zAsyncSegmentClient.delete)r.   r/   r0   r   r   r1   r	   r   r2   r3   r4   r5   r6   r   r   r&   r   r,   r   r   r   r   r7      sF    	

Hr7   )r4   core.client_wrapperr   r   core.request_optionsr   types.segment_delete_responser   types.segment_update_responser   
raw_clientr	   r
   castAnyr2   r   r7   r   r   r   r   <module>   s   t