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j
Ze
eZG dd	 d	ejZeeZG d
d dej
Ze
eZe e_e e_ejejde_ede_e	ej_edge_dejjfge_e e_e e_e e_e e_e e_ e e_ejejejejej ejde_ede_!ede_"ede_#ede_$ede_%ede_e ej&_edge_dej&jfge_e'dddeeeddddZ(de(iZ)dS )    )unicode_literals)
stone_base)stone_validatorsc                       sL   e Zd ZdZdZdZedd Zdd Zdd	 Z	d
d Z
 fddZ  ZS )PhotoSourceArga$  
    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 account.PhotoSourceArg.base64_data: Image data in base64-encoded
        bytes.
    otherNc                 C   s
   | d|S )z
        Create an instance of this class set to the ``base64_data`` tag with
        value ``val``.

        :param str val:
        :rtype: PhotoSourceArg
        base64_data )clsvalr   r   fC:\Users\jesus\OneDrive\Desktop\erpjis_fastapi\backend\jisbackend\Lib\site-packages\dropbox/account.pyr      s   
	zPhotoSourceArg.base64_datac                 C   
   | j dkS )zR
        Check if the union tag is ``base64_data``.

        :rtype: bool
        r   Z_tagselfr   r   r   is_base64_data#      
zPhotoSourceArg.is_base64_datac                 C   r   zL
        Check if the union tag is ``other``.

        :rtype: bool
        r   r   r   r   r   r   is_other+   r   zPhotoSourceArg.is_otherc                 C   s   |   std| jS )z
        Image data in base64-encoded bytes.

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

        :rtype: str
        ztag 'base64_data' not set)r   AttributeError_valuer   r   r   r   get_base64_data3   s   zPhotoSourceArg.get_base64_datac                       t t| ||| d S N)superr   _process_custom_annotationsr   Zannotation_typeZ
field_path	processor	__class__r   r   r   ?      z*PhotoSourceArg._process_custom_annotations)__name__
__module____qualname____doc__
_catch_allr   classmethodr   r   r   r   r   __classcell__r   r   r   r   r   
   s    	

r   c                       sD   e Zd ZdZdgZdZ	dddZejdddZ	 fd	d
Z
  ZS )SetProfilePhotoArgzg
    :ivar account.SetProfilePhotoArg.photo: Image to set as the user's new
        profile photo.
    _photo_valueTNc                 C      t j| _|d ur|| _d S d S r   )bbNOT_SETr(   photo)r   r,   r   r   r   __init__P      
zSetProfilePhotoArg.__init__r,   )Zuser_definedc                    r   r   )r   r'   r   r   r   r   r   r   Y   r   z.SetProfilePhotoArg._process_custom_annotationsr   )r    r!   r"   r#   	__slots___has_required_fieldsr-   r*   	Attributer,   r   r&   r   r   r   r   r'   D   s    
r'   c                       sl   e Zd ZdZdZdZdZdZdZdZ	dZ
dd Zdd Zdd	 Zd
d Zdd Zdd Z fddZ  ZS )SetProfilePhotoErrora  
    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 account.SetProfilePhotoError.file_type_error: File cannot be set as
        profile photo.
    :ivar account.SetProfilePhotoError.file_size_error: File cannot exceed 10
        MB.
    :ivar account.SetProfilePhotoError.dimension_error: Image must be larger
        than 128 x 128.
    :ivar account.SetProfilePhotoError.thumbnail_error: Image could not be
        thumbnailed.
    :ivar account.SetProfilePhotoError.transient_error: Temporary infrastructure
        failure, please retry.
    r   Nc                 C   r   )zV
        Check if the union tag is ``file_type_error``.

        :rtype: bool
        file_type_errorr   r   r   r   r   is_file_type_error~   r   z'SetProfilePhotoError.is_file_type_errorc                 C   r   )zV
        Check if the union tag is ``file_size_error``.

        :rtype: bool
        file_size_errorr   r   r   r   r   is_file_size_error   r   z'SetProfilePhotoError.is_file_size_errorc                 C   r   )zV
        Check if the union tag is ``dimension_error``.

        :rtype: bool
        dimension_errorr   r   r   r   r   is_dimension_error   r   z'SetProfilePhotoError.is_dimension_errorc                 C   r   )zV
        Check if the union tag is ``thumbnail_error``.

        :rtype: bool
        thumbnail_errorr   r   r   r   r   is_thumbnail_error   r   z'SetProfilePhotoError.is_thumbnail_errorc                 C   r   )zV
        Check if the union tag is ``transient_error``.

        :rtype: bool
        transient_errorr   r   r   r   r   is_transient_error   r   z'SetProfilePhotoError.is_transient_errorc                 C   r   r   r   r   r   r   r   r      r   zSetProfilePhotoError.is_otherc                    r   r   )r   r2   r   r   r   r   r   r      r   z0SetProfilePhotoError._process_custom_annotations)r    r!   r"   r#   r$   r3   r5   r7   r9   r;   r   r4   r6   r8   r:   r<   r   r   r&   r   r   r   r   r2   ^   s     r2   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 )SetProfilePhotoResultz
    :ivar account.SetProfilePhotoResult.profile_photo_url: URL for the photo
        representing the user, if one is set.
    _profile_photo_url_valueTNc                 C   r)   r   )r*   r+   r>   profile_photo_url)r   r?   r   r   r   r-      r.   zSetProfilePhotoResult.__init__r?   c                    r   r   )r   r=   r   r   r   r   r   r      r   z1SetProfilePhotoResult._process_custom_annotationsr   )r    r!   r"   r#   r/   r0   r-   r*   r1   r?   r   r&   r   r   r   r   r=      s    

r=   )r   r   r   r,   )r3   r5   r7   r9   r;   r   r3   r5   r7   r9   r;   r?   set_profile_photo   FuserapiZrpc)authhoststyleN)*
__future__r   Zstone.backends.python_rsrcr   r*   r   ZbvUnionr   ZPhotoSourceArg_validatorStructr'   ZSetProfilePhotoArg_validatorr2   ZSetProfilePhotoError_validatorr=   ZSetProfilePhotoResult_validatorStringZ_base64_data_validatorZVoidZ_other_validatorZ_tagmapr   r,   	validatorsetZ_all_field_names_Z_all_fields_Z_file_type_error_validatorZ_file_size_error_validatorZ_dimension_error_validatorZ_thumbnail_error_validatorZ_transient_error_validatorr3   r5   r7   r9   r;   r?   ZRouter@   ZROUTESr   r   r   r   <module>   sp   
8

S










	




