o
    /ii                     @   s   d Z ddlm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 - Insights
    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.
    )datetime)AnyDictListOptionalUnionIteratorAsyncIterator)deserializevalues)InstanceResource)ListResource)Version)Pagec                       s   e Zd ZG dd deZG dd deZG dd deZG dd deZG d	d
 d
eZG dd deZ		 de
deeef f fddZdefddZ  ZS )CallSummariesInstancec                   @   s(   e Zd ZdZdZdZdZdZdZdZ	dS )	 CallSummariesInstance.AnsweredByunknownmachine_startmachine_end_beepmachine_end_silencemachine_end_otherhumanfaxN)
__name__
__module____qualname__UNKNOWNMACHINE_STARTMACHINE_END_BEEPMACHINE_END_SILENCEMACHINE_END_OTHERHUMANFAX r#   r#   a/var/www/html/philips/venv/lib/python3.10/site-packages/twilio/rest/insights/v1/call_summaries.py
AnsweredBy   s    r%   c                   @   s,   e Zd ZdZdZdZdZdZdZdZ	dZ
d	S )
zCallSummariesInstance.CallStateringing	completedbusyfailnoanswercanceledansweredundialedN)r   r   r   RINGING	COMPLETEDBUSYFAILNOANSWERCANCELEDANSWEREDUNDIALEDr#   r#   r#   r$   	CallState$   s    r6   c                   @      e Zd ZdZdZdZdZdS )zCallSummariesInstance.CallTypecarriersiptrunkingclientN)r   r   r   CARRIERSIPTRUNKINGCLIENTr#   r#   r#   r$   CallType.   
    r@   c                   @      e Zd ZdZdZdS )z%CallSummariesInstance.ProcessingStatecompletepartialN)r   r   r   COMPLETEPARTIALr#   r#   r#   r$   ProcessingState4       rG   c                   @   r7   ),CallSummariesInstance.ProcessingStateRequestr'   startedrD   allN)r   r   r   r/   STARTEDrF   ALLr#   r#   r#   r$   ProcessingStateRequest8   rA   rN   c                   @   rB   )CallSummariesInstance.SortBy
start_timeend_timeN)r   r   r   
START_TIMEEND_TIMEr#   r#   r#   r$   SortBy>   rH   rT   versionpayloadc                    sB  t  | |d| _|d| _|d| _|d| _|d| _|d| _t	
|d| _t	
|d| _t	
|d	| _t	|d
| _t	|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _d S )Naccount_sidcall_sidanswered_by	call_type
call_stateprocessing_statecreated_timerP   rQ   durationconnect_durationfromtocarrier_edgeclient_edgesdk_edgesip_edgetagsurl
attributes
propertiestrust
annotation)super__init__getrW   rX   rY   rZ   r[   r\   r
   iso8601_datetimer]   rP   rQ   integerr^   r_   _fromra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   )selfrU   rV   	__class__r#   r$   rm   \   sN   zCallSummariesInstance.__init__returnc                 C      dS )f
        Provide a friendly representation

        :returns: Machine friendly representation
        z*<Twilio.Insights.V1.CallSummariesInstance>r#   rr   r#   r#   r$   __repr__   s   zCallSummariesInstance.__repr__)r   r   r   objectr%   r6   r@   rG   rN   rT   r   r   strr   rm   ry   __classcell__r#   r#   rs   r$   r      s    	
+r   c                   @   s4   e Zd Zdeeef defddZdefddZdS )CallSummariesPagerV   ru   c                 C   s   t | j|S )zs
        Build an instance of CallSummariesInstance

        :param payload: Payload response from the API
        )r   _version)rr   rV   r#   r#   r$   get_instance   s   zCallSummariesPage.get_instancec                 C   rv   )rw   z&<Twilio.Insights.V1.CallSummariesPage>r#   rx   r#   r#   r$   ry         zCallSummariesPage.__repr__N)	r   r   r   r   r{   r   r   r   ry   r#   r#   r#   r$   r}      s    r}   c                9       st
  e Zd Zdef fddZejejejejejejejejejejejejejejejejejejejejejejejejdd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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ee	f deee	f deee	f deee	f dede	f dede	f deee	f dee
e	f dede	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e d!ee d"ee f6d#d$Zejejejejejejejejejejejejejejejejejejejejejejejejdd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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ee	f deee	f deee	f deee	f dede	f dede	f deee	f dee
e	f dede	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e d!ee d"ee f6d%d&Zejejejejejejejejejejejejejejejejejejejejejejejejdd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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ee	f deee	f deee	f deee	f dede	f dede	f deee	f dee
e	f dede	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e d!ee d"ee f6d'd(Zejejejejejejejejejejejejejejejejejejejejejejejejdd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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ee	f deee	f deee	f deee	f dede	f dede	f deee	f dee
e	f dede	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e d!ee d"ee f6d)d*Zejejejejejejejejejejejejejejejejejejejejej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	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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ee	f dede	f dede	f deee	f dee
e	f dede	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ee	f d,eee	f d!eee	f d"ef8d-d.Zejejejejejejejejejejejejejejejejejejejejej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	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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ee	f dede	f dede	f deee	f dee
e	f dede	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ee	f d,eee	f d!eee	f d"ef8d/d0Zd1ed"efd2d3Zd1ed"efd4d5Zd"efd6d7Z  ZS )8CallSummariesListrU   c                    s   t  | d| _dS )zo
        Initialize the CallSummariesList

        :param version: Version that contains the resource

        z/Voice/SummariesN)rl   rm   _uri)rr   rU   rs   r#   r$   rm      s   
zCallSummariesList.__init__Nfrom_ra   from_carrier
to_carrierfrom_country_codeto_country_codebrandedverified_callerhas_tagrP   rQ   rZ   r[   	directionr\   rI   sort_byrO   
subaccountabnormal_sessionrY   r   answered_by_annotationconnectivity_issue_annotationquality_issue_annotationspam_annotationcall_score_annotationlimit	page_sizeru   c                 C   s   | j ||}| jdi d|d|d|d|d|d|d|d|d	|	d
|
d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d }| j ||d S )a  
        Streams CallSummariesInstance 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 from_: A calling party. Could be an E.164 number, a SIP URI, or a Twilio Client registered name.
        :param str to: A called party. Could be an E.164 number, a SIP URI, or a Twilio Client registered name.
        :param str from_carrier: An origination carrier.
        :param str to_carrier: A destination carrier.
        :param str from_country_code: A source country code based on phone number in From.
        :param str to_country_code: A destination country code. Based on phone number in To.
        :param bool branded: A boolean flag indicating whether or not the calls were branded using Twilio Branded Calls.
        :param bool verified_caller: A boolean flag indicating whether or not the caller was verified using SHAKEN/STIR.
        :param bool has_tag: A boolean flag indicating the presence of one or more [Voice Insights Call Tags](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-tags).
        :param str start_time: A Start time of the calls. xm (x minutes), xh (x hours), xd (x days), 1w, 30m, 3d, 4w or datetime-ISO. Defaults to 4h.
        :param str end_time: An End Time of the calls. xm (x minutes), xh (x hours), xd (x days), 1w, 30m, 3d, 4w or datetime-ISO. Defaults to 0m.
        :param str call_type: A Call Type of the calls. One of `carrier`, `sip`, `trunking` or `client`.
        :param str call_state: A Call State of the calls. One of `ringing`, `completed`, `busy`, `fail`, `noanswer`, `canceled`, `answered`, `undialed`.
        :param str direction: A Direction of the calls. One of `outbound_api`, `outbound_dial`, `inbound`, `trunking_originating`, `trunking_terminating`.
        :param &quot;CallSummariesInstance.ProcessingStateRequest&quot; processing_state: A Processing State of the Call Summaries. One of `completed`, `partial` or `all`.
        :param &quot;CallSummariesInstance.SortBy&quot; sort_by: A Sort By criterion for the returned list of Call Summaries. One of `start_time` or `end_time`.
        :param str subaccount: A unique SID identifier of a Subaccount.
        :param bool abnormal_session: A boolean flag indicating an abnormal session where the last SIP response was not 200 OK.
        :param &quot;CallSummariesInstance.AnsweredBy&quot; answered_by: An Answered By value for the calls based on `Answering Machine Detection (AMD)`. One of `unknown`, `machine_start`, `machine_end_beep`, `machine_end_silence`, `machine_end_other`, `human` or `fax`.
        :param str answered_by_annotation: Either machine or human.
        :param str connectivity_issue_annotation: A Connectivity Issue with the calls. One of `no_connectivity_issue`, `invalid_number`, `caller_id`, `dropped_call`, or `number_reachability`.
        :param str quality_issue_annotation: A subjective Quality Issue with the calls. One of `no_quality_issue`, `low_volume`, `choppy_robotic`, `echo`, `dtmf`, `latency`, `owa`, `static_noise`.
        :param bool spam_annotation: A boolean flag indicating spam calls.
        :param str call_score_annotation: A Call Score of the calls. Use a range of 1-5 to indicate the call experience score, with the following mapping as a reference for the rated call [5: Excellent, 4: Good, 3 : Fair, 2 : Poor, 1: Bad].
        :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   ra   r   r   r   r   r   r   r   rP   rQ   rZ   r[   r   r\   r   r   r   rY   r   r   r   r   r   r   r   Nr#   )r~   read_limitspagestreamrr   r   ra   r   r   r   r   r   r   r   rP   rQ   rZ   r[   r   r\   r   r   r   rY   r   r   r   r   r   r   r   limitsr   r#   r#   r$   r      sj   F
	
zCallSummariesList.streamc                    s   | j ||}| jdi d|d|d|d|d|d|d|d|d	|	d
|
d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d I dH }| j ||d S )a  
        Asynchronously streams CallSummariesInstance 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 from_: A calling party. Could be an E.164 number, a SIP URI, or a Twilio Client registered name.
        :param str to: A called party. Could be an E.164 number, a SIP URI, or a Twilio Client registered name.
        :param str from_carrier: An origination carrier.
        :param str to_carrier: A destination carrier.
        :param str from_country_code: A source country code based on phone number in From.
        :param str to_country_code: A destination country code. Based on phone number in To.
        :param bool branded: A boolean flag indicating whether or not the calls were branded using Twilio Branded Calls.
        :param bool verified_caller: A boolean flag indicating whether or not the caller was verified using SHAKEN/STIR.
        :param bool has_tag: A boolean flag indicating the presence of one or more [Voice Insights Call Tags](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-tags).
        :param str start_time: A Start time of the calls. xm (x minutes), xh (x hours), xd (x days), 1w, 30m, 3d, 4w or datetime-ISO. Defaults to 4h.
        :param str end_time: An End Time of the calls. xm (x minutes), xh (x hours), xd (x days), 1w, 30m, 3d, 4w or datetime-ISO. Defaults to 0m.
        :param str call_type: A Call Type of the calls. One of `carrier`, `sip`, `trunking` or `client`.
        :param str call_state: A Call State of the calls. One of `ringing`, `completed`, `busy`, `fail`, `noanswer`, `canceled`, `answered`, `undialed`.
        :param str direction: A Direction of the calls. One of `outbound_api`, `outbound_dial`, `inbound`, `trunking_originating`, `trunking_terminating`.
        :param &quot;CallSummariesInstance.ProcessingStateRequest&quot; processing_state: A Processing State of the Call Summaries. One of `completed`, `partial` or `all`.
        :param &quot;CallSummariesInstance.SortBy&quot; sort_by: A Sort By criterion for the returned list of Call Summaries. One of `start_time` or `end_time`.
        :param str subaccount: A unique SID identifier of a Subaccount.
        :param bool abnormal_session: A boolean flag indicating an abnormal session where the last SIP response was not 200 OK.
        :param &quot;CallSummariesInstance.AnsweredBy&quot; answered_by: An Answered By value for the calls based on `Answering Machine Detection (AMD)`. One of `unknown`, `machine_start`, `machine_end_beep`, `machine_end_silence`, `machine_end_other`, `human` or `fax`.
        :param str answered_by_annotation: Either machine or human.
        :param str connectivity_issue_annotation: A Connectivity Issue with the calls. One of `no_connectivity_issue`, `invalid_number`, `caller_id`, `dropped_call`, or `number_reachability`.
        :param str quality_issue_annotation: A subjective Quality Issue with the calls. One of `no_quality_issue`, `low_volume`, `choppy_robotic`, `echo`, `dtmf`, `latency`, `owa`, `static_noise`.
        :param bool spam_annotation: A boolean flag indicating spam calls.
        :param str call_score_annotation: A Call Score of the calls. Use a range of 1-5 to indicate the call experience score, with the following mapping as a reference for the rated call [5: Excellent, 4: Good, 3 : Fair, 2 : Poor, 1: Bad].
        :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   ra   r   r   r   r   r   r   r   rP   rQ   rZ   r[   r   r\   r   r   r   rY   r   r   r   r   r   r   Nr   r#   )r~   r   
page_asyncstream_asyncr   r#   r#   r$   r     sl   F
	

zCallSummariesList.stream_asyncc                 C   s   t | jdi d|d|d|d|d|d|d|d|d	|	d
|
d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|S )a  
        Lists CallSummariesInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str from_: A calling party. Could be an E.164 number, a SIP URI, or a Twilio Client registered name.
        :param str to: A called party. Could be an E.164 number, a SIP URI, or a Twilio Client registered name.
        :param str from_carrier: An origination carrier.
        :param str to_carrier: A destination carrier.
        :param str from_country_code: A source country code based on phone number in From.
        :param str to_country_code: A destination country code. Based on phone number in To.
        :param bool branded: A boolean flag indicating whether or not the calls were branded using Twilio Branded Calls.
        :param bool verified_caller: A boolean flag indicating whether or not the caller was verified using SHAKEN/STIR.
        :param bool has_tag: A boolean flag indicating the presence of one or more [Voice Insights Call Tags](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-tags).
        :param str start_time: A Start time of the calls. xm (x minutes), xh (x hours), xd (x days), 1w, 30m, 3d, 4w or datetime-ISO. Defaults to 4h.
        :param str end_time: An End Time of the calls. xm (x minutes), xh (x hours), xd (x days), 1w, 30m, 3d, 4w or datetime-ISO. Defaults to 0m.
        :param str call_type: A Call Type of the calls. One of `carrier`, `sip`, `trunking` or `client`.
        :param str call_state: A Call State of the calls. One of `ringing`, `completed`, `busy`, `fail`, `noanswer`, `canceled`, `answered`, `undialed`.
        :param str direction: A Direction of the calls. One of `outbound_api`, `outbound_dial`, `inbound`, `trunking_originating`, `trunking_terminating`.
        :param &quot;CallSummariesInstance.ProcessingStateRequest&quot; processing_state: A Processing State of the Call Summaries. One of `completed`, `partial` or `all`.
        :param &quot;CallSummariesInstance.SortBy&quot; sort_by: A Sort By criterion for the returned list of Call Summaries. One of `start_time` or `end_time`.
        :param str subaccount: A unique SID identifier of a Subaccount.
        :param bool abnormal_session: A boolean flag indicating an abnormal session where the last SIP response was not 200 OK.
        :param &quot;CallSummariesInstance.AnsweredBy&quot; answered_by: An Answered By value for the calls based on `Answering Machine Detection (AMD)`. One of `unknown`, `machine_start`, `machine_end_beep`, `machine_end_silence`, `machine_end_other`, `human` or `fax`.
        :param str answered_by_annotation: Either machine or human.
        :param str connectivity_issue_annotation: A Connectivity Issue with the calls. One of `no_connectivity_issue`, `invalid_number`, `caller_id`, `dropped_call`, or `number_reachability`.
        :param str quality_issue_annotation: A subjective Quality Issue with the calls. One of `no_quality_issue`, `low_volume`, `choppy_robotic`, `echo`, `dtmf`, `latency`, `owa`, `static_noise`.
        :param bool spam_annotation: A boolean flag indicating spam calls.
        :param str call_score_annotation: A Call Score of the calls. Use a range of 1-5 to indicate the call experience score, with the following mapping as a reference for the rated call [5: Excellent, 4: Good, 3 : Fair, 2 : Poor, 1: Bad].
        :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   ra   r   r   r   r   r   r   r   rP   rQ   rZ   r[   r   r\   r   r   r   rY   r   r   r   r   r   r   r   Nr#   )listr   rr   r   ra   r   r   r   r   r   r   r   rP   rQ   rZ   r[   r   r\   r   r   r   rY   r   r   r   r   r   r   r   r#   r#   r$   r   y  sn   E
	
zCallSummariesList.listc                    s   dd | j di d|d|d|d|d|d|d	|d
|d|	d|
d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|I dH 2 I dH S )a  
        Asynchronously lists CallSummariesInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str from_: A calling party. Could be an E.164 number, a SIP URI, or a Twilio Client registered name.
        :param str to: A called party. Could be an E.164 number, a SIP URI, or a Twilio Client registered name.
        :param str from_carrier: An origination carrier.
        :param str to_carrier: A destination carrier.
        :param str from_country_code: A source country code based on phone number in From.
        :param str to_country_code: A destination country code. Based on phone number in To.
        :param bool branded: A boolean flag indicating whether or not the calls were branded using Twilio Branded Calls.
        :param bool verified_caller: A boolean flag indicating whether or not the caller was verified using SHAKEN/STIR.
        :param bool has_tag: A boolean flag indicating the presence of one or more [Voice Insights Call Tags](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-tags).
        :param str start_time: A Start time of the calls. xm (x minutes), xh (x hours), xd (x days), 1w, 30m, 3d, 4w or datetime-ISO. Defaults to 4h.
        :param str end_time: An End Time of the calls. xm (x minutes), xh (x hours), xd (x days), 1w, 30m, 3d, 4w or datetime-ISO. Defaults to 0m.
        :param str call_type: A Call Type of the calls. One of `carrier`, `sip`, `trunking` or `client`.
        :param str call_state: A Call State of the calls. One of `ringing`, `completed`, `busy`, `fail`, `noanswer`, `canceled`, `answered`, `undialed`.
        :param str direction: A Direction of the calls. One of `outbound_api`, `outbound_dial`, `inbound`, `trunking_originating`, `trunking_terminating`.
        :param &quot;CallSummariesInstance.ProcessingStateRequest&quot; processing_state: A Processing State of the Call Summaries. One of `completed`, `partial` or `all`.
        :param &quot;CallSummariesInstance.SortBy&quot; sort_by: A Sort By criterion for the returned list of Call Summaries. One of `start_time` or `end_time`.
        :param str subaccount: A unique SID identifier of a Subaccount.
        :param bool abnormal_session: A boolean flag indicating an abnormal session where the last SIP response was not 200 OK.
        :param &quot;CallSummariesInstance.AnsweredBy&quot; answered_by: An Answered By value for the calls based on `Answering Machine Detection (AMD)`. One of `unknown`, `machine_start`, `machine_end_beep`, `machine_end_silence`, `machine_end_other`, `human` or `fax`.
        :param str answered_by_annotation: Either machine or human.
        :param str connectivity_issue_annotation: A Connectivity Issue with the calls. One of `no_connectivity_issue`, `invalid_number`, `caller_id`, `dropped_call`, or `number_reachability`.
        :param str quality_issue_annotation: A subjective Quality Issue with the calls. One of `no_quality_issue`, `low_volume`, `choppy_robotic`, `echo`, `dtmf`, `latency`, `owa`, `static_noise`.
        :param bool spam_annotation: A boolean flag indicating spam calls.
        :param str call_score_annotation: A Call Score of the calls. Use a range of 1-5 to indicate the call experience score, with the following mapping as a reference for the rated call [5: Excellent, 4: Good, 3 : Fair, 2 : Poor, 1: Bad].
        :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
    z0CallSummariesList.list_async.<locals>.<listcomp>r   ra   r   r   r   r   r   r   r   rP   rQ   rZ   r[   r   r\   r   r   r   rY   r   r   r   r   r   r   r   Nr#   )r   r   r#   r#   r$   
list_async  sp   E
	
zCallSummariesList.list_async
page_tokenpage_numberc                 C   s   t i d|d|d|d|d|d|d|d|d	|	d
|
d|d|d|d|d|d|d|||||||||||d
}| jjd| j|d}t| j|S )a?  
        Retrieve a single page of CallSummariesInstance records from the API.
        Request is executed immediately

        :param from_: A calling party. Could be an E.164 number, a SIP URI, or a Twilio Client registered name.
        :param to: A called party. Could be an E.164 number, a SIP URI, or a Twilio Client registered name.
        :param from_carrier: An origination carrier.
        :param to_carrier: A destination carrier.
        :param from_country_code: A source country code based on phone number in From.
        :param to_country_code: A destination country code. Based on phone number in To.
        :param branded: A boolean flag indicating whether or not the calls were branded using Twilio Branded Calls.
        :param verified_caller: A boolean flag indicating whether or not the caller was verified using SHAKEN/STIR.
        :param has_tag: A boolean flag indicating the presence of one or more [Voice Insights Call Tags](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-tags).
        :param start_time: A Start time of the calls. xm (x minutes), xh (x hours), xd (x days), 1w, 30m, 3d, 4w or datetime-ISO. Defaults to 4h.
        :param end_time: An End Time of the calls. xm (x minutes), xh (x hours), xd (x days), 1w, 30m, 3d, 4w or datetime-ISO. Defaults to 0m.
        :param call_type: A Call Type of the calls. One of `carrier`, `sip`, `trunking` or `client`.
        :param call_state: A Call State of the calls. One of `ringing`, `completed`, `busy`, `fail`, `noanswer`, `canceled`, `answered`, `undialed`.
        :param direction: A Direction of the calls. One of `outbound_api`, `outbound_dial`, `inbound`, `trunking_originating`, `trunking_terminating`.
        :param processing_state: A Processing State of the Call Summaries. One of `completed`, `partial` or `all`.
        :param sort_by: A Sort By criterion for the returned list of Call Summaries. One of `start_time` or `end_time`.
        :param subaccount: A unique SID identifier of a Subaccount.
        :param abnormal_session: A boolean flag indicating an abnormal session where the last SIP response was not 200 OK.
        :param answered_by: An Answered By value for the calls based on `Answering Machine Detection (AMD)`. One of `unknown`, `machine_start`, `machine_end_beep`, `machine_end_silence`, `machine_end_other`, `human` or `fax`.
        :param answered_by_annotation: Either machine or human.
        :param connectivity_issue_annotation: A Connectivity Issue with the calls. One of `no_connectivity_issue`, `invalid_number`, `caller_id`, `dropped_call`, or `number_reachability`.
        :param quality_issue_annotation: A subjective Quality Issue with the calls. One of `no_quality_issue`, `low_volume`, `choppy_robotic`, `echo`, `dtmf`, `latency`, `owa`, `static_noise`.
        :param spam_annotation: A boolean flag indicating spam calls.
        :param call_score_annotation: A Call Score of the calls. Use a range of 1-5 to indicate the call experience score, with the following mapping as a reference for the rated call [5: Excellent, 4: Good, 3 : Fair, 2 : Poor, 1: Bad].
        :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 CallSummariesInstance
        FromToFromCarrier	ToCarrierFromCountryCodeToCountryCodeBrandedVerifiedCallerHasTag	StartTimeEndTimer@   r6   	DirectionrG   rT   
Subaccount
AbnormalSessionr%   AnsweredByAnnotationConnectivityIssueAnnotationQualityIssueAnnotationSpamAnnotationCallScoreAnnotation	PageTokenr   PageSizeGETmethoduriparams)r   ofr~   r   r   r}   rr   r   ra   r   r   r   r   r   r   r   rP   rQ   rZ   r[   r   r\   r   r   r   rY   r   r   r   r   r   r   r   r   dataresponser#   r#   r$   r   B  sd   B	
 zCallSummariesList.pagec                    s   t i d|d|d|d|d|d|d|d|d	|	d
|
d|d|d|d|d|d|d|||||||||||d
}| jjd| j|dI dH }t| j|S )aN  
        Asynchronously retrieve a single page of CallSummariesInstance records from the API.
        Request is executed immediately

        :param from_: A calling party. Could be an E.164 number, a SIP URI, or a Twilio Client registered name.
        :param to: A called party. Could be an E.164 number, a SIP URI, or a Twilio Client registered name.
        :param from_carrier: An origination carrier.
        :param to_carrier: A destination carrier.
        :param from_country_code: A source country code based on phone number in From.
        :param to_country_code: A destination country code. Based on phone number in To.
        :param branded: A boolean flag indicating whether or not the calls were branded using Twilio Branded Calls.
        :param verified_caller: A boolean flag indicating whether or not the caller was verified using SHAKEN/STIR.
        :param has_tag: A boolean flag indicating the presence of one or more [Voice Insights Call Tags](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-tags).
        :param start_time: A Start time of the calls. xm (x minutes), xh (x hours), xd (x days), 1w, 30m, 3d, 4w or datetime-ISO. Defaults to 4h.
        :param end_time: An End Time of the calls. xm (x minutes), xh (x hours), xd (x days), 1w, 30m, 3d, 4w or datetime-ISO. Defaults to 0m.
        :param call_type: A Call Type of the calls. One of `carrier`, `sip`, `trunking` or `client`.
        :param call_state: A Call State of the calls. One of `ringing`, `completed`, `busy`, `fail`, `noanswer`, `canceled`, `answered`, `undialed`.
        :param direction: A Direction of the calls. One of `outbound_api`, `outbound_dial`, `inbound`, `trunking_originating`, `trunking_terminating`.
        :param processing_state: A Processing State of the Call Summaries. One of `completed`, `partial` or `all`.
        :param sort_by: A Sort By criterion for the returned list of Call Summaries. One of `start_time` or `end_time`.
        :param subaccount: A unique SID identifier of a Subaccount.
        :param abnormal_session: A boolean flag indicating an abnormal session where the last SIP response was not 200 OK.
        :param answered_by: An Answered By value for the calls based on `Answering Machine Detection (AMD)`. One of `unknown`, `machine_start`, `machine_end_beep`, `machine_end_silence`, `machine_end_other`, `human` or `fax`.
        :param answered_by_annotation: Either machine or human.
        :param connectivity_issue_annotation: A Connectivity Issue with the calls. One of `no_connectivity_issue`, `invalid_number`, `caller_id`, `dropped_call`, or `number_reachability`.
        :param quality_issue_annotation: A subjective Quality Issue with the calls. One of `no_quality_issue`, `low_volume`, `choppy_robotic`, `echo`, `dtmf`, `latency`, `owa`, `static_noise`.
        :param spam_annotation: A boolean flag indicating spam calls.
        :param call_score_annotation: A Call Score of the calls. Use a range of 1-5 to indicate the call experience score, with the following mapping as a reference for the rated call [5: Excellent, 4: Good, 3 : Fair, 2 : Poor, 1: Bad].
        :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 CallSummariesInstance
        r   r   r   r   r   r   r   r   r   r   r   r@   r6   r   rG   rT   r   r   r   r   N)r   r   r~   r   r   r}   r   r#   r#   r$   r     sj   B	
 zCallSummariesList.page_async
target_urlc                 C   s   | j jjd|}t| j |S )z
        Retrieve a specific page of CallSummariesInstance records from the API.
        Request is executed immediately

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

        :returns: Page of CallSummariesInstance
        r   )r~   domaintwiliorequestr}   rr   r   r   r#   r#   r$   get_page  s   	zCallSummariesList.get_pagec                    s&   | j jjd|I dH }t| j |S )a  
        Asynchronously retrieve a specific page of CallSummariesInstance records from the API.
        Request is executed immediately

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

        :returns: Page of CallSummariesInstance
        r   N)r~   r   r   request_asyncr}   r   r#   r#   r$   get_page_async  s   	z CallSummariesList.get_page_asyncc                 C   rv   )rw   z&<Twilio.Insights.V1.CallSummariesList>r#   rx   r#   r#   r$   ry   &  r   zCallSummariesList.__repr__)r   r   r   r   rm   r   unsetr   r{   rz   boolr   intr   r   r   r	   r   r   r   r   r}   r   r   r   r   ry   r|   r#   r#   rs   r$   r      s   







	
















g







	
















g







	
















f







	
















g







	



















g







	



















gr   N)__doc__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}   r   r#   r#   r#   r$   <module>   s    $w