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

Class BaseTeamFolderError

dropbox/team.py:747–856  ·  view source on GitHub ↗

Base error that all errors for existing team folders should extend. 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

745BaseDfbReport_validator = bv.Struct(BaseDfbReport)
746
747class BaseTeamFolderError(bb.Union):
748 """
749 Base error that all errors for existing team folders should extend.
750
751 This class acts as a tagged union. Only one of the ``is_*`` methods will
752 return true. To get the associated value of a tag (if one exists), use the
753 corresponding ``get_*`` method.
754 """
755
756 _catch_all = 'other'
757 # Attribute is overwritten below the class definition
758 other = None
759
760 @classmethod
761 def access_error(cls, val):
762 """
763 Create an instance of this class set to the ``access_error`` tag with
764 value ``val``.
765
766 :param TeamFolderAccessError val:
767 :rtype: BaseTeamFolderError
768 """
769 return cls('access_error', val)
770
771 @classmethod
772 def status_error(cls, val):
773 """
774 Create an instance of this class set to the ``status_error`` tag with
775 value ``val``.
776
777 :param TeamFolderInvalidStatusError val:
778 :rtype: BaseTeamFolderError
779 """
780 return cls('status_error', val)
781
782 @classmethod
783 def team_shared_dropbox_error(cls, val):
784 """
785 Create an instance of this class set to the
786 ``team_shared_dropbox_error`` tag with value ``val``.
787
788 :param TeamFolderTeamSharedDropboxError val:
789 :rtype: BaseTeamFolderError
790 """
791 return cls('team_shared_dropbox_error', val)
792
793 def is_access_error(self):
794 """
795 Check if the union tag is ``access_error``.
796
797 :rtype: bool
798 """
799 return self._tag == 'access_error'
800
801 def is_status_error(self):
802 """
803 Check if the union tag is ``status_error``.
804

Callers 1

team.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected