
    pi+                        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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	serialize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     h/opt/services/ai/voice_agent/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dZy)CallSummariesInstance.CallTypecarriersiptrunkingclientwhatsappN)r   r   r   CARRIERSIPTRUNKINGCLIENTWHATSAPPr'   r(   r)   CallTyper?   .   s    r(   rJ   c                       e Zd ZdZdZy)%CallSummariesInstance.ProcessingStatecompletepartialN)r   r   r   COMPLETEPARTIALr'   r(   r)   ProcessingStaterL   5   s    r(   rQ   c                       e Zd ZdZdZdZdZy),CallSummariesInstance.ProcessingStateRequestr.   startedrN   allN)r   r   r   r6   STARTEDrP   ALLr'   r(   r)   ProcessingStateRequestrS   9   s    	r(   rX   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)   SortByrZ   ?   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_timer[   r\   durationconnect_durationfromtocarrier_edgeclient_edgesdk_edgesip_edgetagsurl
attributes
propertiestrust
annotation)super__init__getrc   rd   re   rf   rg   rh   r   iso8601_datetimeri   r[   r\   integerrj   rk   _fromrm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   )selfr`   ra   	__class__s      r)   ry   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=   rJ   rQ   rX   r_   r   r   strr   ry   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)CallSummariesPagera   r   c                 .    t        | j                  |      S )zs
        Build an instance of CallSummariesInstance

        :param payload: Payload response from the API
        )r   _version)r~   ra   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            Q       T     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                  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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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   d,ee   d-ee   fNd.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                  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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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   d,ee   d-ee   fNd/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                  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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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   d,ee   d-ee   fNd0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                  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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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   d,ee   d-ee   fNd1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                  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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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   d2eee	f   d3eee	f   d,eee	f   d-efPd4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                  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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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   d2eee	f   d3eee	f   d,eee	f   d-efPd5Zd6ed-efd7Zd6ed-efd8Zd-efd9Z xZS ):CallSummariesListr`   c                 2    t         |   |       d| _        y)zo
        Initialize the CallSummariesList

        :param version: Version that contains the resource

        z/Voice/SummariesN)rx   ry   _uri)r~   r`   r   s     r)   ry   zCallSummariesList.__init__   s     	!&	r(   Nfrom_rm   from_carrier
to_carrierfrom_country_codeto_country_codeverified_callerhas_tagr[   r\   rf   rg   	directionrh   rS   sort_byrZ   
subaccountabnormal_sessionre   r   answered_by_annotationconnectivity_issue_annotationquality_issue_annotationspam_annotationcall_score_annotationbranded_enabledvoice_integrity_enabledbranded_bundle_sidbranded_logobranded_typebranded_use_casebranded_call_reasonvoice_integrity_bundle_sidvoice_integrity_use_casebusiness_profile_identitybusiness_profile_industrybusiness_profile_bundle_sidbusiness_profile_typelimit	page_sizer   c'                 |   | j                   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|d|d|d|d|d|d | d!|!d"|"d#|#d$|$d%|'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 verified_caller: A boolean flag indicating whether or not the caller was verified using SHAKEN/STIR.One of 'true' or 'false'.
        :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 bool branded_enabled: A boolean flag indicating whether or not the calls were branded using Twilio Branded Calls. One of 'true' or 'false'
        :param bool voice_integrity_enabled: A boolean flag indicating whether or not the phone number had voice integrity enabled.One of 'true' or 'false'
        :param str branded_bundle_sid: A unique SID identifier of the Branded Call.
        :param bool branded_logo: Indicates whether the branded logo was displayed during the in_brand branded call. Possible values are true (logo was present) or false (logo was not present).
        :param str branded_type: Indicates whether the Branded Call is in_band vs out_of_band.
        :param str branded_use_case: Specifies the user-defined purpose for the call, as provided during the setup of in_band branded calling.
        :param str branded_call_reason: Specifies the user-defined reason for the call, which will be displayed to the end user on their mobile device during an in_band branded call.
        :param str voice_integrity_bundle_sid: A unique SID identifier of the Voice Integrity Profile.
        :param str voice_integrity_use_case: A Voice Integrity Use Case . Is of type enum. One of 'abandoned_cart', 'appointment_reminders', 'appointment_scheduling', 'asset_management', 'automated_support', 'call_tracking', 'click_to_call', 'contact_tracing', 'contactless_delivery', 'customer_support', 'dating/social', 'delivery_notifications', 'distance_learning', 'emergency_notifications', 'employee_notifications', 'exam_proctoring', 'field_notifications', 'first_responder', 'fraud_alerts', 'group_messaging', 'identify_&_verification', 'intelligent_routing', 'lead_alerts', 'lead_distribution', 'lead_generation', 'lead_management', 'lead_nurturing', 'marketing_events', 'mass_alerts', 'meetings/collaboration', 'order_notifications', 'outbound_dialer', 'pharmacy', 'phone_system', 'purchase_confirmation', 'remote_appointments', 'rewards_program', 'self-service', 'service_alerts', 'shift_management', 'survey/research', 'telehealth', 'telemarketing', 'therapy_(individual+group)'.
        :param str business_profile_identity: A Business Identity of the calls. Is of type enum. One of 'direct_customer', 'isv_reseller_or_partner'.
        :param str business_profile_industry: A Business Industry of the calls. Is of type enum. One of 'automotive', 'agriculture', 'banking', 'consumer', 'construction', 'education', 'engineering', 'energy', 'oil_and_gas', 'fast_moving_consumer_goods', 'financial', 'fintech', 'food_and_beverage', 'government', 'healthcare', 'hospitality', 'insurance', 'legal', 'manufacturing', 'media', 'online', 'professional_services', 'raw_materials', 'real_estate', 'religion', 'retail', 'jewelry', 'technology', 'telecommunications', 'transportation', 'travel', 'electronics', 'not_for_profit'
        :param str business_profile_bundle_sid: A unique SID identifier of the Business Profile.
        :param str business_profile_type: A Business Profile Type of the calls. Is of type enum. One of 'primary', 'secondary'.
        :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   rm   r   r   r   r   r   r   r[   r\   rf   rg   r   rh   r   r   r   re   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r'   )r   read_limitspagestream)r~   r   rm   r   r   r   r   r   r   r[   r\   rf   rg   r   rh   r   r   r   re   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   limitsr   s)                                            r)   r   zCallSummariesList.stream   s   | **5)<tyy &
&
&
 &&
 "	&

 0&
 ,&
 ,&
 &
 "&
 &
  &
 "&
  &
 .&
 &
  "!&
" .#&
$ $%&
& $:'&
( +H)&
* &>+&
, ,-&
. #8/&
0 ,1&
2 %<3&
4  25&
6 &7&
8 &9&
: .;&
< !4=&
> (B?&
@ &>A&
B '@C&
D '@E&
F )DG&
H #8I&
J [)K&
P }}##D&/::r(   c'                   K   | j                   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|d|d|d|d|d|d | d!|!d"|"d#|#d$|$d%|'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 verified_caller: A boolean flag indicating whether or not the caller was verified using SHAKEN/STIR.One of 'true' or 'false'.
        :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 bool branded_enabled: A boolean flag indicating whether or not the calls were branded using Twilio Branded Calls. One of 'true' or 'false'
        :param bool voice_integrity_enabled: A boolean flag indicating whether or not the phone number had voice integrity enabled.One of 'true' or 'false'
        :param str branded_bundle_sid: A unique SID identifier of the Branded Call.
        :param bool branded_logo: Indicates whether the branded logo was displayed during the in_brand branded call. Possible values are true (logo was present) or false (logo was not present).
        :param str branded_type: Indicates whether the Branded Call is in_band vs out_of_band.
        :param str branded_use_case: Specifies the user-defined purpose for the call, as provided during the setup of in_band branded calling.
        :param str branded_call_reason: Specifies the user-defined reason for the call, which will be displayed to the end user on their mobile device during an in_band branded call.
        :param str voice_integrity_bundle_sid: A unique SID identifier of the Voice Integrity Profile.
        :param str voice_integrity_use_case: A Voice Integrity Use Case . Is of type enum. One of 'abandoned_cart', 'appointment_reminders', 'appointment_scheduling', 'asset_management', 'automated_support', 'call_tracking', 'click_to_call', 'contact_tracing', 'contactless_delivery', 'customer_support', 'dating/social', 'delivery_notifications', 'distance_learning', 'emergency_notifications', 'employee_notifications', 'exam_proctoring', 'field_notifications', 'first_responder', 'fraud_alerts', 'group_messaging', 'identify_&_verification', 'intelligent_routing', 'lead_alerts', 'lead_distribution', 'lead_generation', 'lead_management', 'lead_nurturing', 'marketing_events', 'mass_alerts', 'meetings/collaboration', 'order_notifications', 'outbound_dialer', 'pharmacy', 'phone_system', 'purchase_confirmation', 'remote_appointments', 'rewards_program', 'self-service', 'service_alerts', 'shift_management', 'survey/research', 'telehealth', 'telemarketing', 'therapy_(individual+group)'.
        :param str business_profile_identity: A Business Identity of the calls. Is of type enum. One of 'direct_customer', 'isv_reseller_or_partner'.
        :param str business_profile_industry: A Business Industry of the calls. Is of type enum. One of 'automotive', 'agriculture', 'banking', 'consumer', 'construction', 'education', 'engineering', 'energy', 'oil_and_gas', 'fast_moving_consumer_goods', 'financial', 'fintech', 'food_and_beverage', 'government', 'healthcare', 'hospitality', 'insurance', 'legal', 'manufacturing', 'media', 'online', 'professional_services', 'raw_materials', 'real_estate', 'religion', 'retail', 'jewelry', 'technology', 'telecommunications', 'transportation', 'travel', 'electronics', 'not_for_profit'
        :param str business_profile_bundle_sid: A unique SID identifier of the Business Profile.
        :param str business_profile_type: A Business Profile Type of the calls. Is of type enum. One of 'primary', 'secondary'.
        :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   rm   r   r   r   r   r   r   r[   r\   rf   rg   r   rh   r   r   r   re   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Nr   r'   )r   r   
page_asyncstream_asyncr   s)                                            r)   r   zCallSummariesList.stream_async;  s    | **5)<$T__ &
&
&
 &&
 "	&

 0&
 ,&
 ,&
 &
 "&
 &
  &
 "&
  &
 .&
 &
  "!&
" .#&
$ $%&
& $:'&
( +H)&
* &>+&
, ,-&
. #8/&
0 ,1&
2 %<3&
4  25&
6 &7&
8 &9&
: .;&
< !4=&
> (B?&
@ &>A&
B '@C&
D '@E&
F )DG&
H #8I&
J [)K&
 &
P }}))$w@@Q&
s   B"C
$C%$C
c'                    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|d|d|d|d|d|d | d!|!d"|"d#|#d$|$d%|%d&|&      S )(aB  
        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 verified_caller: A boolean flag indicating whether or not the caller was verified using SHAKEN/STIR.One of 'true' or 'false'.
        :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 bool branded_enabled: A boolean flag indicating whether or not the calls were branded using Twilio Branded Calls. One of 'true' or 'false'
        :param bool voice_integrity_enabled: A boolean flag indicating whether or not the phone number had voice integrity enabled.One of 'true' or 'false'
        :param str branded_bundle_sid: A unique SID identifier of the Branded Call.
        :param bool branded_logo: Indicates whether the branded logo was displayed during the in_brand branded call. Possible values are true (logo was present) or false (logo was not present).
        :param str branded_type: Indicates whether the Branded Call is in_band vs out_of_band.
        :param str branded_use_case: Specifies the user-defined purpose for the call, as provided during the setup of in_band branded calling.
        :param str branded_call_reason: Specifies the user-defined reason for the call, which will be displayed to the end user on their mobile device during an in_band branded call.
        :param str voice_integrity_bundle_sid: A unique SID identifier of the Voice Integrity Profile.
        :param str voice_integrity_use_case: A Voice Integrity Use Case . Is of type enum. One of 'abandoned_cart', 'appointment_reminders', 'appointment_scheduling', 'asset_management', 'automated_support', 'call_tracking', 'click_to_call', 'contact_tracing', 'contactless_delivery', 'customer_support', 'dating/social', 'delivery_notifications', 'distance_learning', 'emergency_notifications', 'employee_notifications', 'exam_proctoring', 'field_notifications', 'first_responder', 'fraud_alerts', 'group_messaging', 'identify_&_verification', 'intelligent_routing', 'lead_alerts', 'lead_distribution', 'lead_generation', 'lead_management', 'lead_nurturing', 'marketing_events', 'mass_alerts', 'meetings/collaboration', 'order_notifications', 'outbound_dialer', 'pharmacy', 'phone_system', 'purchase_confirmation', 'remote_appointments', 'rewards_program', 'self-service', 'service_alerts', 'shift_management', 'survey/research', 'telehealth', 'telemarketing', 'therapy_(individual+group)'.
        :param str business_profile_identity: A Business Identity of the calls. Is of type enum. One of 'direct_customer', 'isv_reseller_or_partner'.
        :param str business_profile_industry: A Business Industry of the calls. Is of type enum. One of 'automotive', 'agriculture', 'banking', 'consumer', 'construction', 'education', 'engineering', 'energy', 'oil_and_gas', 'fast_moving_consumer_goods', 'financial', 'fintech', 'food_and_beverage', 'government', 'healthcare', 'hospitality', 'insurance', 'legal', 'manufacturing', 'media', 'online', 'professional_services', 'raw_materials', 'real_estate', 'religion', 'retail', 'jewelry', 'technology', 'telecommunications', 'transportation', 'travel', 'electronics', 'not_for_profit'
        :param str business_profile_bundle_sid: A unique SID identifier of the Business Profile.
        :param str business_profile_type: A Business Profile Type of the calls. Is of type enum. One of 'primary', 'secondary'.
        :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   rm   r   r   r   r   r   r   r[   r\   rf   rg   r   rh   r   r   r   re   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r'   )listr   )'r~   r   rm   r   r   r   r   r   r   r[   r\   rf   rg   r   rh   r   r   r   re   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   s'                                          r)   r   zCallSummariesList.list  s   z DKK ''' *' &	'
 #4' !0' !0'  ' &' "' $' &' $' "2'  '  &!'" "2#'$ (%'& (>''( /L)'* *B+', !0-'. '</'0 !01'2 )@3'4 $65'6 *7'8 *9': "2;'< %8='> ,F?'@ *BA'B +DC'D +DE'F -HG'H '<I'J K'L $M')
 )	
r(   c'                 X  K    | 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|d|d|d|d|d|d | d!|!d"|"d#|#d$|$d%|%d&|& d'{   2 'cg c3 d'{   }'|'7 7 	6 c}'S c c}'w w))aQ  
        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 verified_caller: A boolean flag indicating whether or not the caller was verified using SHAKEN/STIR.One of 'true' or 'false'.
        :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 bool branded_enabled: A boolean flag indicating whether or not the calls were branded using Twilio Branded Calls. One of 'true' or 'false'
        :param bool voice_integrity_enabled: A boolean flag indicating whether or not the phone number had voice integrity enabled.One of 'true' or 'false'
        :param str branded_bundle_sid: A unique SID identifier of the Branded Call.
        :param bool branded_logo: Indicates whether the branded logo was displayed during the in_brand branded call. Possible values are true (logo was present) or false (logo was not present).
        :param str branded_type: Indicates whether the Branded Call is in_band vs out_of_band.
        :param str branded_use_case: Specifies the user-defined purpose for the call, as provided during the setup of in_band branded calling.
        :param str branded_call_reason: Specifies the user-defined reason for the call, which will be displayed to the end user on their mobile device during an in_band branded call.
        :param str voice_integrity_bundle_sid: A unique SID identifier of the Voice Integrity Profile.
        :param str voice_integrity_use_case: A Voice Integrity Use Case . Is of type enum. One of 'abandoned_cart', 'appointment_reminders', 'appointment_scheduling', 'asset_management', 'automated_support', 'call_tracking', 'click_to_call', 'contact_tracing', 'contactless_delivery', 'customer_support', 'dating/social', 'delivery_notifications', 'distance_learning', 'emergency_notifications', 'employee_notifications', 'exam_proctoring', 'field_notifications', 'first_responder', 'fraud_alerts', 'group_messaging', 'identify_&_verification', 'intelligent_routing', 'lead_alerts', 'lead_distribution', 'lead_generation', 'lead_management', 'lead_nurturing', 'marketing_events', 'mass_alerts', 'meetings/collaboration', 'order_notifications', 'outbound_dialer', 'pharmacy', 'phone_system', 'purchase_confirmation', 'remote_appointments', 'rewards_program', 'self-service', 'service_alerts', 'shift_management', 'survey/research', 'telehealth', 'telemarketing', 'therapy_(individual+group)'.
        :param str business_profile_identity: A Business Identity of the calls. Is of type enum. One of 'direct_customer', 'isv_reseller_or_partner'.
        :param str business_profile_industry: A Business Industry of the calls. Is of type enum. One of 'automotive', 'agriculture', 'banking', 'consumer', 'construction', 'education', 'engineering', 'energy', 'oil_and_gas', 'fast_moving_consumer_goods', 'financial', 'fintech', 'food_and_beverage', 'government', 'healthcare', 'hospitality', 'insurance', 'legal', 'manufacturing', 'media', 'online', 'professional_services', 'raw_materials', 'real_estate', 'religion', 'retail', 'jewelry', 'technology', 'telecommunications', 'transportation', 'travel', 'electronics', 'not_for_profit'
        :param str business_profile_bundle_sid: A unique SID identifier of the Business Profile.
        :param str business_profile_type: A Business Profile Type of the calls. Is of type enum. One of 'primary', 'secondary'.
        :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   rm   r   r   r   r   r   r   r[   r\   rf   rg   r   rh   r   r   r   re   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Nr'   )r   )(r~   r   rm   r   r   r   r   r   r   r[   r\   rf   rg   r   rh   r   r   r   re   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   records(                                           r)   
list_asynczCallSummariesList.list_asyncL  s    ~ '8d&7&7 '''''' *'' &	''
 #4'' !0'' !0''  '' &'' "'' $'' &'' $'' "2''  ''  &!''" "2#''$ (%''& (>'''( /L)''* *B+'', !0-''. '</''0 !01''2 )@3''4 $65''6 *7''8 *9'': "2;''< %8=''> ,F?''@ *BA''B +DC''D +DE''F -HG''H '<I''J K''L $M'' '!*
 *
 '!*
 *
 *	
 *
sH   BB*B	B*B%B!B
B!B%B*B!!B%"B*
page_tokenpage_numberc(           	         t        j                  i d|d|d|d|d|d|dt        j                  |      dt        j                  |      d	|	d
|
d|d|d|d|d|d|dt        j                  |      i d|d|d|d|dt        j                  |      d|dt        j                  |      dt        j                  |      d|dt        j                  |      d|d|d|d|d | d!|!d"|"|#|$|%|&|'d#      }(t        j                  d$d%i      })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 verified_caller: A boolean flag indicating whether or not the caller was verified using SHAKEN/STIR.One of 'true' or 'false'.
        :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 branded_enabled: A boolean flag indicating whether or not the calls were branded using Twilio Branded Calls. One of 'true' or 'false'
        :param voice_integrity_enabled: A boolean flag indicating whether or not the phone number had voice integrity enabled.One of 'true' or 'false'
        :param branded_bundle_sid: A unique SID identifier of the Branded Call.
        :param branded_logo: Indicates whether the branded logo was displayed during the in_brand branded call. Possible values are true (logo was present) or false (logo was not present).
        :param branded_type: Indicates whether the Branded Call is in_band vs out_of_band.
        :param branded_use_case: Specifies the user-defined purpose for the call, as provided during the setup of in_band branded calling.
        :param branded_call_reason: Specifies the user-defined reason for the call, which will be displayed to the end user on their mobile device during an in_band branded call.
        :param voice_integrity_bundle_sid: A unique SID identifier of the Voice Integrity Profile.
        :param voice_integrity_use_case: A Voice Integrity Use Case . Is of type enum. One of 'abandoned_cart', 'appointment_reminders', 'appointment_scheduling', 'asset_management', 'automated_support', 'call_tracking', 'click_to_call', 'contact_tracing', 'contactless_delivery', 'customer_support', 'dating/social', 'delivery_notifications', 'distance_learning', 'emergency_notifications', 'employee_notifications', 'exam_proctoring', 'field_notifications', 'first_responder', 'fraud_alerts', 'group_messaging', 'identify_&_verification', 'intelligent_routing', 'lead_alerts', 'lead_distribution', 'lead_generation', 'lead_management', 'lead_nurturing', 'marketing_events', 'mass_alerts', 'meetings/collaboration', 'order_notifications', 'outbound_dialer', 'pharmacy', 'phone_system', 'purchase_confirmation', 'remote_appointments', 'rewards_program', 'self-service', 'service_alerts', 'shift_management', 'survey/research', 'telehealth', 'telemarketing', 'therapy_(individual+group)'.
        :param business_profile_identity: A Business Identity of the calls. Is of type enum. One of 'direct_customer', 'isv_reseller_or_partner'.
        :param business_profile_industry: A Business Industry of the calls. Is of type enum. One of 'automotive', 'agriculture', 'banking', 'consumer', 'construction', 'education', 'engineering', 'energy', 'oil_and_gas', 'fast_moving_consumer_goods', 'financial', 'fintech', 'food_and_beverage', 'government', 'healthcare', 'hospitality', 'insurance', 'legal', 'manufacturing', 'media', 'online', 'professional_services', 'raw_materials', 'real_estate', 'religion', 'retail', 'jewelry', 'technology', 'telecommunications', 'transportation', 'travel', 'electronics', 'not_for_profit'
        :param business_profile_bundle_sid: A unique SID identifier of the Business Profile.
        :param business_profile_type: A Business Profile Type of the calls. Is of type enum. One of 'primary', 'secondary'.
        :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VerifiedCallerHasTag	StartTimeEndTimerJ   r=   	DirectionrQ   r_   
SubaccountAbnormalSessionr*   AnsweredByAnnotationConnectivityIssueAnnotationQualityIssueAnnotationSpamAnnotationCallScoreAnnotationBrandedEnabledVoiceIntegrityEnabledBrandedBundleSidBrandedLogoBrandedTypeBrandedUseCaseBrandedCallReasonVoiceIntegrityBundleSidVoiceIntegrityUseCaseBusinessProfileIdentityBusinessProfileIndustryBusinessProfileBundleSidBusinessProfileType	PageTokenr   PageSizeContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptGETmethoduriparamsheaders)r   ofr   boolean_to_stringr   r   r   r   +r~   r   rm   r   r   r   r   r   r   r[   r\   rf   rg   r   rh   r   r   r   re   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   datar   responses+                                              r)   r   zCallSummariesList.page  s   t yy**b* |* Z	*
 "#4*  * !)"="=o"N* )55g>* Z* 8* I* Z* Y* "#3* '*  j!*" "9#>#>?O#P#*$ k%*& '(>'*( ./L)** )*B+*, !)"="=o"N-*. &'</*0 !)"="=o"N1*2 ()D)D+*3*8 #$69*: y::<H;*< |=*> !"2?*@ $%8A*B *+EC*D ()AE*F *+DG*H *+DI*J -H'<'#%S*,
\ ))^-PQR.==%%diig & 
 !99r(   c(           	        K   t        j                  i d|d|d|d|d|d|dt        j                  |      dt        j                  |      d	|	d
|
d|d|d|d|d|d|dt        j                  |      i d|d|d|d|dt        j                  |      d|dt        j                  |      dt        j                  |      d|dt        j                  |      d|d|d|d|d | d!|!d"|"|#|$|%|&|'d#      }(t        j                  d$d%i      })d&|)d'<   | j                  j                  d(| j                  |(|))       d*{   }*t        | j                  |*      S 7 w)+a  
        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 verified_caller: A boolean flag indicating whether or not the caller was verified using SHAKEN/STIR.One of 'true' or 'false'.
        :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 branded_enabled: A boolean flag indicating whether or not the calls were branded using Twilio Branded Calls. One of 'true' or 'false'
        :param voice_integrity_enabled: A boolean flag indicating whether or not the phone number had voice integrity enabled.One of 'true' or 'false'
        :param branded_bundle_sid: A unique SID identifier of the Branded Call.
        :param branded_logo: Indicates whether the branded logo was displayed during the in_brand branded call. Possible values are true (logo was present) or false (logo was not present).
        :param branded_type: Indicates whether the Branded Call is in_band vs out_of_band.
        :param branded_use_case: Specifies the user-defined purpose for the call, as provided during the setup of in_band branded calling.
        :param branded_call_reason: Specifies the user-defined reason for the call, which will be displayed to the end user on their mobile device during an in_band branded call.
        :param voice_integrity_bundle_sid: A unique SID identifier of the Voice Integrity Profile.
        :param voice_integrity_use_case: A Voice Integrity Use Case . Is of type enum. One of 'abandoned_cart', 'appointment_reminders', 'appointment_scheduling', 'asset_management', 'automated_support', 'call_tracking', 'click_to_call', 'contact_tracing', 'contactless_delivery', 'customer_support', 'dating/social', 'delivery_notifications', 'distance_learning', 'emergency_notifications', 'employee_notifications', 'exam_proctoring', 'field_notifications', 'first_responder', 'fraud_alerts', 'group_messaging', 'identify_&_verification', 'intelligent_routing', 'lead_alerts', 'lead_distribution', 'lead_generation', 'lead_management', 'lead_nurturing', 'marketing_events', 'mass_alerts', 'meetings/collaboration', 'order_notifications', 'outbound_dialer', 'pharmacy', 'phone_system', 'purchase_confirmation', 'remote_appointments', 'rewards_program', 'self-service', 'service_alerts', 'shift_management', 'survey/research', 'telehealth', 'telemarketing', 'therapy_(individual+group)'.
        :param business_profile_identity: A Business Identity of the calls. Is of type enum. One of 'direct_customer', 'isv_reseller_or_partner'.
        :param business_profile_industry: A Business Industry of the calls. Is of type enum. One of 'automotive', 'agriculture', 'banking', 'consumer', 'construction', 'education', 'engineering', 'energy', 'oil_and_gas', 'fast_moving_consumer_goods', 'financial', 'fintech', 'food_and_beverage', 'government', 'healthcare', 'hospitality', 'insurance', 'legal', 'manufacturing', 'media', 'online', 'professional_services', 'raw_materials', 'real_estate', 'religion', 'retail', 'jewelry', 'technology', 'telecommunications', 'transportation', 'travel', 'electronics', 'not_for_profit'
        :param business_profile_bundle_sid: A unique SID identifier of the Business Profile.
        :param business_profile_type: A Business Profile Type of the calls. Is of type enum. One of 'primary', 'secondary'.
        :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   rJ   r=   r   rQ   r_   r   r   r*   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   N)r   r   r   r   r   r   r   r   r   s+                                              r)   r   zCallSummariesList.page_asyncf  s    t yy**b* |* Z	*
 "#4*  * !)"="=o"N* )55g>* Z* 8* I* Z* Y* "#3* '*  j!*" "9#>#>?O#P#*$ k%*& '(>'*( ./L)** )*B+*, !)"="=o"N-*. &'</*0 !)"="=o"N1*2 ()D)D+*3*8 #$69*: y::<H;*< |=*> !"2?*@ $%8A*B *+EC*D ()AE*F *+DG*H *+DI*J -H'<'#%S*,
\ ))^-PQR.11diig 2 
 
 !99
s   EE2E0E2
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   ry   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/5||7=||17,2LL+1<</5||28,,9?7=||8>8>:@,,4:LL##'SG;S&[!G; #v+G; CK(	G;
 #v+&G; !f-G; sF{+G; tV|,G; tV|$G; #v+&G; V$G; f%G; #v+&G; f%G;  :FB
G;$ 5v=>%G;& #v+&'G;(  f-)G;* =vEF+G;, !&c6k 2-G;. (-S&['9/G;0 #(V"41G;2 tV|,3G;4  %S&[15G;6 tV|,7G;8 "'tV|!49G;: "#v+.;G;< D&L)=G;> CK(?G;@  V,AG;B #3;/CG;D %*#v+$6EG;F #(V"4GG;H $)f#5IG;J $)f#5KG;L &+3;%7MG;N  %S&[1OG;P }QG;R C=SG;T 
'	(UG;V %+LL!'+1<<)/06.4ll/5||'-||)/'-||(.)/(. LLAG)/06IO5;\\<BLL7=||/5||4:LL/5||7=||17,2LL+1<</5||28,,9?7=||8>8>:@,,4:LL##'SGAS&[!GA #v+GA CK(	GA
 #v+&GA !f-GA sF{+GA tV|,GA tV|$GA #v+&GA V$GA f%GA #v+&GA f%GA  :FB
GA$ 5v=>%GA& #v+&'GA(  f-)GA* =vEF+GA, !&c6k 2-GA. (-S&['9/GA0 #(V"41GA2 tV|,3GA4  %S&[15GA6 tV|,7GA8 "'tV|!49GA: "#v+.;GA< D&L)=GA> CK(?GA@  V,AGAB #3;/CGAD %*#v+$6EGAF #(V"4GGAH $)f#5IGAJ $)f#5KGAL &+3;%7MGAN  %S&[1OGAP }QGAR C=SGAT 
,	-UGAV %+LL!'+1<<)/06.4ll/5||'-||)/'-||(.)/(. LLAG)/06IO5;\\<BLL7=||/5||4:LL/5||7=||17,2LL+1<</5||28,,9?7=||8>8>:@,,4:LL##'SF
S&[!F
 #v+F
 CK(	F

 #v+&F
 !f-F
 sF{+F
 tV|,F
 tV|$F
 #v+&F
 V$F
 f%F
 #v+&F
 f%F
  :FB
F
$ 5v=>%F
& #v+&'F
(  f-)F
* =vEF+F
, !&c6k 2-F
. (-S&['9/F
0 #(V"41F
2 tV|,3F
4  %S&[15F
6 tV|,7F
8 "'tV|!49F
: "#v+.;F
< D&L)=F
> CK(?F
@  V,AF
B #3;/CF
D %*#v+$6EF
F #(V"4GF
H $)f#5IF
J $)f#5KF
L &+3;%7MF
N  %S&[1OF
P }QF
R C=SF
T 
#	$UF
T %+LL!'+1<<)/06.4ll/5||'-||)/'-||(.)/(. LLAG)/06IO5;\\<BLL7=||/5||4:LL/5||7=||17,2LL+1<</5||28,,9?7=||8>8>:@,,4:LL##'SG
S&[!G
 #v+G
 CK(	G

 #v+&G
 !f-G
 sF{+G
 tV|,G
 tV|$G
 #v+&G
 V$G
 f%G
 #v+&G
 f%G
  :FB
G
$ 5v=>%G
& #v+&'G
(  f-)G
* =vEF+G
, !&c6k 2-G
. (-S&['9/G
0 #(V"41G
2 tV|,3G
4  %S&[15G
6 tV|,7G
8 "'tV|!49G
: "#v+.;G
< D&L)=G
> CK(?G
@  V,AG
B #3;/CG
D %*#v+$6EG
F #(V"4GG
H $)f#5IG
J $)f#5KG
L &+3;%7MG
N  %S&[1OG
P }QG
R C=SG
T 
#	$UG
V %+LL!'+1<<)/06.4ll/5||'-||)/'-||(.)/(. LLAG)/06IO5;\\<BLL7=||/5||4:LL/5||7=||17,2LL+1<</5||28,,9?7=||8>8>:@,,4:LL)/*0,,(.UO:S&[!O: #v+O: CK(	O:
 #v+&O: !f-O: sF{+O: tV|,O: tV|$O: #v+&O: V$O: f%O: #v+&O: f%O:  :FB
O:$ 5v=>%O:& #v+&'O:(  f-)O:* =vEF+O:, !&c6k 2-O:. (-S&['9/O:0 #(V"41O:2 tV|,3O:4  %S&[15O:6 tV|,7O:8 "'tV|!49O:: "#v+.;O:< D&L)=O:> CK(?O:@  V,AO:B #3;/CO:D %*#v+$6EO:F #(V"4GO:H $)f#5IO:J $)f#5KO:L &+3;%7MO:N  %S&[1OO:P #v+&QO:R 3;'SO:T f%UO:V 
WO:f %+LL!'+1<<)/06.4ll/5||'-||)/'-||(.)/(. LLAG)/06IO5;\\<BLL7=||/5||4:LL/5||7=||17,2LL+1<</5||28,,9?7=||8>8>:@,,4:LL)/*0,,(.UO:S&[!O: #v+O: CK(	O:
 #v+&O: !f-O: sF{+O: tV|,O: tV|$O: #v+&O: V$O: f%O: #v+&O: f%O:  :FB
O:$ 5v=>%O:& #v+&'O:(  f-)O:* =vEF+O:, !&c6k 2-O:. (-S&['9/O:0 #(V"41O:2 tV|,3O:4  %S&[15O:6 tV|,7O:8 "'tV|!49O:: "#v+.;O:< D&L)=O:> CK(?O:@  V,AO:B #3;/CO:D %*#v+$6EO:F #(V"4GO:H $)f#5IO:J $)f#5KO:L &+3;%7MO:N  %S&[1OO:P #v+&QO:R 3;'SO:T f%UO:V 
WO:b
:3 
:+< 
:
:s 
:7H 
:8# 8r(   r   N)__doc__r   typingr   r   r   r   r   r	   r
   twilio.baser   r   r   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r   r   r'   r(   r)   <module>r     sT     L L L 6 6 : 2 ' !v<, v<r8 8&p8 p8r(   