o
    /iD                     @   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                       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   b/var/www/html/philips/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.   r/   r0   r   integerr1   r2   r3   r4   	_solution_context)selfr)   r*   r+   	__class__r   r   r6   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?   _versionr9   r;   r   r   r   _proxyJ   s   
zAnnotationInstance._proxyc                 C   s
   | j  S )a
        Fetch the AnnotationInstance


        :returns: The fetched AnnotationInstance
        )rC   fetchrB   r   r   r   rE   Y   s   
zAnnotationInstance.fetchc                    s   | j  I dH S ){
        Asynchronous coroutine to fetch the AnnotationInstance


        :returns: The fetched AnnotationInstance
        N)rC   fetch_asyncrB   r   r   r   rG   b   s   zAnnotationInstance.fetch_asyncr-   r   r.   r   r/   r0   r1   r2   r3   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/   r0   r1   r2   r3   )rC   updater;   r-   r.   r/   r0   r1   r2   r3   r   r   r   rJ   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
        rI   N)rC   update_asyncrK   r   r   r   rM      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 {}>joinr9   itemsrT   r;   contextr   r   r   __repr__      
zAnnotationInstance.__repr__)r>   r?   )r>   r   )r   r   r   objectr   r(   r   r   strr   r6   propertyrC   rE   rG   r   unsetr   boolintrJ   rM   r`   __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   )r5   r6   r9   rT   _urir;   r)   r+   r<   r   r   r6      s   zAnnotationContext.__init__r>   c                 C   s(   | j jd| jd}t| j || jd dS )rD   GETmethodurir+   r@   )rA   rE   ri   r   r9   r;   r*   r   r   r   rE      s   zAnnotationContext.fetchc                    s0   | j jd| jdI dH }t| j || jd dS )rF   rk   rl   Nr+   r@   )rA   rG   ri   r   r9   ro   r   r   r   rG      s   zAnnotationContext.fetch_asyncr-   r   r.   r   r/   r0   r1   r2   r3   c           
   
   C   sD   t |||||||d}| jjd| j|d}	t| j|	| jd dS )rH   r   r(   QualityIssuesSpam	CallScoreCommentIncidentPOSTrm   rn   datar+   r@   )r   ofrA   rJ   ri   r   r9   
r;   r-   r.   r/   r0   r1   r2   r3   rx   r*   r   r   r   rJ      s$   zAnnotationContext.updatec           
   
      sL   t |||||||d}| jjd| j|dI dH }	t| j|	| jd dS )rL   rp   rv   rw   Nr+   r@   )r   ry   rA   rM   ri   r   r9   rz   r   r   r   rM      s&   zAnnotationContext.update_asyncc                 C   rN   )rO   rP   c                 s   rQ   rR   rS   rU   r   r   r   rY   U  rZ   z-AnnotationContext.__repr__.<locals>.<genexpr>z)<Twilio.Insights.V1.AnnotationContext {}>r[   r^   r   r   r   r`   O  ra   zAnnotationContext.__repr__)r   r   r   r   rc   r6   r   rE   rG   r   re   r   rb   rf   rg   rJ   rM   r`   rh   r   r   r<   r   r?      sr    




	


1




	


/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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)r5   r6   r9   rj   r<   r   r   r6   Z  s   
zAnnotationList.__init__r>   c                 C      t | j| jd dS z1
        Constructs a AnnotationContext

        r+   r@   r?   rA   r9   rB   r   r   r   r7   i     zAnnotationList.getc                 C   r|   r}   r~   rB   r   r   r   __call__p  r   zAnnotationList.__call__c                 C   s   dS )rO   z#<Twilio.Insights.V1.AnnotationList>r   rB   r   r   r   r`   w  s   zAnnotationList.__repr__)r   r   r   r   rc   r6   r?   r7   r   r`   rh   r   r   r<   r   r{   Y  s
    r{   N)__doc__typingr   r   r   r   r   twilio.baser   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     $ 