
    m>h<                         d Z ddlmZ ddlmZmZmZmZmZmZm	Z	 ddl
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 G d de      Zy)a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Events
    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.
    )datetime)AnyDictListOptionalUnionIteratorAsyncIterator)deserializevalues)InstanceContext)InstanceResource)ListResource)Version)Pagec            
       v     e Zd ZdZ	 ddedeeef   dedee	   f fdZ
edd       Zdd	Zdd
ZdefdZ xZS )SchemaVersionInstanceaA  
    :ivar id: The unique identifier of the schema. Each schema can have multiple versions, that share the same id.
    :ivar schema_version: The version of this schema.
    :ivar date_created: The date the schema version was created, given in ISO 8601 format.
    :ivar url: The URL of this resource.
    :ivar raw:
    versionpayloadidschema_versionc                    t         |   |       |j                  d      | _        t	        j
                  |j                  d            | _        t	        j                  |j                  d            | _        |j                  d      | _	        |j                  d      | _
        ||xs | j                  d| _        d | _        y )Nr   r   date_createdurlrawr   r   )super__init__getr   r   integerr   iso8601_datetimer   r   r   	_solution_context)selfr   r   r   r   	__class__s        o/var/www/html/DP/alpha_backend/venv/lib/python3.12/site-packages/twilio/rest/events/v1/schema/schema_version.pyr   zSchemaVersionInstance.__init__"   s     	!!(T!2-8-@-@KK().
 1<0L0LKK'1
 #*++e"4")++e"4 ,C0C0C
 9=    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: SchemaVersionContext for this SchemaVersionInstance
        r   r   r   )r#   SchemaVersionContext_versionr"   r$   s    r&   _proxyzSchemaVersionInstance._proxy;   sF     == 0>>$'#~~.>?DM
 }}r'   c                 6    | j                   j                         S )g
        Fetch the SchemaVersionInstance


        :returns: The fetched SchemaVersionInstance
        )r-   fetchr,   s    r&   r0   zSchemaVersionInstance.fetchK   s     {{  ""r'   c                 R   K   | j                   j                          d{   S 7 w)
        Asynchronous coroutine to fetch the SchemaVersionInstance


        :returns: The fetched SchemaVersionInstance
        N)r-   fetch_asyncr,   s    r&   r3   z!SchemaVersionInstance.fetch_asyncT   s!      [[,,....s   '%'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>z1SchemaVersionInstance.__repr__.<locals>.<genexpr>c   "     S<RDAq7>>!Q/<R   !z+<Twilio.Events.V1.SchemaVersionInstance {}>joinr"   itemsr:   r$   contexts     r&   __repr__zSchemaVersionInstance.__repr__]   s6     ((SDNN<P<P<RSS<CCGLLr'   )N)r(   r*   )r(   r   )__name__
__module____qualname____doc__r   r   strr   r   intr   propertyr-   r0   r3   rG   __classcell__r%   s   @r&   r   r      sp     )-== c3h= 	=
 !=2  #/M# Mr'   r   c                   P     e Zd 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
 xZS )	r*   r   r   r   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)a"  
        Initialize the SchemaVersionContext

        :param version: Version that contains the resource
        :param id: The unique identifier of the schema. Each schema can have multiple versions, that share the same id.
        :param schema_version: The version of the schema
        r   z'/Schemas/{id}/Versions/{schema_version}N r   r   r"   r:   _uri)r$   r   r   r   r%   s       r&   r   zSchemaVersionContext.__init__i   sB     	! ,
 E=DDVt~~V	r'   r(   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d   | j                  d         S )r/   application/jsonAcceptGETmethoduriheadersr   r   r   )r   ofr+   r0   rU   r   r"   r$   r]   r   s      r&   r0   zSchemaVersionContext.fetchz   sj     ))B-.--%%U		7%S$MM~~d#>>*:;	
 	
r'   c                   K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  || j                  d   | j                  d         S 7 7w)	r2   rW   rX   rY   rZ   Nr   r   r   )r   r^   r+   r3   rU   r   r"   r_   s      r&   r3   z SchemaVersionContext.fetch_async   s      ))B-.11dii 2 
 
 %MM~~d#>>*:;	
 	
	
s   ABB 	8Bc                     dj                  d | j                  j                         D              }dj                  |      S )r5   r6   c              3   F   K   | ]  \  }}d j                  ||        ywr8   r9   r;   s      r&   r?   z0SchemaVersionContext.__repr__.<locals>.<genexpr>   r@   rA   z*<Twilio.Events.V1.SchemaVersionContext {}>rB   rE   s     r&   rG   zSchemaVersionContext.__repr__   s6     ((SDNN<P<P<RSS;BB7KKr'   )rH   rI   rJ   r   rL   rM   r   r   r0   r3   rG   rO   rP   s   @r&   r*   r*   g   sI    W WS W# W"
, 
*
#8 
.L# Lr'   r*   c                   2    e Zd Zdeeef   defdZdefdZy)SchemaVersionPager   r(   c                 L    t        | j                  || j                  d         S )zs
        Build an instance of SchemaVersionInstance

        :param payload: Payload response from the API
        r   )r   )r   r+   r"   )r$   r   s     r&   get_instancezSchemaVersionPage.get_instance   s      %T]]Gt@TUUr'   c                      y)r5   z$<Twilio.Events.V1.SchemaVersionPage>rS   r,   s    r&   rG   zSchemaVersionPage.__repr__        6r'   N)	rH   rI   rJ   r   rL   r   r   rf   rG   rS   r'   r&   rd   rd      s-    VDcN V7L V6# 6r'   rd   c            	           e Zd Zdedef fdZ	 	 ddee   dee   dee	   fdZ
	 	 ddee   dee   dee	   fdZ	 	 ddee   dee   dee	   fd	Z	 	 ddee   dee   dee	   fd
Zej"                  ej"                  ej"                  fdeeef   deeef   deeef   defdZej"                  ej"                  ej"                  fdeeef   deeef   deeef   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 )SchemaVersionListr   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the SchemaVersionList

        :param version: Version that contains the resource
        :param id: The unique identifier of the schema. Each schema can have multiple versions, that share the same id.

        r   z/Schemas/{id}/VersionsNrS   rT   )r$   r   r   r%   s      r&   r   zSchemaVersionList.__init__   s@     	! "
 4,33EdnnE	r'   limit	page_sizer(   c                     | j                   j                  ||      }| j                  |d         }| j                   j                  ||d         S )ac  
        Streams SchemaVersionInstance records from the API as a generator stream.
        This operation lazily loads records as efficiently as possible until the limit
        is reached.
        The results are returned as a generator, so this operation is memory efficient.

        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, stream() will attempt to read the
                          limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        rm   rm   rl   )r+   read_limitspagestreamr$   rl   rm   limitsrq   s        r&   rr   zSchemaVersionList.stream   sJ    ( **5)<yy6+#6y7}}##D&/::r'   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)ar  
        Asynchronously streams SchemaVersionInstance records from the API as a generator stream.
        This operation lazily loads records as efficiently as possible until the limit
        is reached.
        The results are returned as a generator, so this operation is memory efficient.

        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, stream() will attempt to read the
                          limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        rm   ro   Nrl   )r+   rp   
page_asyncstream_asyncrs   s        r&   rw   zSchemaVersionList.stream_async   sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                 :    t        | j                  ||            S )a   
        Lists SchemaVersionInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, list() will attempt to read the limit
                          with the most efficient page size, i.e. min(limit, 1000)

        :returns: list that will contain up to limit results
        rl   rm   )listrr   )r$   rl   rm   s      r&   rz   zSchemaVersionList.list  s(    & KK#  
 	
r'   c                 z   K   | j                  ||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)a  
        Asynchronously lists SchemaVersionInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, list() will attempt to read the limit
                          with the most efficient page size, i.e. min(limit, 1000)

        :returns: list that will contain up to limit results
        ry   N)rw   )r$   rl   rm   records       r&   
list_asynczSchemaVersionList.list_async!  sY     * '+&7&7# '8 ' ! !
 
 !
 
 	
 
s0   ;.;620
26;26;
page_tokenpage_numberc                     t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                        S )a  
        Retrieve a single page of SchemaVersionInstance records from the API.
        Request is executed immediately

        :param page_token: PageToken provided by the API
        :param page_number: Page Number, this value is simply for client state
        :param page_size: Number of records to return, defaults to 50

        :returns: Page of SchemaVersionInstance
        	PageTokenr   PageSizeContent-Type!application/x-www-form-urlencodedrW   rX   rY   r[   r\   paramsr]   )r   r^   r+   rq   rU   rd   r"   r$   r~   r   rm   datar]   responses          r&   rq   zSchemaVersionList.page<  s      yy'#%
 ))^-PQR.==%%diig & 
 !$..IIr'   c                   K   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                        S 7 %w)	a  
        Asynchronously retrieve a single page of SchemaVersionInstance records from the API.
        Request is executed immediately

        :param page_token: PageToken provided by the API
        :param page_number: Page Number, this value is simply for client state
        :param page_size: Number of records to return, defaults to 50

        :returns: Page of SchemaVersionInstance
        r   r   r   rW   rX   rY   r   N)r   r^   r+   rv   rU   rd   r"   r   s          r&   rv   zSchemaVersionList.page_async]  s       yy'#%
 ))^-PQR.11diig 2 
 
 !$..II
s   A"B$B
%&B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )z
        Retrieve a specific page of SchemaVersionInstance records from the API.
        Request is executed immediately

        :param target_url: API-generated URL for the requested results page

        :returns: Page of SchemaVersionInstance
        rY   )r+   domaintwiliorequestrd   r"   r$   r   r   s      r&   get_pagezSchemaVersionList.get_page~  s=     ==''..66ujI $..IIr'   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)a  
        Asynchronously retrieve a specific page of SchemaVersionInstance records from the API.
        Request is executed immediately

        :param target_url: API-generated URL for the requested results page

        :returns: Page of SchemaVersionInstance
        rY   N)r+   r   r   request_asyncrd   r"   r   s      r&   get_page_asyncz SchemaVersionList.get_page_async  sJ      --44BB5*UU $..II Vs   4AA&Ar   c                 L    t        | j                  | j                  d   |      S zm
        Constructs a SchemaVersionContext

        :param schema_version: The version of the schema
        r   r   r*   r+   r"   r$   r   s     r&   r   zSchemaVersionList.get  %     $MMdnnT2>
 	
r'   c                 L    t        | j                  | j                  d   |      S r   r   r   s     r&   __call__zSchemaVersionList.__call__  r   r'   c                      y)r5   z$<Twilio.Events.V1.SchemaVersionList>rS   r,   s    r&   rG   zSchemaVersionList.__repr__  rh   r'   )NN)rH   rI   rJ   r   rL   r   r   rM   r	   r   rr   r
   rw   r   rz   r}   r   unsetr   objectrd   rq   rv   r   r   r*   r   r   rG   rO   rP   s   @r&   rj   rj      s!   F FS F$  $#';}; C=; 
'	(	;6  $#'A}A C=A 
,	-	A6  $#'
}
 C=
 
#	$	
8  $#'
}
 C=
 
#	$	
: *0*0,,(.	J#v+&J 3;'J f%	J
 
JF *0*0,,(.	J#v+&J 3;'J f%	J
 
JB
J3 
J+< 
J
Js 
J7H 
J
# 
*> 

s 
/C 
6# 6r'   rj   N)rK   r   typingr   r   r   r   r   r	   r
   twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r*   rd   rj   rS   r'   r&   <module>r      sg     L L L + 8 : 2 ' !KM, KM\FL? FLR6 6&m6 m6r'   