a
    !fD                     @   s   d Z ddlmZmZmZmZmZ ddlmZm	Z	 ddl
mZ ddlmZ ddlmZ ddlmZ G dd	 d	eZG d
d deZG dd deZdS )a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Insights
    This is the public Twilio REST API.

    NOTE: This class is auto generated by OpenAPI Generator.
    https://openapi-generator.tech
    Do not edit the class manually.
    )AnyDictListOptionalUnion)deserialize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   h/var/www/html/python-backend/venv/lib/python3.9/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u 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
        )r3   fetchr2   r   r   r   r5   Y   s    zAnnotationInstance.fetchc                    s   | j  I dH S ){
        Asynchronous coroutine to fetch the AnnotationInstance


        :returns: The fetched AnnotationInstance
        N)r3   fetch_asyncr2   r   r   r   r7   b   s    zAnnotationInstance.fetch_asyncr   r   r   r   r   r   r    r!   r"   r/   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"   )r3   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)r3   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>       z.AnnotationInstance.__repr__.<locals>.<genexpr>z*<Twilio.Insights.V1.AnnotationInstance {}>joinr(   itemsrC   r*   contextr   r   r   __repr__   s    zAnnotationInstance.__repr__)r   r   r   objectr   r   r   r   strr   r%   propertyr3   r5   r7   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 i | 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(   rC   _urir*   r   r   r+   r   r   r%      s    zAnnotationContext.__init__r.   c                 C   s(   | j jd| jd}t| j || jd dS )r4   GETmethodurir   r0   )r1   r5   rX   r   r(   r*   r   r   r   r   r5      s    zAnnotationContext.fetchc                    s.   | j jd| jdI dH }t| j || jd dS )r6   rZ   r[   Nr   r0   )r1   r7   rX   r   r(   r^   r   r   r   r7      s    zAnnotationContext.fetch_asyncr   r   r8   c           
   
   C   sD   t |||||||d}| jjd| j|d}	t| j|	| jd dS )r9   r   r   ZQualityIssuesZSpamZ	CallScoreCommentZIncidentPOSTr\   r]   datar   r0   )r   ofr1   r;   rX   r   r(   
r*   r   r   r   r   r    r!   r"   rc   r   r   r   r   r;      s$    zAnnotationContext.updatec           
   
      sJ   t |||||||d}| jjd| j|dI dH }	t| j|	| jd dS )r=   r_   ra   rb   Nr   r0   )r   rd   r1   r>   rX   r   r(   re   r   r   r   r>      s$    zAnnotationContext.update_asyncc                 C   s$   d dd | j D }d|S )r?   r@   c                 s   s   | ]\}}d  ||V  qdS rA   rB   rD   r   r   r   rH   U  rI   z-AnnotationContext.__repr__.<locals>.<genexpr>z)<Twilio.Insights.V1.AnnotationContext {}>rJ   rM   r   r   r   rO   O  s    zAnnotationContext.__repr__)r   r   r   r   rQ   r%   r   r5   r7   r   rS   r   rP   rT   rU   r;   r>   rO   rV   r   r   r+   r   r-      sT   





1





/r-   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%   Z  s    zAnnotationList.__init__r.   c                 C   s   t | j| jd dS z1
        Constructs a AnnotationContext

        r   r0   r-   r1   r(   r2   r   r   r   r&   i  s    zAnnotationList.getc                 C   s   t | j| jd dS rg   rh   r2   r   r   r   __call__p  s    zAnnotationList.__call__c                 C   s   dS )r?   z#<Twilio.Insights.V1.AnnotationList>r   r2   r   r   r   rO   w  s    zAnnotationList.__repr__)r   r   r   r   rQ   r%   r-   r&   ri   rO   rV   r   r   r+   r   rf   Y  s   rf   N)__doc__typingr   r   r   r   r   Ztwilio.baser   r   Ztwilio.base.instance_contextr	   Ztwilio.base.instance_resourcer
   Ztwilio.base.list_resourcer   Ztwilio.base.versionr   r   r-   rf   r   r   r   r   <module>   s    $ 