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 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 )	PhoneNumberListc                    s   t t| | i | _dS )z
        Initialize the PhoneNumberList

        :param Version version: Version that contains the resource

        :returns: twilio.rest.lookups.v1.phone_number.PhoneNumberList
        :rtype: twilio.rest.lookups.v1.phone_number.PhoneNumberList
        N)superr   __init__	_solution)selfversion	__class__ V/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/lookups/v1/phone_number.pyr
      s   	
zPhoneNumberList.__init__c                 C      t | j|dS a
  
        Constructs a PhoneNumberContext

        :param phone_number: The phone number to fetch in E.164 format

        :returns: twilio.rest.lookups.v1.phone_number.PhoneNumberContext
        :rtype: twilio.rest.lookups.v1.phone_number.PhoneNumberContext
        phone_numberPhoneNumberContext_versionr   r   r   r   r   get!      	zPhoneNumberList.getc                 C   r   r   r   r   r   r   r   __call__,   r   zPhoneNumberList.__call__c                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z#<Twilio.Lookups.V1.PhoneNumberList>r   r   r   r   r   __repr__7      zPhoneNumberList.__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 )PhoneNumberPagec                    s   t t| || || _dS )a7  
        Initialize the PhoneNumberPage

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

        :returns: twilio.rest.lookups.v1.phone_number.PhoneNumberPage
        :rtype: twilio.rest.lookups.v1.phone_number.PhoneNumberPage
        N)r	   r&   r
   r   )r   r   responsesolutionr   r   r   r
   C   s   

zPhoneNumberPage.__init__c                 C   s   t | j|S )a	  
        Build an instance of PhoneNumberInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.lookups.v1.phone_number.PhoneNumberInstance
        :rtype: twilio.rest.lookups.v1.phone_number.PhoneNumberInstance
        )PhoneNumberInstancer   )r   payloadr   r   r   get_instanceR   s   	zPhoneNumberPage.get_instancec                 C   r   )r   z#<Twilio.Lookups.V1.PhoneNumberPage>r   r   r   r   r   r    ]   r!   zPhoneNumberPage.__repr__)r"   r#   r$   r
   r+   r    r%   r   r   r   r   r&   A   s    r&   c                       s>   e Zd Z fddZejejejejfddZdd Z  ZS )r   c                    s2   t t| | d|i| _djdi | j| _dS )aO  
        Initialize the PhoneNumberContext

        :param Version version: Version that contains the resource
        :param phone_number: The phone number to fetch in E.164 format

        :returns: twilio.rest.lookups.v1.phone_number.PhoneNumberContext
        :rtype: twilio.rest.lookups.v1.phone_number.PhoneNumberContext
        r   z/PhoneNumbers/{phone_number}Nr   )r	   r   r
   r   format_uri)r   r   r   r   r   r   r
   i   s   

zPhoneNumberContext.__init__c              	   C   sf   t |t|dd t|dd d}|t|d | jjd| j|d}t	| j|| j
d d	S )
  
        Fetch the PhoneNumberInstance

        :param unicode country_code: The ISO country code of the phone number
        :param list[unicode] type: The type of information to return
        :param list[unicode] add_ons: The unique_name of an Add-on you would like to invoke
        :param dict add_ons_data: Data specific to the add-on you would like to invoke

        :returns: The fetched PhoneNumberInstance
        :rtype: twilio.rest.lookups.v1.phone_number.PhoneNumberInstance
        c                 S      | S Nr   er   r   r   <lambda>       z*PhoneNumberContext.fetch.<locals>.<lambda>c                 S   r/   r0   r   r1   r   r   r   r3      r4   )CountryCodeTypeAddOnsr7   GET)methoduriparamsr   r   )r   ofr   mapupdateprefixed_collapsible_mapr   fetchr-   r)   r   )r   country_codetypeadd_onsadd_ons_datadatar*   r   r   r   r@   y   s   zPhoneNumberContext.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.PhoneNumberContext.__repr__.<locals>.<genexpr>z)<Twilio.Lookups.V1.PhoneNumberContext {}>joinr   itemsr,   r   contextr   r   r   r          
zPhoneNumberContext.__repr__)	r"   r#   r$   r
   r   unsetr@   r    r%   r   r   r   r   r   g   s    
r   c                       s   e Zd ZG dd deZd 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dd Zejej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S )zPhoneNumberInstance.TypelandlinemobilevoipN)r"   r#   r$   LANDLINEMOBILEVOIPr   r   r   r   r6      s    r6   Nc              	      sn   t t| | |d|d|d|d|d|d|dd| _d	| _d|p2| jd i| _d	S )
z
        Initialize the PhoneNumberInstance

        :returns: twilio.rest.lookups.v1.phone_number.PhoneNumberInstance
        :rtype: twilio.rest.lookups.v1.phone_number.PhoneNumberInstance
        caller_namerA   r   national_formatcarrierrC   url)r^   rA   r   r_   r`   rC   ra   N)r	   r)   r
   r   _properties_contextr   )r   r   r*   r   r   r   r   r
      s   zPhoneNumberInstance.__init__c                 C   s&   | j du rt| j| jd d| _ | j S )a9  
        Generate an instance context for the instance, the context is capable of
        performing various actions.  All instance actions are proxied to the context

        :returns: PhoneNumberContext for this PhoneNumberInstance
        :rtype: twilio.rest.lookups.v1.phone_number.PhoneNumberContext
        Nr   r   )rc   r   r   r   r   r   r   r   _proxy   s   
	zPhoneNumberInstance._proxyc                 C   
   | j d S )zU
        :returns: The name of the phone number's owner
        :rtype: dict
        r^   rb   r   r   r   r   r^         
zPhoneNumberInstance.caller_namec                 C   re   )z]
        :returns: The ISO country code for the phone number
        :rtype: unicode
        rA   rf   r   r   r   r   rA      rg   z PhoneNumberInstance.country_codec                 C   re   )zT
        :returns: The phone number in E.164 format
        :rtype: unicode
        r   rf   r   r   r   r   r      rg   z PhoneNumberInstance.phone_numberc                 C   re   )zX
        :returns: The phone number, in national format
        :rtype: unicode
        r_   rf   r   r   r   r   r_      rg   z#PhoneNumberInstance.national_formatc                 C   re   )zc
        :returns: The telecom company that provides the phone number
        :rtype: dict
        r`   rf   r   r   r   r   r`      rg   zPhoneNumberInstance.carrierc                 C   re   )zl
        :returns: A JSON string with the results of the Add-ons you specified
        :rtype: dict
        rC   rf   r   r   r   r   rC      rg   zPhoneNumberInstance.add_onsc                 C   re   )zT
        :returns: The absolute URL of the resource
        :rtype: unicode
        ra   rf   r   r   r   r   ra      rg   zPhoneNumberInstance.urlc                 C   s   | j j||||dS )r.   )rA   rB   rC   rD   )rd   r@   )r   rA   rB   rC   rD   r   r   r   r@      s   zPhoneNumberInstance.fetchc                 C   rF   )r   rG   c                 s   rH   rI   rJ   rK   r   r   r   rO     rP   z/PhoneNumberInstance.__repr__.<locals>.<genexpr>z*<Twilio.Lookups.V1.PhoneNumberInstance {}>rQ   rT   r   r   r   r      rV   zPhoneNumberInstance.__repr__r0   )r"   r#   r$   objectr6   r
   propertyrd   r^   rA   r   r_   r`   rC   ra   r   rW   r@   r    r%   r   r   r   r   r)      s.    








r)   N)__doc__twilio.baser   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   0&5