
    pi[4                         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 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 - Flex
    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values)InstanceResource)ListResource)Version)Pagec                   B     e Zd ZdZdedeeef   f fdZdefdZ	 xZ
S )InsightsConversationsInstancez
    :ivar account_id: The id of the account.
    :ivar conversation_id: The unique id of the conversation
    :ivar segment_count: The count of segments for a conversation
    :ivar segments: The Segments of a conversation
    versionpayloadc                     t         |   |       |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        |j                  d      | _        y )N
account_idconversation_idsegment_countsegments)	super__init__getr   r   r
   integerr   r   )selfr   r   	__class__s      p/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/flex_api/v1/insights_conversations.pyr   z&InsightsConversationsInstance.__init__    sd    !)0\)B.5kk:K.L,7,?,?KK(-
 <C;;z;R    returnc                      y)f
        Provide a friendly representation

        :returns: Machine friendly representation
        z1<Twilio.FlexApi.V1.InsightsConversationsInstance> r   s    r   __repr__z&InsightsConversationsInstance.__repr__*   s     Cr    )__name__
__module____qualname____doc__r   r   strr   r   r&   __classcell__r   s   @r   r   r      s4    S S$sCx. SC# Cr    r   c                   2    e Zd Zdeeef   defdZdefdZy)InsightsConversationsPager   r!   c                 .    t        | j                  |      S )z{
        Build an instance of InsightsConversationsInstance

        :param payload: Payload response from the API
        )r   _version)r   r   s     r   get_instancez&InsightsConversationsPage.get_instance6   s     -T]]GDDr    c                      y)r#   z-<Twilio.FlexApi.V1.InsightsConversationsPage>r$   r%   s    r   r&   z"InsightsConversationsPage.__repr__>        ?r    N)	r'   r(   r)   r   r+   r   r   r2   r&   r$   r    r   r/   r/   4   s-    EDcN E7T E?# ?r    r/   c                       e Zd Z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 )InsightsConversationsListr   c                 2    t         |   |       d| _        y)zw
        Initialize the InsightsConversationsList

        :param version: Version that contains the resource

        z/Insights/ConversationsN)r   r   _uri)r   r   r   s     r   r   z"InsightsConversationsList.__init__I   s     	!-	r    Nauthorization
segment_idlimit	page_sizer!   c                     | j                   j                  ||      }| j                  |||d         }| j                   j                  ||d         S )a  
        Streams InsightsConversationsInstance 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 str authorization: The Authorization HTTP request header
        :param str segment_id: Unique Id of the segment for which conversation details needs to be fetched
        :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
        r<   r9   r:   r<   r;   )r1   read_limitspagestreamr   r9   r:   r;   r<   limitsr@   s          r   rA   z InsightsConversationsList.streamT   sX    0 **5)<yy'![)  
 }}##D&/::r    c                    K   | j                   j                  ||      }| j                  |||d          d{   }| j                   j                  ||d         S 7 #w)a-  
        Asynchronously streams InsightsConversationsInstance 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 str authorization: The Authorization HTTP request header
        :param str segment_id: Unique Id of the segment for which conversation details needs to be fetched
        :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
        r<   r>   Nr;   )r1   r?   
page_asyncstream_asyncrB   s          r   rF   z&InsightsConversationsList.stream_asyncu   sf     0 **5)<__'![) % 
 
 }}))$w@@
s   7AA$Ac                 >    t        | j                  ||||            S )a  
        Lists InsightsConversationsInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str authorization: The Authorization HTTP request header
        :param str segment_id: Unique Id of the segment for which conversation details needs to be fetched
        :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
        r9   r:   r;   r<   )listrA   )r   r9   r:   r;   r<   s        r   rI   zInsightsConversationsList.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 InsightsConversationsInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str authorization: The Authorization HTTP request header
        :param str segment_id: Unique Id of the segment for which conversation details needs to be fetched
        :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
        rH   N)rF   )r   r9   r:   r;   r<   records         r   
list_asyncz$InsightsConversationsList.list_async   sZ     2 '+&7&7+%#	 '8 ' !
 
 !
 
 	
 
s0   =0=842
48=48=
page_tokenpage_numberc                     t        j                  |||||d      }t        j                  |dd      }d|d<   | j                  j                  d| j                  ||      }t        | j                  |      S )a:  
        Retrieve a single page of InsightsConversationsInstance records from the API.
        Request is executed immediately

        :param authorization: The Authorization HTTP request header
        :param segment_id: Unique Id of the segment for which conversation details needs to be fetched
        :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 InsightsConversationsInstance
        Authorization	SegmentId	PageTokenr   PageSize!application/x-www-form-urlencodedrQ   zContent-Typeapplication/jsonAcceptGETmethoduriparamsheaders)r   ofr1   r@   r8   r/   	r   r9   r:   rM   rN   r<   datar^   responses	            r   r@   zInsightsConversationsList.page   s    ( yy!.''#%
 ))!. C
 /==%%diig & 
 )AAr    c                   K   t        j                  |||||d      }t        j                  |dd      }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  |      S 7 w)	aI  
        Asynchronously retrieve a single page of InsightsConversationsInstance records from the API.
        Request is executed immediately

        :param authorization: The Authorization HTTP request header
        :param segment_id: Unique Id of the segment for which conversation details needs to be fetched
        :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 InsightsConversationsInstance
        rP   rU   rV   rW   rX   rY   rZ   N)r   r_   r1   rE   r8   r/   r`   s	            r   rE   z$InsightsConversationsList.page_async  s     ( yy!.''#%
 ))!. C
 /11diig 2 
 
 )AA
s   A%B'B(B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   |      S )a  
        Retrieve a specific page of InsightsConversationsInstance records from the API.
        Request is executed immediately

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

        :returns: Page of InsightsConversationsInstance
        rY   )r1   domaintwiliorequestr/   r   rd   rb   s      r   get_pagez"InsightsConversationsList.get_page/  s7     ==''..66ujI(AAr    c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   |      S 7 w)a  
        Asynchronously retrieve a specific page of InsightsConversationsInstance records from the API.
        Request is executed immediately

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

        :returns: Page of InsightsConversationsInstance
        rY   N)r1   rf   rg   request_asyncr/   ri   s      r   get_page_asyncz(InsightsConversationsList.get_page_async;  sD      --44BB5*UU(AA Vs   4AAAc                      y)r#   z-<Twilio.FlexApi.V1.InsightsConversationsList>r$   r%   s    r   r&   z"InsightsConversationsList.__repr__G  r4   r    )r'   r(   r)   r   r   r   unsetr   r+   objectr   intr   r   rA   r	   rF   r   rI   rL   r/   r@   rE   rj   rm   r&   r,   r-   s   @r   r6   r6   G   s1   	. 	. -3LL)/##';S&[); #v+&; }	;
 C=; 
/	0;F -3LL)/##'AS&[)A #v+&A }	A
 C=A 
4	5AF -3LL)/##'
S&[)
 #v+&
 }	

 C=
 
+	,
D -3LL)/##'
S&[)
 #v+&
 }	

 C=
 
+	,
F -3LL)/)/*0,,(.*BS&[)*B #v+&*B #v+&	*B
 3;'*B f%*B 
#*B\ -3LL)/)/*0,,(.*BS&[)*B #v+&*B #v+&	*B
 3;'*B f%*B 
#*BX
B3 
B+D 
B
Bs 
B7P 
B?# ?r    r6   N)r*   typingr   r   r   r   r   r   r	   twilio.baser
   r   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r/   r6   r$   r    r   <module>rx      sN    M L L + : 2 ' !C$4 C8? ?&F? F?r    