gravitino.dto.authorization.role_dto.RoleDTO

class gravitino.dto.authorization.role_dto.RoleDTO(_name: str, _properties: dict[str, str] | None = None, _securable_objects: list[gravitino.dto.authorization.securable_object_dto.SecurableObjectDTO] = <factory>, _audit: ~gravitino.dto.audit_dto.AuditDTO | None = None)

Bases: Role

Represents a Role Data Transfer Object (DTO).

__init__(_name: str, _properties: dict[str, str] | None = None, _securable_objects: list[gravitino.dto.authorization.securable_object_dto.SecurableObjectDTO] = <factory>, _audit: ~gravitino.dto.audit_dto.AuditDTO | None = None) None

Methods

__init__(_name[, _properties, ...])

audit_info()

builder()

from_dict(kvs, *[, infer_missing])

from_json(s, *[, parse_float, parse_int, ...])

name()

The name of the role.

properties()

The properties of the role.

schema(*[, infer_missing, only, exclude, ...])

securable_objects()

The securable object represents a special kind of entity with a unique identifier.

to_dict([encode_json])

to_json(*[, skipkeys, ensure_ascii, ...])

class Builder

Bases: object

Helper class to build a RoleDTO object.

name() str

The name of the role.

Raises:

NotImplementedError: if the method is not implemented.

Returns:

str: The name of the role.

properties() dict[str, str] | None

The properties of the role. Note, this method will return None if the properties are not set.

Raises:

NotImplementedError: if the method is not implemented.

Returns:

dict[str, str]: The properties of the role.

securable_objects() list[gravitino.api.authorization.securable_objects.SecurableObject]

The securable object represents a special kind of entity with a unique identifier. All securable objects are organized by tree structure. For example: If the securable object is a table, the identifier may be catalog1.schema1.table1._summary_

Raises:

NotImplementedError: if the method is not implemented.

Returns:

list[SecurableObject]: The securable objects of the role.