
    x
h$                        d dl mZ d dlmZ d dlmZ  G d dej                        Z ej                  e      Z	 G d de      Z
 ej                  e
      Z G d d	ej                        Z ej                  e      Z G d
 dej                        Z ej                  e      Z G d de      Z ej                  e      Z G d dej                        Z ej                  e      Z ej*                  d      Zee_        dej.                  ie_         ej2                         e
_        de
j4                  ie
_        e
j0                  j7                  ej0                          e
d      e
_        eej:                  _         edg      e_         dej:                  j<                  fge_!         ej2                         e_"        dejD                  ie_         ed      e_#         ej2                         e_        dej4                  ie_        ej0                  j7                  ej0                          ed      e_         ej2                         e_$         ej2                         e_%         ej2                         e_&        ejH                  ejJ                  ejL                  de_         ed      e_'         ed      e_(         ed      e_)        i Z*y)    )unicode_literals)
stone_base)stone_validatorsc                   B     e Zd ZdZdZed        Zd Zd Z fdZ	 x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                      | 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vals     S/var/www/html/lionshead-backend/venv/lib/python3.12/site-packages/dropbox/async_.pyr	   zLaunchResultBase.async_job_id   s     >3''    c                      | j                   dk(  S )zS
        Check if the union tag is ``async_job_id``.

        :rtype: bool
        r	   _tagselfs    r   is_async_job_idz LaunchResultBase.is_async_job_id(   s     yyN**r   c                 P    | j                         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   s    r   get_async_job_idz!LaunchResultBase.get_async_job_id0   s&     ##% !=>>{{r   c                 0    t         t        |   |||       y N)superr   _process_custom_annotationsr   annotation_type
field_path	processor	__class__s       r   r   z,LaunchResultBase._process_custom_annotations=   s    A/S]_hir   )__name__
__module____qualname____doc__
_catch_allclassmethodr	   r   r   r   __classcell__r!   s   @r   r   r   
   s7      J( (+j jr   r   c                   ,     e Zd ZdZdZd Z fdZ x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                      | j                   dk(  S zO
        Check if the union tag is ``complete``.

        :rtype: bool
        completer   r   s    r   is_completezLaunchEmptyResult.is_completeS        yyJ&&r   c                 0    t         t        |   |||       y r   )r   r+   r   r   s       r   r   z-LaunchEmptyResult._process_custom_annotations[   s    B?T^`ijr   r"   r#   r$   r%   r.   r/   r   r(   r)   s   @r   r+   r+   B   s      H'k kr   r+   c                   Z     e Zd ZdZdgZdZ	 ddZ ej                  d      Z	 fdZ
 x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_valueTc                 B    t         j                  | _        ||| _        y y r   )bbNOT_SETr5   r	   )r   r	   s     r   __init__zPollArg.__init__n   s!    #%:: # ,D $r   r	   c                 0    t         t        |   |||       y r   )r   r4   r   r   s       r   r   z#PollArg._process_custom_annotationsw   s    gt8*V_`r   r   )r"   r#   r$   r%   	__slots___has_required_fieldsr9   r7   	Attributer	   r   r(   r)   s   @r   r4   r4   `   sD     	I   #-  2<</La ar   r4   c                   0     e Zd ZdZdZdZd Z fdZ x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                      | j                   dk(  S )zR
        Check if the union tag is ``in_progress``.

        :rtype: bool
        in_progressr   r   s    r   is_in_progresszPollResultBase.is_in_progress   s     yyM))r   c                 0    t         t        |   |||       y r   )r   r?   r   r   s       r   r   z*PollResultBase._process_custom_annotations   s    nd?Q[]fgr   )	r"   r#   r$   r%   r&   rA   rB   r   r(   r)   s   @r   r?   r?   |   s%     JK*h hr   r?   c                   ,     e Zd ZdZdZd Z fdZ xZS )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                      | j                   dk(  S r-   r   r   s    r   r/   zPollEmptyResult.is_complete   r0   r   c                 0    t         t        |   |||       y r   )r   rE   r   r   s       r   r   z+PollEmptyResult._process_custom_annotations   s    ot@R\^ghr   r2   r)   s   @r   rE   rE      s     
 H'i ir   rE   c                   D     e Zd ZdZdZdZdZdZd Zd Z	d Z
 fdZ x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                      | j                   dk(  S )z[
        Check if the union tag is ``invalid_async_job_id``.

        :rtype: bool
        invalid_async_job_idr   r   s    r   is_invalid_async_job_idz!PollError.is_invalid_async_job_id   s     yy222r   c                      | j                   dk(  S )zU
        Check if the union tag is ``internal_error``.

        :rtype: bool
        internal_errorr   r   s    r   is_internal_errorzPollError.is_internal_error   s     yy,,,r   c                      | j                   dk(  S )zL
        Check if the union tag is ``other``.

        :rtype: bool
        rJ   r   r   s    r   is_otherzPollError.is_other   s     yyG##r   c                 0    t         t        |   |||       y r   )r   rI   r   r   s       r   r   z%PollError._process_custom_annotations   s    i:?JXabr   )r"   r#   r$   r%   r&   rL   rO   rJ   rM   rP   rR   r   r(   r)   s   @r   rI   rI      s:     JNE3-$c cr   rI      )
min_lengthr	   r.   rA   )rL   rO   rJ   rL   rO   rJ   N)+
__future__r   stone.backends.python_rsrcr   r7   r   bvUnionr   LaunchResultBase_validatorr+   LaunchEmptyResult_validatorStructr4   PollArg_validatorr?   PollResultBase_validatorrE   PollEmptyResult_validatorrI   PollError_validatorStringAsyncJobId_validator_async_job_id_validator_tagmapVoid_complete_validatorupdater.   r	   	validatorset_all_field_names__all_fields__in_progress_validatorrA   _invalid_async_job_id_validator_internal_error_validator_other_validatorrL   rO   rJ   ROUTESr
   r   r   <module>rq      s   ( 7 =4jrxx 4jl &RXX&67 k( k8 'bhh'89 abii a4 BIIg& hRXX h< $288N3 in i6 %BHH_5 /c /cb bhhy)  ryyA. +?  ($<<   )0	  %!55         !1!9!9 :.z:  !5    01 ')=)=)G)GHI (/	 %>88  ,M: &-bggi #33      ~55 6*:6 ,3BGGI	 )&-bggi	 #$RWWY	 %EE99''	  "++A!B	 $%56	 G$	
r   