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

Class ListDocsCursorError

dropbox/paper.py:782–831  ·  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

780InviteeInfoWithPermissionLevel_validator = bv.Struct(InviteeInfoWithPermissionLevel)
781
782class ListDocsCursorError(bb.Union):
783 """
784 This class acts as a tagged union. Only one of the ``is_*`` methods will
785 return true. To get the associated value of a tag (if one exists), use the
786 corresponding ``get_*`` method.
787 """
788
789 _catch_all = 'other'
790 # Attribute is overwritten below the class definition
791 other = None
792
793 @classmethod
794 def cursor_error(cls, val):
795 """
796 Create an instance of this class set to the ``cursor_error`` tag with
797 value ``val``.
798
799 :param PaperApiCursorError val:
800 :rtype: ListDocsCursorError
801 """
802 return cls('cursor_error', val)
803
804 def is_cursor_error(self):
805 """
806 Check if the union tag is ``cursor_error``.
807
808 :rtype: bool
809 """
810 return self._tag == 'cursor_error'
811
812 def is_other(self):
813 """
814 Check if the union tag is ``other``.
815
816 :rtype: bool
817 """
818 return self._tag == 'other'
819
820 def get_cursor_error(self):
821 """
822 Only call this if :meth:`is_cursor_error` is true.
823
824 :rtype: PaperApiCursorError
825 """
826 if not self.is_cursor_error():
827 raise AttributeError("tag 'cursor_error' not set")
828 return self._value
829
830 def _process_custom_annotations(self, annotation_type, field_path, processor):
831 super(ListDocsCursorError, self)._process_custom_annotations(annotation_type, field_path, processor)
832
833ListDocsCursorError_validator = bv.Union(ListDocsCursorError)
834

Callers 1

paper.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected