# automatically generated by the FlatBuffers compiler, do not modify

# namespace: aghast_generated

import flatbuffers

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

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

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

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

    # FractionBinning
    def LayoutReversed(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
        return False

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

def FractionBinningStart(builder): builder.StartObject(3)
def FractionBinningAddLayout(builder, layout): builder.PrependInt8Slot(0, layout, 0)
def FractionBinningAddLayoutReversed(builder, layoutReversed): builder.PrependBoolSlot(1, layoutReversed, 0)
def FractionBinningAddErrorMethod(builder, errorMethod): builder.PrependInt8Slot(2, errorMethod, 0)
def FractionBinningEnd(builder): return builder.EndObject()
