
    d{i$Z                         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 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)ApiResponse)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      l/home/sas/my/fyp/ringai/.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_instance7   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   r3   r'   r%   r!   r    r0   r0   5   s-    EDcN E7T E?# ?r!   r0   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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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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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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__J   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=   r:   r;   r=   r<   )r2   read_limitspagestreamr   r:   r;   r<   r=   limitsrA   s          r    rB   z InsightsConversationsList.streamU   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<   )r2   r@   
page_asyncstream_asyncrC   s          r    rG   z&InsightsConversationsList.stream_asyncv   sf     0 **5)<__'![) % 
 
 }}))$w@@
s   7AA$Ac                     | j                   j                  ||      }| j                  |||d         }| j                   j                  |j                  |d         }||j
                  |j                  fS )ar  
        Streams InsightsConversationsInstance and returns headers from first page


        :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: tuple of (generator, status_code, headers) where generator yields instances
        r=   r?   r<   )r2   r@   page_with_http_inforB   datastatus_codeheadersr   r:   r;   r<   r=   rD   page_response	generators           r    stream_with_http_infoz/InsightsConversationsList.stream_with_http_info   sx    , **5)<00'![) 1 
 MM((););VG_M	=44m6K6KLLr!   c                   K   | j                   j                  ||      }| j                  |||d          d{   }| j                   j                  |j                  |d         }||j
                  |j                  fS 7 Fw)a  
        Asynchronously streams InsightsConversationsInstance and returns headers from first page


        :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: tuple of (generator, status_code, headers) where generator yields instances
        r=   r?   Nr<   )r2   r@   page_with_http_info_asyncrG   rJ   rK   rL   rM   s           r    stream_with_http_info_asyncz5InsightsConversationsList.stream_with_http_info_async   s     , **5)<"<<'![) = 
 
 MM..}/A/A6'?S	=44m6K6KLL
s   7BB AB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
        r:   r;   r<   r=   )listrB   )r   r:   r;   r<   r=   s        r    rV   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
        rU   N)rG   )r   r:   r;   r<   r=   records         r    
list_asyncz$InsightsConversationsList.list_async   sZ     2 '+&7&7+%#	 '8 ' !
 
 !
 
 	
 
s0   =0=842
48=48=c                 f    | j                  ||||      \  }}}t        |      }t        |||      S )a]  
        Lists InsightsConversationsInstance and returns headers from first page


        :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: ApiResponse with list of instances, status code, and headers
        rU   rJ   rK   rL   )rP   rV   r   )	r   r:   r;   r<   r=   rO   rK   rL   itemss	            r    list_with_http_infoz-InsightsConversationsList.list_with_http_info  sG    , +/*D*D'!	 +E +
'	; Y;PPr!   c                    K   | j                  ||||       d{   \  }}}|2 cg c3 d{   }|7 7 	6 nc c}w }	}t        |	||      S w)al  
        Asynchronously lists InsightsConversationsInstance and returns headers from first page


        :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: ApiResponse with list of instances, status code, and headers
        rU   Nr[   )rS   r   )
r   r:   r;   r<   r=   rO   rK   rL   rX   r\   s
             r    list_with_http_info_asyncz3InsightsConversationsList.list_with_http_info_async7  sl     , 150P0P'!	 1Q 1
 +
'	; -666&+
 7666;PPs4   A6A<:8
:<A:<A
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rd   zContent-Typeapplication/jsonAcceptGETmethoduriparamsrL   )r   ofr2   rA   r9   r0   	r   r:   r;   r`   ra   r=   rJ   rL   responses	            r    rA   zInsightsConversationsList.pageV  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
        rc   rh   ri   rj   rk   rl   rm   N)r   rq   r2   rF   r9   r0   rr   s	            r    rF   z$InsightsConversationsList.page_async  s     ( yy!.''#%
 ))!. C
 /11diig 2 
 
 )AA
s   A%B'B(Bc                    t        j                  |||||d      }t        j                  |dd      }d|d<   | j                  j                  d| j                  ||      \  }}	}
t        | j                  |      }t        ||	|
      S )	a  
        Retrieve a single page with response metadata


        :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: ApiResponse with InsightsConversationsPage, status code, and headers
        rc   rh   ri   rj   rk   rl   rm   r[   )r   rq   r2   page_with_response_infor9   r0   r   r   r:   r;   r`   ra   r=   rJ   rL   rs   rK   response_headersrA   s               r    rI   z-InsightsConversationsList.page_with_http_info  s    ( yy!.''#%
 ))!. C
 /26--2W2Wdiig 3X 3
/+/ )A+GWXXr!   c                 0  K   t        j                  |||||d      }t        j                  |dd      }d|d<   | j                  j                  d| j                  ||       d{   \  }}	}
t        | j                  |      }t        ||	|
	      S 7 ,w)
a!  
        Asynchronously retrieve a single page with response metadata


        :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: ApiResponse with InsightsConversationsPage, status code, and headers
        rc   rh   ri   rj   rk   rl   rm   Nr[   )r   rq   r2   page_with_response_info_asyncr9   r0   r   rw   s               r    rR   z3InsightsConversationsList.page_with_http_info_async  s     ( yy!.''#%
 ))!. C
 / --==$))D' >   	0+/
 )A+GWXX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
        rl   )r2   domaintwiliorequestr0   r   r{   rs   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
        rl   N)r2   r}   r~   request_asyncr0   r   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__"  r5   r!   )#r(   r)   r*   r   r   r   unsetr   r,   objectr   intr   r   rB   r	   rG   tuplerP   rS   r   rV   rY   r   r]   r_   r0   rA   rF   rI   rR   r   r   r'   r-   r.   s   @r    r7   r7   H   s   	. 	. -3LL)/##';S&[); #v+&; }	;
 C=; 
/	0;F -3LL)/##'AS&[)A #v+&A }	A
 C=A 
4	5AF -3LL)/##'MS&[)M #v+&M }	M
 C=M 
MD -3LL)/##'MS&[)M #v+&M }	M
 C=M 
MD -3LL)/##'
S&[)
 #v+&
 }	

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

 C=
 
+	,
F -3LL)/##'QS&[)Q #v+&Q }	Q
 C=Q 
QB -3LL)/##'QS&[)Q #v+&Q }	Q
 C=Q 
QB -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\ -3LL)/)/*0,,(.+YS&[)+Y #v+&+Y #v+&	+Y
 3;'+Y f%+Y 
+Y^ -3LL)/)/*0,,(.-YS&[)-Y #v+&-Y #v+&	-Y
 3;'-Y f%-Y 
-Y^
B3 
B+D 
B
Bs 
B7P 
B?# ?r!   r7   N)r+   typingr   r   r   r   r   r   r	   twilio.baser
   r   twilio.base.api_responser   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r0   r7   r%   r!   r    <module>r      sQ    M L L + 0 : 2 ' !C$4 C8? ?&`? `?r!   