# automatically generated by the FlatBuffers compiler, do not modify

# namespace: ExtraInfo

import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()

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

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

    @classmethod
    def GetRootAsReq(cls, buf, offset=0):
        """This method is deprecated. Please switch to GetRootAs."""
        return cls.GetRootAs(buf, offset)
    # Req
    def Init(self, buf, pos):
        self._tab = flatbuffers.table.Table(buf, pos)

    # Req
    def InfoType(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

    # Req
    def Info(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            from flatbuffers.table import Table
            obj = Table(bytearray(), 0)
            self._tab.Union(obj, o)
            return obj
        return None

def Start(builder): builder.StartObject(2)
def ReqStart(builder):
    """This method is deprecated. Please switch to Start."""
    return Start(builder)
def AddInfoType(builder, infoType): builder.PrependUint8Slot(0, infoType, 0)
def ReqAddInfoType(builder, infoType):
    """This method is deprecated. Please switch to AddInfoType."""
    return AddInfoType(builder, infoType)
def AddInfo(builder, info): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(info), 0)
def ReqAddInfo(builder, info):
    """This method is deprecated. Please switch to AddInfo."""
    return AddInfo(builder, info)
def End(builder): return builder.EndObject()
def ReqEnd(builder):
    """This method is deprecated. Please switch to End."""
    return End(builder)