Source code for crossbar.shell.reflection.Service

# automatically generated by the FlatBuffers compiler, do not modify

# namespace: reflection

import flatbuffers


[docs] class Service(object):
[docs] __slots__ = ["_tab"]
@classmethod
[docs] def GetRootAsService(cls, buf, offset): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) x = Service() x.Init(buf, n + offset) return x
# Service
[docs] def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos)
# Service
[docs] def Name(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) if o != 0: return self._tab.String(o + self._tab.Pos) return bytes()
# Service
[docs] def Calls(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: x = self._tab.Vector(o) x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 x = self._tab.Indirect(x) from .RPCCall import RPCCall obj = RPCCall() obj.Init(self._tab.Bytes, x) return obj return None
# Service
[docs] def CallsLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: return self._tab.VectorLen(o) return 0
# Service
[docs] def Attributes(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: x = self._tab.Vector(o) x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 x = self._tab.Indirect(x) from .KeyValue import KeyValue obj = KeyValue() obj.Init(self._tab.Bytes, x) return obj return None
# Service
[docs] def AttributesLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: return self._tab.VectorLen(o) return 0
# Service
[docs] def Documentation(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) if o != 0: a = self._tab.Vector(o) return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) return ""
# Service
[docs] def DocumentationLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) if o != 0: return self._tab.VectorLen(o) return 0
[docs] def ServiceStart(builder): builder.StartObject(4)
[docs] def ServiceAddName(builder, name): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0)
[docs] def ServiceAddCalls(builder, calls): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(calls), 0)
[docs] def ServiceStartCallsVector(builder, numElems): return builder.StartVector(4, numElems, 4)
[docs] def ServiceAddAttributes(builder, attributes): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(attributes), 0)
[docs] def ServiceStartAttributesVector(builder, numElems): return builder.StartVector(4, numElems, 4)
[docs] def ServiceAddDocumentation(builder, documentation): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(documentation), 0)
[docs] def ServiceStartDocumentationVector(builder, numElems): return builder.StartVector(4, numElems, 4)
[docs] def ServiceEnd(builder): return builder.EndObject()