
    pi2                         d Z ddlmZmZmZmZmZ ddlmZ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	e      Z G d
 de      Z G d de      Zy)a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Lookups
    This is the public Twilio REST API.

    NOTE: This class is auto generated by OpenAPI Generator.
    https://openapi-generator.tech
    Do not edit the class manually.
    )AnyDictListOptionalUnion)	serializevalues)InstanceContext)InstanceResource)ListResource)Versionc                       e Zd ZdZ	 ddedeeef   dee   f fdZ	e
dd       Zej                  ej                  ej                  ej                  fdeeef   d	eee   ef   d
eee   ef   deeeef   ef   dd f
dZej                  ej                  ej                  ej                  fdeeef   d	eee   ef   d
eee   ef   deeeef   ef   dd f
dZdefdZ xZS )PhoneNumberInstancea  
    :ivar caller_name: The name of the phone number's owner. If `null`, that information was not available.
    :ivar country_code: The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) for the phone number.
    :ivar phone_number: The phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number.
    :ivar national_format: The phone number, in national format.
    :ivar carrier: The telecom company that provides the phone number.
    :ivar add_ons: A JSON string with the results of the Add-ons you specified in the `add_ons` parameters. For the format of the object, see [Using Add-ons](https://www.twilio.com/docs/add-ons).
    :ivar url: The absolute URL of the resource.
    versionpayloadphone_numberc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _	        d|xs | j
                  i| _
        d | _        y )Ncaller_namecountry_coder   national_formatcarrieradd_onsurl)super__init__getr   r   r   r   r   r   r   	_solution_context)selfr   r   r   	__class__s       e/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/lookups/v1/phone_number.pyr   zPhoneNumberInstance.__init__"   s     	!8?M8R+2;;~+F+2;;~+F.5kk:K.L4;KK	4J4;KK	4J")++e"4 L=D,=,=
 7;    returnc                     | j                   )t        | j                  | j                  d         | _         | j                   S )z
        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
        r   r   )r   PhoneNumberContext_versionr   r   s    r!   _proxyzPhoneNumberInstance._proxy7   s9     == .!^^N;DM }}r"   r   typer   add_ons_datac                 @    | j                   j                  ||||      S )  
        Fetch the PhoneNumberInstance

        :param country_code: The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the phone number to fetch. This is used to specify the country when the phone number is provided in a national format.
        :param type: The type of information to return. Can be: `carrier` or `caller-name`. The default is null. To retrieve both types of information, specify this parameter twice; once with `carrier` and once with `caller-name` as the value.
        :param add_ons: The `unique_name` of an Add-on you would like to invoke. Can be the `unique_name` of an Add-on that is installed on your account. You can specify multiple instances of this parameter to invoke multiple Add-ons. For more information about  Add-ons, see the [Add-ons documentation](https://www.twilio.com/docs/add-ons).
        :param add_ons_data: Data specific to the add-on you would like to invoke. The content and format of this value depends on the add-on.

        :returns: The fetched PhoneNumberInstance
        r   r*   r   r+   )r)   fetchr   r   r*   r   r+   s        r!   r/   zPhoneNumberInstance.fetchF   s,    " {{  %%	 ! 
 	
r"   c                 \   K   | j                   j                  ||||       d{   S 7 w)6  
        Asynchronous coroutine to fetch the PhoneNumberInstance

        :param country_code: The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the phone number to fetch. This is used to specify the country when the phone number is provided in a national format.
        :param type: The type of information to return. Can be: `carrier` or `caller-name`. The default is null. To retrieve both types of information, specify this parameter twice; once with `carrier` and once with `caller-name` as the value.
        :param add_ons: The `unique_name` of an Add-on you would like to invoke. Can be the `unique_name` of an Add-on that is installed on your account. You can specify multiple instances of this parameter to invoke multiple Add-ons. For more information about  Add-ons, see the [Add-ons documentation](https://www.twilio.com/docs/add-ons).
        :param add_ons_data: Data specific to the add-on you would like to invoke. The content and format of this value depends on the add-on.

        :returns: The fetched PhoneNumberInstance
        r.   N)r)   fetch_asyncr0   s        r!   r3   zPhoneNumberInstance.fetch_async^   s:     " [[,,%%	 - 
 
 	
 
s   #,*,c                     dj                  d | j                  j                         D              }dj                  |      S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c              3   F   K   | ]  \  }}d j                  ||        ywz{}={}Nformat.0kvs      r!   	<genexpr>z/PhoneNumberInstance.__repr__.<locals>.<genexpr>|        SDAq7>>!Q/S   !z*<Twilio.Lookups.V1.PhoneNumberInstance {}>joinr   itemsr:   r   contexts     r!   __repr__zPhoneNumberInstance.__repr__v   s6     ((SDNN<P<P<RSS;BB7KKr"   N)r#   r&   )__name__
__module____qualname____doc__r   r   strr   r   r   propertyr)   r	   unsetr   objectr   r/   r3   rG   __classcell__r    s   @r!   r   r      sr    '+	;; c3h; sm	;*    ,2<<)/,2LL9?
CK(
 DIv%&
 tCy&()	

 Df-v56
 

4 ,2<<)/,2LL9?
CK(
 DIv%&
 tCy&()	

 Df-v56
 

0L# Lr"   r   c                       e Zd Zdedef fdZej                  ej                  ej                  ej                  fdeee	f   dee
e   e	f   dee
e   e	f   deeee	f   e	f   def
d	Zej                  ej                  ej                  ej                  fdeee	f   dee
e   e	f   dee
e   e	f   deeee	f   e	f   def
d
ZdefdZ xZS )r&   r   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)a4  
        Initialize the PhoneNumberContext

        :param version: Version that contains the resource
        :param phone_number: The phone number to lookup in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number.
        r   z/PhoneNumbers/{phone_number}N )r   r   r   r:   _uri)r   r   r   r    s      r!   r   zPhoneNumberContext.__init__   s@     	! L
 :299KDNNK	r"   r   r*   r   r+   r#   c                    t        j                  |t        j                  |d       t        j                  |d       d      }|j	                  t        j
                  |d             t        j                  i       }d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                  d	   
      S )r-   c                     | S rH   rU   es    r!   <lambda>z*PhoneNumberContext.fetch.<locals>.<lambda>       a r"   c                     | S rH   rU   rY   s    r!   r[   z*PhoneNumberContext.fetch.<locals>.<lambda>       1 r"   CountryCodeTypeAddOnsrb   application/jsonAcceptGETmethoduriparamsheadersr   r%   )r	   ofr   mapupdateprefixed_collapsible_mapr'   r/   rV   r   r   r   r   r*   r   r+   ri   rj   r   s           r!   r/   zPhoneNumberContext.fetch   s    $ +!dK8#--=
 	i88xPQ))B-.--%%dii & 
 #MM7
 	
r"   c                   K   t        j                  |t        j                  |d       t        j                  |d       d      }|j	                  t        j
                  |d             t        j                  i       }d|d<   | j                  j                  d| j                  ||       d	{   }t        | j                  || j                  d
         S 7 )w)r2   c                     | S rH   rU   rY   s    r!   r[   z0PhoneNumberContext.fetch_async.<locals>.<lambda>   r\   r"   c                     | S rH   rU   rY   s    r!   r[   z0PhoneNumberContext.fetch_async.<locals>.<lambda>   r^   r"   r_   rb   rc   rd   re   rf   Nr   r%   )r	   rk   r   rl   rm   rn   r'   r3   rV   r   r   ro   s           r!   r3   zPhoneNumberContext.fetch_async   s     $ +!dK8#--=
 	i88xPQ))B-.11dii 2 
 
 #MM7
 	
	
s   B/C1C2*Cc                     dj                  d | j                  j                         D              }dj                  |      S )r5   r6   c              3   F   K   | ]  \  }}d j                  ||        ywr8   r9   r;   s      r!   r?   z.PhoneNumberContext.__repr__.<locals>.<genexpr>   r@   rA   z)<Twilio.Lookups.V1.PhoneNumberContext {}>rB   rE   s     r!   rG   zPhoneNumberContext.__repr__   s6     ((SDNN<P<P<RSS:AA'JJr"   )rI   rJ   rK   r   rM   r   r	   rO   r   rP   r   r   r   r/   r3   rG   rQ   rR   s   @r!   r&   r&      s?   L Ls L" ,2<<)/,2LL9?(
CK((
 DIv%&(
 tCy&()	(

 Df-v56(
 
(
X ,2<<)/,2LL9?(
CK((
 DIv%&(
 tCy&()	(

 Df-v56(
 
(
TK# Kr"   r&   c                   P     e Zd Zdef fdZdedefdZdedefdZdefdZ	 xZ
S )PhoneNumberListr   c                 $    t         |   |       y)zm
        Initialize the PhoneNumberList

        :param version: Version that contains the resource

        N)r   r   )r   r   r    s     r!   r   zPhoneNumberList.__init__   s     	!r"   r   r#   c                 0    t        | j                  |      S z
        Constructs a PhoneNumberContext

        :param phone_number: The phone number to lookup in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number.
        r%   r&   r'   r   r   s     r!   r   zPhoneNumberList.get        "$--lKKr"   c                 0    t        | j                  |      S ry   rz   r{   s     r!   __call__zPhoneNumberList.__call__  r|   r"   c                      y)r5   z#<Twilio.Lookups.V1.PhoneNumberList>rU   r(   s    r!   rG   zPhoneNumberList.__repr__
  s     5r"   )rI   rJ   rK   r   r   rM   r&   r   r~   rG   rQ   rR   s   @r!   rv   rv      sI    " "L L(: LLS L-? L5# 5r"   rv   N)rL   typingr   r   r   r   r   twilio.baser   r	   twilio.base.instance_contextr
   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   r&   rv   rU   r"   r!   <module>r      sP    4 3 ) 8 : 2 'fL* fLRlK lK^!5l !5r"   