o
    6d$                     @   s  d dl mZ d dlmZ d dlmZ G dd dejZeeZ	G dd deZ
ee
ZG dd	 d	ejZeeZG d
d dejZeeZG dd deZeeZG dd dejZeeZejddZee_dejie_e e
_de
jie
_e
jej e
de
_eej_edge_ dejjfge_!e e_"dej"ie_ede_#e e_dejie_ejej ede_e e_$e e_%e e_&ej$ej%ej&de_ede_'ede_(ede_)i Z*dS )    )unicode_literals)
stone_base)stone_validatorsc                       s@   e Zd ZdZdZedd Zdd Zdd Z fd	d
Z	  Z
S )LaunchResultBasea  
    Result returned by methods that launch an asynchronous job. A method who may
    either launch an asynchronous job, or complete the request synchronously,
    can use this union by extending it, and adding a 'complete' field with the
    type of the synchronous response. See :class:`LaunchEmptyResult` for an
    example.

    This class acts as a tagged union. Only one of the ``is_*`` methods will
    return true. To get the associated value of a tag (if one exists), use the
    corresponding ``get_*`` method.

    :ivar str async.LaunchResultBase.async_job_id: This response indicates that
        the processing is asynchronous. The string is an id that can be used to
        obtain the status of the asynchronous job.
    Nc                 C   s
   | d|S )z
        Create an instance of this class set to the ``async_job_id`` tag with
        value ``val``.

        :param str val:
        :rtype: LaunchResultBase
        async_job_id )clsvalr   r   eC:\Users\jesus\OneDrive\Desktop\erpjis_fastapi\backend\jisbackend\Lib\site-packages\dropbox/async_.pyr      s   
	zLaunchResultBase.async_job_idc                 C   
   | j dkS )zS
        Check if the union tag is ``async_job_id``.

        :rtype: bool
        r   Z_tagselfr   r   r
   is_async_job_id(      
z LaunchResultBase.is_async_job_idc                 C   s   |   std| jS )z
        This response indicates that the processing is asynchronous. The string
        is an id that can be used to obtain the status of the asynchronous job.

        Only call this if :meth:`is_async_job_id` is true.

        :rtype: str
        ztag 'async_job_id' not set)r   AttributeError_valuer   r   r   r
   get_async_job_id0   s   	z!LaunchResultBase.get_async_job_idc                       t t| ||| d S N)superr   _process_custom_annotationsr   Zannotation_typeZ
field_path	processor	__class__r   r
   r   =      z,LaunchResultBase._process_custom_annotations)__name__
__module____qualname____doc__
_catch_allclassmethodr   r   r   r   __classcell__r   r   r   r
   r   
   s    

r   c                       ,   e Zd ZdZdZdd Z fddZ  ZS )LaunchEmptyResulta  
    Result returned by methods that may either launch an asynchronous job or
    complete synchronously. Upon synchronous completion of the job, no
    additional information is returned.

    This class acts as a tagged union. Only one of the ``is_*`` methods will
    return true. To get the associated value of a tag (if one exists), use the
    corresponding ``get_*`` method.

    :ivar async.LaunchEmptyResult.complete: The job finished synchronously and
        successfully.
    Nc                 C   r   zO
        Check if the union tag is ``complete``.

        :rtype: bool
        completer   r   r   r   r
   is_completeS   r   zLaunchEmptyResult.is_completec                    r   r   )r   r%   r   r   r   r   r
   r   [   r   z-LaunchEmptyResult._process_custom_annotationsr   r   r   r    r'   r(   r   r#   r   r   r   r
   r%   B   s
    r%   c                       s@   e Zd ZdZdgZdZ	d
ddZedZ	 fdd	Z
  ZS )PollArgz
    Arguments for methods that poll the status of an asynchronous job.

    :ivar async.PollArg.async_job_id: Id of the asynchronous job. This is the
        value of a response returned from the method that launched the job.
    _async_job_id_valueTNc                 C   s   t j| _|d ur|| _d S d S r   )bbZNOT_SETr+   r   )r   r   r   r   r
   __init__n   s   
zPollArg.__init__r   c                    r   r   )r   r*   r   r   r   r   r
   r   w   r   z#PollArg._process_custom_annotationsr   )r   r   r   r    	__slots__Z_has_required_fieldsr-   r,   	Attributer   r   r#   r   r   r   r
   r*   `   s    

r*   c                       s0   e Zd ZdZdZdZdd Z fddZ  ZS )PollResultBasea(  
    Result returned by methods that poll for the status of an asynchronous job.
    Unions that extend this union should add a 'complete' field with a type of
    the information returned upon job completion. See :class:`PollEmptyResult`
    for an example.

    This class acts as a tagged union. Only one of the ``is_*`` methods will
    return true. To get the associated value of a tag (if one exists), use the
    corresponding ``get_*`` method.

    :ivar async.PollResultBase.in_progress: The asynchronous job is still in
        progress.
    Nc                 C   r   )zR
        Check if the union tag is ``in_progress``.

        :rtype: bool
        in_progressr   r   r   r   r
   is_in_progress   r   zPollResultBase.is_in_progressc                    r   r   )r   r0   r   r   r   r   r
   r      r   z*PollResultBase._process_custom_annotations)	r   r   r   r    r!   r1   r2   r   r#   r   r   r   r
   r0   |   s    r0   c                       r$   )PollEmptyResulta  
    Result returned by methods that poll for the status of an asynchronous job.
    Upon completion of the job, no additional information is returned.

    This class acts as a tagged union. Only one of the ``is_*`` methods will
    return true. To get the associated value of a tag (if one exists), use the
    corresponding ``get_*`` method.

    :ivar async.PollEmptyResult.complete: The asynchronous job has completed
        successfully.
    Nc                 C   r   r&   r   r   r   r   r
   r(      r   zPollEmptyResult.is_completec                    r   r   )r   r3   r   r   r   r   r
   r      r   z+PollEmptyResult._process_custom_annotationsr)   r   r   r   r
   r3      s
    r3   c                       sH   e Zd ZdZdZdZdZdZdd Zdd Z	dd	 Z
 fd
dZ  ZS )	PollErrora>  
    Error returned by methods for polling the status of asynchronous job.

    This class acts as a tagged union. Only one of the ``is_*`` methods will
    return true. To get the associated value of a tag (if one exists), use the
    corresponding ``get_*`` method.

    :ivar async.PollError.invalid_async_job_id: The job ID is invalid.
    :ivar async.PollError.internal_error: Something went wrong with the job on
        Dropbox's end. You'll need to verify that the action you were taking
        succeeded, and if not, try again. This should happen very rarely.
    otherNc                 C   r   )z[
        Check if the union tag is ``invalid_async_job_id``.

        :rtype: bool
        invalid_async_job_idr   r   r   r   r
   is_invalid_async_job_id   r   z!PollError.is_invalid_async_job_idc                 C   r   )zU
        Check if the union tag is ``internal_error``.

        :rtype: bool
        internal_errorr   r   r   r   r
   is_internal_error   r   zPollError.is_internal_errorc                 C   r   )zL
        Check if the union tag is ``other``.

        :rtype: bool
        r5   r   r   r   r   r
   is_other   r   zPollError.is_otherc                    r   r   )r   r4   r   r   r   r   r
   r      r   z%PollError._process_custom_annotations)r   r   r   r    r!   r6   r8   r5   r7   r9   r:   r   r#   r   r   r   r
   r4      s    r4      )Z
min_lengthr   r'   r1   )r6   r8   r5   r6   r8   r5   N)+
__future__r   Zstone.backends.python_rsrcr   r,   r   ZbvUnionr   ZLaunchResultBase_validatorr%   ZLaunchEmptyResult_validatorStructr*   ZPollArg_validatorr0   ZPollResultBase_validatorr3   ZPollEmptyResult_validatorr4   ZPollError_validatorStringZAsyncJobId_validatorZ_async_job_id_validatorZ_tagmapZVoidZ_complete_validatorupdater'   r   	validatorsetZ_all_field_names_Z_all_fields_Z_in_progress_validatorr1   Z_invalid_async_job_id_validatorZ_internal_error_validatorZ_other_validatorr6   r8   r5   ZROUTESr   r   r   r
   <module>   s^   
6




1











