
    d{i`                         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 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)ApiResponse)InstanceContext)InstanceResource)ListResource)Version)Pagec            
            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def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        i/home/sas/my/fyp/ringai/.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'   r1   zSchemaVersionInstance.fetchL   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'   r4   z!SchemaVersionInstance.fetch_asyncU   s!      [[,,....   '%'c                 6    | j                   j                         S )z
        Fetch the SchemaVersionInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        )r.   fetch_with_http_infor-   s    r'   r7   z*SchemaVersionInstance.fetch_with_http_info^   s     {{//11r(   c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine to fetch the SchemaVersionInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        N)r.   fetch_with_http_info_asyncr-   s    r'   r9   z0SchemaVersionInstance.fetch_with_http_info_asyncg   s!      [[;;====r5   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>v        SDAq7>>!Q/S   !z+<Twilio.Events.V1.SchemaVersionInstance {}>joinr#   itemsr@   r%   contexts     r'   __repr__zSchemaVersionInstance.__repr__p   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.   r1   r4   r   r7   r9   rM   __classcell__r&   s   @r'   r   r      s     )-== c3h= 	=
 !=2  #/2k 2>+ >M# Mr(   r   c                        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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   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__|   sB     	! ,
 E=DDVt~~V	r(   r)   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GETmethoduriheaders)r   ofr,   fetch_with_response_infor[   r%   rc   s     r'   _fetchzSchemaVersionContext._fetch   sB     ))B-.}}55dii 6 
 	
r(   c                     | j                         \  }}}t        | j                  || j                  d   | j                  d         S )r0   r   r   r   )rg   r   r,   r#   r%   r   _s      r'   r1   zSchemaVersionContext.fetch   sE     A$MM~~d#>>*:;	
 	
r(   c                     | j                         \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S )z
        Fetch the SchemaVersionInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        r   r   r   datastatus_coderc   )rg   r   r,   r#   r   r%   r   rn   rc   instances        r'   r7   z)SchemaVersionContext.fetch_with_http_info   sT     )-%g(MM~~d#>>*:;	
 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   rd   r,   fetch_with_response_info_asyncr[   rf   s     r'   _fetch_asyncz!SchemaVersionContext._fetch_async   sQ      ))B-.]]AAdii B 
 
 	
 
s   AAA	Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d   | j                  d         S 7 ;w)r3   Nr   r   r   )rs   r   r,   r#   ri   s      r'   r4   z SchemaVersionContext.fetch_async   sT      #//11A$MM~~d#>>*:;	
 	
 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 SchemaVersionInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        Nr   r   r   rl   )rs   r   r,   r#   r   ro   s        r'   r9   z/SchemaVersionContext.fetch_with_http_info_async   sd      /3.?.?.A(A%g(MM~~d#>>*:;	
 k7SS )Bs   A"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?   rA   s      r'   rE   z0SchemaVersionContext.__repr__.<locals>.<genexpr>   rF   rG   z*<Twilio.Events.V1.SchemaVersionContext {}>rH   rK   s     r'   rM   zSchemaVersionContext.__repr__   s6     ((SDNN<P<P<RSS;BB7KKr(   )rN   rO   rP   r   rR   rS   r   tuplerg   r   r1   r   r7   rs   r4   r9   rM   rU   rV   s   @r'   r+   r+   z   s}    W WS W# W"
 
 
, 
Tk T 
E 
 
#8 
T+ T 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)r;   z$<Twilio.Events.V1.SchemaVersionPage>rY   r-   s    r'   rM   zSchemaVersionPage.__repr__        6r(   N)	rN   rO   rP   r   rR   r   r   r|   rM   rY   r(   r'   rz   rz      s-    VDcN V7L V6# 6r(   rz   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fd	Z	 	 ddee   dee   d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fdZ	 	 ddee   dee   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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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}/VersionsNrY   rZ   )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
        r   r   r   )r,   read_limitspagestreamr%   r   r   limitsr   s        r'   r   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
        r   r   Nr   )r,   r   
page_asyncstream_asyncr   s        r'   r   zSchemaVersionList.stream_async3  sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                     | j                   j                  ||      }| j                  |d         }| j                   j                  |j                  |d         }||j
                  |j                  fS )a  
        Streams SchemaVersionInstance and returns headers from first page


        :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: tuple of (generator, status_code, headers) where generator yields instances
        r   r   r   )r,   r   page_with_http_infor   rm   rn   rc   r%   r   r   r   page_response	generators         r'   stream_with_http_infoz'SchemaVersionList.stream_with_http_infoL  sk    $ **5)<006+;N0OMM((););VG_M	=44m6K6KLLr(   c                   K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  |j                  |d         }||j
                  |j                  fS 7 Fw)a  
        Asynchronously streams SchemaVersionInstance and returns headers from first page


        :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: tuple of (generator, status_code, headers) where generator yields instances
        r   r   Nr   )r,   r   page_with_http_info_asyncr   rm   rn   rc   r   s         r'   stream_with_http_info_asyncz-SchemaVersionList.stream_with_http_info_asyncd  s     $ **5)<"<<[) = 
 
 MM..}/A/A6'?S	=44m6K6KLL
s   5B A>AB 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
        r   r   )listr   )r%   r   r   s      r'   r   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
        r   N)r   )r%   r   r   records       r'   
list_asynczSchemaVersionList.list_async  sT     * '+&7&7# '8 ' !
 
 !
 
 	
 
s0   ;.;620
26;26;c                 b    | j                  ||      \  }}}t        |      }t        |||      S )a  
        Lists SchemaVersionInstance and returns headers from first page


        :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: ApiResponse with list of instances, status code, and headers
        r   rl   )r   r   r   )r%   r   r   r   rn   rc   rJ   s          r'   list_with_http_infoz%SchemaVersionList.list_with_http_info  sA    $ +/*D*D +E +
'	; Y;PPr(   c                    K   | j                  ||       d{   \  }}}|2 cg c3 d{   }|7 7 	6 nc c}w }}t        |||      S w)a  
        Asynchronously lists SchemaVersionInstance and returns headers from first page


        :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: ApiResponse with list of instances, status code, and headers
        r   Nrl   )r   r   )r%   r   r   r   rn   rc   r   rJ   s           r'   list_with_http_info_asyncz+SchemaVersionList.list_with_http_info_async  sf     $ 150P0P 1Q 1
 +
'	; -666&	+
 7666;PPs4   A4A:86
8:A8:A
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-urlencodedr]   r^   r_   ra   rb   paramsrc   )r   rd   r,   r   r[   rz   r#   r%   r   r   r   rm   rc   responses          r'   r   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   r]   r^   r_   r   N)r   rd   r,   r   r[   rz   r#   r   s          r'   r   zSchemaVersionList.page_async  s       yy'#%
 ))^-PQR.11diig 2 
 
 !$..II
s   A"B$B
%&Bc                 $   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      \  }}}t        | j                  || j                        }	t        |	||      S )	a_  
        Retrieve a single page with response metadata


        :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: ApiResponse with SchemaVersionPage, status code, and headers
        r   r   r   r]   r^   r_   r   rl   )r   rd   r,   page_with_response_infor[   rz   r#   r   
r%   r   r   r   rm   rc   r   rn   response_headersr   s
             r'   r   z%SchemaVersionList.page_with_http_info'  s      yy'#%
 ))^-PQR.26--2W2Wdiig 3X 3
/+/ !$..I+GWXXr(   c                 @  K   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   \  }}}t        | j                  || j                        }	t        |	||	      S 7 7w)
an  
        Asynchronously retrieve a single page with response metadata


        :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: ApiResponse with SchemaVersionPage, status code, and headers
        r   r   r   r]   r^   r_   r   Nrl   )r   rd   r,   page_with_response_info_asyncr[   rz   r#   r   r   s
             r'   r   z+SchemaVersionList.page_with_http_info_asyncI  s       yy'#%
 ))^-PQR. --==$))D' >   	0+/
 !$..I+GWXXs   A"B$B%8B
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
        r_   )r,   domaintwiliorequestrz   r#   r%   r   r   s      r'   get_pagezSchemaVersionList.get_pagem  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
        r_   N)r,   r   r   request_asyncrz   r#   r   s      r'   get_page_asyncz SchemaVersionList.get_page_asyncy  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)r;   z$<Twilio.Events.V1.SchemaVersionList>rY   r-   s    r'   rM   zSchemaVersionList.__repr__  r~   r(   )NN)&rN   rO   rP   r   rR   r   r   rS   r	   r   r   r
   r   rx   r   r   r   r   r   r   r   r   r   unsetr   objectrz   r   r   r   r   r   r   r+   r    r   rM   rU   rV   s   @r'   r   r     s   F FS F$  $#';}; C=; 
'	(	;6  $#'A}A C=A 
,	-	A6  $#'M}M C=M 
	M4  $#'M}M C=M 
	M8  $#'
}
 C=
 
#	$	
8  $#'
}
 C=
 
#	$	
:  $#'Q}Q C=Q 
	Q6  $#'Q}Q C=Q 
	Q6 *0*0,,(.	J#v+&J 3;'J f%	J
 
JF *0*0,,(.	J#v+&J 3;'J f%	J
 
JF *0*0,,(.	 Y#v+& Y 3;' Y f%	 Y
 
 YH *0*0,,(.	"Y#v+&"Y 3;'"Y f%	"Y
 
"YH
J3 
J+< 
J
Js 
J7H 
J
# 
*> 

s 
/C 
6# 6r(   r   N)rQ   r   typingr   r   r   r   r   r	   r
   twilio.baser   r   twilio.base.api_responser   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r+   rz   r   rY   r(   r'   <module>r      sj     L L L + 0 8 : 2 ' !]M, ]M@xL? xLv6 6&W6 W6r(   