# automatically generated by the FlatBuffers compiler, do not modify

# namespace: Packets

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

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

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

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

def QueryProfileParamStart(builder): builder.StartObject(0)
def Start(builder):
    return QueryProfileParamStart(builder)
def QueryProfileParamEnd(builder): return builder.EndObject()
def End(builder):
    return QueryProfileParamEnd(builder)

class QueryProfileParamT(object):

    # QueryProfileParamT
    def __init__(self):
        pass

    @classmethod
    def InitFromBuf(cls, buf, pos):
        queryProfileParam = QueryProfileParam()
        queryProfileParam.Init(buf, pos)
        return cls.InitFromObj(queryProfileParam)

    @classmethod
    def InitFromPackedBuf(cls, buf, pos=0):
        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos)
        return cls.InitFromBuf(buf, pos+n)

    @classmethod
    def InitFromObj(cls, queryProfileParam):
        x = QueryProfileParamT()
        x._UnPack(queryProfileParam)
        return x

    # QueryProfileParamT
    def _UnPack(self, queryProfileParam):
        if queryProfileParam is None:
            return

    # QueryProfileParamT
    def Pack(self, builder):
        QueryProfileParamStart(builder)
        queryProfileParam = QueryProfileParamEnd(builder)
        return queryProfileParam
