# automatically generated by the FlatBuffers compiler, do not modify

# namespace: API

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

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

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

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

    # SelectVariable
    def Id(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            x = o + self._tab.Pos
            from SEAScope.API.RenderableId import RenderableId
            obj = RenderableId()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

    # SelectVariable
    def Selected(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

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

def SelectVariableStart(builder): builder.StartObject(3)
def SelectVariableAddId(builder, id): builder.PrependStructSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(id), 0)
def SelectVariableAddSelected(builder, selected): builder.PrependBoolSlot(1, selected, 0)
def SelectVariableAddExclusive(builder, exclusive): builder.PrependBoolSlot(2, exclusive, 0)
def SelectVariableEnd(builder): return builder.EndObject()
