
    d{i)i                         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)	serialize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 )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      g/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/rest/flex_api/v1/insights_segments.pyr-   z!InsightsSegmentsInstance.__init__3   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    r1   __repr__z!InsightsSegmentsInstance.__repr__W   s     >r2   )__name__
__module____qualname____doc__r   r   strr   r-   r8   __classcell__r0   s   @r1   r   r      s0    2"5 "5$sCx. "5H># >r2   r   c                   2    e Zd Zdeeef   defdZdefdZy)InsightsSegmentsPager   r3   c                 .    t        | j                  |      S )zv
        Build an instance of InsightsSegmentsInstance

        :param payload: Payload response from the API
        )r   _version)r/   r   s     r1   get_instancez!InsightsSegmentsPage.get_instancec   s     (w??r2   c                      y)r5   z(<Twilio.FlexApi.V1.InsightsSegmentsPage>r6   r7   s    r1   r8   zInsightsSegmentsPage.__repr__k        :r2   N)	r9   r:   r;   r   r=   r   r   rD   r8   r6   r2   r1   rA   rA   a   s-    @DcN @7O @:# :r2   rA   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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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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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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   r0   s     r1   r-   zInsightsSegmentsList.__init__v   s     	!(	r2   Nauthorizationr   reservation_idlimit	page_sizer3   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
        rN   rK   r   rL   rN   rM   )rC   read_limitspagestreamr/   rK   r   rL   rM   rN   limitsrR   s           r1   rS   zInsightsSegmentsList.stream   s[    4 **5)<yy'!)[)	  
 }}##D&/::r2   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
        rN   rP   NrM   )rC   rQ   
page_asyncstream_asyncrT   s           r1   rX   z!InsightsSegmentsList.stream_async   si     4 **5)<__'!)[)	 % 
 
 }}))$w@@
s   8A A$A c                     | j                   j                  ||      }| j                  ||||d         }| j                   j                  |j                  |d         }||j
                  |j                  fS )a  
        Streams InsightsSegmentsInstance and returns headers from first page


        :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: tuple of (generator, status_code, headers) where generator yields instances
        rN   rP   rM   )rC   rQ   page_with_http_inforS   datastatus_codeheaders	r/   rK   r   rL   rM   rN   rU   page_response	generators	            r1   stream_with_http_infoz*InsightsSegmentsList.stream_with_http_info   s{    0 **5)<00'!)[)	 1 
 MM((););VG_M	=44m6K6KLLr2   c                 
  K   | j                   j                  ||      }| j                  ||||d          d{   }| j                   j                  |j                  |d         }||j
                  |j                  fS 7 Fw)a  
        Asynchronously streams InsightsSegmentsInstance and returns headers from first page


        :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: tuple of (generator, status_code, headers) where generator yields instances
        rN   rP   NrM   )rC   rQ   page_with_http_info_asyncrX   r[   r\   r]   r^   s	            r1   stream_with_http_info_asyncz0InsightsSegmentsList.stream_with_http_info_async   s     0 **5)<"<<'!)[)	 = 
 
 MM..}/A/A6'?S	=44m6K6KLL
s   8BBAB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
        rK   r   rL   rM   rN   )listrS   )r/   rK   r   rL   rM   rN   s         r1   rg   zInsightsSegmentsList.list  s1    2 KK+%-#  
 	
r2   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
        rf   N)rX   )r/   rK   r   rL   rM   rN   records          r1   
list_asynczInsightsSegmentsList.list_async2  s]     6 '+&7&7+%-# '8 ' !	
 	
 !	
 	
 		
 	
s0   >1>953
59>59>c                 h    | j                  |||||      \  }}}t        |      }	t        |	||      S )am  
        Lists InsightsSegmentsInstance and returns headers from first page


        :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: ApiResponse with list of instances, status code, and headers
        rf   r[   r\   r]   )ra   rg   r   )
r/   rK   r   rL   rM   rN   r`   r\   r]   itemss
             r1   list_with_http_infoz(InsightsSegmentsList.list_with_http_infoV  sJ    0 +/*D*D'!) +E +
'	; Y;PPr2   c                    K   | j                  |||||       d{   \  }}}|2 	cg c3 d{   }	|	7 7 	6 nc c}	w }
}	t        |
||      S w)a|  
        Asynchronously lists InsightsSegmentsInstance and returns headers from first page


        :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: ApiResponse with list of instances, status code, and headers
        rf   Nrl   )rd   r   )r/   rK   r   rL   rM   rN   r`   r\   r]   ri   rm   s              r1   list_with_http_info_asyncz.InsightsSegmentsList.list_with_http_info_asyncx  so     0 150P0P'!) 1Q 1
 +
'	; -666&+
 7666;PPs4   A7A=;9
;=A;=A
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 Nr6   es    r1   <lambda>z+InsightsSegmentsList.page.<locals>.<lambda>       r2   Authorization	SegmentIdReservationId	PageTokenr   PageSize!application/x-www-form-urlencodedr{   zContent-Typeapplication/jsonAcceptGETmethoduriparamsr]   )r   ofr
   maprC   rR   rJ   rA   
r/   rK   r   rL   rq   rr   rN   r[   r]   responses
             r1   rR   zInsightsSegmentsList.page  s    , yy!.'!*~{!K'#%	
 ))!. C
 /==%%diig & 
 $DMM8<<r2   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 ru   r6   rv   s    r1   rx   z1InsightsSegmentsList.page_async.<locals>.<lambda>  ry   r2   rz   r   r   r   r   r   r   N)r   r   r
   r   rC   rW   rJ   rA   r   s
             r1   rW   zInsightsSegmentsList.page_async  s     , yy!.'!*~{!K'#%	
 ))!. C
 /11diig 2 
 
 $DMM8<<
s   A;B=B>Bc           	      @   t        j                  ||t        j                  |d       |||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: 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: ApiResponse with InsightsSegmentsPage, status code, and headers
        c                     | S ru   r6   rv   s    r1   rx   z:InsightsSegmentsList.page_with_http_info.<locals>.<lambda>  ry   r2   rz   r   r   r   r   r   r   rl   )	r   r   r
   r   rC   page_with_response_inforJ   rA   r   r/   rK   r   rL   rq   rr   rN   r[   r]   r   r\   response_headersrR   s                r1   rZ   z(InsightsSegmentsList.page_with_http_info  s    , yy!.'!*~{!K'#%	
 ))!. C
 /26--2W2Wdiig 3X 3
/+/ $DMM8<+GWXXr2   c           	      \  K   t        j                  ||t        j                  |d       |||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: 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: ApiResponse with InsightsSegmentsPage, status code, and headers
        c                     | S ru   r6   rv   s    r1   rx   z@InsightsSegmentsList.page_with_http_info_async.<locals>.<lambda>B  ry   r2   rz   r   r   r   r   r   r   Nrl   )	r   r   r
   r   rC   page_with_response_info_asyncrJ   rA   r   r   s                r1   rc   z.InsightsSegmentsList.page_with_http_info_async(  s     , yy!.'!*~{!K'#%	
 ))!. C
 / --==$))D' >   	0+/
 $DMM8<+GWXX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
        r   )rC   domaintwiliorequestrA   r/   r   r   s      r1   get_pagezInsightsSegmentsList.get_pageZ  s7     ==''..66ujI#DMM8<<r2   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
        r   N)rC   r   r   request_asyncrA   r   s      r1   get_page_asyncz#InsightsSegmentsList.get_page_asyncf  sD      --44BB5*UU#DMM8<< Vs   4AAAc                      y)r5   z(<Twilio.FlexApi.V1.InsightsSegmentsList>r6   r7   s    r1   r8   zInsightsSegmentsList.__repr__r  rF   r2   )#r9   r:   r;   r   r-   r   unsetr   r=   objectr   r   intr   r   rS   r	   rX   tuplera   rd   rg   rj   r   rn   rp   rA   rR   rW   rZ   rc   r   r   r8   r>   r?   s   @r1   rH   rH   t   sz   	) 	) -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<<##'!MS&[)!M #v+&!M d3i/0	!M
 }!M C=!M 
!MJ -3LL)/39<<##'!MS&[)!M #v+&!M d3i/0	!M
 }!M C=!M 
!MJ -3LL)/39<<##'!
S&[)!
 #v+&!
 d3i/0	!

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

 }"
 C="
 
&	'"
L -3LL)/39<<##' QS&[) Q #v+& Q d3i/0	 Q
 } Q C= Q 
 QH -3LL)/39<<##' QS&[) Q #v+& Q d3i/0	 Q
 } Q C= Q 
 QH -3LL)/39<<)/*0,,(.-=S&[)-= #v+&-= d3i/0	-=
 #v+&-= 3;'-= f%-= 
-=b -3LL)/39<<)/*0,,(.-=S&[)-= #v+&-= d3i/0	-=
 #v+&-= 3;'-= f%-= 
-=b -3LL)/39<<)/*0,,(..YS&[).Y #v+&.Y d3i/0	.Y
 #v+&.Y 3;'.Y f%.Y 
.Yd -3LL)/39<<)/*0,,(.0YS&[)0Y #v+&0Y d3i/0	0Y
 #v+&0Y 3;'0Y f%0Y 
0Yd
=3 
=+? 
=
=s 
=7K 
=:# :r2   rH   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   rA   rH   r6   r2   r1   <module>r      sR    M L L ) 0 : 2 ' !E>/ E>P:4 :&D:< D:r2   