
    C%h":                         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         |   |       t        j                  |j	                  d            | _        t        j                  |j	                  d            | _        t        j                  |j	                  d            | _        t        j                  |j	                  d            | _	        |j	                  d      | _
        |j	                  d      | _        t        j                  |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   decimalr   r   r   r   r   r   	_solution)selfr   r   r   	__class__s       u/var/www/html/Kila-kolis-project/venv/lib/python3.12/site-packages/twilio/rest/intelligence/v2/transcript/sentence.pyr    zSentenceInstance.__init__$   s    !,7,?,?KK(-
 .9-@-@KK().
 ,7+>+>KK%,
 *5)<)<W[[=T)U)0\)B")++e"4+6+>+>KK%,
 9@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>B   s"     S<RDAq7>>!Q/<Rs   !z,<Twilio.Intelligence.V2.SentenceInstance {}>)joinr$   itemsr.   )r%   contexts     r'   __repr__zSentenceInstance.__repr__<   s6     ((SDNN<P<P<RSS=DDWMMr(   )__name__
__module____qualname____doc__r   r   strr   r    r6   __classcell__r&   s   @r'   r   r      s9    	
 
$sCx. 
RU 
0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_instanceH   s&      MM74>>BR3S
 	
r(   c                      y)r+   z%<Twilio.Intelligence.V2.SentencePage> r%   s    r'   r6   zSentencePage.__repr__R        7r(   N)	r7   r8   r9   r   r;   r   r   rB   r6   rD   r(   r'   r?   r?   F   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}/SentencesNrD   )r   r    r$   r.   _uri)r%   r   r   r&   s      r'   r    zSentenceList.__init__]   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
        rN   rK   rL   rN   rM   )rA   read_limitspagestreamr%   rK   rL   rM   rN   limitsrR   s          r'   rS   zSentenceList.streamm   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
        rN   rP   NrM   )rA   rQ   
page_asyncstream_asyncrT   s          r'   rX   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
        rK   rL   rM   rN   )listrS   )r%   rK   rL   rM   rN   s        r'   r[   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
        rZ   N)rX   )r%   rK   rL   rM   rN   records         r'   
list_asynczSentenceList.list_async   s_     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_stringrA   rR   rJ   r?   r$   	r%   rK   rL   r_   r`   rN   datarp   responses	            r'   rR   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
        rb   rg   rh   ri   rj   rk   rl   N)	r   rq   r   rr   rA   rW   rJ   r?   r$   rs   s	            r'   rW   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
        rk   )rA   domaintwiliorequestr?   r$   r%   rw   ru   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
        rk   N)rA   ry   rz   request_asyncr?   r$   r|   s      r'   get_page_asynczSentenceList.get_page_asyncJ  sJ      --44BB5*UUDMM8T^^DD Vs   4AA&Ac                      y)r+   z%<Twilio.Intelligence.V2.SentenceList>rD   rE   s    r'   r6   zSentenceList.__repr__V  rF   r(   )r7   r8   r9   r   r;   r    r   unsetr   boolobjectr   intr   r   rS   r	   rX   r   r[   r^   r?   rR   rW   r}   r   r6   r<   r=   s   @r'   rH   rH   [   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(   rH   N)r:   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?   rH   rD   r(   r'   <module>r      sR    M L L 6 6 : 2 ' !+N' +N\74 7*A7< A7r(   