
    pi!                         d Z ddl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 - Verify
    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)values)InstanceContext)InstanceResource)ListResource)Versionc                        e Zd ZdZ	 ddedeeef   dee   f fdZ	e
dd       ZdefdZdefd	Zdd
Zd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.
    :ivar url: The absolute URL of the SafeList resource.
    versionpayloadphone_numberc                     t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        d|xs | j                  i| _        d | _        y )Nsidr   url)super__init__getr   r   r   	_solution_context)selfr   r   r   	__class__s       `/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/verify/v2/safelist.pyr   zSafelistInstance.__init__   sg     	!")++e"4+2;;~+F")++e"4 L=D,=,=
 48    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: SafelistContext for this SafelistInstance
        r   r   )r   SafelistContext_versionr   r   s    r   _proxyzSafelistInstance._proxy/   s9     == +!^^N;DM }}r   c                 6    | j                   j                         S )k
        Deletes the SafelistInstance


        :returns: True if delete succeeds, False otherwise
        )r"   deleter!   s    r   r%   zSafelistInstance.delete>   s     {{!!##r   c                 R   K   | j                   j                          d{   S 7 w)
        Asynchronous coroutine that deletes the SafelistInstance


        :returns: True if delete succeeds, False otherwise
        N)r"   delete_asyncr!   s    r   r(   zSafelistInstance.delete_asyncG   s!      [[--////   '%'c                 6    | j                   j                         S )]
        Fetch the SafelistInstance


        :returns: The fetched SafelistInstance
        )r"   fetchr!   s    r   r,   zSafelistInstance.fetchP   s     {{  ""r   c                 R   K   | j                   j                          d{   S 7 w)w
        Asynchronous coroutine to fetch the SafelistInstance


        :returns: The fetched SafelistInstance
        N)r"   fetch_asyncr!   s    r   r/   zSafelistInstance.fetch_asyncY   s!      [[,,....r)   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,SafelistInstance.__repr__.<locals>.<genexpr>h        SDAq7>>!Q/S   !z&<Twilio.Verify.V2.SafelistInstance {}>joinr   itemsr6   r   contexts     r   __repr__zSafelistInstance.__repr__b   s6     ((SDNN<P<P<RSS7>>wGGr   )N)r   r   )r   r   )__name__
__module____qualname____doc__r
   r   strr   r   r   propertyr"   boolr%   r(   r,   r/   rC   __classcell__r   s   @r   r   r      s~     '+	88 c3h8 sm	8"  $ $0D 0#/H# Hr   r   c                   d     e Zd Zdedef fdZdefdZdefdZde	fdZ
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)a  
        Initialize the SafelistContext

        :param version: Version that contains the resource
        :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).
        r   z /SafeList/Numbers/{phone_number}N )r   r   r   r6   _uri)r   r   r   r   s      r   r   zSafelistContext.__init__n   s@     	! L
 >6==OO	r   r   c                 |    t        j                  i       }| j                  j                  d| j                  |      S )r$   DELETEmethoduriheaders)r   ofr    r%   rP   r   rV   s     r   r%   zSafelistContext.delete}   s1     ))B-}}##8G#TTr   c                    K   t        j                  i       }| j                  j                  d| j                  |       d{   S 7 w)r'   rR   rS   N)r   rW   r    r(   rP   rX   s     r   r(   zSafelistContext.delete_async   sF      ))B-]]//G 0 
 
 	
 
s   AA
AA
c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d         S )r+   application/jsonAcceptGETrS   r   r   )r   rW   r    r,   rP   r   r   r   rV   r   s      r   r,   zSafelistContext.fetch   s]     ))B-.--%%U		7%SMM7
 	
r   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  || j                  d         S 7 )w)r.   r[   r\   r]   rS   Nr   r   )r   rW   r    r/   rP   r   r   r^   s      r   r/   zSafelistContext.fetch_async   sr      ))B-.11dii 2 
 
  MM7
 	
	
s   AA4A2	*A4c                     dj                  d | j                  j                         D              }dj                  |      S )r1   r2   c              3   F   K   | ]  \  }}d j                  ||        ywr4   r5   r7   s      r   r;   z+SafelistContext.__repr__.<locals>.<genexpr>   r<   r=   z%<Twilio.Verify.V2.SafelistContext {}>r>   rA   s     r   rC   zSafelistContext.__repr__   s6     ((SDNN<P<P<RSS6==gFFr   )rD   rE   rF   r
   rH   r   rJ   r%   r(   r   r,   r/   rC   rK   rL   s   @r   r   r   l   s[    P Ps P
U 
U
D 

' 
(
#3 
,G# G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de	fdZ
de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   rP   )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-urlencodedr[   r\   POSTrT   rU   datarV   )r   rW   r    createrP   r   r   r   rk   rV   r   s        r   rl   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
        rf   rg   rh   r[   r\   ri   rj   N)r   rW   r    create_asyncrP   r   rm   s        r   ro   zSafelistList.create_async   s      yy|

 ))^-PQR"E.22tyytW 3 
 
  w77	
s   A%B'B(Bc                 0    t        | j                  |      S z
        Constructs a SafelistContext

        :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).
        r   r   r    r   r   s     r   r   zSafelistList.get       t}}<HHr   c                 0    t        | j                  |      S rq   rr   rs   s     r   __call__zSafelistList.__call__  rt   r   c                      y)r1   z<Twilio.Verify.V2.SafelistList>rO   r!   s    r   rC   zSafelistList.__repr__  s     1r   )rD   rE   rF   r
   r   rH   r   rl   ro   r   r   rv   rC   rK   rL   s   @r   rc   rc      so    	( 	(83 8+; 848s 87G 84I I IIS I_ I1# 1r   rc   N)rG   typingr   r   r   twilio.baser   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer	   twilio.base.versionr
   r   r   rc   rO   r   r   <module>r~      sR    ' &  8 : 2 'RH' RHj\Go \G~W1< W1r   