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
 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)	serialize)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 )	FeedbackListc                    s    t t| | ||d| _dS )a  
        Initialize the FeedbackList

        :param Version version: Version that contains the resource
        :param account_sid: The unique sid that identifies this account
        :param call_sid: The unique string that identifies this resource

        :returns: twilio.rest.api.v2010.account.call.feedback.FeedbackList
        :rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackList
        account_sidcall_sidN)superr	   __init__	_solutionselfversionr   r   	__class__ ^/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/api/v2010/account/call/feedback.pyr      s   zFeedbackList.__init__c                 C      t | j| jd | jd dS z
        Constructs a FeedbackContext

        :returns: twilio.rest.api.v2010.account.call.feedback.FeedbackContext
        :rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackContext
        r   r   r
   FeedbackContext_versionr   r   r   r   r   get$   
   zFeedbackList.getc                 C   r   r   r   r   r   r   r   __call__1   r   zFeedbackList.__call__c                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z<Twilio.Api.V2010.FeedbackList>r   r   r   r   r   __repr__>      zFeedbackList.__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 )FeedbackPagec                    s   t t| || || _dS )a  
        Initialize the FeedbackPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param account_sid: The unique sid that identifies this account
        :param call_sid: The unique string that identifies this resource

        :returns: twilio.rest.api.v2010.account.call.feedback.FeedbackPage
        :rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackPage
        N)r   r(   r   r   )r   r   responsesolutionr   r   r   r   J   s   
zFeedbackPage.__init__c                 C   s   t | j|| jd | jd dS )a  
        Build an instance of FeedbackInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.api.v2010.account.call.feedback.FeedbackInstance
        :rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackInstance
        r   r   r
   )FeedbackInstancer   r   r   payloadr   r   r   get_instance[   s   	zFeedbackPage.get_instancec                 C   r    )r!   z<Twilio.Api.V2010.FeedbackPage>r   r   r   r   r   r"   k   r#   zFeedbackPage.__repr__)r$   r%   r&   r   r.   r"   r'   r   r   r   r   r(   H   s    r(   c                       sL   e Zd Z fddZdd ZejfddZejejfddZd	d
 Z	  Z
S )r   c                    s4   t t| | ||d| _djdi | j| _dS )a  
        Initialize the FeedbackContext

        :param Version version: Version that contains the resource
        :param account_sid: The unique sid that identifies this account
        :param call_sid: The call sid that uniquely identifies the call

        :returns: twilio.rest.api.v2010.account.call.feedback.FeedbackContext
        :rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackContext
        r
   z6/Accounts/{account_sid}/Calls/{call_sid}/Feedback.jsonNr   )r   r   r   r   format_urir   r   r   r   r   w   s   zFeedbackContext.__init__c                 C   s0   | j jd| jd}t| j || jd | jd dS )
        Fetch the FeedbackInstance

        :returns: The fetched FeedbackInstance
        :rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackInstance
        GET)methodurir   r   r
   )r   fetchr0   r+   r   r,   r   r   r   r5      s   zFeedbackContext.fetchc                 C   N   t |t|dd d}| jjd| j|d}t| j|| jd | jd dS )	]  
        Create the FeedbackInstance

        :param unicode quality_score: The call quality expressed as an integer from 1 to 5
        :param list[FeedbackInstance.Issues] issue: Issues experienced during the call

        :returns: The created FeedbackInstance
        :rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackInstance
        c                 S      | S Nr   er   r   r   <lambda>       z(FeedbackContext.create.<locals>.<lambda>QualityScoreIssuePOSTr3   r4   datar   r   r
   )	r   ofr   mapr   creater0   r+   r   r   quality_scoreissuerC   r-   r   r   r   rF         
zFeedbackContext.createc                 C   r6   )	]  
        Update the FeedbackInstance

        :param unicode quality_score: The call quality expressed as an integer from 1 to 5
        :param list[FeedbackInstance.Issues] issue: Issues experienced during the call

        :returns: The updated FeedbackInstance
        :rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackInstance
        c                 S   r8   r9   r   r:   r   r   r   r<      r=   z(FeedbackContext.update.<locals>.<lambda>r>   rA   rB   r   r   r
   )	r   rD   r   rE   r   updater0   r+   r   rG   r   r   r   rL      rJ   zFeedbackContext.updatec                 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+FeedbackContext.__repr__.<locals>.<genexpr>z%<Twilio.Api.V2010.FeedbackContext {}>joinr   itemsr/   r   contextr   r   r   r"         
zFeedbackContext.__repr__)r$   r%   r&   r   r5   r   unsetrF   rL   r"   r'   r   r   r   r   r   u   s    r   c                       s   e Zd ZG dd deZ 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dd ZejfddZejejfddZdd Z  ZS )r+   c                   @   s,   e Zd ZdZdZdZdZdZdZdZ	dZ
d	S )
zFeedbackInstance.Issueszaudio-latencyzdigits-not-capturedzdropped-callzimperfect-audiozincorrect-caller-idzone-way-audiozpost-dial-delayzunsolicited-callN)r$   r%   r&   AUDIO_LATENCYDIGITS_NOT_CAPTUREDDROPPED_CALLIMPERFECT_AUDIOINCORRECT_CALLER_IDONE_WAY_AUDIOPOST_DIAL_DELAYUNSOLICITED_CALLr   r   r   r   Issues   s    rg   c              	      sp   t t| | |dt|dt|d|dt|d|dd| _d| _||d	| _	dS )
z
        Initialize the FeedbackInstance

        :returns: twilio.rest.api.v2010.account.call.feedback.FeedbackInstance
        :rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackInstance
        r   date_createddate_updatedissuesrH   sid)r   rh   ri   rj   rH   rk   Nr
   )
r   r+   r   r   r   rfc2822_datetimeinteger_properties_contextr   )r   r   r-   r   r   r   r   r   r      s   
zFeedbackInstance.__init__c                 C   s.   | j du rt| j| jd | jd d| _ | j S )a8  
        Generate an instance context for the instance, the context is capable of
        performing various actions.  All instance actions are proxied to the context

        :returns: FeedbackContext for this FeedbackInstance
        :rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackContext
        Nr   r   r
   )ro   r   r   r   r   r   r   r   _proxy   s   
	zFeedbackInstance._proxyc                 C   
   | j d S )z_
        :returns: The unique sid that identifies this account
        :rtype: unicode
        r   rn   r   r   r   r   r        
zFeedbackInstance.account_sidc                 C   rq   )zW
        :returns: The date this resource was created
        :rtype: datetime
        rh   rr   r   r   r   r   rh   	  rs   zFeedbackInstance.date_createdc                 C   rq   )z\
        :returns: The date this resource was last updated
        :rtype: datetime
        ri   rr   r   r   r   r   ri     rs   zFeedbackInstance.date_updatedc                 C   rq   )zl
        :returns: Issues experienced during the call
        :rtype: list[FeedbackInstance.Issues]
        rj   rr   r   r   r   r   rj     rs   zFeedbackInstance.issuesc                 C   rq   )zH
        :returns: 1 to 5 quality score
        :rtype: unicode
        rH   rr   r   r   r   r   rH   !  rs   zFeedbackInstance.quality_scorec                 C   rq   )zl
        :returns: A string that uniquely identifies this feedback resource
        :rtype: unicode
        rk   rr   r   r   r   r   rk   )  rs   zFeedbackInstance.sidc                 C   s
   | j  S )r1   )rp   r5   r   r   r   r   r5   1  s   
zFeedbackInstance.fetchc                 C      | j j||dS )r7   )rI   )rp   rF   r   rH   rI   r   r   r   rF   :     
zFeedbackInstance.createc                 C   rt   )rK   )rH   rI   )rp   rL   ru   r   r   r   rL   F  rv   zFeedbackInstance.updatec                 C   rM   )r!   rN   c                 s   rO   rP   rQ   rR   r   r   r   rV   Y  rW   z,FeedbackInstance.__repr__.<locals>.<genexpr>z&<Twilio.Api.V2010.FeedbackInstance {}>rX   r[   r   r   r   r"   R  r]   zFeedbackInstance.__repr__)r$   r%   r&   objectrg   r   propertyrp   r   rh   ri   rj   rH   rk   r5   r   r^   rF   rL   r"   r'   r   r   r   r   r+      s*    







	r+   N)__doc__twilio.baser   r   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   6-X