# automatically generated by the FlatBuffers compiler, do not modify

# namespace: tecrpc

import flatbuffers

class Header(object):
    __slots__ = ['_tab']

    @classmethod
    def GetRootAsHeader(cls, buf, offset):
        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
        x = Header()
        x.Init(buf, n + offset)
        return x

    # Header
    def Init(self, buf, pos):
        self._tab = flatbuffers.table.Table(buf, pos)

    # Header
    def Version(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Uint8Flags, o + self._tab.Pos)
        return 0

    # Header
    def TuserverVersion(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
        return 0

def HeaderStart(builder): builder.StartObject(2)
def HeaderAddVersion(builder, version): builder.PrependUint8Slot(0, version, 0)
def HeaderAddTuserverVersion(builder, tuserverVersion): builder.PrependUint32Slot(1, tuserverVersion, 0)
def HeaderEnd(builder): return builder.EndObject()
