class documentation

class PathRoot(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 common.PathRoot.home: Paths are relative to the authenticating user's home namespace, whether or not that user belongs to a team. :ivar str common.PathRoot.root: Paths are relative to the authenticating user's root namespace (This results in :field:`PathRootError.invalid_root` if the user's root namespace has changed.). :ivar str common.PathRoot.namespace_id: Paths are relative to given namespace id (This results in :field:`PathRootError.no_permission` if you don't have access to this namespace.).

Class Method namespace_id Create an instance of this class set to the ``namespace_id`` tag with value ``val``.
Class Method root Create an instance of this class set to the ``root`` tag with value ``val``.
Method get_namespace_id Paths are relative to given namespace id (This results in ``PathRootError.no_permission`` if you don't have access to this namespace.).
Method get_root Paths are relative to the authenticating user's root namespace (This results in ``PathRootError.invalid_root`` if the user's root namespace has changed.).
Method is_home Check if the union tag is ``home``.
Method is_namespace_id Check if the union tag is ``namespace_id``.
Method is_other Check if the union tag is ``other``.
Method is_root Check if the union tag is ``root``.
Class Variable home Undocumented
Class Variable other Undocumented
Method _process_custom_annotations Undocumented
Class Variable _catch_all Undocumented
@classmethod
def namespace_id(cls, val): (source)

Create an instance of this class set to the ``namespace_id`` tag with value ``val``. :param str val: :rtype: PathRoot

@classmethod
def root(cls, val): (source)

Create an instance of this class set to the ``root`` tag with value ``val``. :param str val: :rtype: PathRoot

def get_namespace_id(self): (source)

Paths are relative to given namespace id (This results in ``PathRootError.no_permission`` if you don't have access to this namespace.). Only call this if :meth:`is_namespace_id` is true. :rtype: str

def get_root(self): (source)

Paths are relative to the authenticating user's root namespace (This results in ``PathRootError.invalid_root`` if the user's root namespace has changed.). Only call this if :meth:`is_root` is true. :rtype: str

def is_home(self): (source)

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

def is_namespace_id(self): (source)

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

def is_other(self): (source)

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

def is_root(self): (source)

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

Undocumented

Undocumented

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

Undocumented

_catch_all: str = (source)

Undocumented