# automatically generated by the FlatBuffers compiler, do not modify

# namespace: proto

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

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

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

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

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

    # Register
    def Procedure(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

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

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

    # Register
    def Concurrency(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Uint16Flags, o + self._tab.Pos)
        return 0

    # Register
    def ForceReregister(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
        if o != 0:
            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
        return False

def Start(builder): builder.StartObject(6)
def RegisterStart(builder):
    """This method is deprecated. Please switch to Start."""
    return Start(builder)
def AddRequest(builder, request): builder.PrependUint64Slot(0, request, 0)
def RegisterAddRequest(builder, request):
    """This method is deprecated. Please switch to AddRequest."""
    return AddRequest(builder, request)
def AddProcedure(builder, procedure): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(procedure), 0)
def RegisterAddProcedure(builder, procedure):
    """This method is deprecated. Please switch to AddProcedure."""
    return AddProcedure(builder, procedure)
def AddMatch(builder, match): builder.PrependUint8Slot(2, match, 0)
def RegisterAddMatch(builder, match):
    """This method is deprecated. Please switch to AddMatch."""
    return AddMatch(builder, match)
def AddInvoke(builder, invoke): builder.PrependUint8Slot(3, invoke, 0)
def RegisterAddInvoke(builder, invoke):
    """This method is deprecated. Please switch to AddInvoke."""
    return AddInvoke(builder, invoke)
def AddConcurrency(builder, concurrency): builder.PrependUint16Slot(4, concurrency, 0)
def RegisterAddConcurrency(builder, concurrency):
    """This method is deprecated. Please switch to AddConcurrency."""
    return AddConcurrency(builder, concurrency)
def AddForceReregister(builder, forceReregister): builder.PrependBoolSlot(5, forceReregister, 0)
def RegisterAddForceReregister(builder, forceReregister):
    """This method is deprecated. Please switch to AddForceReregister."""
    return AddForceReregister(builder, forceReregister)
def End(builder): return builder.EndObject()
def RegisterEnd(builder):
    """This method is deprecated. Please switch to End."""
    return End(builder)