# automatically generated by the FlatBuffers compiler, do not modify

# namespace: aghast_generated

import flatbuffers

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

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

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

    # PredicateBinning
    def Predicates(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            a = self._tab.Vector(o)
            return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
        return ""

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

    # PredicateBinning
    def OverlappingFill(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
        return 0

def PredicateBinningStart(builder): builder.StartObject(2)
def PredicateBinningAddPredicates(builder, predicates): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(predicates), 0)
def PredicateBinningStartPredicatesVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def PredicateBinningAddOverlappingFill(builder, overlappingFill): builder.PrependInt8Slot(1, overlappingFill, 0)
def PredicateBinningEnd(builder): return builder.EndObject()
