• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# automatically generated by the FlatBuffers compiler, do not modify
2
3# namespace: models
4
5import flatbuffers
6from flatbuffers.compat import import_numpy
7np = import_numpy()
8
9class HelloRequest(object):
10    __slots__ = ['_tab']
11
12    @classmethod
13    def GetRootAs(cls, buf, offset=0):
14        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
15        x = HelloRequest()
16        x.Init(buf, n + offset)
17        return x
18
19    @classmethod
20    def GetRootAsHelloRequest(cls, buf, offset=0):
21        """This method is deprecated. Please switch to GetRootAs."""
22        return cls.GetRootAs(buf, offset)
23    # HelloRequest
24    def Init(self, buf, pos):
25        self._tab = flatbuffers.table.Table(buf, pos)
26
27    # HelloRequest
28    def Name(self):
29        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
30        if o != 0:
31            return self._tab.String(o + self._tab.Pos)
32        return None
33
34def Start(builder): builder.StartObject(1)
35def HelloRequestStart(builder):
36    """This method is deprecated. Please switch to Start."""
37    return Start(builder)
38def AddName(builder, name): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0)
39def HelloRequestAddName(builder, name):
40    """This method is deprecated. Please switch to AddName."""
41    return AddName(builder, name)
42def End(builder): return builder.EndObject()
43def HelloRequestEnd(builder):
44    """This method is deprecated. Please switch to End."""
45    return End(builder)