U
    hRfb                     @   s   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	 d	eZG d
d de
ZG dd deZdS )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                       s  e Zd ZG dd deZdeeeef e	e d fddZ
edd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feeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef d d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feeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef d dddZedddZ  ZS )PhoneNumberInstancec                   @   s$   e Zd ZdZdZdZdZdZdZdS )z#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    r   r   G/tmp/pip-unpacked-wheel-74se_viw/twilio/rest/lookups/v2/phone_number.pyValidationError   s   r   N)versionpayloadphone_numberc                    s   t  | |d| _|d| _|d| _|d| _|d| _|d| _|d| _	|d| _
|d	| _|d
| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _d|p| ji| _d | _d S )Ncalling_country_codecountry_coder   national_formatvalidvalidation_errorscaller_namesim_swapcall_forwardingline_statusline_type_intelligence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)   r*   r+   	_solution_context)selfr   r   r   	__class__r   r   r-   5   sB     zPhoneNumberInstance.__init__PhoneNumberContextreturnc                 C   s&   | j dkr t| j| jd 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
        Nr   r   )r0   r4   _versionr/   r1   r   r   r   _proxy`   s    
zPhoneNumberInstance._proxy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_sidr6   c                 C   s(   | j j|||||||||	|
||||dS )	  
        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.

        :returns: The fetched PhoneNumberInstance
        r<   r   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   )r:   fetchr1   r<   r   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   r   r   r   rK   o   s     %zPhoneNumberInstance.fetchc                    s.   | j j|||||||||	|
||||dI dH S )	  
        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.

        :returns: The fetched PhoneNumberInstance
        rJ   N)r:   fetch_asyncrL   r   r   r   rN      s     %zPhoneNumberInstance.fetch_asyncc                 C   s$   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s   s   | ]\}}d  ||V  qdS z{}={}Nformat.0kvr   r   r   	<genexpr>   s     z/PhoneNumberInstance.__repr__.<locals>.<genexpr>z*<Twilio.Lookups.V2.PhoneNumberInstance {}>joinr/   itemsrS   r1   contextr   r   r   __repr__   s    zPhoneNumberInstance.__repr__)N)r   r   r   objectr   r   r   strr   r   r-   propertyr:   r   unsetr   rK   rN   r^   __classcell__r   r   r2   r   r      s     
+













8













6r   c                       s  e Zd Zeed f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feee	f eee	f eee	f eee	f eee	f eee	f eee	f eee	f eee	f eee	f eee	f eee	f eee	f eee	f e
d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feee	f eee	f eee	f eee	f eee	f eee	f eee	f eee	f eee	f eee	f eee	f eee	f eee	f eee	f e
dddZed	d
dZ  ZS )r4   )r   r   c                    s*   t  | d|i| _djf | j| _dS )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}N)r,   r-   r/   rS   _uri)r1   r   r   r2   r   r   r-      s
     zPhoneNumberContext.__init__r;   c                 C   sR   t |||||||||	|
||||d}| jjd| j|d}t| j|| jd dS )rI   ZFieldsZCountryCodeZ	FirstNameZLastNameZAddressLine1ZAddressLine2ZCityStateZ
PostalCodeZAddressCountryCodeZ
NationalIdZDateOfBirthZLastVerifiedDateZVerificationSidGETmethoduriparamsr   r7   )r   ofr8   rK   rd   r   r/   r1   r<   r   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   datar   r   r   r   rK      s.    &zPhoneNumberContext.fetchc                    sX   t |||||||||	|
||||d}| jjd| j|dI dH }t| j|| jd dS )rM   re   rg   rh   Nr   r7   )r   rl   r8   rN   rd   r   r/   rm   r   r   r   rN   7  s6    &  zPhoneNumberContext.fetch_asyncr5   c                 C   s$   d dd | j D }d|S )rO   rP   c                 s   s   | ]\}}d  ||V  qdS rQ   rR   rT   r   r   r   rX     s     z.PhoneNumberContext.__repr__.<locals>.<genexpr>z)<Twilio.Lookups.V2.PhoneNumberContext {}>rY   r\   r   r   r   r^   z  s    zPhoneNumberContext.__repr__)r   r   r   r   r`   r-   r   rb   r   r_   r   rK   rN   r^   rc   r   r   r2   r   r4      s   













C













Cr4   c                       sP   e Zd Zed fddZeedddZeedddZed	d
dZ	  Z
S )PhoneNumberList)r   c                    s   t  | dS )zm
        Initialize the PhoneNumberList

        :param version: Version that contains the resource

        N)r,   r-   )r1   r   r2   r   r   r-     s    zPhoneNumberList.__init__)r   r6   c                 C   s   t | j|d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).
        r7   r4   r8   r1   r   r   r   r   r.     s    zPhoneNumberList.getc                 C   s   t | j|dS rp   rq   rr   r   r   r   __call__  s    zPhoneNumberList.__call__r5   c                 C   s   dS )rO   z#<Twilio.Lookups.V2.PhoneNumberList>r   r9   r   r   r   r^     s    zPhoneNumberList.__repr__)r   r   r   r   r-   r`   r4   r.   rs   r^   rc   r   r   r2   r   ro     s   	ro   N)__doc__typingr   r   r   r   r   Ztwilio.baser   Ztwilio.base.instance_contextr   Ztwilio.base.instance_resourcer	   Ztwilio.base.list_resourcer
   Ztwilio.base.versionr   r   r4   ro   r   r   r   r   <module>   s    O  