o
    e.                     @   s   d 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	 d	e	ZG d
d deZG dd deZG dd deZdS )za
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
    )deserialize)values)InstanceContext)InstanceResource)ListResource)Pagec                       sj   e Zd ZdZ fddZdddZdddZejejejfd	d
Z	dd Z
dd Zdd Zdd Z  ZS )SchemaVersionListk PLEASE NOTE that this class contains beta products that are subject to
    change. Use them with caution. c                    s2   t t| | d|i| _djdi | j| _dS )a?  
        Initialize the SchemaVersionList

        :param Version version: Version that contains the resource
        :param id: The unique identifier of the schema.

        :returns: twilio.rest.events.v1.schema.version.SchemaVersionList
        :rtype: twilio.rest.events.v1.schema.version.SchemaVersionList
        idz/Schemas/{id}/VersionsN )superr   __init__	_solutionformat_uri)selfversionr
   	__class__r   W/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/events/v1/schema/version.pyr      s   

zSchemaVersionList.__init__Nc                 C   s0   | j ||}| j|d d}| j ||d S )a  
        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 int limit: Upper limit for the number of records to return. stream()
                          guarantees to never return more than limit.  Default is no limit
        :param int 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
        :rtype: list[twilio.rest.events.v1.schema.version.SchemaVersionInstance]
        	page_size)r   limit)_versionread_limitspagestream)r   r   r   limitsr   r   r   r   r   %   s   zSchemaVersionList.streamc                 C   s   t | j||dS )al  
        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 int limit: Upper limit for the number of records to return. list() guarantees
                          never to return more than limit.  Default is no limit
        :param int 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: Generator that will yield up to limit results
        :rtype: list[twilio.rest.events.v1.schema.version.SchemaVersionInstance]
        )r   r   )listr   )r   r   r   r   r   r   r   <   s   zSchemaVersionList.listc                 C   s6   t |||d}| jjd| j|d}t| j|| jS )a  
        Retrieve a single page of SchemaVersionInstance records from the API.
        Request is executed immediately

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

        :returns: Page of SchemaVersionInstance
        :rtype: twilio.rest.events.v1.schema.version.SchemaVersionPage
        )	PageTokenr   PageSizeGET)methoduriparams)r   ofr   r   r   SchemaVersionPager   )r   
page_tokenpage_numberr   dataresponser   r   r   r   N   s   zSchemaVersionList.pagec                 C   s"   | j jjd|}t| j || jS )aJ  
        Retrieve a specific page of SchemaVersionInstance records from the API.
        Request is executed immediately

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

        :returns: Page of SchemaVersionInstance
        :rtype: twilio.rest.events.v1.schema.version.SchemaVersionPage
        r    )r   domaintwiliorequestr%   r   )r   
target_urlr)   r   r   r   get_pagea   s
   

zSchemaVersionList.get_pagec                 C      t | j| jd |dS a  
        Constructs a SchemaVersionContext

        :param schema_version: The version of the schema

        :returns: twilio.rest.events.v1.schema.version.SchemaVersionContext
        :rtype: twilio.rest.events.v1.schema.version.SchemaVersionContext
        r
   r
   schema_versionSchemaVersionContextr   r   r   r2   r   r   r   getr      	zSchemaVersionList.getc                 C   r/   r0   r3   r5   r   r   r   __call__}   r7   zSchemaVersionList.__call__c                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z$<Twilio.Events.V1.SchemaVersionList>r   r   r   r   r   __repr__      zSchemaVersionList.__repr__)NN)__name__
__module____qualname____doc__r   r   r   r   unsetr   r.   r6   r8   r<   __classcell__r   r   r   r   r      s    


r   c                       0   e Zd ZdZ fddZdd Zdd Z  ZS )r%   r	   c                    s   t t| || || _dS )aw  
        Initialize the SchemaVersionPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param id: The unique identifier of the schema.

        :returns: twilio.rest.events.v1.schema.version.SchemaVersionPage
        :rtype: twilio.rest.events.v1.schema.version.SchemaVersionPage
        N)r   r%   r   r   )r   r   r)   solutionr   r   r   r      s   
zSchemaVersionPage.__init__c                 C   s   t | j|| jd dS )a  
        Build an instance of SchemaVersionInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.events.v1.schema.version.SchemaVersionInstance
        :rtype: twilio.rest.events.v1.schema.version.SchemaVersionInstance
        r
   )r
   )SchemaVersionInstancer   r   r   payloadr   r   r   get_instance   r7   zSchemaVersionPage.get_instancec                 C   r9   )r:   z$<Twilio.Events.V1.SchemaVersionPage>r   r;   r   r   r   r<      r=   zSchemaVersionPage.__repr__)r>   r?   r@   rA   r   rI   r<   rC   r   r   r   r   r%      s
    r%   c                       rD   )r4   r	   c                    s4   t t| | ||d| _djdi | j| _dS )a  
        Initialize the SchemaVersionContext

        :param Version version: Version that contains the resource
        :param id: The unique identifier of the schema.
        :param schema_version: The version of the schema

        :returns: twilio.rest.events.v1.schema.version.SchemaVersionContext
        :rtype: twilio.rest.events.v1.schema.version.SchemaVersionContext
        r1   z'/Schemas/{id}/Versions/{schema_version}Nr   )r   r4   r   r   r   r   )r   r   r
   r2   r   r   r   r      s   zSchemaVersionContext.__init__c                 C   s0   | j jd| jd}t| j || jd | jd dS )
        Fetch the SchemaVersionInstance

        :returns: The fetched SchemaVersionInstance
        :rtype: twilio.rest.events.v1.schema.version.SchemaVersionInstance
        r    )r!   r"   r
   r2   r1   )r   fetchr   rF   r   rG   r   r   r   rK      s   zSchemaVersionContext.fetchc                 C   $   d dd | j D }d|S )r:    c                 s        | ]\}}d  ||V  qdS z{}={}Nr   .0kvr   r   r   	<genexpr>       z0SchemaVersionContext.__repr__.<locals>.<genexpr>z*<Twilio.Events.V1.SchemaVersionContext {}>joinr   itemsr   r   contextr   r   r   r<         
zSchemaVersionContext.__repr__)r>   r?   r@   rA   r   rK   r<   rC   r   r   r   r   r4      s
    r4   c                       sz   e Zd ZdZd fdd	Zedd Zedd Zed	d
 Zedd Z	edd Z
edd Zdd Zdd Z  ZS )rF   r	   Nc                    sl   t t| | |dt|dt|d|d|dd| _d| _||p0| jd d| _	dS )	z
        Initialize the SchemaVersionInstance

        :returns: twilio.rest.events.v1.schema.version.SchemaVersionInstance
        :rtype: twilio.rest.events.v1.schema.version.SchemaVersionInstance
        r
   r2   date_createdurlraw)r
   r2   r]   r^   r_   Nr1   )
r   rF   r   r6   r   integeriso8601_datetime_properties_contextr   )r   r   rH   r
   r2   r   r   r   r      s   	zSchemaVersionInstance.__init__c                 C   s.   | j du rt| j| jd | jd d| _ | j S )a@  
        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
        :rtype: twilio.rest.events.v1.schema.version.SchemaVersionContext
        Nr
   r2   r1   )rc   r4   r   r   r;   r   r   r   _proxy  s   
	zSchemaVersionInstance._proxyc                 C   
   | j d S )zX
        :returns: The unique identifier of the schema.
        :rtype: unicode
        r
   rb   r;   r   r   r   r
        
zSchemaVersionInstance.idc                 C   re   )zO
        :returns: The version of this schema.
        :rtype: unicode
        r2   rf   r;   r   r   r   r2     rg   z$SchemaVersionInstance.schema_versionc                 C   re   )z]
        :returns: The date the schema version was created.
        :rtype: datetime
        r]   rf   r;   r   r   r   r]   &  rg   z"SchemaVersionInstance.date_createdc                 C   re   )zM
        :returns: The URL of this resource.
        :rtype: unicode
        r^   rf   r;   r   r   r   r^   .  rg   zSchemaVersionInstance.urlc                 C   re   )z;
        :returns: The raw
        :rtype: unicode
        r_   rf   r;   r   r   r   r_   6  rg   zSchemaVersionInstance.rawc                 C   s
   | j  S )rJ   )rd   rK   r;   r   r   r   rK   >  s   
zSchemaVersionInstance.fetchc                 C   rL   )r:   rM   c                 s   rN   rO   rP   rQ   r   r   r   rU   N  rV   z1SchemaVersionInstance.__repr__.<locals>.<genexpr>z+<Twilio.Events.V1.SchemaVersionInstance {}>rW   rZ   r   r   r   r<   G  r\   zSchemaVersionInstance.__repr__)N)r>   r?   r@   rA   r   propertyrd   r
   r2   r]   r^   r_   rK   r<   rC   r   r   r   r   rF      s"    





	rF   N)rA   twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r   r%   r4   rF   r   r   r   r   <module>   s    )0