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

Class AccessInheritance

dropbox/sharing.py:22–69  ·  view source on GitHub ↗

Information about the inheritance policy of a shared folder. 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 sharing.AccessInheritance.inhe

Source from the content-addressed store, hash-verified

20from dropbox import users_common
21
22class AccessInheritance(bb.Union):
23 """
24 Information about the inheritance policy of a shared folder.
25
26 This class acts as a tagged union. Only one of the ``is_*`` methods will
27 return true. To get the associated value of a tag (if one exists), use the
28 corresponding ``get_*`` method.
29
30 :ivar sharing.AccessInheritance.inherit: The shared folder inherits its
31 members from the parent folder.
32 :ivar sharing.AccessInheritance.no_inherit: The shared folder does not
33 inherit its members from the parent folder.
34 """
35
36 _catch_all = 'other'
37 # Attribute is overwritten below the class definition
38 inherit = None
39 # Attribute is overwritten below the class definition
40 no_inherit = None
41 # Attribute is overwritten below the class definition
42 other = None
43
44 def is_inherit(self):
45 """
46 Check if the union tag is ``inherit``.
47
48 :rtype: bool
49 """
50 return self._tag == 'inherit'
51
52 def is_no_inherit(self):
53 """
54 Check if the union tag is ``no_inherit``.
55
56 :rtype: bool
57 """
58 return self._tag == 'no_inherit'
59
60 def is_other(self):
61 """
62 Check if the union tag is ``other``.
63
64 :rtype: bool
65 """
66 return self._tag == 'other'
67
68 def _process_custom_annotations(self, annotation_type, field_path, processor):
69 super(AccessInheritance, self)._process_custom_annotations(annotation_type, field_path, processor)
70
71AccessInheritance_validator = bv.Union(AccessInheritance)
72

Callers 1

sharing.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected