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
 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 )
CpsList 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__ X/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/preview/trusted_comms/cps.pyr
      s   	
zCpsList.__init__c                 C   
   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#      
zCpsList.getc                 C   r   r   r   r   r   r   r   __call__,   r   zCpsList.__call__c                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z%<Twilio.Preview.TrustedComms.CpsList>r   r   r   r   r   __repr__5      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 )CpsPager   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   responsesolutionr   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   r   )r   z%<Twilio.Preview.TrustedComms.CpsPage>r   r   r   r   r   r   ^   r   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   r   c                    s.   t t| | i | _djdi | 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/CPSNr   )r	   r   r
   r   format_urir   r   r   r   r
   m   s   	zCpsContext.__init__c                 C   s.   t d|i}| jjd| j|d}t| j|S )
        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   ofr   fetchr,   r(   )r   x_xcnam_sensitive_phone_numberr1   r)   r   r   r   r3   |   s   	zCpsContext.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&CpsContext.__repr__.<locals>.<genexpr>z+<Twilio.Preview.TrustedComms.CpsContext {}>joinr   itemsr+   r   contextr   r   r   r         
zCpsContext.__repr__)
r    r!   r"   r#   r
   r   unsetr3   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(   r   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)rG   rH   rI   N)r	   r(   r
   r   _properties_contextr   )r   r   r)   r   r   r   r
      s   
zCpsInstance.__init__c                 C   s   | j du 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)rK   r   r   r   r   r   r   _proxy   s   
	zCpsInstance._proxyc                 C   
   | j d S )zP
        :returns: CPS URL of the phone number.
        :rtype: unicode
        rG   rJ   r   r   r   r   rG         
zCpsInstance.cps_urlc                 C   rM   )zH
        :returns: Phone number passed.
        :rtype: unicode
        rH   rN   r   r   r   r   rH      rO   zCpsInstance.phone_numberc                 C   rM   )zM
        :returns: The URL of this resource.
        :rtype: unicode
        rI   rN   r   r   r   r   rI      rO   zCpsInstance.urlc                 C   s   | j j|dS )r-   )r4   )rL   r3   )r   r4   r   r   r   r3      s   	zCpsInstance.fetchc                 C   r5   )r   r6   c                 s   r7   r8   r9   r:   r   r   r   r>      r?   z'CpsInstance.__repr__.<locals>.<genexpr>z,<Twilio.Preview.TrustedComms.CpsInstance {}>r@   rC   r   r   r   r      rE   zCpsInstance.__repr__)r    r!   r"   r#   r
   propertyrL   rG   rH   rI   r   rF   r3   r   r$   r   r   r   r   r(      s    



r(   N)r#   twilio.baser   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   /).