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
 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
      /       /
    )values)InstanceContext)InstanceResource)ListResource)Pagec                   s8   e Zd ZdZ fddZdd Zdd Zdd	 Z  ZS )
CpsListz PLEASE NOTE that this class contains preview products that are subject
    to change. Use them with caution. If you currently do not have developer
    preview access, please contact help@twilio.com. c                s   t t| | i | _dS )z
        Initialize the CpsList

        :param Version version: Version that contains the resource

        :returns: twilio.rest.preview.trusted_comms.cps.CpsList
        :rtype: twilio.rest.preview.trusted_comms.cps.CpsList
        N)superr   __init__	_solution)selfversion)	__class__ T/home/dcms/DCMS/lib/python3.7/site-packages/twilio/rest/preview/trusted_comms/cps.pyr	      s    	zCpsList.__init__c             C   s
   t | jS )z
        Constructs a CpsContext

        :returns: twilio.rest.preview.trusted_comms.cps.CpsContext
        :rtype: twilio.rest.preview.trusted_comms.cps.CpsContext
        )
CpsContext_version)r   r   r   r   get#   s    zCpsList.getc             C   s
   t | jS )z
        Constructs a CpsContext

        :returns: twilio.rest.preview.trusted_comms.cps.CpsContext
        :rtype: twilio.rest.preview.trusted_comms.cps.CpsContext
        )r   r   )r   r   r   r   __call__,   s    zCpsList.__call__c             C   s   dS )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z%<Twilio.Preview.TrustedComms.CpsList>r   )r   r   r   r   __repr__5   s    zCpsList.__repr__)	__name__
__module____qualname____doc__r	   r   r   r   __classcell__r   r   )r   r   r      s
   		r   c                   s0   e Zd ZdZ fddZdd Zdd Z  ZS )CpsPagez PLEASE NOTE that this class contains preview products that are subject
    to change. Use them with caution. If you currently do not have developer
    preview access, please contact help@twilio.com. c                s   t t| || || _dS )a#  
        Initialize the CpsPage

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

        :returns: twilio.rest.preview.trusted_comms.cps.CpsPage
        :rtype: twilio.rest.preview.trusted_comms.cps.CpsPage
        N)r   r   r	   r
   )r   r   responseZsolution)r   r   r   r	   D   s    
zCpsPage.__init__c             C   s   t | j|S )z
        Build an instance of CpsInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.preview.trusted_comms.cps.CpsInstance
        :rtype: twilio.rest.preview.trusted_comms.cps.CpsInstance
        )CpsInstancer   )r   payloadr   r   r   get_instanceS   s    	zCpsPage.get_instancec             C   s   dS )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z%<Twilio.Preview.TrustedComms.CpsPage>r   )r   r   r   r   r   ^   s    zCpsPage.__repr__)r   r   r   r   r	   r   r   r   r   r   )r   r   r   ?   s   r   c                   s6   e Zd ZdZ fddZejfddZdd Z  Z	S )r   z PLEASE NOTE that this class contains preview products that are subject
    to change. Use them with caution. If you currently do not have developer
    preview access, please contact help@twilio.com. c                s*   t t| | i | _djf | j| _dS )z
        Initialize the CpsContext

        :param Version version: Version that contains the resource

        :returns: twilio.rest.preview.trusted_comms.cps.CpsContext
        :rtype: twilio.rest.preview.trusted_comms.cps.CpsContext
        z/CPSN)r   r   r	   r
   format_uri)r   r   )r   r   r   r	   m   s    	zCpsContext.__init__c             C   s.   t d|i}| jjd| j|d}t| j|S )z
        Fetch the CpsInstance

        :param unicode x_xcnam_sensitive_phone_number: Phone number to retrieve CPS.

        :returns: The fetched CpsInstance
        :rtype: twilio.rest.preview.trusted_comms.cps.CpsInstance
        zX-Xcnam-Sensitive-Phone-NumberGET)methoduriheaders)r   Zofr   fetchr    r   )r   x_xcnam_sensitive_phone_numberr$   r   r   r   r   r%   |   s    	zCpsContext.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    z&CpsContext.__repr__.<locals>.<genexpr>z+<Twilio.Preview.TrustedComms.CpsContext {}>)joinr
   itemsr   )r   contextr   r   r   r      s    zCpsContext.__repr__)
r   r   r   r   r	   r   unsetr%   r   r   r   r   )r   r   r   h   s   r   c                   sf   e Zd ZdZ f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  ZS )r   z PLEASE NOTE that this class contains preview products that are subject
    to change. Use them with caution. If you currently do not have developer
    preview access, please contact help@twilio.com. c                s@   t t| | |d|d|dd| _d| _i | _dS )z
        Initialize the CpsInstance

        :returns: twilio.rest.preview.trusted_comms.cps.CpsInstance
        :rtype: twilio.rest.preview.trusted_comms.cps.CpsInstance
        cps_urlphone_numberurl)r0   r1   r2   N)r   r   r	   r   _properties_contextr
   )r   r   r   )r   r   r   r	      s    zCpsInstance.__init__c             C   s   | j dkrt| j| _ | j S )a#  
        Generate an instance context for the instance, the context is capable of
        performing various actions.  All instance actions are proxied to the context

        :returns: CpsContext for this CpsInstance
        :rtype: twilio.rest.preview.trusted_comms.cps.CpsContext
        N)r4   r   r   )r   r   r   r   _proxy   s    	
zCpsInstance._proxyc             C   s
   | j d S )zP
        :returns: CPS URL of the phone number.
        :rtype: unicode
        r0   )r3   )r   r   r   r   r0      s    zCpsInstance.cps_urlc             C   s
   | j d S )zH
        :returns: Phone number passed.
        :rtype: unicode
        r1   )r3   )r   r   r   r   r1      s    zCpsInstance.phone_numberc             C   s
   | j d S )zM
        :returns: The URL of this resource.
        :rtype: unicode
        r2   )r3   )r   r   r   r   r2      s    zCpsInstance.urlc             C   s   | j j|dS )z
        Fetch the CpsInstance

        :param unicode x_xcnam_sensitive_phone_number: Phone number to retrieve CPS.

        :returns: The fetched CpsInstance
        :rtype: twilio.rest.preview.trusted_comms.cps.CpsInstance
        )r&   )r5   r%   )r   r&   r   r   r   r%      s    	zCpsInstance.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    z'CpsInstance.__repr__.<locals>.<genexpr>z,<Twilio.Preview.TrustedComms.CpsInstance {}>)r,   r
   r-   r   )r   r.   r   r   r   r      s    zCpsInstance.__repr__)r   r   r   r   r	   propertyr5   r0   r1   r2   r   r/   r%   r   r   r   r   )r   r   r      s   r   N)r   Ztwilio.baser   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   /).