o
    e',                     @   s   d Z ddlmZ ddl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G dd deZdS )za
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
    )deserialize)values)InstanceContext)InstanceResource)ListResource)Pagec                       s4   e Zd Z fddZdd Zdd Zdd Z  ZS )	AnnotationListc                    s   t t| | i | _dS )z
        Initialize the AnnotationList

        :param Version version: Version that contains the resource

        :returns: twilio.rest.insights.v1.annotation.AnnotationList
        :rtype: twilio.rest.insights.v1.annotation.AnnotationList
        N)superr   __init__	_solution)selfversion	__class__ U/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/insights/v1/annotation.pyr
      s   	
zAnnotationList.__init__c                 C      t | j|dS z
        Constructs a AnnotationContext

        :param call_sid: The call_sid

        :returns: twilio.rest.insights.v1.annotation.AnnotationContext
        :rtype: twilio.rest.insights.v1.annotation.AnnotationContext
        call_sidAnnotationContext_versionr   r   r   r   r   get!      	zAnnotationList.getc                 C   r   r   r   r   r   r   r   __call__,   r   zAnnotationList.__call__c                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z#<Twilio.Insights.V1.AnnotationList>r   r   r   r   r   __repr__7      zAnnotationList.__repr__)__name__
__module____qualname__r
   r   r   r    __classcell__r   r   r   r   r      s
    r   c                       s,   e Zd Z fddZdd Zdd Z  ZS )AnnotationPagec                    s   t t| || || _dS )a2  
        Initialize the AnnotationPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API

        :returns: twilio.rest.insights.v1.annotation.AnnotationPage
        :rtype: twilio.rest.insights.v1.annotation.AnnotationPage
        N)r	   r&   r
   r   )r   r   responsesolutionr   r   r   r
   C   s   

zAnnotationPage.__init__c                 C   s   t | j|S )a  
        Build an instance of AnnotationInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.insights.v1.annotation.AnnotationInstance
        :rtype: twilio.rest.insights.v1.annotation.AnnotationInstance
        )AnnotationInstancer   r   payloadr   r   r   get_instanceR   s   	zAnnotationPage.get_instancec                 C   r   )r   z#<Twilio.Insights.V1.AnnotationPage>r   r   r   r   r   r    ]   r!   zAnnotationPage.__repr__)r"   r#   r$   r
   r,   r    r%   r   r   r   r   r&   A   s    r&   c                       sR   e Zd Z fddZejejejejejejejfddZdd Zdd Z  Z	S )	r   c                    s2   t t| | d|i| _djdi | j| _dS )a)  
        Initialize the AnnotationContext

        :param Version version: Version that contains the resource
        :param call_sid: The call_sid

        :returns: twilio.rest.insights.v1.annotation.AnnotationContext
        :rtype: twilio.rest.insights.v1.annotation.AnnotationContext
        r   z/Voice/{call_sid}/AnnotationNr   )r	   r   r
   r   format_uri)r   r   r   r   r   r   r
   i   s   

zAnnotationContext.__init__c           
   
   C   sD   t |||||||d}| jjd| j|d}	t| j|	| jd dS ):  
        Update the AnnotationInstance

        :param AnnotationInstance.AnsweredBy answered_by: The answered_by
        :param AnnotationInstance.ConnectivityIssue connectivity_issue: The connectivity_issue
        :param unicode quality_issues: The quality_issues
        :param bool spam: The spam
        :param unicode call_score: The call_score
        :param unicode comment: The comment
        :param unicode incident: The incident

        :returns: The updated AnnotationInstance
        :rtype: twilio.rest.insights.v1.annotation.AnnotationInstance
        )
AnsweredByConnectivityIssueQualityIssuesSpam	CallScoreCommentIncidentPOST)methoduridatar   r   )r   ofr   updater.   r)   r   )
r   answered_byconnectivity_issuequality_issuesspam
call_scorecommentincidentr:   r+   r   r   r   r<   y   s   
zAnnotationContext.updatec                 C   s(   | j jd| jd}t| j || jd dS )
        Fetch the AnnotationInstance

        :returns: The fetched AnnotationInstance
        :rtype: twilio.rest.insights.v1.annotation.AnnotationInstance
        GET)r8   r9   r   r   )r   fetchr.   r)   r   r*   r   r   r   rF      s   zAnnotationContext.fetchc                 C   $   d dd | j D }d|S )r    c                 s        | ]\}}d  ||V  qdS z{}={}Nr-   .0kvr   r   r   	<genexpr>       z-AnnotationContext.__repr__.<locals>.<genexpr>z)<Twilio.Insights.V1.AnnotationContext {}>joinr   itemsr-   r   contextr   r   r   r          
zAnnotationContext.__repr__)
r"   r#   r$   r
   r   unsetr<   rF   r    r%   r   r   r   r   r   g   s    
 r   c                       s  e Zd ZG dd deZG dd deZG dd deZd& fdd		Zed
d Z	edd Z
edd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zejejejejejejejfd d!Zd"d# Zd$d% Z  ZS )'r)   c                   @   s   e Zd ZdZdZdZdS )zAnnotationInstance.AnsweredByunknown_answered_byhumanmachineN)r"   r#   r$   UNKNOWN_ANSWERED_BYHUMANMACHINEr   r   r   r   r0      s    r0   c                   @   s$   e Zd ZdZdZdZdZdZdZdS )z$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   r1      s    r1   c                   @   s0   e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
S )z AnnotationInstance.QualityIssuesunknown_quality_issueno_quality_issue
low_volumechoppy_roboticechodtmflatencyowastatic_noiseN)r"   r#   r$   UNKNOWN_QUALITY_ISSUENO_QUALITY_ISSUE
LOW_VOLUMECHOPPY_ROBOTICECHODTMFLATENCYOWASTATIC_NOISEr   r   r   r   r2      s    r2   Nc                    s   t t| | |d|d|d|d|d|dt|d|d|d	|d
d
| _d| _d|pA| jd i| _dS )z
        Initialize the AnnotationInstance

        :returns: twilio.rest.insights.v1.annotation.AnnotationInstance
        :rtype: twilio.rest.insights.v1.annotation.AnnotationInstance
        r   account_sidr=   r>   r?   r@   rA   rB   rC   url)
r   r}   r=   r>   r?   r@   rA   rB   rC   r~   N)	r	   r)   r
   r   r   integer_properties_contextr   )r   r   r+   r   r   r   r   r
      s   zAnnotationInstance.__init__c                 C   s&   | j du rt| j| jd d| _ | j S )a5  
        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
        :rtype: twilio.rest.insights.v1.annotation.AnnotationContext
        Nr   r   )r   r   r   r   r   r   r   r   _proxy   s   
	zAnnotationInstance._proxyc                 C   
   | j d S )z@
        :returns: The call_sid
        :rtype: unicode
        r   r   r   r   r   r   r         
zAnnotationInstance.call_sidc                 C   r   )zC
        :returns: The account_sid
        :rtype: unicode
        r}   r   r   r   r   r   r}      r   zAnnotationInstance.account_sidc                 C   r   )zY
        :returns: The answered_by
        :rtype: AnnotationInstance.AnsweredBy
        r=   r   r   r   r   r   r=     r   zAnnotationInstance.answered_byc                 C   r   )zg
        :returns: The connectivity_issue
        :rtype: AnnotationInstance.ConnectivityIssue
        r>   r   r   r   r   r   r>   	  r   z%AnnotationInstance.connectivity_issuec                 C   r   )zL
        :returns: The quality_issues
        :rtype: list[unicode]
        r?   r   r   r   r   r   r?     r   z!AnnotationInstance.quality_issuesc                 C   r   )z9
        :returns: The spam
        :rtype: bool
        r@   r   r   r   r   r   r@     r   zAnnotationInstance.spamc                 C   r   )zB
        :returns: The call_score
        :rtype: unicode
        rA   r   r   r   r   r   rA   !  r   zAnnotationInstance.call_scorec                 C   r   )z?
        :returns: The comment
        :rtype: unicode
        rB   r   r   r   r   r   rB   )  r   zAnnotationInstance.commentc                 C   r   )z@
        :returns: The incident
        :rtype: unicode
        rC   r   r   r   r   r   rC   1  r   zAnnotationInstance.incidentc                 C   r   )z;
        :returns: The url
        :rtype: unicode
        r~   r   r   r   r   r   r~   9  r   zAnnotationInstance.urlc              	   C   s   | j j|||||||dS )r/   )r=   r>   r?   r@   rA   rB   rC   )r   r<   )r   r=   r>   r?   r@   rA   rB   rC   r   r   r   r<   A  s   zAnnotationInstance.updatec                 C   s
   | j  S )rD   )r   rF   r   r   r   r   rF   ]  s   
zAnnotationInstance.fetchc                 C   rG   )r   rH   c                 s   rI   rJ   rK   rL   r   r   r   rP   m  rQ   z.AnnotationInstance.__repr__.<locals>.<genexpr>z*<Twilio.Insights.V1.AnnotationInstance {}>rR   rU   r   r   r   r    f  rW   zAnnotationInstance.__repr__)N)r"   r#   r$   objectr0   r1   r2   r
   propertyr   r   r}   r=   r>   r?   r@   rA   rB   rC   r~   r   rX   r<   rF   r    r%   r   r   r   r   r)      sD    











	r)   N)__doc__twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r   r&   r   r)   r   r   r   r   <module>   s   0&H