
    pib                         d Z ddlmZmZmZ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)values)InstanceContext)InstanceResource)ListResource)Versionc            !           e Zd Z G d de      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                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  fd	eeef   d
eeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   dd f dZej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  fd	eeef   d
eeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   dd f dZdefdZ xZS )PhoneNumberInstancec                   $    e Zd ZdZdZdZdZdZdZy)#PhoneNumberInstance.ValidationError	TOO_SHORTTOO_LONGINVALID_BUT_POSSIBLEINVALID_COUNTRY_CODEINVALID_LENGTHNOT_A_NUMBERN)	__name__
__module____qualname__r   r   r   r   r   r        e/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/lookups/v2/phone_number.pyValidationErrorr      s"    	55)%r   r   versionpayloadphone_numberc                 L   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _	        |j                  d      | _
        |j                  d	      | _        |j                  d
      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        d|xs | j
                  i| _        d | _        y )Ncalling_country_codecountry_coder    national_formatvalidvalidation_errorscaller_namesim_swapcall_forwardingline_type_intelligenceline_statusidentity_matchreassigned_numbersms_pumping_riskphone_number_quality_scorepre_fillurl)super__init__getr"   r#   r    r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   	_solution_context)selfr   r   r    	__class__s       r   r3   zPhoneNumberInstance.__init__5   se    	!3:;;?U3V!+2;;~+F+2;;~+F.5kk:K.L%,[[%9
6=kkBU6V*1++m*D'.{{:'>.5kk:K.L5<[[$6
# +2++m*D-4[[9I-J07<O0P/6{{;M/NGN{{(H
' 6=[[5L")++e"4 L=D,=,=
 7;r   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    )r6   PhoneNumberContext_versionr5   r7   s    r   _proxyzPhoneNumberInstance._proxyX   s9     == .!^^N;DM }}r   fieldsr#   
first_name	last_nameaddress_line1address_line2citystatepostal_codeaddress_country_codenational_iddate_of_birthlast_verified_dateverification_sidpartner_sub_idc                 V    | j                   j                  |||||||||	|
|||||      S )v
  
        Fetch the PhoneNumberInstance

        :param fields: A comma-separated list of fields to return. Possible values are validation, caller_name, sim_swap, call_forwarding, line_status, line_type_intelligence, identity_match, reassigned_number, sms_pumping_risk, phone_number_quality_score, pre_fill.
        :param country_code: The [country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) used if the phone number provided is in national format.
        :param first_name: User’s first name. This query parameter is only used (optionally) for identity_match package requests.
        :param last_name: User’s last name. This query parameter is only used (optionally) for identity_match package requests.
        :param address_line1: User’s first address line. This query parameter is only used (optionally) for identity_match package requests.
        :param address_line2: User’s second address line. This query parameter is only used (optionally) for identity_match package requests.
        :param city: User’s city. This query parameter is only used (optionally) for identity_match package requests.
        :param state: User’s country subdivision, such as state, province, or locality. This query parameter is only used (optionally) for identity_match package requests.
        :param postal_code: User’s postal zip code. This query parameter is only used (optionally) for identity_match package requests.
        :param address_country_code: User’s country, up to two characters. This query parameter is only used (optionally) for identity_match package requests.
        :param national_id: User’s national ID, such as SSN or Passport ID. This query parameter is only used (optionally) for identity_match package requests.
        :param date_of_birth: User’s date of birth, in YYYYMMDD format. This query parameter is only used (optionally) for identity_match package requests.
        :param last_verified_date: The date you obtained consent to call or text the end-user of the phone number or a date on which you are reasonably certain that the end-user could still be reached at that number. This query parameter is only used (optionally) for reassigned_number package requests.
        :param verification_sid: The unique identifier associated with a verification process through verify API. This query parameter is only used (optionally) for pre_fill package requests.
        :param partner_sub_id: The optional partnerSubId parameter to provide context for your sub-accounts, tenantIDs, sender IDs or other segmentation, enhancing the accuracy of the risk analysis.

        :returns: The fetched PhoneNumberInstance
        r@   r#   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   )r?   fetchr7   r@   r#   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   s                   r   rQ   zPhoneNumberInstance.fetchg   sN    N {{  %!''#!5#'1-) ! 
 	
r   c                 r   K   | j                   j                  |||||||||	|
|||||       d{   S 7 w)
  
        Asynchronous coroutine to fetch the PhoneNumberInstance

        :param fields: A comma-separated list of fields to return. Possible values are validation, caller_name, sim_swap, call_forwarding, line_status, line_type_intelligence, identity_match, reassigned_number, sms_pumping_risk, phone_number_quality_score, pre_fill.
        :param country_code: The [country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) used if the phone number provided is in national format.
        :param first_name: User’s first name. This query parameter is only used (optionally) for identity_match package requests.
        :param last_name: User’s last name. This query parameter is only used (optionally) for identity_match package requests.
        :param address_line1: User’s first address line. This query parameter is only used (optionally) for identity_match package requests.
        :param address_line2: User’s second address line. This query parameter is only used (optionally) for identity_match package requests.
        :param city: User’s city. This query parameter is only used (optionally) for identity_match package requests.
        :param state: User’s country subdivision, such as state, province, or locality. This query parameter is only used (optionally) for identity_match package requests.
        :param postal_code: User’s postal zip code. This query parameter is only used (optionally) for identity_match package requests.
        :param address_country_code: User’s country, up to two characters. This query parameter is only used (optionally) for identity_match package requests.
        :param national_id: User’s national ID, such as SSN or Passport ID. This query parameter is only used (optionally) for identity_match package requests.
        :param date_of_birth: User’s date of birth, in YYYYMMDD format. This query parameter is only used (optionally) for identity_match package requests.
        :param last_verified_date: The date you obtained consent to call or text the end-user of the phone number or a date on which you are reasonably certain that the end-user could still be reached at that number. This query parameter is only used (optionally) for reassigned_number package requests.
        :param verification_sid: The unique identifier associated with a verification process through verify API. This query parameter is only used (optionally) for pre_fill package requests.
        :param partner_sub_id: The optional partnerSubId parameter to provide context for your sub-accounts, tenantIDs, sender IDs or other segmentation, enhancing the accuracy of the risk analysis.

        :returns: The fetched PhoneNumberInstance
        rP   N)r?   fetch_asyncrR   s                   r   rU   zPhoneNumberInstance.fetch_async   s\     N [[,,%!''#!5#'1-) - 
 
 	
 
s   .757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.V2.PhoneNumberInstance {}>joinr5   itemsr\   r7   contexts     r   __repr__zPhoneNumberInstance.__repr__   s6     ((SDNN<P<P<RSS;BB7KKr   )N)r9   r<   )r   r   r   objectr   r   r   strr   r   r3   propertyr?   r   unsetr   rQ   rU   ri   __classcell__r8   s   @r   r   r      s   && &0 '+	!;!; c3h!; sm	!;F    &,\\+1<<)/(.,2LL,2LL#)<<$*LL*0,,39<<*0,,,2LL17/5||-3\\!7
c6k"7
 CK(7
 #v+&	7

 f%7
 S&[)7
 S&[)7
 CK 7
 S&[!7
 3;'7
 $CK07
 3;'7
 S&[)7
 "#v+.7
  V,7
  c6k*!7
" 
#7
v &,\\+1<<)/(.,2LL,2LL#)<<$*LL*0,,39<<*0,,,2LL17/5||-3\\!7
c6k"7
 CK(7
 #v+&	7

 f%7
 S&[)7
 S&[)7
 CK 7
 S&[!7
 3;'7
 $CK07
 3;'7
 S&[)7
 "#v+.7
  V,7
  c6k*!7
" 
#7
r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                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  fdeee	f   deee	f   deee	f   deee	f   deee	f   d	eee	f   d
eee	f   deee	f   deee	f   deee	f   deee	f   deee	f   deee	f   deee	f   deee	f   de
f dZej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  fdeee	f   deee	f   deee	f   deee	f   deee	f   d	eee	f   d
eee	f   deee	f   deee	f   deee	f   deee	f   deee	f   deee	f   deee	f   dee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)z
        Initialize the PhoneNumberContext

        :param version: Version that contains the resource
        :param phone_number: The phone number to lookup in E.164 or national format. Default country code is +1 (North America).
        r    z/PhoneNumbers/{phone_number}Nr   )r2   r3   r5   r\   _uri)r7   r   r    r8   s      r   r3   zPhoneNumberContext.__init__   s@     	! L
 :299KDNNK	r   r@   r#   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   r9   c                    t        j                  |||||||||	|
|||||d      }t        j                  i       }d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                  d         S )rO   FieldsCountryCode	FirstNameLastNameAddressLine1AddressLine2CityState
PostalCodeAddressCountryCode
NationalIdDateOfBirthLastVerifiedDateVerificationSidPartnerSubIdapplication/jsonAcceptGETmethoduriparamsheadersr    r;   )r   ofr=   rQ   rr   r   r5   r7   r@   r#   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   r   r   r   s                      r   rQ   zPhoneNumberContext.fetch   s    P  +'% - -)&:),$6#3 .
( ))B-.--%%dii & 
 #MM7
 	
r   c                 8  K   t        j                  |||||||||	|
|||||d      }t        j                  i       }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                  d         S 7 )w)	rT   rt   r   r   r   r   Nr    r;   )r   r   r=   rU   rr   r   r5   r   s                      r   rU   zPhoneNumberContext.fetch_async>  s     P  +'% - -)&:),$6#3 .
( ))B-.11dii 2 
 
 #MM7
 	
	
s   A,B.B/*Bc                     dj                  d | j                  j                         D              }dj                  |      S )rW   rX   c              3   F   K   | ]  \  }}d j                  ||        ywrZ   r[   r]   s      r   ra   z.PhoneNumberContext.__repr__.<locals>.<genexpr>  rb   rc   z)<Twilio.Lookups.V2.PhoneNumberContext {}>rd   rg   s     r   ri   zPhoneNumberContext.__repr__  s6     ((SDNN<P<P<RSS:AA'JJr   )r   r   r   r   rk   r3   r   rm   r   rj   r   rQ   rU   ri   rn   ro   s   @r   r<   r<      su   L Ls L" &,\\+1<<)/(.,2LL,2LL#)<<$*LL*0,,39<<*0,,,2LL17/5||-3\\!H
c6k"H
 CK(H
 #v+&	H

 f%H
 S&[)H
 S&[)H
 CK H
 S&[!H
 3;'H
 $CK0H
 3;'H
 S&[)H
 "#v+.H
  V,H
  c6k*!H
" 
#H
X &,\\+1<<)/(.,2LL,2LL#)<<$*LL*0,,39<<*0,,,2LL17/5||-3\\!H
c6k"H
 CK(H
 #v+&	H

 f%H
 S&[)H
 S&[)H
 CK H
 S&[!H
 3;'H
 $CK0H
 3;'H
 S&[)H
 "#v+.H
  V,H
  c6k*!H
" 
#H
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)r2   r3   )r7   r   r8   s     r   r3   zPhoneNumberList.__init__  s     	!r   r    r9   c                 0    t        | j                  |      S z
        Constructs a PhoneNumberContext

        :param phone_number: The phone number to lookup in E.164 or national format. Default country code is +1 (North America).
        r;   r<   r=   r7   r    s     r   r4   zPhoneNumberList.get       "$--lKKr   c                 0    t        | j                  |      S r   r   r   s     r   __call__zPhoneNumberList.__call__  r   r   c                      y)rW   z#<Twilio.Lookups.V2.PhoneNumberList>r   r>   s    r   ri   zPhoneNumberList.__repr__  s     5r   )r   r   r   r   r3   rk   r<   r4   r   ri   rn   ro   s   @r   r   r     sI    " "L L(: LLS L-? L5# 5r   r   N)__doc__typingr   r   r   r   r   twilio.baser   twilio.base.instance_contextr	   twilio.base.instance_resourcer
   twilio.base.list_resourcer   twilio.base.versionr   r   r<   r   r   r   r   <module>r      sP    4 3  8 : 2 'IL* ILXlK lK^!5l !5r   