o
    f>hF                     @   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                       s  e Zd ZG dd deZG dd deZ	 dedeee	f def fdd	Z
ed!ddZd"ddZd"ddZejejejejejejejfded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
d fddZejejejejejejejfded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
d fddZd
efdd Z  ZS )#AnnotationInstancec                   @   s   e Zd ZdZdZdZdS )AnnotationInstance.AnsweredByunknown_answered_byhumanmachineN)__name__
__module____qualname__UNKNOWN_ANSWERED_BYHUMANMACHINE r   r   Z/var/www/html/venv/lib/python3.10/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.ConnectivityIssueunknown_connectivity_issueno_connectivity_issueinvalid_number	caller_iddropped_callnumber_reachabilityN)	r   r   r   UNKNOWN_CONNECTIVITY_ISSUENO_CONNECTIVITY_ISSUEINVALID_NUMBER	CALLER_IDDROPPED_CALL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/   r0   r1   r   integerr2   r3   r4   r5   	_solution_context)selfr*   r+   r,   	__class__r   r   r7   3   s"   
zAnnotationInstance.__init__returnAnnotationContextc                 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
        )rD   fetchrC   r   r   r   rF   Y   s   
zAnnotationInstance.fetchc                    s   | j  I dH S ){
        Asynchronous coroutine to fetch the AnnotationInstance


        :returns: The fetched AnnotationInstance
        N)rD   fetch_asyncrC   r   r   r   rH   b   s   zAnnotationInstance.fetch_asyncr.   r   r/   r   r0   r1   r2   r3   r4   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/   r0   r1   r2   r3   r4   )rD   updater<   r.   r/   r0   r1   r2   r3   r4   r   r   r   rK   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
        rJ   N)rD   update_asyncrL   r   r   r   rN      s   zAnnotationInstance.update_asyncc                 C   $   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 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:   itemsrU   r<   contextr   r   r   __repr__      
zAnnotationInstance.__repr__)r?   r@   )r?   r   )r   r   r   objectr   r)   r   r   strr   r7   propertyrD   rF   rH   r	   unsetr   boolintrK   rN   ra   __classcell__r   r   r=   r   r      s|    "

	




	


%




	


#r   c                       sP  e Zd Zdedef fddZdefddZdefdd	Ze	j
e	j
e	j
e	j
e	j
e	j
e	j
fd
ed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fddZe	j
e	j
e	j
e	j
e	j
e	j
e	j
fd
ed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fddZdefddZ  ZS )r@   r*   r,   c                    s.   t  | d|i| _djd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}/AnnotationNr   )r6   r7   r:   rU   _urir<   r*   r,   r=   r   r   r7      s   zAnnotationContext.__init__r?   c                 C   s<   t i }d|d< | jjd| j|d}t| j|| jd dS )rE   application/jsonAcceptGETmethoduriheadersr,   rA   )r	   ofrB   rF   rj   r   r:   r<   rr   r+   r   r   r   rF      s   
zAnnotationContext.fetchc                    sD   t i }d|d< | jjd| j|dI dH }t| j|| jd dS )rG   rl   rm   rn   ro   Nr,   rA   )r	   rs   rB   rH   rj   r   r:   rt   r   r   r   rH      s   
zAnnotationContext.fetch_asyncr.   r   r/   r   r0   r1   r2   r3   r4   c              
   C   sf   t |||t||||d}t i }	d|	d< d|	d< | jjd| j||	d}
t| j|
| jd d	S )
rI   r   r)   QualityIssuesSpam	CallScoreCommentIncident!application/x-www-form-urlencodedContent-Typerl   rm   POSTrp   rq   datarr   r,   rA   )	r	   rs   r   boolean_to_stringrB   rK   rj   r   r:   r<   r.   r/   r0   r1   r2   r3   r4   r   rr   r+   r   r   r   rK      s&   

zAnnotationContext.updatec              
      sn   t |||t||||d}t i }	d|	d< d|	d< | jjd| j||	dI dH }
t| j|
| jd	 d
S )rM   ru   r{   r|   rl   rm   r}   r~   Nr,   rA   )	r	   rs   r   r   rB   rN   rj   r   r:   r   r   r   r   rN   )  s(   

zAnnotationContext.update_asyncc                 C   rO   )rP   rQ   c                 s   rR   rS   rT   rV   r   r   r   rZ   b  r[   z-AnnotationContext.__repr__.<locals>.<genexpr>z)<Twilio.Insights.V1.AnnotationContext {}>r\   r_   r   r   r   ra   \  rb   zAnnotationContext.__repr__)r   r   r   r   rd   r7   r   rF   rH   r	   rf   r   rc   rg   rh   rK   rN   ra   ri   r   r   r=   r   r@      sr    




	


5




	


3r@   c                       sP   e Zd Zdedef fddZdefddZdefdd	Zdefd
dZ	  Z
S )AnnotationListr*   r,   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)r6   r7   r:   rk   r=   r   r   r7   h  s   
zAnnotationList.__init__r?   c                 C      t | j| jd dS z1
        Constructs a AnnotationContext

        r,   rA   r@   rB   r:   rC   r   r   r   r8   w     zAnnotationList.getc                 C   r   r   r   rC   r   r   r   __call__~  r   zAnnotationList.__call__c                 C   s   dS )rP   z#<Twilio.Insights.V1.AnnotationList>r   rC   r   r   r   ra     s   zAnnotationList.__repr__)r   r   r   r   rd   r7   r@   r8   r   ra   ri   r   r   r=   r   r   f  s
    r   N)__doc__typingr   r   r   r   r   twilio.baser   r   r	   twilio.base.instance_contextr
   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   r@   r   r   r   r   r   <module>   s     % ,