
    d{iqG                         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 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 - 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OptionalUnion)values)ApiResponse)InstanceContext)InstanceResource)ListResource)Versionc            
           e Zd Z G d de      Z	 	 	 ddedeeef   de	e   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ej0                  fdeeef   dd fdZej0                  fdeeef   dd fdZej0                  fdeeef   defdZej0                  fdeeef   defdZdefdZ xZS )BucketInstancec                   ,    e Zd ZdZdeeef   fdZd Zy)BucketInstance.RateLimitRequestk
        :ivar limit: Limit of requests for the bucket
        :ivar ttl: Time to live of the rule
        payloadc                 \    |j                  d      | _        |j                  d      | _        y Nlimitttlgetr   r   selfr   s     [/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/rest/lookups/v2/bucket.py__init__z(BucketInstance.RateLimitRequest.__init__    "    (/G(<DJ&-kk%&8DH    c                 4    | j                   | j                  dS Nr   r   r!   r   s    r   to_dictz'BucketInstance.RateLimitRequest.to_dict%       xx r   N	__name__
__module____qualname____doc__r   strr   r   r#    r   r   RateLimitRequestr           	
	9DcN 	9
	r   r,   versionr   fieldbucketc                 
   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _	        |j                  d      | _
        |j                  d	      | _        |xs | j                  |xs | j                  d
| _        d | _        y )Ncodemessage	more_infostatusr/   r   r0   ownerr   r/   r0   )superr   r   r2   r3   r4   r5   r/   r   r0   r6   r   	_solution_context)r   r.   r   r/   r0   	__class__s        r   r   zBucketInstance.__init__7   s     	!#*;;v#6	&-kk)&<(/K(@%,[[%:$+KK$8
$+KK$8
%,[[%:$+KK$8
")++e"4 (djj+
 26r   returnc                     | j                   7t        | j                  | j                  d   | 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: BucketContext for this BucketInstance
        r/   r0   r7   )r:   BucketContext_versionr9   r"   s    r   _proxyzBucketInstance._proxyP   sE     == )nnW-~~h/DM
 }}r   c                 6    | j                   j                         S zi
        Deletes the BucketInstance


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


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


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


        :returns: ApiResponse with success boolean, status code, and headers
        N)r@   delete_with_http_info_asyncr"   s    r   rK   z*BucketInstance.delete_with_http_info_async{   s!      [[<<>>>>rG   c                 6    | j                   j                         S )Y
        Fetch the BucketInstance


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


        :returns: The fetched BucketInstance
        N)r@   fetch_asyncr"   s    r   rQ   zBucketInstance.fetch_async   s!      [[,,....rG   c                 6    | j                   j                         S )z
        Fetch the BucketInstance with HTTP info


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


        :returns: ApiResponse with instance, status code, and headers
        N)r@   fetch_with_http_info_asyncr"   s    r   rU   z)BucketInstance.fetch_with_http_info_async   s!      [[;;====rG   rate_limit_requestc                 :    | j                   j                  |      S )}
        Update the BucketInstance

        :param rate_limit_request:

        :returns: The updated BucketInstance
        rV   )r@   updater   rV   s     r   rZ   zBucketInstance.update   s#     {{!!1 " 
 	
r   c                 V   K   | j                   j                  |       d{   S 7 w)
        Asynchronous coroutine to update the BucketInstance

        :param rate_limit_request:

        :returns: The updated BucketInstance
        rY   N)r@   update_asyncr[   s     r   r^   zBucketInstance.update_async   s1      [[--1 . 
 
 	
 
    )')c                 :    | j                   j                  |      S )z
        Update the BucketInstance with HTTP info

        :param rate_limit_request:

        :returns: ApiResponse with instance, status code, and headers
        rY   )r@   update_with_http_infor[   s     r   ra   z$BucketInstance.update_with_http_info   s#     {{001 1 
 	
r   c                 V   K   | j                   j                  |       d{   S 7 w)z
        Asynchronous coroutine to update the BucketInstance with HTTP info

        :param rate_limit_request:

        :returns: ApiResponse with instance, status code, and headers
        rY   N)r@   update_with_http_info_asyncr[   s     r   rc   z*BucketInstance.update_with_http_info_async   s1      [[<<1 = 
 
 	
 
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*BucketInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z%<Twilio.Lookups.V2.BucketInstance {}>joinr9   itemsrj   r   contexts     r   __repr__zBucketInstance.__repr__   s6     ((SDNN<P<P<RSS6==gFFr   )NN)r<   r>   )r<   r   ) r&   r'   r(   objectr,   r   r   r*   r   r   r   propertyr@   boolrC   rF   r   rI   rK   rN   rQ   rS   rU   r   unsetr   rZ   r^   ra   rc   rw   __classcell__r;   s   @r   r   r      sw   6 "
   $ $66 c3h6 }	6
 62  $ $0D 03{ 3?; ?#/2k 2>+ > EKLL
"'(8&(@"A
	
 EKLL
"'(8&(@"A
	
 EKLL
"'(8&(@"A
	
 EKLL
"'(8&(@"A
	
G# Gr   r   c                   
    e Zd Z G d de      Zde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ej2                  fdeeef   defdZej2                  fdeeef   defdZej2                  fdeeef   defdZej2                  fdeeef   defdZej2                  fdeeef   defdZej2                  fdeeef   defdZ defdZ! xZ"S )r>   c                   ,    e Zd ZdZdeeef   fdZd Zy)BucketContext.RateLimitRequestr   r   c                 \    |j                  d      | _        |j                  d      | _        y r   r   r   s     r   r   z'BucketContext.RateLimitRequest.__init__   r   r   c                 4    | j                   | j                  dS r    r!   r"   s    r   r#   z&BucketContext.RateLimitRequest.to_dict   r$   r   Nr%   r+   r   r   r,   r      r-   r   r,   r.   r/   r0   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)z
        Initialize the BucketContext

        :param version: Version that contains the resource
        :param field: field name
        :param bucket: bucket name
        r7   z*/RateLimits/Fields/{field}/Bucket/{bucket}Nr+   )r8   r   r9   rj   _uri)r   r.   r/   r0   r;   s       r   r   zBucketContext.__init__   sG     	! 
 H@GG 
nn
	r   r<   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      S )z
        Internal helper for delete operation

        Returns:
            tuple: (success_boolean, status_code, headers)
        application/jsonAcceptDELETEmethoduriheaders)r   ofr?   delete_with_response_infor   r   r   s     r   _deletezBucketContext._delete  sB     ))B-.}}66G 7 
 	
r   c                 .    | j                         \  }}}|S rB   )r   r   success_s      r   rC   zBucketContext.delete   s     Ar   c                 F    | j                         \  }}}t        |||      S )z
        Deletes the BucketInstance and return response metadata


        :returns: ApiResponse with success boolean, status code, and headers
        datastatus_coder   )r   r   r   r   r   r   s       r   rI   z#BucketContext.delete_with_http_info*  s%     )-%g['RRr   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   S 7 w)z
        Internal async helper for delete operation

        Returns:
            tuple: (success_boolean, status_code, headers)
        r   r   r   r   N)r   r   r?   delete_with_response_info_asyncr   r   s     r   _delete_asynczBucketContext._delete_async4  sQ      ))B-.]]BBG C 
 
 	
 
   AAA	Ac                 J   K   | j                          d{   \  }}}|S 7 
wrE   )r   r   s      r   rF   zBucketContext.delete_asyncD  s)      #0022A 3s   #!#c                 b   K   | j                          d{   \  }}}t        |||      S 7 w)z
        Asynchronous coroutine that deletes the BucketInstance and return response metadata


        :returns: ApiResponse with success boolean, status code, and headers
        Nr   )r   r   r   s       r   rK   z)BucketContext.delete_with_http_info_asyncN  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)
        r   r   GETr   )r   r   r?   fetch_with_response_infor   r   s     r   _fetchzBucketContext._fetchX  sB     ))B-.}}55dii 6 
 	
r   c                     | j                         \  }}}t        | j                  || j                  d   | j                  d         S )rM   r/   r0   r7   )r   r   r?   r9   r   r   r   s      r   rN   zBucketContext.fetchh  sD     AMM..)>>(+	
 	
r   c                     | j                         \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S )z
        Fetch the BucketInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        r/   r0   r7   r   )r   r   r?   r9   r   r   r   r   r   instances        r   rS   z"BucketContext.fetch_with_http_infow  sS     )-%g!MM..)>>(+	
 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)
        r   r   r   r   N)r   r   r?   fetch_with_response_info_asyncr   r   s     r   _fetch_asynczBucketContext._fetch_async  sQ      ))B-.]]AAdii B 
 
 	
 
r   c                    K   | j                          d{   \  }}}t        | j                  || j                  d   | j                  d         S 7 ;w)rP   Nr/   r0   r7   )r   r   r?   r9   r   s      r   rQ   zBucketContext.fetch_async  sS      #//11AMM..)>>(+	
 	
 2s   AA<Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S 7 Iw)z
        Asynchronous coroutine to fetch the BucketInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        Nr/   r0   r7   r   )r   r   r?   r9   r   r   s        r   rU   z(BucketContext.fetch_with_http_info_async  sc      /3.?.?.A(A%g!MM..)>>(+	
 k7SS )Bs   A"A A
A"rV   c                     |j                         }t        j                  i       }d|d<   d|d<   | j                  j	                  d| j
                  ||      S )z{
        Internal helper for update operation

        Returns:
            tuple: (payload, status_code, headers)
        r   Content-Typer   PUTr   r   r   r   )r#   r   r   r?   update_with_response_infor   r   rV   r   r   s       r   _updatezBucketContext._update  s\     "))+))B-"4.}}66diidG 7 
 	
r   c                     | j                  |      \  }}}t        | j                  || j                  d   | j                  d         S )rX   rY   r/   r0   r7   )r   r   r?   r9   r   rV   r   r   s       r   rZ   zBucketContext.update  sJ     8JKAMM..)>>(+	
 	
r   c                     | j                  |      \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S )z
        Update the BucketInstance and return response metadata

        :param rate_limit_request:

        :returns: ApiResponse with instance, status code, and headers
        rY   r/   r0   r7   r   )r   r   r?   r9   r   r   rV   r   r   r   r   s         r   ra   z#BucketContext.update_with_http_info  s`     )-1 )5 )
%g "MM..)>>(+	
 k7SSr   c                    K   |j                         }t        j                  i       }d|d<   d|d<   | j                  j	                  d| j
                  ||       d{   S 7 w)z
        Internal async helper for update operation

        Returns:
            tuple: (payload, status_code, headers)
        r   r   r   r   r   N)r#   r   r   r?   update_with_response_info_asyncr   r   s       r   _update_asynczBucketContext._update_async  sk      "))+))B-"4.]]BBdiidG C 
 
 	
 
s   AA%A#A%c                    K   | j                  |       d{   \  }}}t        | j                  || j                  d   | j                  d         S 7 ;w)r]   rY   Nr/   r0   r7   )r   r   r?   r9   r   s       r   r^   zBucketContext.update_async  sZ      #00DV0WWAMM..)>>(+	
 	
 Xs   AA<Ac                    K   | j                  |       d{   \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S 7 Iw)z
        Asynchronous coroutine to update the BucketInstance and return response metadata

        :param rate_limit_request:

        :returns: ApiResponse with instance, status code, and headers
        rY   Nr/   r0   r7   r   )r   r   r?   r9   r   r   s         r   rc   z)BucketContext.update_with_http_info_async  sq      /3.@.@1 /A /
 )
%g "MM..)>>(+	
 k7SS)
s   A$A"A
A$c                     dj                  d | j                  j                         D              }dj                  |      S )re   rf   c              3   F   K   | ]  \  }}d j                  ||        ywrh   ri   rk   s      r   ro   z)BucketContext.__repr__.<locals>.<genexpr>4  rp   rq   z$<Twilio.Lookups.V2.BucketContext {}>rr   ru   s     r   rw   zBucketContext.__repr__.  s6     ((SDNN<P<P<RSS5<<WEEr   )#r&   r'   r(   rx   r,   r   r*   r   tupler   rz   rC   r   rI   r   rF   rK   r   r   rN   rS   r   rQ   rU   r   r{   r   r   rZ   ra   r   r^   rc   rw   r|   r}   s   @r   r>   r>      s   6 "
 
 
S 
&
 
  S{ S
U 
 D S; S
 
 
~ 
Tk T 
E 
 
> 
T+ T" EKLL
"'(8&(@"A
	
, EKLL
"'(8&(@"A
	
& EKLLT"'(8&(@"AT	T, EKLL
"'(8&(@"A
	
, EKLL
"'(8&(@"A
	
& EKLLT"'(8&(@"AT	T*F# Fr   r>   c                   n     e Zd Z G d de      Zdef fdZdededefdZ	dededefd	Z
defd
Z xZS )
BucketListc                   ,    e Zd ZdZdeeef   fdZd Zy)BucketList.RateLimitRequestr   r   c                 \    |j                  d      | _        |j                  d      | _        y r   r   r   s     r   r   z$BucketList.RateLimitRequest.__init__@  r   r   c                 4    | j                   | j                  dS r    r!   r"   s    r   r#   z#BucketList.RateLimitRequest.to_dictE  r$   r   Nr%   r+   r   r   r,   r   :  r-   r   r,   r.   c                 $    t         |   |       y)zh
        Initialize the BucketList

        :param version: Version that contains the resource

        N)r8   r   )r   r.   r;   s     r   r   zBucketList.__init__K  s     	!r   r/   r0   r<   c                 2    t        | j                  ||      S zq
        Constructs a BucketContext

        :param field: field name
        :param bucket: bucket name
        r7   r>   r?   r   r/   r0   s      r   r   zBucketList.getT       T]]%GGr   c                 2    t        | j                  ||      S r   r   r   s      r   __call__zBucketList.__call__]  r   r   c                      y)re   z<Twilio.Lookups.V2.BucketList>r+   r"   s    r   rw   zBucketList.__repr__f  s     0r   )r&   r'   r(   rx   r,   r   r   r*   r>   r   r   rw   r|   r}   s   @r   r   r   8  sc    6 "" "H Hc Hm HHc H3 H= H0# 0r   r   N)r)   typingr   r   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   r+   r   r   <module>r      sS    . -  0 8 : 2 'OG% OGdKFO KF\
40 40r   