# automatically generated by the FlatBuffers compiler, do not modify

# namespace: HTTPReqCall

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 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

    # Req
    def SrcIp(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            a = self._tab.Vector(o)
            return self._tab.Get(flatbuffers.number_types.Uint8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1))
        return 0

    # Req
    def SrcIpAsNumpy(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint8Flags, o)
        return 0

    # Req
    def SrcIpLength(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

    # Req
    def SrcIpIsNone(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        return o == 0

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

    # Req
    def Path(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

    # Req
    def Args(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
        if o != 0:
            x = self._tab.Vector(o)
            x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
            x = self._tab.Indirect(x)
            from A6.TextEntry import TextEntry
            obj = TextEntry()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

    # Req
    def ArgsLength(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

    # Req
    def ArgsIsNone(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
        return o == 0

    # Req
    def Headers(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
        if o != 0:
            x = self._tab.Vector(o)
            x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
            x = self._tab.Indirect(x)
            from A6.TextEntry import TextEntry
            obj = TextEntry()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

    # Req
    def HeadersLength(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

    # Req
    def HeadersIsNone(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
        return o == 0

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

def Start(builder): builder.StartObject(7)
def ReqStart(builder):
    """This method is deprecated. Please switch to Start."""
    return Start(builder)
def AddId(builder, id): builder.PrependUint32Slot(0, id, 0)
def ReqAddId(builder, id):
    """This method is deprecated. Please switch to AddId."""
    return AddId(builder, id)
def AddSrcIp(builder, srcIp): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(srcIp), 0)
def ReqAddSrcIp(builder, srcIp):
    """This method is deprecated. Please switch to AddSrcIp."""
    return AddSrcIp(builder, srcIp)
def StartSrcIpVector(builder, numElems): return builder.StartVector(1, numElems, 1)
def ReqStartSrcIpVector(builder, numElems):
    """This method is deprecated. Please switch to Start."""
    return StartSrcIpVector(builder, numElems)
def AddMethod(builder, method): builder.PrependUint8Slot(2, method, 0)
def ReqAddMethod(builder, method):
    """This method is deprecated. Please switch to AddMethod."""
    return AddMethod(builder, method)
def AddPath(builder, path): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(path), 0)
def ReqAddPath(builder, path):
    """This method is deprecated. Please switch to AddPath."""
    return AddPath(builder, path)
def AddArgs(builder, args): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(args), 0)
def ReqAddArgs(builder, args):
    """This method is deprecated. Please switch to AddArgs."""
    return AddArgs(builder, args)
def StartArgsVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def ReqStartArgsVector(builder, numElems):
    """This method is deprecated. Please switch to Start."""
    return StartArgsVector(builder, numElems)
def AddHeaders(builder, headers): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(headers), 0)
def ReqAddHeaders(builder, headers):
    """This method is deprecated. Please switch to AddHeaders."""
    return AddHeaders(builder, headers)
def StartHeadersVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def ReqStartHeadersVector(builder, numElems):
    """This method is deprecated. Please switch to Start."""
    return StartHeadersVector(builder, numElems)
def AddConfToken(builder, confToken): builder.PrependUint32Slot(6, confToken, 0)
def ReqAddConfToken(builder, confToken):
    """This method is deprecated. Please switch to AddConfToken."""
    return AddConfToken(builder, confToken)
def End(builder): return builder.EndObject()
def ReqEnd(builder):
    """This method is deprecated. Please switch to End."""
    return End(builder)