U
    ^g%i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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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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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   b/var/www/html/api-medvista/venv/lib/python3.8/site-packages/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_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)   r*   r+   	_solution_context)selfr   r   r   	__class__r   r   r-   5   s4     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   _proxyX   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_sidpartner_sub_idr6   c                 C   s*   | j j|||||||||	|
|||||d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   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   )r:   fetchr1   r<   r   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   r   r   r   rL   g   s"    'zPhoneNumberInstance.fetchc                    s0   | 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.
        :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
        rK   N)r:   fetch_asyncrM   r   r   r   rO      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/   itemsrT   r1   contextr   r   r   __repr__   s    zPhoneNumberInstance.__repr__)N)r   r   r   objectr   r   r   strr   r   r-   propertyr:   r   unsetr   rL   rO   r_   __classcell__r   r   r2   r   r      s     
#














;














9r   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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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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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/   rT   _uri)r1   r   r   r2   r   r   r-      s
     zPhoneNumberContext.__init__r;   c                 C   sh   t |||||||||	|
|||||d}t i }d|d< | jjd| j||d}t| j|| jd dS )rJ   ZFieldsZCountryCodeZ	FirstNameZLastNameZAddressLine1ZAddressLine2ZCityStateZ
PostalCodeZAddressCountryCodeZ
NationalIdZDateOfBirthZLastVerifiedDateZVerificationSidZPartnerSubIdapplication/jsonAcceptGETmethoduriparamsheadersr   r7   )r   ofr8   rL   re   r   r/   r1   r<   r   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rn   ro   r   r   r   r   rL      s>    (
   zPhoneNumberContext.fetchc                    sn   t |||||||||	|
|||||d}t i }d|d< | jjd| j||dI dH }t| j|| jd dS )	rN   rf   rh   ri   rj   rk   Nr   r7   )r   rp   r8   rO   re   r   r/   rq   r   r   r   rO   >  s>    (
   zPhoneNumberContext.fetch_asyncr5   c                 C   s$   d dd | j D }d|S )rP   rQ   c                 s   s   | ]\}}d  ||V  qdS rR   rS   rU   r   r   r   rY     s     z.PhoneNumberContext.__repr__.<locals>.<genexpr>z)<Twilio.Lookups.V2.PhoneNumberContext {}>rZ   r]   r   r   r   r_     s    zPhoneNumberContext.__repr__)r   r   r   r   ra   r-   r   rc   r   r`   r   rL   rO   r_   rd   r   r   r2   r   r4      s   














L














Jr4   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 rs   rt   ru   r   r   r   __call__  s    zPhoneNumberList.__call__r5   c                 C   s   dS )rP   z#<Twilio.Lookups.V2.PhoneNumberList>r   r9   r   r   r   r_     s    zPhoneNumberList.__repr__)r   r   r   r   r-   ra   r4   r.   rv   r_   rd   r   r   r2   r   rr     s   	rr   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   rr   r   r   r   r   <module>   s    M 0