
    m>h                     |    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e	      Z G d	 d
e      Zy)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                   B     e Zd ZdZdedeeef   f fdZdefdZ	 xZ
S )SafelistInstancez
    :ivar sid: The unique string that we created to identify the SafeList resource.
    :ivar phone_number: The phone number in SafeList.
    versionpayloadc                 |    t         |   |       |j                  d      | _        |j                  d      | _        y )Nsidphone_number)super__init__getr   r   )selfr   r   	__class__s      d/var/www/html/DP/alpha_backend/venv/lib/python3.12/site-packages/twilio/rest/accounts/v1/safelist.pyr   zSafelistInstance.__init__   s1    !")++e"4+2;;~+F    returnc                      y)f
        Provide a friendly representation

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

        :param version: Version that contains the resource

        z/SafeList/NumbersN)r   r   _uri)r   r   r   s     r   r   zSafelistList.__init__/   s     	!'	r   r   r   c                     t        j                  d|i      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  |      S )z
        Create the SafelistInstance

        :param phone_number: The phone number 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   r4   r5   r   s        r   r8   zSafelistList.create:   s     yy|

 ))^-PQR"E.--&&tyytW ' 
  w77r   c                   K   t        j                  d|i      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  |      S 7 w)	a  
        Asynchronously create the SafelistInstance

        :param phone_number: The phone number 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/   r0   r1   N)r   r6   r7   create_asyncr)   r   r9   s        r   r;   zSafelistList.create_asyncT   s      yy|

 ))^-PQR"E.22tyytW 3 
 
  w77	
s   A%B'B(Bc                     t        j                  ddi      }t        j                  d|i      }| j                  j                  d| j                  ||      S )  
        Asynchronously delete the SafelistInstance

        :param phone_number: The phone number 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r2   r3   r5   params)r   r6   r7   deleter)   r   r   r5   r@   s       r   rA   zSafelistList.deleten   s[     ))^-PQR|

 }}##GF $ 
 	
r   c                    K   t        j                  ddi      }t        j                  d|i      }| j                  j                  d| j                  ||       d{   S 7 w)r=   r,   r-   r+   r>   r?   N)r   r6   r7   delete_asyncr)   rB   s       r   rD   zSafelistList.delete_async   si      ))^-PQR|

 ]]//GF 0 
 
 	
 
s   AA$A"A$c                     t        j                  ddi      }d|d<   t        j                  d|i      }| j                  j                  d| j                  ||      }t        | j                  |      S )  
        Asynchronously fetch the SafelistInstance

        :param phone_number: The phone number 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+   GETr?   )r   r6   r7   fetchr)   r   r   r   r5   r@   r   s        r   rH   zSafelistList.fetch   su     ))^-PQR.|
 --%%dii & 
  w77r   c                   K   t        j                  ddi      }d|d<   t        j                  d|i      }| j                  j                  d| j                  ||       d{   }t        | j                  |      S 7 w)	rF   r,   r-   r.   r/   r+   rG   r?   N)r   r6   r7   fetch_asyncr)   r   rI   s        r   rK   zSafelistList.fetch_async   s      ))^-PQR.|
 11dii 2 
 
  w77	
s   A A?"A=#A?c                      y)r   z!<Twilio.Accounts.V1.SafelistList>r   r   s    r   r   zSafelistList.__repr__   s     3r   )r   r    r!   r
   r   r#   r   r8   r;   r   unsetr   objectboolrA   rD   rH   rK   r   r$   r%   s   @r   r'   r'   -   s    	( 	(83 8+; 848s 87G 84 9? 
5f#5 
 
& 28
!#v+.
	
* 288!#v+.8	84 288!#v+.8	823# 3r   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   <module>rU      s9    . -  : 2 '7' 7,_3< _3r   