# automatically generated by the FlatBuffers compiler, do not modify

# namespace: tecrpc

import flatbuffers

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

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

    # ArgList
    def Init(self, buf, pos):
        self._tab = flatbuffers.table.Table(buf, pos)

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

    # ArgList
    def ItemsLength(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

def ArgListStart(builder): builder.StartObject(1)
def ArgListAddItems(builder, items): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(items), 0)
def ArgListStartItemsVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def ArgListEnd(builder): return builder.EndObject()
