MCPcopy Create free account
hub / github.com/dropbox/dropbox-sdk-python / PropertiesSearchError

Class PropertiesSearchError

dropbox/file_properties.py:829–878  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

827PropertiesSearchContinueError_validator = bv.Union(PropertiesSearchContinueError)
828
829class PropertiesSearchError(bb.Union):
830 """
831 This class acts as a tagged union. Only one of the ``is_*`` methods will
832 return true. To get the associated value of a tag (if one exists), use the
833 corresponding ``get_*`` method.
834 """
835
836 _catch_all = 'other'
837 # Attribute is overwritten below the class definition
838 other = None
839
840 @classmethod
841 def property_group_lookup(cls, val):
842 """
843 Create an instance of this class set to the ``property_group_lookup``
844 tag with value ``val``.
845
846 :param LookUpPropertiesError val:
847 :rtype: PropertiesSearchError
848 """
849 return cls('property_group_lookup', val)
850
851 def is_property_group_lookup(self):
852 """
853 Check if the union tag is ``property_group_lookup``.
854
855 :rtype: bool
856 """
857 return self._tag == 'property_group_lookup'
858
859 def is_other(self):
860 """
861 Check if the union tag is ``other``.
862
863 :rtype: bool
864 """
865 return self._tag == 'other'
866
867 def get_property_group_lookup(self):
868 """
869 Only call this if :meth:`is_property_group_lookup` is true.
870
871 :rtype: LookUpPropertiesError
872 """
873 if not self.is_property_group_lookup():
874 raise AttributeError("tag 'property_group_lookup' not set")
875 return self._value
876
877 def _process_custom_annotations(self, annotation_type, field_path, processor):
878 super(PropertiesSearchError, self)._process_custom_annotations(annotation_type, field_path, processor)
879
880PropertiesSearchError_validator = bv.Union(PropertiesSearchError)
881

Callers 1

file_properties.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected