B
    `x,                 @   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__ Z/home/dcms/DCMS/lib/python3.7/site-packages/twilio/rest/api/v2010/account/call/feedback.pyr      s    zFeedbackList.__init__c             C   s   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
   r   )FeedbackContext_versionr   )r   r   r   r   get$   s    zFeedbackList.getc             C   s   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
   r   )r   r   r   )r   r   r   r   __call__1   s    zFeedbackList.__call__c             C   s   dS )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z<Twilio.Api.V2010.FeedbackList>r   )r   r   r   r   __repr__>   s    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   responseZsolution)r   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
   r   )FeedbackInstancer   r   )r   payloadr   r   r   get_instance[   s
    	zFeedbackPage.get_instancec             C   s   dS )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z<Twilio.Api.V2010.FeedbackPage>r   )r   r   r   r   r   k   s    zFeedbackPage.__repr__)r   r   r   r   r!   r   r   r   r   )r   r   r   H   s   r   c                   sH   e Zd Z fddZejfddZdd ZejfddZd	d
 Z	  Z
S )r   c                s0   t t| | ||d| _djf | 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
   r   z6/Accounts/{account_sid}/Calls/{call_sid}/Feedback.jsonN)r   r   r   r   format_uri)r   r   r
   r   )r   r   r   r   w   s    zFeedbackContext.__init__c             C   sN   t |t|dd d}| jjd| j|d}t| j|| jd | jd dS )	aW  
        Create the FeedbackInstance

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

        :returns: The created FeedbackInstance
        :rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackInstance
        c             S   s   | S )Nr   )er   r   r   <lambda>       z(FeedbackContext.create.<locals>.<lambda>)QualityScoreIssuePOST)methoduridatar
   r   )r
   r   )	r   ofr   mapr   creater#   r   r   )r   quality_scoreissuer,   r    r   r   r   r/      s    
zFeedbackContext.createc             C   s0   | j jd| jd}t| j || jd | jd dS )z
        Fetch the FeedbackInstance

        :returns: The fetched FeedbackInstance
        :rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackInstance
        GET)r*   r+   r
   r   )r
   r   )r   fetchr#   r   r   )r   r    r   r   r   r3      s    zFeedbackContext.fetchc             C   sN   t |t|dd d}| jjd| j|d}t| j|| jd | jd dS )	aW  
        Update the FeedbackInstance

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

        :returns: The updated FeedbackInstance
        :rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackInstance
        c             S   s   | S )Nr   )r$   r   r   r   r%      r&   z(FeedbackContext.update.<locals>.<lambda>)r'   r(   r)   )r*   r+   r,   r
   r   )r
   r   )	r   r-   r   r.   r   updater#   r   r   )r   r0   r1   r,   r    r   r   r   r4      s    
zFeedbackContext.updatec             C   s$   d dd | j D }d|S )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
         c             s   s   | ]\}}d  ||V  qdS )z{}={}N)r"   ).0kvr   r   r   	<genexpr>   s    z+FeedbackContext.__repr__.<locals>.<genexpr>z%<Twilio.Api.V2010.FeedbackContext {}>)joinr   itemsr"   )r   contextr   r   r   r      s    zFeedbackContext.__repr__)r   r   r   r   r   unsetr/   r3   r4   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ejfddZdd Z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   ZAUDIO_LATENCYZDIGITS_NOT_CAPTUREDZDROPPED_CALLZIMPERFECT_AUDIOZINCORRECT_CALLER_IDZONE_WAY_AUDIOZPOST_DIAL_DELAYZUNSOLICITED_CALLr   r   r   r   Issues   s   r>   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issuesr0   sid)r
   r?   r@   rA   r0   rB   N)r
   r   )
r   r   r   r   r   Zrfc2822_datetimeinteger_properties_contextr   )r   r   r    r
   r   )r   r   r   r      s    zFeedbackInstance.__init__c             C   s.   | j dk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
   r   )rE   r   r   r   )r   r   r   r   _proxy   s    	
zFeedbackInstance._proxyc             C   s
   | j d S )z_
        :returns: The unique sid that identifies this account
        :rtype: unicode
        r
   )rD   )r   r   r   r   r
     s    zFeedbackInstance.account_sidc             C   s
   | j d S )zW
        :returns: The date this resource was created
        :rtype: datetime
        r?   )rD   )r   r   r   r   r?   	  s    zFeedbackInstance.date_createdc             C   s
   | j d S )z\
        :returns: The date this resource was last updated
        :rtype: datetime
        r@   )rD   )r   r   r   r   r@     s    zFeedbackInstance.date_updatedc             C   s
   | j d S )zf
        :returns: Issues experienced during the call
        :rtype: FeedbackInstance.Issues
        rA   )rD   )r   r   r   r   rA     s    zFeedbackInstance.issuesc             C   s
   | j d S )zH
        :returns: 1 to 5 quality score
        :rtype: unicode
        r0   )rD   )r   r   r   r   r0   !  s    zFeedbackInstance.quality_scorec             C   s
   | j d S )zl
        :returns: A string that uniquely identifies this feedback resource
        :rtype: unicode
        rB   )rD   )r   r   r   r   rB   )  s    zFeedbackInstance.sidc             C   s   | j j||dS )aW  
        Create the FeedbackInstance

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

        :returns: The created FeedbackInstance
        :rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackInstance
        )r1   )rF   r/   )r   r0   r1   r   r   r   r/   1  s    
zFeedbackInstance.createc             C   s
   | j  S )z
        Fetch the FeedbackInstance

        :returns: The fetched FeedbackInstance
        :rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackInstance
        )rF   r3   )r   r   r   r   r3   =  s    zFeedbackInstance.fetchc             C   s   | j j||dS )aW  
        Update the FeedbackInstance

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

        :returns: The updated FeedbackInstance
        :rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackInstance
        )r1   )rF   r4   )r   r0   r1   r   r   r   r4   F  s    
zFeedbackInstance.updatec             C   s$   d dd | j D }d|S )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        r5   c             s   s   | ]\}}d  ||V  qdS )z{}={}N)r"   )r6   r7   r8   r   r   r   r9   Y  s    z,FeedbackInstance.__repr__.<locals>.<genexpr>z&<Twilio.Api.V2010.FeedbackInstance {}>)r:   r   r;   r"   )r   r<   r   r   r   r   R  s    zFeedbackInstance.__repr__)r   r   r   objectr>   r   propertyrF   r
   r?   r@   rA   r0   rB   r   r=   r/   r3   r4   r   r   r   r   )r   r   r      s   
	r   N)__doc__Ztwilio.baser   r   r   Ztwilio.base.instance_contextr   Ztwilio.base.instance_resourcer   Ztwilio.base.list_resourcer   Ztwilio.base.pager   r	   r   r   r   r   r   r   r   <module>   s   6-X