
    d{i8                         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 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)ApiResponse)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efd
ZdefdZddZddZdefdZde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.
    :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       \/home/sas/my/fyp/ringai/.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._proxy0   s9     == +!^^N;DM }}r   c                 6    | j                   j                         S zk
        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z
        Asynchronous coroutine that deletes the SafelistInstance


        :returns: True if delete succeeds, False otherwise
        N)r#   delete_asyncr"   s    r   r)   zSafelistInstance.delete_asyncH   s!      [[--////   '%'c                 6    | j                   j                         S )z
        Deletes the SafelistInstance with HTTP info


        :returns: ApiResponse with success boolean, status code, and headers
        )r#   delete_with_http_infor"   s    r   r,   z&SafelistInstance.delete_with_http_infoQ   s     {{0022r   c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine that deletes the SafelistInstance with HTTP info


        :returns: ApiResponse with success boolean, status code, and headers
        N)r#   delete_with_http_info_asyncr"   s    r   r.   z,SafelistInstance.delete_with_http_info_asyncZ   s!      [[<<>>>>r*   c                 6    | j                   j                         S )]
        Fetch the SafelistInstance


        :returns: The fetched SafelistInstance
        )r#   fetchr"   s    r   r1   zSafelistInstance.fetchc   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   r4   zSafelistInstance.fetch_asyncl   s!      [[,,....r*   c                 6    | j                   j                         S )z
        Fetch the SafelistInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        )r#   fetch_with_http_infor"   s    r   r6   z%SafelistInstance.fetch_with_http_infou   s     {{//11r   c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine to fetch the SafelistInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        N)r#   fetch_with_http_info_asyncr"   s    r   r8   z+SafelistInstance.fetch_with_http_info_async~   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>        SDAq7>>!Q/S   !z&<Twilio.Verify.V2.SafelistInstance {}>joinr   itemsr?   r   contexts     r   __repr__zSafelistInstance.__repr__   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,   r.   r1   r4   r6   r8   rL   __classcell__r   s   @r   r   r      s     '+	88 c3h8 sm	8"  $ $0D 03{ 3?; ?#/2k 2>+ >H# Hr   r   c                        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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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   r?   _uri)r   r   r   r   s      r   r   zSafelistContext.__init__   s@     	! L
 >6==OO	r   r   c                 |    t        j                  i       }| j                  j                  d| j                  |      S )z
        Internal helper for delete operation

        Returns:
            tuple: (success_boolean, status_code, headers)
        DELETEmethoduriheaders)r   ofr!   delete_with_response_inforY   r   r_   s     r   _deletezSafelistContext._delete   s8     ))B-}}66G 7 
 	
r   c                 .    | j                         \  }}}|S r%   )rc   r   success_s      r   r&   zSafelistContext.delete   s     Ar   c                 F    | j                         \  }}}t        |||      S )z
        Deletes the SafelistInstance and return response metadata


        :returns: ApiResponse with success boolean, status code, and headers
        datastatus_coder_   )rc   r   r   rf   rk   r_   s       r   r,   z%SafelistContext.delete_with_http_info   s%     )-%g['RRr   c                    K   t        j                  i       }| j                  j                  d| j                  |       d{   S 7 w)z
        Internal async helper for delete operation

        Returns:
            tuple: (success_boolean, status_code, headers)
        r[   r\   N)r   r`   r!   delete_with_response_info_asyncrY   rb   s     r   _delete_asynczSafelistContext._delete_async   sG      ))B-]]BBG C 
 
 	
 
s   AA
AA
c                 J   K   | j                          d{   \  }}}|S 7 
wr(   )ro   re   s      r   r)   zSafelistContext.delete_async   s)      #0022A 3s   #!#c                 b   K   | j                          d{   \  }}}t        |||      S 7 w)z
        Asynchronous coroutine that deletes the SafelistInstance and return response metadata


        :returns: ApiResponse with success boolean, status code, and headers
        Nri   )ro   r   rl   s       r   r.   z+SafelistContext.delete_with_http_info_async   s5      /3.@.@.B(B%g['RR )Cs   /-/c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      S )zz
        Internal helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        application/jsonAcceptGETr\   )r   r`   r!   fetch_with_response_inforY   rb   s     r   _fetchzSafelistContext._fetch   sB     ))B-.}}55dii 6 
 	
r   c                 t    | j                         \  }}}t        | j                  || j                  d         S )r0   r   r   )rw   r   r!   r   r   r   rg   s      r   r1   zSafelistContext.fetch   s8     AMM7
 	
r   c                     | j                         \  }}}t        | j                  || j                  d         }t	        |||      S )z
        Fetch the SafelistInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        r   r   ri   )rw   r   r!   r   r   r   r   rk   r_   instances        r   r6   z$SafelistContext.fetch_with_http_info  sG     )-%g#MM7

 k7SSr   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   S 7 w)z
        Internal async helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        rs   rt   ru   r\   N)r   r`   r!   fetch_with_response_info_asyncrY   rb   s     r   _fetch_asynczSafelistContext._fetch_async  sQ      ))B-.]]AAdii B 
 
 	
 
s   AAA	Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d         S 7 -w)r3   Nr   r   )r   r   r!   r   ry   s      r   r4   zSafelistContext.fetch_async#  sG      #//11AMM7
 	
 2s   AA.Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d         }t	        |||      S 7 ;w)z
        Asynchronous coroutine to fetch the SafelistInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        Nr   r   ri   )r   r   r!   r   r   r{   s        r   r8   z*SafelistContext.fetch_with_http_info_async1  sW      /3.?.?.A(A%g#MM7

 k7SS )Bs   AA<Ac                     dj                  d | j                  j                         D              }dj                  |      S )r:   r;   c              3   F   K   | ]  \  }}d j                  ||        ywr=   r>   r@   s      r   rD   z+SafelistContext.__repr__.<locals>.<genexpr>F  rE   rF   z%<Twilio.Verify.V2.SafelistContext {}>rG   rJ   s     r   rL   zSafelistContext.__repr__@  s6     ((SDNN<P<P<RSS6==gFFr   )rM   rN   rO   r   rQ   r   tuplerc   rS   r&   r   r,   ro   r)   r.   rw   r   r1   r6   r   r4   r8   rL   rT   rU   s   @r   r    r       s    P Ps P
 
 S{ S
U 
D S; S
 
 
' 
Tk T
E 
 
#3 
T+ TG# Gr   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	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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   rY   )r   r   r   s     r   r   zSafelistList.__init__L  s     	!'	r   r   r   c                     t        j                  d|i      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||      S )z{
        Internal helper for create operation

        Returns:
            tuple: (payload, status_code, headers)
        PhoneNumberContent-Type!application/x-www-form-urlencodedrs   rt   POSTr]   r^   rj   r_   )r   r`   r!   create_with_response_inforY   r   r   rj   r_   s       r   _createzSafelistList._createW  so     yy|

 ))^-PQR"E.}}66tyytW 7 
 	
r   c                 Z    | 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
        r   )r   r   r!   r   r   r   rg   s       r   createzSafelistList.createn  s+     ,?Aw77r   c                 v    | j                  |      \  }}}t        | j                  |      }t        |||      S )a2  
        Create the SafelistInstance and return response metadata

        :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: ApiResponse with instance, status code, and headers
        r   ri   )r   r   r!   r   r   r   r   rk   r_   r|   s         r   create_with_http_infoz"SafelistList.create_with_http_infoy  s:     )-,(O%g#DMM7;k7SSr   c                    K   t        j                  d|i      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||       d{   S 7 w)	z
        Internal async helper for create operation

        Returns:
            tuple: (payload, status_code, headers)
        r   r   r   rs   rt   r   r   N)r   r`   r!   create_with_response_info_asyncrY   r   s       r   _create_asynczSafelistList._create_async  s~      yy|

 ))^-PQR"E.]]BBtyytW C 
 
 	
 
s   A%A.'A,(A.c                 v   K   | 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   N)r   r   r!   r   s       r   create_asynczSafelistList.create_async  s;      #00l0KKAw77 Ls   979c                    K   | j                  |       d{   \  }}}t        | j                  |      }t        |||      S 7 ,w)aA  
        Asynchronously create the SafelistInstance and return response metadata

        :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: ApiResponse with instance, status code, and headers
        r   Nri   )r   r   r!   r   r   s         r   create_with_http_info_asyncz(SafelistList.create_with_http_info_async  sS      /3.@.@% /A /
 )
%g $DMM7;k7SS	)
s   AA-A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 r   r   r   s     r   __call__zSafelistList.__call__  r   r   c                      y)r:   z<Twilio.Verify.V2.SafelistList>rX   r"   s    r   rL   zSafelistList.__repr__  s     1r   )rM   rN   rO   r   r   rQ   r   r   r   r   r   r   r   r   r   r    r   r   rL   rT   rU   s   @r   r   r   J  s    	( 	(
C 
E 
.	83 	8+; 	8
T# 
T+ 
T
 
 
.	8s 	87G 	8Tc Tk TI I IIS I_ I1# 1r   r   N)rP   typingr   r   r   twilio.baser   twilio.base.api_responser   twilio.base.instance_contextr   twilio.base.instance_resourcer	   twilio.base.list_resourcer
   twilio.base.versionr   r   r    r   rX   r   r   <module>r      sU    ' &  0 8 : 2 'vH' vHrvGo vGrA1< A1r   