# automatically generated by the FlatBuffers compiler, do not modify

# namespace: HTTPReqCall

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

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

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

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

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

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

    # Resp
    def Action(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        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(3)
def RespStart(builder):
    """This method is deprecated. Please switch to Start."""
    return Start(builder)
def AddId(builder, id): builder.PrependUint32Slot(0, id, 0)
def RespAddId(builder, id):
    """This method is deprecated. Please switch to AddId."""
    return AddId(builder, id)
def AddActionType(builder, actionType): builder.PrependUint8Slot(1, actionType, 0)
def RespAddActionType(builder, actionType):
    """This method is deprecated. Please switch to AddActionType."""
    return AddActionType(builder, actionType)
def AddAction(builder, action): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(action), 0)
def RespAddAction(builder, action):
    """This method is deprecated. Please switch to AddAction."""
    return AddAction(builder, action)
def End(builder): return builder.EndObject()
def RespEnd(builder):
    """This method is deprecated. Please switch to End."""
    return End(builder)