Source code for cfxdb.gen.arealm.Permission

# automatically generated by the FlatBuffers compiler, do not modify

# namespace: arealm

import flatbuffers
from flatbuffers.compat import import_numpy

[docs] np = import_numpy()
# WAMP permission (authorization of performing a WAMP action on a WAMP URI pattern).
[docs] class Permission(object):
[docs] __slots__ = ["_tab"]
@classmethod
[docs] def SizeOf(cls): return 9
# Permission
[docs] def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos)
# URI or URI pattern to match for the permission to apply. # URI check level. # Permission
[docs] def UriCheckLevel(self): return self._tab.Get( flatbuffers.number_types.Int8Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0) )
# URI matching mode. # Permission
[docs] def Match(self): return self._tab.Get( flatbuffers.number_types.Int8Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(1) )
# Allow/disallow calling procedures on a match. # Permission
[docs] def AllowCall(self): return self._tab.Get( flatbuffers.number_types.BoolFlags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(2) )
# Allow/disallow registering procedures on a match. # Permission
[docs] def AllowRegister(self): return self._tab.Get( flatbuffers.number_types.BoolFlags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(3) )
# Allow/disallow publishing events on a match. # Permission
[docs] def AllowPublish(self): return self._tab.Get( flatbuffers.number_types.BoolFlags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(4) )
# Allow/disallow subscribing topics on a match. # Permission
[docs] def AllowSubscribe(self): return self._tab.Get( flatbuffers.number_types.BoolFlags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(5) )
# Disclose the caller on a match (of a procedure) when called. # Permission
[docs] def DiscloseCaller(self): return self._tab.Get( flatbuffers.number_types.BoolFlags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(6) )
# Disclose the publisher on a match (of a topic) when published to. # Permission
[docs] def DisclosePublisher(self): return self._tab.Get( flatbuffers.number_types.BoolFlags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(7) )
# Cache the permission on a match in the router worker. # Permission
[docs] def Cache(self): return self._tab.Get( flatbuffers.number_types.BoolFlags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(8) )
[docs] def CreatePermission( builder, uriCheckLevel, match, allowCall, allowRegister, allowPublish, allowSubscribe, discloseCaller, disclosePublisher, cache, ): builder.Prep(1, 9) builder.PrependBool(cache) builder.PrependBool(disclosePublisher) builder.PrependBool(discloseCaller) builder.PrependBool(allowSubscribe) builder.PrependBool(allowPublish) builder.PrependBool(allowRegister) builder.PrependBool(allowCall) builder.PrependInt8(match) builder.PrependInt8(uriCheckLevel) return builder.Offset()