o
    f>hv                     @   sp   d Z ddl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 G dd de	ZG d	d
 d
eZdS )a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Accounts
    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OptionalUnion)values)InstanceResource)ListResource)Versionc                       s@   e Zd ZdZdedeeef f fddZdefddZ	  Z
S )	SafelistInstancez
    :ivar sid: The unique string that we created to identify the SafeList resource.
    :ivar phone_number: The phone number or phone number 1k prefix in SafeList.
    versionpayloadc                    s(   t  | |d| _|d| _d S )Nsidphone_number)super__init__getr   r   )selfr   r   	__class__ S/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/accounts/v1/safelist.pyr      s   zSafelistInstance.__init__returnc                 C      dS )f
        Provide a friendly representation

        :returns: Machine friendly representation
        z%<Twilio.Accounts.V1.SafelistInstance>r   r   r   r   r   __repr__#   s   zSafelistInstance.__repr__)__name__
__module____qualname____doc__r	   r   strr   r   r   __classcell__r   r   r   r   r
      s    r
   c                       s   e Zd Zdef fddZdedefddZdedefdd	Ze	j
fdeeef defd
dZe	j
fdeeef defddZe	j
fdeeef defddZe	j
fdeeef defddZdefddZ  ZS )SafelistListr   c                    s   t  | d| _dS )zj
        Initialize the SafelistList

        :param version: Version that contains the resource

        z/SafeList/NumbersN)r   r   _uri)r   r   r   r   r   r   /   s   
zSafelistList.__init__r   r   c                 C   sN   t d|i}t ddi}d|d< d|d< | jjd| j||d}t| j|S )a  
        Create the SafelistInstance

        :param phone_number: The phone number or phone number 1k prefix to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).

        :returns: The created SafelistInstance
        PhoneNumberContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptPOSTmethoduridataheaders)r   of_versioncreater#   r
   r   r   r-   r.   r   r   r   r   r1   :   s   	
zSafelistList.createc                    sV   t d|i}t ddi}d|d< d|d< | jjd| j||dI dH }t| j|S )	a'  
        Asynchronously create the SafelistInstance

        :param phone_number: The phone number or phone number 1k prefix to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).

        :returns: The created SafelistInstance
        r$   r%   r&   r'   r(   r)   r*   N)r   r/   r0   create_asyncr#   r
   r2   r   r   r   r3   T   s   	
zSafelistList.create_asyncc                 C   s2   t ddi}t d|i}| jjd| j||dS )6  
        Asynchronously delete the SafelistInstance

        :param phone_number: The phone number or phone number 1k prefix to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
        :returns: True if delete succeeds, False otherwise
        r%   r&   r$   DELETEr+   r,   r.   params)r   r/   r0   deleter#   r   r   r.   r7   r   r   r   r8   n   s   
zSafelistList.deletec                    s:   t ddi}t d|i}| jjd| j||dI dH S )r4   r%   r&   r$   r5   r6   N)r   r/   r0   delete_asyncr#   r9   r   r   r   r:      s   	
zSafelistList.delete_asyncc                 C   sF   t ddi}d|d< t d|i}| jjd| j||d}t| j|S ))  
        Asynchronously fetch the SafelistInstance

        :param phone_number: The phone number or phone number 1k prefix to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
        :returns: The fetched SafelistInstance
        r%   r&   r'   r(   r$   GETr6   )r   r/   r0   fetchr#   r
   r   r   r.   r7   r   r   r   r   r=      s   	
zSafelistList.fetchc                    sN   t ddi}d|d< t d|i}| jjd| j||dI dH }t| j|S )	r;   r%   r&   r'   r(   r$   r<   r6   N)r   r/   r0   fetch_asyncr#   r
   r>   r   r   r   r?      s   	
zSafelistList.fetch_asyncc                 C   r   )r   z!<Twilio.Accounts.V1.SafelistList>r   r   r   r   r   r      s   zSafelistList.__repr__)r   r   r   r	   r   r    r
   r1   r3   r   unsetr   objectboolr8   r:   r=   r?   r   r!   r   r   r   r   r"   -   s0     





r"   N)r   typingr   r   r   r   twilio.baser   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr	   r
   r"   r   r   r   r   <module>   s    