# automatically generated by the FlatBuffers compiler, do not modify

# namespace: HTTPReqCall

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

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

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

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

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

    # Stop
    def Headers(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        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

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

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

    # Stop
    def Body(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        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

    # Stop
    def BodyAsNumpy(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        if o != 0:
            return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint8Flags, o)
        return 0

    # Stop
    def BodyLength(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

    # Stop
    def BodyIsNone(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        return o == 0

def Start(builder): builder.StartObject(3)
def StopStart(builder):
    """This method is deprecated. Please switch to Start."""
    return Start(builder)
def AddStatus(builder, status): builder.PrependUint16Slot(0, status, 0)
def StopAddStatus(builder, status):
    """This method is deprecated. Please switch to AddStatus."""
    return AddStatus(builder, status)
def AddHeaders(builder, headers): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(headers), 0)
def StopAddHeaders(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 StopStartHeadersVector(builder, numElems):
    """This method is deprecated. Please switch to Start."""
    return StartHeadersVector(builder, numElems)
def AddBody(builder, body): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(body), 0)
def StopAddBody(builder, body):
    """This method is deprecated. Please switch to AddBody."""
    return AddBody(builder, body)
def StartBodyVector(builder, numElems): return builder.StartVector(1, numElems, 1)
def StopStartBodyVector(builder, numElems):
    """This method is deprecated. Please switch to Start."""
    return StartBodyVector(builder, numElems)
def End(builder): return builder.EndObject()
def StopEnd(builder):
    """This method is deprecated. Please switch to End."""
    return End(builder)