
    i?1ii                         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
e      Z G d de      Z G d de      Zy)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                        e Zd Z G d de      Z G d de      Z G d de      Z G d de      Z G d	 d
e      Z G d de      Z		 de
deeef   f fdZdefdZ xZS )CallSummariesInstancec                   (    e Zd ZdZdZdZdZdZdZdZ	y)	 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     p/home/www/therecruiter.miabetepe.com/venv/lib/python3.12/site-packages/twilio/rest/insights/v1/call_summaries.py
AnsweredByr      s(    '-3/r'   r)   c                   ,    e Zd ZdZdZdZdZdZdZdZ	dZ
y	)
CallSummariesInstance.CallStateringing	completedbusyfailnoanswercanceledansweredundialedN)r   r   r   RINGING	COMPLETEDBUSYFAILNOANSWERCANCELEDANSWEREDUNDIALEDr&   r'   r(   	CallStater+   $   s*    	r'   r<   c                       e Zd ZdZdZdZdZy)CallSummariesInstance.CallTypecarriersiptrunkingclientN)r   r   r   CARRIERSIPTRUNKINGCLIENTr&   r'   r(   CallTyper>   .   s    r'   rG   c                       e Zd ZdZdZy)%CallSummariesInstance.ProcessingStatecompletepartialN)r   r   r   COMPLETEPARTIALr&   r'   r(   ProcessingStaterI   4   s    r'   rN   c                       e Zd ZdZdZdZdZy),CallSummariesInstance.ProcessingStateRequestr-   startedrK   allN)r   r   r   r5   STARTEDrM   ALLr&   r'   r(   ProcessingStateRequestrP   8   s    	r'   rU   c                       e Zd ZdZdZy)CallSummariesInstance.SortBy
start_timeend_timeN)r   r   r   
START_TIMEEND_TIMEr&   r'   r(   SortByrW   >   s    !
r'   r\   versionpayloadc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _        t        j                  |j                  d	            | _        t        j                  |j                  d
            | _        t        j                  |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account_sidcall_sidanswered_by	call_type
call_stateprocessing_statecreated_timerX   rY   durationconnect_durationfromtocarrier_edgeclient_edgesdk_edgesip_edgetagsurl
attributes
propertiestrust
annotation)super__init__getr`   ra   rb   rc   rd   re   r   iso8601_datetimerf   rX   rY   integerrg   rh   _fromrj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rt   )selfr]   r^   	__class__s      r(   rv   zCallSummariesInstance.__init__\   s   !*1++m*D'.{{:'>IPJ
 FM[[F
 HO{{H

 KK*+ 	 1<0L0LKK'1
 /:.J.JKK%/
 -8,H,HKK
#-
 (3':':7;;z;R'S/:/B/BKK*+0
 3:++f2E
/6{{4/@9@^9T8?M8R5<[[5L5<[[5L)0V)<	")++e"47>{{<7P7>{{<7P29++g2F
7>{{<7Pr'   returnc                      y)f
        Provide a friendly representation

        :returns: Machine friendly representation
        z*<Twilio.Insights.V1.CallSummariesInstance>r&   r{   s    r(   __repr__zCallSummariesInstance.__repr__   s     <r'   )r   r   r   objectr)   r<   rG   rN   rU   r\   r   r   strr   rv   r   __classcell__r|   s   @r(   r   r      s{    V F 6 &   4)Q )Q$sCx. )QV<# <r'   r   c                   2    e Zd Zdeeef   defdZdefdZy)CallSummariesPager^   r}   c                 .    t        | j                  |      S )zs
        Build an instance of CallSummariesInstance

        :param payload: Payload response from the API
        )r   _version)r{   r^   s     r(   get_instancezCallSummariesPage.get_instance   s     %T]]G<<r'   c                      y)r   z&<Twilio.Insights.V1.CallSummariesPage>r&   r   s    r(   r   zCallSummariesPage.__repr__        8r'   N)	r   r   r   r   r   r   r   r   r   r&   r'   r(   r   r      s*    =DcN =7L =8# 8r'   r   c            9       4    e Zd Zdef f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"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#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$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%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(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)Zd*ed!efd+Zd*ed!efd,Zd!efd-Z xZS ).CallSummariesListr]   c                 2    t         |   |       d| _        y)zo
        Initialize the CallSummariesList

        :param version: Version that contains the resource

        z/Voice/SummariesN)ru   rv   _uri)r{   r]   r|   s     r(   rv   zCallSummariesList.__init__   s     	!&	r'   Nfrom_rj   from_carrier
to_carrierfrom_country_codeto_country_codebrandedverified_callerhas_tagrX   rY   rc   rd   	directionre   rP   sort_byrW   
subaccountabnormal_sessionrb   r   answered_by_annotationconnectivity_issue_annotationquality_issue_annotationspam_annotationcall_score_annotationlimit	page_sizer}   c                     | j                   j                  ||      }| j                  |||||||||	|
|||||||||||||||d         }| j                   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   r   rj   r   r   r   r   r   r   r   rX   rY   rc   rd   r   re   r   r   r   rb   r   r   r   r   r   r   r   )r   read_limitspagestreamr{   r   rj   r   r   r   r   r   r   r   rX   rY   rc   rd   r   re   r   r   r   rb   r   r   r   r   r   r   r   limitsr   s                                r(   r   zCallSummariesList.stream   s    L **5)<yy%!/++!!-!-##9*G%=+"7[)3  
8 }}##D&/::r'   c                    K   | j                   j                  ||      }| j                  |||||||||	|
|||||||||||||||d          d{   }| j                   j                  ||d         S 7 #w)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   r   Nr   )r   r   
page_asyncstream_asyncr   s                                r(   r   zCallSummariesList.stream_async  s     L **5)<__%!/++!!-!-##9*G%=+"7[)3 % 
 
8 }}))$w@@9
s   AA5A3$A5c                 j    t        | j                  |||||||||	|
||||||||||||||||            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   rj   r   r   r   r   r   r   r   rX   rY   rc   rd   r   re   r   r   r   rb   r   r   r   r   r   r   r   )listr   )r{   r   rj   r   r   r   r   r   r   r   rX   rY   rc   rd   r   re   r   r   r   rb   r   r   r   r   r   r   r   s                              r(   r   zCallSummariesList.listy  sq    J KK)%"3 / /%!#%#!1%!1''=.K)A /&;#5  
 	
r'   c                    K   | j                  |||||||||	|
||||||||||||||||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)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
        r   N)r   )r{   r   rj   r   r   r   r   r   r   r   rX   rY   rc   rd   r   re   r   r   r   rb   r   r   r   r   r   r   r   records                               r(   
list_asynczCallSummariesList.list_async  s     N '+&7&7)%"3 / /%!#%#!1%!1''=.K)A /&;#5 '8 ' !
 
 !
 
 	
 
sA   /AAAAA
A
A
AAA

AA
page_tokenpage_numberc                 (   t        j                  i d|d|d|d|d|d|d|d|d	|	d
|
d|d|d|d|d|d|d|||||||||||d
      }| j                  j                  d| j                  |      }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EndTimerG   r<   	DirectionrN   r\   
Subaccount
AbnormalSessionr)   AnsweredByAnnotationConnectivityIssueAnnotationQualityIssueAnnotationSpamAnnotationCallScoreAnnotation	PageTokenr   PageSizeGETmethoduriparams)r   ofr   r   r   r   r{   r   rj   r   r   r   r   r   r   r   rX   rY   rc   rd   r   re   r   r   r   rb   r   r   r   r   r   r   r   r   dataresponses                                 r(   r   zCallSummariesList.pageB  s:   D yyb | Z	
 "#4   7 !/ ' Z 8 I Z Y "#3  '!" j#$ $4)(>/L*B"1'<'#%7
@ ==%%U		$%O 99r'   c                 D  K   t        j                  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 7 w)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   rG   r<   r   rN   r\   r   r   r   r   N)r   r   r   r   r   r   r   s                                 r(   r   zCallSummariesList.page_async  sO    D yyb | Z	
 "#4   7 !/ ' Z 8 I Z Y "#3  '!" j#$ $4)(>/L*B"1'<'#%7
@ 11dii 2 
 
 !99
s   BB BB 
target_urlc                     | j                   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   r{   r   r   s      r(   get_pagezCallSummariesList.get_page  s7     ==''..66ujI 99r'   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   |      S 7 w)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   s      r(   get_page_asyncz CallSummariesList.get_page_async  sD      --44BB5*UU 99 Vs   4AAAc                      y)r   z&<Twilio.Insights.V1.CallSummariesList>r&   r   s    r(   r   zCallSummariesList.__repr__&  r   r'   )r   r   r   r   rv   r   unsetr   r   r   boolr   intr	   r   r   r
   r   r   r   r   r   r   r   r   r   r   r   r   s   @r(   r   r      s   	' 	' %+LL!'+1<<)/06.4ll'-||/5||'-||)/'-||(.)/(. LLAG)/06IO5;\\<BLL7=||/5||4:LL##';c;S&[!c; #v+c; CK(	c;
 #v+&c; !f-c; sF{+c; tV|$c; tV|,c; tV|$c; #v+&c; V$c; f%c; #v+&c; f%c;   :FB
!c;& 5v=>'c;( #v+&)c;*  f-+c;, =vEF-c;. !&c6k 2/c;0 (-S&['91c;2 #(V"43c;4 tV|,5c;6  %S&[17c;8 }9c;: C=;c;< 
'	(=c;N %+LL!'+1<<)/06.4ll'-||/5||'-||)/'-||(.)/(. LLAG)/06IO5;\\<BLL7=||/5||4:LL##';cAS&[!cA #v+cA CK(	cA
 #v+&cA !f-cA sF{+cA tV|$cA tV|,cA tV|$cA #v+&cA V$cA f%cA #v+&cA f%cA   :FB
!cA& 5v=>'cA( #v+&)cA*  f-+cA, =vEF-cA. !&c6k 2/cA0 (-S&['91cA2 #(V"43cA4 tV|,5cA6  %S&[17cA8 }9cA: C=;cA< 
,	-=cAN %+LL!'+1<<)/06.4ll'-||/5||'-||)/'-||(.)/(. LLAG)/06IO5;\\<BLL7=||/5||4:LL##';b
S&[!b
 #v+b
 CK(	b

 #v+&b
 !f-b
 sF{+b
 tV|$b
 tV|,b
 tV|$b
 #v+&b
 V$b
 f%b
 #v+&b
 f%b
   :FB
!b
& 5v=>'b
( #v+&)b
*  f-+b
, =vEF-b
. !&c6k 2/b
0 (-S&['91b
2 #(V"43b
4 tV|,5b
6  %S&[17b
8 }9b
: C=;b
< 
#	$=b
L %+LL!'+1<<)/06.4ll'-||/5||'-||)/'-||(.)/(. LLAG)/06IO5;\\<BLL7=||/5||4:LL##';c
S&[!c
 #v+c
 CK(	c

 #v+&c
 !f-c
 sF{+c
 tV|$c
 tV|,c
 tV|$c
 #v+&c
 V$c
 f%c
 #v+&c
 f%c
   :FB
!c
& 5v=>'c
( #v+&)c
*  f-+c
, =vEF-c
. !&c6k 2/c
0 (-S&['91c
2 #(V"43c
4 tV|,5c
6  %S&[17c
8 }9c
: C=;c
< 
#	$=c
N %+LL!'+1<<)/06.4ll'-||/5||'-||)/'-||(.)/(. LLAG)/06IO5;\\<BLL7=||/5||4:LL)/*0,,(.=c:S&[!c: #v+c: CK(	c:
 #v+&c: !f-c: sF{+c: tV|$c: tV|,c: tV|$c: #v+&c: V$c: f%c: #v+&c: f%c:   :FB
!c:& 5v=>'c:( #v+&)c:*  f-+c:, =vEF-c:. !&c6k 2/c:0 (-S&['91c:2 #(V"43c:4 tV|,5c:6  %S&[17c:8 #v+&9c:: 3;';c:< f%=c:> 
?c:N %+LL!'+1<<)/06.4ll'-||/5||'-||)/'-||(.)/(. LLAG)/06IO5;\\<BLL7=||/5||4:LL)/*0,,(.=e:S&[!e: #v+e: CK(	e:
 #v+&e: !f-e: sF{+e: tV|$e: tV|,e: tV|$e: #v+&e: V$e: f%e: #v+&e: f%e:   :FB
!e:& 5v=>'e:( #v+&)e:*  f-+e:, =vEF-e:. !&c6k 2/e:0 (-S&['91e:2 #(V"43e:4 tV|,5e:6  %S&[17e:8 #v+&9e:: 3;';e:< f%=e:> 
?e:N
:3 
:+< 
:
:s 
:7H 
:8# 8r'   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(   <module>r      sQ     L L L + : 2 ' !t<, t<n8 8$I
8 I
8r'   