Source code for cfxdb.gen.arealm.ApplicationRealmRole

# automatically generated by the FlatBuffers compiler, do not modify

# namespace: arealm

import flatbuffers
from flatbuffers.compat import import_numpy

[docs] np = import_numpy()
# Association (N:M) between roles and application realms, both defined independently at the management realm level.
[docs] class ApplicationRealmRole(object):
[docs] __slots__ = ["_tab"]
@classmethod
[docs] def GetRootAs(cls, buf, offset=0): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) x = ApplicationRealmRole() x.Init(buf, n + offset) return x
@classmethod
[docs] def GetRootAsApplicationRealmRole(cls, buf, offset=0): """This method is deprecated. Please switch to GetRootAs.""" return cls.GetRootAs(buf, offset)
# ApplicationRealmRole
[docs] def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos)
# ID of the role being associated with an application realm. # ApplicationRealmRole
[docs] def RoleOid(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) if o != 0: x = o + self._tab.Pos from ..oid_t import oid_t obj = oid_t() obj.Init(self._tab.Bytes, x) return obj return None
# ID of the application realm this role is associated with. # ApplicationRealmRole
[docs] def ArealmOid(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: x = o + self._tab.Pos from ..oid_t import oid_t obj = oid_t() obj.Init(self._tab.Bytes, x) return obj return None
[docs] def ApplicationRealmRoleStart(builder): builder.StartObject(2)
[docs] def Start(builder): ApplicationRealmRoleStart(builder)
[docs] def ApplicationRealmRoleAddRoleOid(builder, roleOid): builder.PrependStructSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(roleOid), 0)
[docs] def AddRoleOid(builder, roleOid): ApplicationRealmRoleAddRoleOid(builder, roleOid)
[docs] def ApplicationRealmRoleAddArealmOid(builder, arealmOid): builder.PrependStructSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(arealmOid), 0)
[docs] def AddArealmOid(builder, arealmOid): ApplicationRealmRoleAddArealmOid(builder, arealmOid)
[docs] def ApplicationRealmRoleEnd(builder): return builder.EndObject()
[docs] def End(builder): return ApplicationRealmRoleEnd(builder)