class PathRoot(bb.Union): (source)
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 |
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 |
Paths are relative to given namespace id (This results in ``PathRootError.no_permission`` if you don't have access to this namespace.). |
Method | get |
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 |
Check if the union tag is ``home``. |
Method | is |
Check if the union tag is ``namespace_id``. |
Method | is |
Check if the union tag is ``other``. |
Method | is |
Check if the union tag is ``root``. |
Class Variable | home |
Undocumented |
Class Variable | other |
Undocumented |
Method | _process |
Undocumented |
Class Variable | _catch |
Undocumented |
Create an instance of this class set to the ``namespace_id`` tag with value ``val``. :param str val: :rtype: PathRoot
Create an instance of this class set to the ``root`` tag with value ``val``. :param str val: :rtype: PathRoot
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
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