
    pi9                         d Z ddlmZmZmZmZmZmZmZ ddl	m
Z
mZmZ ddlmZ ddlmZ ddlmZ ddlmZ  G d d	e      Z G d
 de      Z G d de      Zy)a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Intelligence
    This is the public Twilio REST API.

    NOTE: This class is auto generated by OpenAPI Generator.
    https://openapi-generator.tech
    Do not edit the class manually.
    )AnyDictListOptionalUnionIteratorAsyncIterator)deserialize	serializevalues)InstanceResource)ListResource)Version)Pagec                   F     e Zd ZdZdedeeef   def fdZdefdZ	 xZ
S )SentenceInstancea  
    :ivar media_channel: The channel number.
    :ivar sentence_index: The index of the sentence in the transcript.
    :ivar start_time: Offset from the beginning of the transcript when this sentence starts.
    :ivar end_time: Offset from the beginning of the transcript when this sentence ends.
    :ivar transcript: Transcript text.
    :ivar sid: A 34 character string that uniquely identifies this Sentence.
    :ivar confidence:
    :ivar words: Detailed information for each of the words of the given Sentence.
    versionpayloadtranscript_sidc                    t         |   |       t        j                  |j	                  d            | _        t        j                  |j	                  d            | _        |j	                  d      | _        |j	                  d      | _        |j	                  d      | _	        |j	                  d      | _
        |j	                  d      | _        |j	                  d      | _        d	|i| _        y )
Nmedia_channelsentence_index
start_timeend_time
transcriptsid
confidencewordsr   )super__init__r
   integergetr   r   r   r   r   r   r   r   	_solution)selfr   r   r   	__class__s       q/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/intelligence/v2/transcript/sentence.pyr    zSentenceInstance.__init__$   s    !,7,?,?KK(-
 .9-@-@KK().
 *1\)B'.{{:'>)0\)B")++e"4)0\)B8?G8L
 n
    returnc                     dj                  d | j                  j                         D              }dj                  |      S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c              3   F   K   | ]  \  }}d j                  ||        yw)z{}={}N)format).0kvs      r&   	<genexpr>z,SentenceInstance.__repr__.<locals>.<genexpr>>   s     SDAq7>>!Q/Ss   !z,<Twilio.Intelligence.V2.SentenceInstance {}>)joinr#   itemsr-   )r$   contexts     r&   __repr__zSentenceInstance.__repr__8   s6     ((SDNN<P<P<RSS=DDWMMr'   )__name__
__module____qualname____doc__r   r   strr   r    r5   __classcell__r%   s   @r&   r   r      s9    	
 
$sCx. 
RU 
(N# Nr'   r   c                   2    e Zd Zdeeef   defdZdefdZy)SentencePager   r(   c                 L    t        | j                  || j                  d         S )zn
        Build an instance of SentenceInstance

        :param payload: Payload response from the API
        r   )r   )r   _versionr#   )r$   r   s     r&   get_instancezSentencePage.get_instanceD   s&      MM74>>BR3S
 	
r'   c                      y)r*   z%<Twilio.Intelligence.V2.SentencePage> r$   s    r&   r5   zSentencePage.__repr__N        7r'   N)	r6   r7   r8   r   r:   r   r   rA   r5   rC   r'   r&   r>   r>   B   s*    
DcN 
7G 
7# 7r'   r>   c                       e Zd Zdedef fdZej                  ej                  ddfdee	e
f   dee	e
f   dee   dee   d	ee   f
d
Zej                  ej                  ddfdee	e
f   dee	e
f   dee   dee   d	ee   f
dZej                  ej                  ddfdee	e
f   dee	e
f   dee   dee   d	ee   f
dZej                  ej                  ddfdee	e
f   dee	e
f   dee   dee   d	ee   f
dZej                  ej                  ej                  ej                  ej                  fdee	e
f   dee	e
f   deee
f   deee
f   deee
f   d	efdZej                  ej                  ej                  ej                  ej                  fdee	e
f   dee	e
f   deee
f   deee
f   deee
f   d	efdZded	efdZded	efdZd	efdZ xZS )SentenceListr   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the SentenceList

        :param version: Version that contains the resource
        :param transcript_sid: The unique SID identifier of the Transcript.

        r   z'/Transcripts/{transcript_sid}/SentencesNrC   )r   r    r#   r-   _uri)r$   r   r   r%   s      r&   r    zSentenceList.__init__Y   sA     	! n
 E=DDVt~~V	r'   Nredactedword_timestampslimit	page_sizer(   c                     | j                   j                  ||      }| j                  |||d         }| j                   j                  ||d         S )a  
        Streams SentenceInstance records from the API as a generator stream.
        This operation lazily loads records as efficiently as possible until the limit
        is reached.
        The results are returned as a generator, so this operation is memory efficient.

        :param bool redacted: Grant access to PII Redacted/Unredacted Sentences. If redaction is enabled, the default is `true` to access redacted sentences.
        :param bool word_timestamps: Returns word level timestamps information, if word_timestamps is enabled. The default is `false`.
        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, stream() will attempt to read the
                          limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        rM   rJ   rK   rM   rL   )r@   read_limitspagestreamr$   rJ   rK   rL   rM   limitsrQ   s          r&   rR   zSentenceList.streami   sX    0 **5)<yy+[)  
 }}##D&/::r'   c                    K   | j                   j                  ||      }| j                  |||d          d{   }| j                   j                  ||d         S 7 #w)a  
        Asynchronously streams SentenceInstance records from the API as a generator stream.
        This operation lazily loads records as efficiently as possible until the limit
        is reached.
        The results are returned as a generator, so this operation is memory efficient.

        :param bool redacted: Grant access to PII Redacted/Unredacted Sentences. If redaction is enabled, the default is `true` to access redacted sentences.
        :param bool word_timestamps: Returns word level timestamps information, if word_timestamps is enabled. The default is `false`.
        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, stream() will attempt to read the
                          limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        rM   rO   NrL   )r@   rP   
page_asyncstream_asyncrS   s          r&   rW   zSentenceList.stream_async   sf     0 **5)<__+[) % 
 
 }}))$w@@
s   7AA$Ac                 >    t        | j                  ||||            S )a   
        Lists SentenceInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param bool redacted: Grant access to PII Redacted/Unredacted Sentences. If redaction is enabled, the default is `true` to access redacted sentences.
        :param bool word_timestamps: Returns word level timestamps information, if word_timestamps is enabled. The default is `false`.
        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, list() will attempt to read the limit
                          with the most efficient page size, i.e. min(limit, 1000)

        :returns: list that will contain up to limit results
        rJ   rK   rL   rM   )listrR   )r$   rJ   rK   rL   rM   s        r&   rZ   zSentenceList.list   s.    . KK! /#	  
 	
r'   c                 ~   K   | j                  ||||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)a/  
        Asynchronously lists SentenceInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param bool redacted: Grant access to PII Redacted/Unredacted Sentences. If redaction is enabled, the default is `true` to access redacted sentences.
        :param bool word_timestamps: Returns word level timestamps information, if word_timestamps is enabled. The default is `false`.
        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, list() will attempt to read the limit
                          with the most efficient page size, i.e. min(limit, 1000)

        :returns: list that will contain up to limit results
        rY   N)rW   )r$   rJ   rK   rL   rM   records         r&   
list_asynczSentenceList.list_async   sZ     2 '+&7&7! /#	 '8 ' !
 
 !
 
 	
 
s0   =0=842
48=48=
page_tokenpage_numberc                 P   t        j                  t        j                  |      t        j                  |      |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                        S )a  
        Retrieve a single page of SentenceInstance records from the API.
        Request is executed immediately

        :param redacted: Grant access to PII Redacted/Unredacted Sentences. If redaction is enabled, the default is `true` to access redacted sentences.
        :param word_timestamps: Returns word level timestamps information, if word_timestamps is enabled. The default is `false`.
        :param page_token: PageToken provided by the API
        :param page_number: Page Number, this value is simply for client state
        :param page_size: Number of records to return, defaults to 50

        :returns: Page of SentenceInstance
        RedactedWordTimestamps	PageTokenr   PageSizeContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptGETmethoduriparamsheaders)	r   ofr   boolean_to_stringr@   rQ   rI   r>   r#   	r$   rJ   rK   r^   r_   rM   dataro   responses	            r&   rQ   zSentenceList.page   s    ( yy%77A"+"="=o"N'#%
 ))^-PQR.==%%diig & 
 DMM8T^^DDr'   c                 l  K   t        j                  t        j                  |      t        j                  |      |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                        S 7 %w)	a  
        Asynchronously retrieve a single page of SentenceInstance records from the API.
        Request is executed immediately

        :param redacted: Grant access to PII Redacted/Unredacted Sentences. If redaction is enabled, the default is `true` to access redacted sentences.
        :param word_timestamps: Returns word level timestamps information, if word_timestamps is enabled. The default is `false`.
        :param page_token: PageToken provided by the API
        :param page_number: Page Number, this value is simply for client state
        :param page_size: Number of records to return, defaults to 50

        :returns: Page of SentenceInstance
        ra   rf   rg   rh   ri   rj   rk   N)	r   rp   r   rq   r@   rV   rI   r>   r#   rr   s	            r&   rV   zSentenceList.page_async  s     ( yy%77A"+"="=o"N'#%
 ))^-PQR.11diig 2 
 
 DMM8T^^DD
s   B
B4B2&B4
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )z
        Retrieve a specific page of SentenceInstance records from the API.
        Request is executed immediately

        :param target_url: API-generated URL for the requested results page

        :returns: Page of SentenceInstance
        rj   )r@   domaintwiliorequestr>   r#   r$   rv   rt   s      r&   get_pagezSentenceList.get_page:  s=     ==''..66ujIDMM8T^^DDr'   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)a  
        Asynchronously retrieve a specific page of SentenceInstance records from the API.
        Request is executed immediately

        :param target_url: API-generated URL for the requested results page

        :returns: Page of SentenceInstance
        rj   N)r@   rx   ry   request_asyncr>   r#   r{   s      r&   get_page_asynczSentenceList.get_page_asyncF  sJ      --44BB5*UUDMM8T^^DD Vs   4AA&Ac                      y)r*   z%<Twilio.Intelligence.V2.SentenceList>rC   rD   s    r&   r5   zSentenceList.__repr__R  rE   r'   )r6   r7   r8   r   r:   r    r   unsetr   boolobjectr   intr   r   rR   r	   rW   r   rZ   r]   r>   rQ   rV   r|   r   r5   r;   r<   s   @r&   rG   rG   W   s9   W W W$ )//5||##';f%; tV|,; }	;
 C=; 
"	#;F )//5||##'Af%A tV|,A }	A
 C=A 
'	(AF )//5||##'
f%
 tV|,
 }	

 C=
 
	
D )//5||##'
f%
 tV|,
 }	

 C=
 
	
F )//5||)/*0,,(.%Ef%%E tV|,%E #v+&	%E
 3;'%E f%%E 
%ER )//5||)/*0,,(.%Ef%%E tV|,%E #v+&	%E
 3;'%E f%%E 
%EN
E3 
E< 
E
Es 
E| 
E7# 7r'   rG   N)r9   typingr   r   r   r   r   r   r	   twilio.baser
   r   r   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r>   rG   rC   r'   r&   <module>r      sR    M L L 6 6 : 2 ' !'N' 'NT74 7*A7< A7r'   