B
    `	                 @   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
      /       /
    )	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 )	DeactivationsListc                s   t t| | i | _dS )a	  
        Initialize the DeactivationsList

        :param Version version: Version that contains the resource

        :returns: twilio.rest.messaging.v1.deactivation.DeactivationsList
        :rtype: twilio.rest.messaging.v1.deactivation.DeactivationsList
        N)superr   __init__	_solution)selfversion)	__class__ T/home/dcms/DCMS/lib/python3.7/site-packages/twilio/rest/messaging/v1/deactivation.pyr
      s    	zDeactivationsList.__init__c             C   s
   t | jS )z
        Constructs a DeactivationsContext

        :returns: twilio.rest.messaging.v1.deactivation.DeactivationsContext
        :rtype: twilio.rest.messaging.v1.deactivation.DeactivationsContext
        )DeactivationsContext_version)r   r   r   r   get!   s    zDeactivationsList.getc             C   s
   t | jS )z
        Constructs a DeactivationsContext

        :returns: twilio.rest.messaging.v1.deactivation.DeactivationsContext
        :rtype: twilio.rest.messaging.v1.deactivation.DeactivationsContext
        )r   r   )r   r   r   r   __call__*   s    zDeactivationsList.__call__c             C   s   dS )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z'<Twilio.Messaging.V1.DeactivationsList>r   )r   r   r   r   __repr__3   s    zDeactivationsList.__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 )DeactivationsPagec                s   t t| || || _dS )aA  
        Initialize the DeactivationsPage

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

        :returns: twilio.rest.messaging.v1.deactivation.DeactivationsPage
        :rtype: twilio.rest.messaging.v1.deactivation.DeactivationsPage
        N)r	   r   r
   r   )r   r   responseZsolution)r   r   r   r
   ?   s    
zDeactivationsPage.__init__c             C   s   t | j|S )a  
        Build an instance of DeactivationsInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.messaging.v1.deactivation.DeactivationsInstance
        :rtype: twilio.rest.messaging.v1.deactivation.DeactivationsInstance
        )DeactivationsInstancer   )r   payloadr   r   r   get_instanceN   s    	zDeactivationsPage.get_instancec             C   s   dS )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z'<Twilio.Messaging.V1.DeactivationsPage>r   )r   r   r   r   r   Y   s    zDeactivationsPage.__repr__)r   r   r   r
   r   r   r   r   r   )r   r   r   =   s   r   c                   s2   e Zd Z fddZejfddZdd Z  ZS )r   c                s*   t t| | i | _djf | j| _dS )a  
        Initialize the DeactivationsContext

        :param Version version: Version that contains the resource

        :returns: twilio.rest.messaging.v1.deactivation.DeactivationsContext
        :rtype: twilio.rest.messaging.v1.deactivation.DeactivationsContext
        z/DeactivationsN)r	   r   r
   r   format_uri)r   r   )r   r   r   r
   e   s    	zDeactivationsContext.__init__c             C   s4   t dt|i}| jjd| j|d}t| j|S )z
        Fetch the DeactivationsInstance

        :param date date: The date to retrieve deactivated numbers for.

        :returns: The fetched DeactivationsInstance
        :rtype: twilio.rest.messaging.v1.deactivation.DeactivationsInstance
        DateGET)methoduriparams)r   Zofr   iso8601_dater   fetchr    r   )r   datedatar   r   r   r   r'   t   s    	zDeactivationsContext.fetchc             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    z0DeactivationsContext.__repr__.<locals>.<genexpr>z-<Twilio.Messaging.V1.DeactivationsContext {}>)joinr   itemsr   )r   contextr   r   r   r      s    zDeactivationsContext.__repr__)	r   r   r   r
   r   unsetr'   r   r   r   r   )r   r   r   c   s   r   c                   sJ   e Zd Z fddZedd Zedd ZejfddZ	d	d
 Z
  ZS )r   c                s0   t t| | d|di| _d| _i | _dS )z
        Initialize the DeactivationsInstance

        :returns: twilio.rest.messaging.v1.deactivation.DeactivationsInstance
        :rtype: twilio.rest.messaging.v1.deactivation.DeactivationsInstance
        redirect_toN)r	   r   r
   r   _properties_contextr   )r   r   r   )r   r   r   r
      s    zDeactivationsInstance.__init__c             C   s   | j dkrt| j| _ | j S )aA  
        Generate an instance context for the instance, the context is capable of
        performing various actions.  All instance actions are proxied to the context

        :returns: DeactivationsContext for this DeactivationsInstance
        :rtype: twilio.rest.messaging.v1.deactivation.DeactivationsContext
        N)r5   r   r   )r   r   r   r   _proxy   s    	
zDeactivationsInstance._proxyc             C   s
   | j d S )zd
        :returns: Redirect url to the list of deactivated numbers.
        :rtype: unicode
        r3   )r4   )r   r   r   r   r3      s    z!DeactivationsInstance.redirect_toc             C   s   | j j|dS )z
        Fetch the DeactivationsInstance

        :param date date: The date to retrieve deactivated numbers for.

        :returns: The fetched DeactivationsInstance
        :rtype: twilio.rest.messaging.v1.deactivation.DeactivationsInstance
        )r(   )r6   r'   )r   r(   r   r   r   r'      s    	zDeactivationsInstance.fetchc             C   s$   d dd | j D }d|S )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        r*   c             s   s   | ]\}}d  ||V  qdS )z{}={}N)r   )r+   r,   r-   r   r   r   r.      s    z1DeactivationsInstance.__repr__.<locals>.<genexpr>z.<Twilio.Messaging.V1.DeactivationsInstance {}>)r/   r   r0   r   )r   r1   r   r   r   r      s    zDeactivationsInstance.__repr__)r   r   r   r
   propertyr6   r3   r   r2   r'   r   r   r   r   )r   r   r      s
   r   N)__doc__Ztwilio.baser   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   ,&+