class documentation

class PreviewError(bb.Union): (source)

View In Hierarchy

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 LookupError PreviewError.path: An error occurs when downloading metadata for the file. :ivar files.PreviewError.in_progress: This preview generation is still in progress and the file is not ready for preview yet. :ivar files.PreviewError.unsupported_extension: The file extension is not supported preview generation. :ivar files.PreviewError.unsupported_content: The file content is not supported for preview generation.

Class Method path Create an instance of this class set to the ``path`` tag with value ``val``.
Method get_path An error occurs when downloading metadata for the file.
Method is_in_progress Check if the union tag is ``in_progress``.
Method is_path Check if the union tag is ``path``.
Method is_unsupported_content Check if the union tag is ``unsupported_content``.
Method is_unsupported_extension Check if the union tag is ``unsupported_extension``.
Class Variable in_progress Undocumented
Class Variable unsupported_content Undocumented
Class Variable unsupported_extension Undocumented
Method _process_custom_annotations Undocumented
Class Variable _catch_all Undocumented
@classmethod
def path(cls, val): (source)

Create an instance of this class set to the ``path`` tag with value ``val``. :param LookupError val: :rtype: PreviewError

def get_path(self): (source)

An error occurs when downloading metadata for the file. Only call this if :meth:`is_path` is true. :rtype: LookupError

def is_in_progress(self): (source)

Check if the union tag is ``in_progress``. :rtype: bool

def is_path(self): (source)

Check if the union tag is ``path``. :rtype: bool

def is_unsupported_content(self): (source)

Check if the union tag is ``unsupported_content``. :rtype: bool

def is_unsupported_extension(self): (source)

Check if the union tag is ``unsupported_extension``. :rtype: bool

in_progress = (source)

Undocumented

unsupported_content = (source)

Undocumented

unsupported_extension = (source)

Undocumented

def _process_custom_annotations(self, annotation_type, field_path, processor): (source)

Undocumented

_catch_all = (source)

Undocumented