
    piR@                         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)	serialize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 )InsightsSegmentsInstancea  
    :ivar segment_id: To unique id of the segment
    :ivar external_id: The unique id for the conversation.
    :ivar queue:
    :ivar external_contact:
    :ivar external_segment_link_id: The uuid for the external_segment_link.
    :ivar date: The date of the conversation.
    :ivar account_id: The unique id for the account.
    :ivar external_segment_link: The hyperlink to recording of the task event.
    :ivar agent_id: The unique id for the agent.
    :ivar agent_phone: The phone number of the agent.
    :ivar agent_name: The name of the agent.
    :ivar agent_team_name: The team name to which agent belongs.
    :ivar agent_team_name_in_hierarchy: he team name to which agent belongs.
    :ivar agent_link: The link to the agent conversation.
    :ivar customer_phone: The phone number of the customer.
    :ivar customer_name: The name of the customer.
    :ivar customer_link: The link to the customer conversation.
    :ivar segment_recording_offset: The offset value for the recording.
    :ivar media: The media identifiers of the conversation.
    :ivar assessment_type: The type of the assessment.
    :ivar assessment_percentage: The percentage scored on the Assessments.
    :ivar url:
    versionpayloadc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _	        |j                  d      | _
        |j                  d	      | _        |j                  d
      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        y )N
segment_idexternal_idqueueexternal_contactexternal_segment_link_iddate
account_idexternal_segment_linkagent_idagent_phone
agent_nameagent_team_nameagent_team_name_in_hierarchy
agent_linkcustomer_phonecustomer_namecustomer_linksegment_recording_offsetmediaassessment_typeassessment_percentageurl)super__init__getr   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   )selfr   r   	__class__s      k/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/flex_api/v1/insights_segments.pyr,   z!InsightsSegmentsInstance.__init__2   s   !)0\)B*1++m*D$+KK$8
/6{{;M/N7>{{&8
% $+;;v#6	)0\)B4;KK@W4X"'.{{:'>*1++m*D)0\)B.5kk:K.L;B;;*<
) *1\)B-4[[9I-J,3KK,H,3KK,H7>{{&8
% 3:++g2F
<CKK=
 CJ++#C
" #*++e"4    returnc                      y)f
        Provide a friendly representation

        :returns: Machine friendly representation
        z,<Twilio.FlexApi.V1.InsightsSegmentsInstance> r.   s    r0   __repr__z!InsightsSegmentsInstance.__repr__V   s     >r1   )__name__
__module____qualname____doc__r   r   strr   r,   r7   __classcell__r/   s   @r0   r   r      s0    2"5 "5$sCx. "5H># >r1   r   c                   2    e Zd Zdeeef   defdZdefdZy)InsightsSegmentsPager   r2   c                 .    t        | j                  |      S )zv
        Build an instance of InsightsSegmentsInstance

        :param payload: Payload response from the API
        )r   _version)r.   r   s     r0   get_instancez!InsightsSegmentsPage.get_instanceb   s     (w??r1   c                      y)r4   z(<Twilio.FlexApi.V1.InsightsSegmentsPage>r5   r6   s    r0   r7   zInsightsSegmentsPage.__repr__j        :r1   N)	r8   r9   r:   r   r<   r   r   rC   r7   r5   r1   r0   r@   r@   `   s-    @DcN @7O @:# :r1   r@   c                       e Zd Zdef fdZej                  ej                  ej                  ddfdeee	f   deee	f   dee
e   e	f   dee   dee   d	ee   fd
Zej                  ej                  ej                  ddfdeee	f   deee	f   dee
e   e	f   dee   dee   d	ee   fdZej                  ej                  ej                  ddfdeee	f   deee	f   dee
e   e	f   dee   dee   d	e
e   fdZej                  ej                  ej                  ddfdeee	f   deee	f   de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                  ej                  fdeee	f   deee	f   de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                  ej                  fdeee	f   deee	f   de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 )InsightsSegmentsListr   c                 2    t         |   |       d| _        y)zr
        Initialize the InsightsSegmentsList

        :param version: Version that contains the resource

        z/Insights/SegmentsN)r+   r,   _uri)r.   r   r/   s     r0   r,   zInsightsSegmentsList.__init__u   s     	!(	r1   Nauthorizationr   reservation_idlimit	page_sizer2   c                     | j                   j                  ||      }| j                  ||||d         }| j                   j                  ||d         S )a.  
        Streams InsightsSegmentsInstance 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: To unique id of the segment
        :param List[str] reservation_id: The list of reservation Ids
        :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   r   rK   rM   rL   )rB   read_limitspagestreamr.   rJ   r   rK   rL   rM   limitsrQ   s           r0   rR   zInsightsSegmentsList.stream   s[    4 **5)<yy'!)[)	  
 }}##D&/::r1   c                    K   | j                   j                  ||      }| j                  ||||d          d{   }| j                   j                  ||d         S 7 #w)a=  
        Asynchronously streams InsightsSegmentsInstance 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: To unique id of the segment
        :param List[str] reservation_id: The list of reservation Ids
        :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   )rB   rP   
page_asyncstream_asyncrS   s           r0   rW   z!InsightsSegmentsList.stream_async   si     4 **5)<__'!)[)	 % 
 
 }}))$w@@
s   8A A$A c           	      @    t        | j                  |||||            S )a  
        Lists InsightsSegmentsInstance 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: To unique id of the segment
        :param List[str] reservation_id: The list of reservation Ids
        :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   r   rK   rL   rM   )listrR   )r.   rJ   r   rK   rL   rM   s         r0   rZ   zInsightsSegmentsList.list   s1    2 KK+%-#  
 	
r1   c                    K   | j                  |||||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)a  
        Asynchronously lists InsightsSegmentsInstance 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: To unique id of the segment
        :param List[str] reservation_id: The list of reservation Ids
        :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   r   rK   rL   rM   records          r0   
list_asynczInsightsSegmentsList.list_async   s]     6 '+&7&7+%-# '8 ' !	
 	
 !	
 	
 		
 	
s0   >1>953
59>59>
page_tokenpage_numberc           	         t        j                  ||t        j                  |d       |||d      }t        j                  |dd      }d|d<   | j                  j                  d| j                  ||      }	t        | j                  |	      S )	a;  
        Retrieve a single page of InsightsSegmentsInstance records from the API.
        Request is executed immediately

        :param authorization: The Authorization HTTP request header
        :param segment_id: To unique id of the segment
        :param reservation_id: The list of reservation Ids
        :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 InsightsSegmentsInstance
        c                     | S Nr5   es    r0   <lambda>z+InsightsSegmentsList.page.<locals>.<lambda>)       r1   Authorization	SegmentIdReservationId	PageTokenr   PageSize!application/x-www-form-urlencodedrh   zContent-Typeapplication/jsonAcceptGETmethoduriparamsheaders)r   ofr
   maprB   rQ   rI   r@   
r.   rJ   r   rK   r^   r_   rM   datarv   responses
             r0   rQ   zInsightsSegmentsList.page  s    , yy!.'!*~{!K'#%	
 ))!. C
 /==%%diig & 
 $DMM8<<r1   c           	      8  K   t        j                  ||t        j                  |d       |||d      }t        j                  |dd      }d|d<   | j                  j                  d| j                  ||       d	{   }	t        | j                  |	      S 7 w)
aJ  
        Asynchronously retrieve a single page of InsightsSegmentsInstance records from the API.
        Request is executed immediately

        :param authorization: The Authorization HTTP request header
        :param segment_id: To unique id of the segment
        :param reservation_id: The list of reservation Ids
        :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 InsightsSegmentsInstance
        c                     | S rb   r5   rc   s    r0   re   z1InsightsSegmentsList.page_async.<locals>.<lambda>X  rf   r1   rg   rm   rn   ro   rp   rq   rr   N)r   rw   r
   rx   rB   rV   rI   r@   ry   s
             r0   rV   zInsightsSegmentsList.page_async>  s     , yy!.'!*~{!K'#%	
 ))!. C
 /11diig 2 
 
 $DMM8<<
s   A;B=B>B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   |      S )a  
        Retrieve a specific page of InsightsSegmentsInstance records from the API.
        Request is executed immediately

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

        :returns: Page of InsightsSegmentsInstance
        rq   )rB   domaintwiliorequestr@   r.   r~   r{   s      r0   get_pagezInsightsSegmentsList.get_pagem  s7     ==''..66ujI#DMM8<<r1   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   |      S 7 w)a  
        Asynchronously retrieve a specific page of InsightsSegmentsInstance records from the API.
        Request is executed immediately

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

        :returns: Page of InsightsSegmentsInstance
        rq   N)rB   r   r   request_asyncr@   r   s      r0   get_page_asyncz#InsightsSegmentsList.get_page_asyncy  sD      --44BB5*UU#DMM8<< Vs   4AAAc                      y)r4   z(<Twilio.FlexApi.V1.InsightsSegmentsList>r5   r6   s    r0   r7   zInsightsSegmentsList.__repr__  rE   r1   )r8   r9   r:   r   r,   r   unsetr   r<   objectr   r   intr   r   rR   r	   rW   rZ   r]   r@   rQ   rV   r   r   r7   r=   r>   s   @r0   rG   rG   s   s   	) 	) -3LL)/39<<##'";S&[)"; #v+&"; d3i/0	";
 }"; C="; 
*	+";L -3LL)/39<<##'"AS&[)"A #v+&"A d3i/0	"A
 }"A C="A 
/	0"AL -3LL)/39<<##'!
S&[)!
 #v+&!
 d3i/0	!

 }!
 C=!
 
&	'!
J -3LL)/39<<##'"
S&[)"
 #v+&"
 d3i/0	"

 }"
 C="
 
&	'"
L -3LL)/39<<)/*0,,(.-=S&[)-= #v+&-= d3i/0	-=
 #v+&-= 3;'-= f%-= 
-=b -3LL)/39<<)/*0,,(.-=S&[)-= #v+&-= d3i/0	-=
 #v+&-= 3;'-= f%-= 
-=^
=3 
=+? 
=
=s 
=7K 
=:# :r1   rG   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@   rG   r5   r1   r0   <module>r      sO    M L L ) : 2 ' !E>/ E>P:4 :&X:< X:r1   