U
    ^g%iF                     @   s   d Z ddl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	 d	eZG d
d deZG dd deZdS )a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Insights
    This is the public Twilio REST API.

    NOTE: This class is auto generated by OpenAPI Generator.
    https://openapi-generator.tech
    Do not edit the class manually.
    )AnyDictListOptionalUnion)deserialize	serializevalues)InstanceContext)InstanceResource)ListResource)Versionc                
       sn  e Zd ZG dd deZG dd deZeeee	f ed fddZ
edd	d
dZd d	ddZd d	ddZejejejejejejejfedef edef eeef eeef eeef eeef eeef d dddZejejejejejejejfedef edef eeef eeef eeef eeef eeef d dddZed	ddZ  ZS )AnnotationInstancec                   @   s   e Zd ZdZdZdZdS )AnnotationInstance.AnsweredByZunknown_answered_byZhumanmachineN)__name__
__module____qualname__ZUNKNOWN_ANSWERED_BYZHUMANZMACHINE r   r   f/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/insights/v1/call/annotation.py
AnsweredBy   s   r   c                   @   s$   e Zd ZdZdZdZdZdZdZdS )$AnnotationInstance.ConnectivityIssueZunknown_connectivity_issueZno_connectivity_issueZinvalid_numberZ	caller_idZdropped_callZnumber_reachabilityN)	r   r   r   ZUNKNOWN_CONNECTIVITY_ISSUEZNO_CONNECTIVITY_ISSUEZINVALID_NUMBERZ	CALLER_IDZDROPPED_CALLZNUMBER_REACHABILITYr   r   r   r   ConnectivityIssue   s   r   )versionpayloadcall_sidc                    s   t  | |d| _|d| _|d| _|d| _|d| _|d| _t	
|d| _|d| _|d	| _|d
| _d|i| _d | _d S )Nr   account_sidanswered_byconnectivity_issuequality_issuesspam
call_scorecommentincidenturl)super__init__getr   r   r   r   r   r    r   integerr!   r"   r#   r$   	_solution_context)selfr   r   r   	__class__r   r   r&   3   s$     zAnnotationInstance.__init__AnnotationContextreturnc                 C   s&   | j dkr t| j| jd d| _ | j S )z
        Generate an instance context for the instance, the context is capable of
        performing various actions. All instance actions are proxied to the context

        :returns: AnnotationContext for this AnnotationInstance
        Nr   r   )r*   r.   _versionr)   r+   r   r   r   _proxyJ   s    
zAnnotationInstance._proxyc                 C   s
   | j  S )a
        Fetch the AnnotationInstance


        :returns: The fetched AnnotationInstance
        )r4   fetchr3   r   r   r   r6   Y   s    zAnnotationInstance.fetchc                    s   | j  I dH S ){
        Asynchronous coroutine to fetch the AnnotationInstance


        :returns: The fetched AnnotationInstance
        N)r4   fetch_asyncr3   r   r   r   r8   b   s    zAnnotationInstance.fetch_asyncr   r   r   r   r   r    r!   r"   r#   r0   c              	   C   s   | j j|||||||dS )  
        Update the AnnotationInstance

        :param answered_by:
        :param connectivity_issue:
        :param quality_issues: Specify if the call had any subjective quality issues. Possible values, one or more of `no_quality_issue`, `low_volume`, `choppy_robotic`, `echo`, `dtmf`, `latency`, `owa`, `static_noise`. Use comma separated values to indicate multiple quality issues for the same call.
        :param spam: A boolean flag to indicate if the call was a spam call. Use this to provide feedback on whether calls placed from your account were marked as spam, or if inbound calls received by your account were unwanted spam. Use `true` if the call was a spam call.
        :param call_score: Specify the call score. This is of type integer. Use a range of 1-5 to indicate the call experience score, with the following mapping as a reference for rating the call [5: Excellent, 4: Good, 3 : Fair, 2 : Poor, 1: Bad].
        :param comment: Specify any comments pertaining to the call. `comment` has a maximum character limit of 100. Twilio does not treat this field as PII, so no PII should be included in the `comment`.
        :param incident: Associate this call with an incident or support ticket. The `incident` parameter is of type string with a maximum character limit of 100. Twilio does not treat this field as PII, so no PII should be included in `incident`.

        :returns: The updated AnnotationInstance
        r   r   r   r    r!   r"   r#   )r4   updater+   r   r   r   r    r!   r"   r#   r   r   r   r<   k   s    zAnnotationInstance.updatec              	      s    | j j|||||||dI dH S )  
        Asynchronous coroutine to update the AnnotationInstance

        :param answered_by:
        :param connectivity_issue:
        :param quality_issues: Specify if the call had any subjective quality issues. Possible values, one or more of `no_quality_issue`, `low_volume`, `choppy_robotic`, `echo`, `dtmf`, `latency`, `owa`, `static_noise`. Use comma separated values to indicate multiple quality issues for the same call.
        :param spam: A boolean flag to indicate if the call was a spam call. Use this to provide feedback on whether calls placed from your account were marked as spam, or if inbound calls received by your account were unwanted spam. Use `true` if the call was a spam call.
        :param call_score: Specify the call score. This is of type integer. Use a range of 1-5 to indicate the call experience score, with the following mapping as a reference for rating the call [5: Excellent, 4: Good, 3 : Fair, 2 : Poor, 1: Bad].
        :param comment: Specify any comments pertaining to the call. `comment` has a maximum character limit of 100. Twilio does not treat this field as PII, so no PII should be included in the `comment`.
        :param incident: Associate this call with an incident or support ticket. The `incident` parameter is of type string with a maximum character limit of 100. Twilio does not treat this field as PII, so no PII should be included in `incident`.

        :returns: The updated AnnotationInstance
        r;   N)r4   update_asyncr=   r   r   r   r?      s    zAnnotationInstance.update_asyncc                 C   s$   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s   s   | ]\}}d  ||V  qdS z{}={}Nformat.0kvr   r   r   	<genexpr>   s     z.AnnotationInstance.__repr__.<locals>.<genexpr>z*<Twilio.Insights.V1.AnnotationInstance {}>joinr)   itemsrD   r+   contextr   r   r   __repr__   s    zAnnotationInstance.__repr__)r   r   r   objectr   r   r   r   strr   r&   propertyr4   r6   r8   r	   unsetr   boolintr<   r?   rO   __classcell__r   r   r,   r   r      s\   	





%





#r   c                
       s2  e Zd Zeed fddZedddZedddZe	j
e	j
e	j
e	j
e	j
e	j
e	j
fed	ef ed
ef eeef eeef eeef eeef eeef edddZe	j
e	j
e	j
e	j
e	j
e	j
e	j
fed	ef ed
ef eeef eeef eeef eeef eeef edddZedddZ  ZS )r.   r   r   c                    s*   t  | d|i| _djf | j| _dS )z
        Initialize the AnnotationContext

        :param version: Version that contains the resource
        :param call_sid: The unique string that Twilio created to identify this Call resource. It always starts with a CA.
        r   z/Voice/{call_sid}/AnnotationN)r%   r&   r)   rD   _urir+   r   r   r,   r   r   r&      s
     zAnnotationContext.__init__r/   c                 C   s<   t i }d|d< | jjd| j|d}t| j|| jd dS )r5   application/jsonAcceptGETmethoduriheadersr   r1   )r	   ofr2   r6   rX   r   r)   r+   r`   r   r   r   r   r6      s    
zAnnotationContext.fetchc                    sB   t i }d|d< | jjd| j|dI dH }t| j|| jd dS )r7   rZ   r[   r\   r]   Nr   r1   )r	   ra   r2   r8   rX   r   r)   rb   r   r   r   r8      s    
  zAnnotationContext.fetch_asyncr   r   r9   c              
   C   sf   t |||t||||d}t i }	d|	d< d|	d< | jjd| j||	d}
t| j|
| jd d	S )
r:   r   r   ZQualityIssuesZSpamZ	CallScoreCommentZIncident!application/x-www-form-urlencodedContent-TyperZ   r[   POSTr^   r_   datar`   r   r1   )	r	   ra   r   boolean_to_stringr2   r<   rX   r   r)   r+   r   r   r   r    r!   r"   r#   ri   r`   r   r   r   r   r<      s0    
     zAnnotationContext.updatec              
      sl   t |||t||||d}t i }	d|	d< d|	d< | jjd| j||	dI dH }
t| j|
| jd	 d
S )r>   rc   re   rf   rZ   r[   rg   rh   Nr   r1   )	r	   ra   r   rj   r2   r?   rX   r   r)   rk   r   r   r   r?   )  s0    
     zAnnotationContext.update_asyncc                 C   s$   d dd | j D }d|S )r@   rA   c                 s   s   | ]\}}d  ||V  qdS rB   rC   rE   r   r   r   rI   b  s     z-AnnotationContext.__repr__.<locals>.<genexpr>z)<Twilio.Insights.V1.AnnotationContext {}>rJ   rM   r   r   r   rO   \  s    zAnnotationContext.__repr__)r   r   r   r   rQ   r&   r   r6   r8   r	   rS   r   rP   rT   rU   r<   r?   rO   rV   r   r   r,   r   r.      sT   





5





3r.   c                       sN   e Zd Zeed fddZedddZedddZedd	d
Z	  Z
S )AnnotationListrW   c                    s   t  | d|i| _dS )z
        Initialize the AnnotationList

        :param version: Version that contains the resource
        :param call_sid: The unique SID identifier of the Call.

        r   N)r%   r&   r)   rY   r,   r   r   r&   h  s     zAnnotationList.__init__r/   c                 C   s   t | j| jd dS z1
        Constructs a AnnotationContext

        r   r1   r.   r2   r)   r3   r   r   r   r'   w  s    zAnnotationList.getc                 C   s   t | j| jd dS rm   rn   r3   r   r   r   __call__~  s    zAnnotationList.__call__c                 C   s   dS )r@   z#<Twilio.Insights.V1.AnnotationList>r   r3   r   r   r   rO     s    zAnnotationList.__repr__)r   r   r   r   rQ   r&   r.   r'   ro   rO   rV   r   r   r,   r   rl   f  s   rl   N)__doc__typingr   r   r   r   r   Ztwilio.baser   r   r	   Ztwilio.base.instance_contextr
   Ztwilio.base.instance_resourcer   Ztwilio.base.list_resourcer   Ztwilio.base.versionr   r   r.   rl   r   r   r   r   <module>   s    % ,