
    d{iR                         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 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)ApiResponse)InstanceContext)InstanceResource)ListResource)Versionc                   2    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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 )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       a/home/sas/my/fyp/ringai/.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._proxy8   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"   r0   zPhoneNumberInstance.fetchG   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_asyncr1   s        r"   r4   zPhoneNumberInstance.fetch_async_   s:     " [[,,%%	 - 
 
 	
 
   #,*,c                 @    | j                   j                  ||||      S )a?  
        Fetch the PhoneNumberInstance with HTTP info

        :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: ApiResponse with instance, status code, and headers
        r/   )r*   fetch_with_http_infor1   s        r"   r7   z(PhoneNumberInstance.fetch_with_http_infow   s,    " {{//%%	 0 
 	
r#   c                 \   K   | j                   j                  ||||       d{   S 7 w)aY  
        Asynchronous coroutine to fetch the PhoneNumberInstance with HTTP info

        :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: ApiResponse with instance, status code, and headers
        r/   N)r*   fetch_with_http_info_asyncr1   s        r"   r9   z.PhoneNumberInstance.fetch_with_http_info_async   s:     " [[;;%%	 < 
 
 	
 
r5   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__   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   r0   r4   r
   r7   r9   rM   __classcell__r!   s   @r"   r   r      s    '+	;; 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
 

4 ,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                   l    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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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                 X   t        j                  |t        j                  |d       t        j                  |d       d      }|j	                  t        j
                  |d             t        j                  i       }d|d<   | j                  j                  d| j                  ||      S )	zz
        Internal helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        c                     | S rN   r[   es    r"   <lambda>z+PhoneNumberContext._fetch.<locals>.<lambda>       a r#   c                     | S rN   r[   r_   s    r"   ra   z+PhoneNumberContext._fetch.<locals>.<lambda>       1 r#   CountryCodeTypeAddOnsrh   application/jsonAcceptGETmethoduriparamsheaders)	r	   ofr   mapupdateprefixed_collapsible_mapr(   fetch_with_response_infor\   r    r   r+   r   r,   ro   rp   s          r"   _fetchzPhoneNumberContext._fetch   s     +!dK8#--=
 	i88xPQ))B-.}}55dii 6 
 	
r#   c                 ~    | j                  ||||      \  }}}t        | j                  || j                  d         S )r.   r/   r   r&   )rw   r   r(   r   r    r   r+   r   r,   r   _s          r"   r0   zPhoneNumberContext.fetch   sN    " %%	 $ 
A #MM7
 	
r#   c                     | j                  ||||      \  }}}t        | j                  || j                  d         }t	        |||      S )aM  
        Fetch the PhoneNumberInstance and return response metadata

        :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: ApiResponse with instance, status code, and headers
        r/   r   r&   datastatus_coderp   )rw   r   r(   r   r
   	r    r   r+   r   r,   r   r~   rp   instances	            r"   r7   z'PhoneNumberContext.fetch_with_http_info   s]    " )-%%	 )4 )
%g 'MM7

 k7SSr#   c                 t  K   t        j                  |t        j                  |d       t        j                  |d       d      }|j	                  t        j
                  |d             t        j                  i       }d|d<   | j                  j                  d| j                  ||       d	{   S 7 w)
z
        Internal async helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        c                     | S rN   r[   r_   s    r"   ra   z1PhoneNumberContext._fetch_async.<locals>.<lambda>.  rb   r#   c                     | S rN   r[   r_   s    r"   ra   z1PhoneNumberContext._fetch_async.<locals>.<lambda>/  rd   r#   re   rh   ri   rj   rk   rl   N)	r	   rq   r   rr   rs   rt   r(   fetch_with_response_info_asyncr\   rv   s          r"   _fetch_asynczPhoneNumberContext._fetch_async  s      +!dK8#--=
 	i88xPQ))B-.]]AAdii B 
 
 	
 
s   B/B81B62B8c                    K   | j                  ||||       d{   \  }}}t        | j                  || j                  d         S 7 -w)r3   r/   Nr   r&   )r   r   r(   r   ry   s          r"   r4   zPhoneNumberContext.fetch_async=  s^     " #//%%	 0 
 
A #MM7
 	

s   AA	.Ac                    K   | j                  ||||       d{   \  }}}t        | j                  || j                  d         }t	        |||      S 7 ;w)ag  
        Asynchronous coroutine to fetch the PhoneNumberInstance and return response metadata

        :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: ApiResponse with instance, status code, and headers
        r/   Nr   r&   r|   )r   r   r(   r   r
   r   s	            r"   r9   z-PhoneNumberContext.fetch_with_http_info_asyncZ  sn     " /3.?.?%%	 /@ /
 )
%g 'MM7

 k7SS)
s   AA<Ac                     dj                  d | j                  j                         D              }dj                  |      S )r;   r<   c              3   F   K   | ]  \  }}d j                  ||        ywr>   r?   rA   s      r"   rE   z.PhoneNumberContext.__repr__.<locals>.<genexpr>~  rF   rG   z)<Twilio.Lookups.V1.PhoneNumberContext {}>rH   rK   s     r"   rM   zPhoneNumberContext.__repr__x  s6     ((SDNN<P<P<RSS:AA'JJr#   )rO   rP   rQ   r   rS   r   r	   rU   r   rV   r   r   tuplerw   r   r0   r
   r7   r   r4   r9   rM   rW   rX   s   @r"   r'   r'      sx   L Ls L" ,2<<)/,2LL9?
CK(
 DIv%&
 tCy&()	

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

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

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

 Df-v56
 

> ,2<<)/,2LL9?TCK(T DIv%&T tCy&()	T
 Df-v56T 
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 r   r   r   s     r"   __call__zPhoneNumberList.__call__  r   r#   c                      y)r;   z#<Twilio.Lookups.V1.PhoneNumberList>r[   r)   s    r"   rM   zPhoneNumberList.__repr__  s     5r#   )rO   rP   rQ   r   r   rS   r'   r   r   rM   rW   rX   s   @r"   r   r     sI    " "L L(: LLS L-? L5# 5r#   r   N)rR   typingr   r   r   r   r   twilio.baser   r	   twilio.base.api_responser
   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   r'   r   r[   r#   r"   <module>r      sS    4 3 ) 0 8 : 2 'VL* VLrNK NKb!5l !5r#   