U
    ^g%iR@                     @   s   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	 d	eZG d
d deZG dd deZdS )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                       s>   e Zd ZdZeeeef d fddZedddZ	  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                    s  t  | |d| _|d| _|d| _|d| _|d| _|d| _|d| _	|d| _
|d	| _|d
| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _d S )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__ h/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/flex_api/v1/insights_segments.pyr)   2   sB    z!InsightsSegmentsInstance.__init__returnc                 C   s   dS )f
        Provide a friendly representation

        :returns: Machine friendly representation
        z,<Twilio.FlexApi.V1.InsightsSegmentsInstance>r.   r+   r.   r.   r/   __repr__V   s    z!InsightsSegmentsInstance.__repr__)__name__
__module____qualname____doc__r   r   strr   r)   r4   __classcell__r.   r.   r,   r/   r      s   $r   c                   @   s2   e Zd Zeeef edddZedddZdS )InsightsSegmentsPage)r   r1   c                 C   s   t | j|S )zv
        Build an instance of InsightsSegmentsInstance

        :param payload: Payload response from the API
        )r   _version)r+   r   r.   r.   r/   get_instanceb   s    z!InsightsSegmentsPage.get_instancer0   c                 C   s   dS )r2   z(<Twilio.FlexApi.V1.InsightsSegmentsPage>r.   r3   r.   r.   r/   r4   j   s    zInsightsSegmentsPage.__repr__N)	r5   r6   r7   r   r9   r   r   r=   r4   r.   r.   r.   r/   r;   `   s   r;   c                	       sh  e Zd Zed fddZejejejddfeee	f eee	f ee
e e	f ee ee ee dddZejejejddfeee	f eee	f ee
e e	f ee ee ee ddd	Zejejejddfeee	f eee	f ee
e e	f ee ee e
e dd
dZejejejddfeee	f eee	f ee
e e	f ee ee e
e dddZejejejejejejfeee	f eee	f ee
e e	f eee	f eee	f eee	f edddZejejejejejejfeee	f eee	f ee
e e	f eee	f eee	f eee	f edddZeedddZeedddZedddZ  ZS )InsightsSegmentsList)r   c                    s   t  | d| _dS )zr
        Initialize the InsightsSegmentsList

        :param version: Version that contains the resource

        z/Insights/SegmentsN)r(   r)   _uri)r+   r   r,   r.   r/   r)   u   s    zInsightsSegmentsList.__init__N)authorizationr   reservation_idlimit	page_sizer1   c                 C   s6   | j ||}| j||||d d}| 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
        rC   r@   r   rA   rC   rB   )r<   read_limitspagestreamr+   r@   r   rA   rB   rC   ZlimitsrF   r.   r.   r/   rG      s    zInsightsSegmentsList.streamc                    s<   | j ||}| j||||d dI dH }| j ||d S )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
        rC   rD   NrB   )r<   rE   
page_asyncstream_asyncrH   r.   r.   r/   rJ      s    z!InsightsSegmentsList.stream_asyncc                 C   s   t | j|||||d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
        r@   r   rA   rB   rC   )listrG   r+   r@   r   rA   rB   rC   r.   r.   r/   rL      s    zInsightsSegmentsList.listc                    s*   dd | j |||||dI dH 2 I dH S )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
        c                    s   g | z3 d H W }|q6 S Nr.   ).0recordr.   r.   r/   
<listcomp>  s   z3InsightsSegmentsList.list_async.<locals>.<listcomp>rK   N)rJ   rM   r.   r.   r/   
list_async   s    
zInsightsSegmentsList.list_async)r@   r   rA   
page_tokenpage_numberrC   r1   c           
   	   C   s^   t ||t|dd |||d}t |dd}d|d< | jjd| j||d	}	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   s   | S rN   r.   er.   r.   r/   <lambda>)      z+InsightsSegmentsList.page.<locals>.<lambda>AuthorizationZ	SegmentIdZReservationIdZ	PageTokenr   ZPageSize!application/x-www-form-urlencodedrZ   zContent-Typeapplication/jsonAcceptGETmethoduriparamsheaders)r
   ofr	   mapr<   rF   r?   r;   
r+   r@   r   rA   rS   rT   rC   datard   responser.   r.   r/   rF     s,       zInsightsSegmentsList.pagec           
   	      sd   t ||t|dd |||d}t |dd}d|d< | jjd| j||d	I d
H }	t| j|	S )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   s   | S rN   r.   rU   r.   r.   r/   rW   X  rX   z1InsightsSegmentsList.page_async.<locals>.<lambda>rY   r[   r\   r]   r^   r_   r`   N)r
   re   r	   rf   r<   rI   r?   r;   rg   r.   r.   r/   rI   >  s,       zInsightsSegmentsList.page_async)
target_urlr1   c                 C   s   | 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_   )r<   domaintwiliorequestr;   r+   rj   ri   r.   r.   r/   get_pagem  s    	zInsightsSegmentsList.get_pagec                    s$   | j jjd|I dH }t| j |S )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)r<   rk   rl   Zrequest_asyncr;   rn   r.   r.   r/   get_page_asyncy  s    	z#InsightsSegmentsList.get_page_asyncr0   c                 C   s   dS )r2   z(<Twilio.FlexApi.V1.InsightsSegmentsList>r.   r3   r.   r.   r/   r4     s    zInsightsSegmentsList.__repr__)r5   r6   r7   r   r)   r
   unsetr   r9   objectr   r   intr   r   rG   r   rJ   rL   rR   r;   rF   rI   ro   rp   r4   r:   r.   r.   r,   r/   r>   s   s   

&

&

%

&




1




/r>   N)r8   typingr   r   r   r   r   r   r   Ztwilio.baser	   r
   Ztwilio.base.instance_resourcer   Ztwilio.base.list_resourcer   Ztwilio.base.versionr   Ztwilio.base.pager   r   r;   r>   r.   r.   r.   r/   <module>   s   $H