# automatically generated by the FlatBuffers compiler, do not modify

# namespace: tabular

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

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

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

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

    # GetRowColumnSecurityResponse
    def RowFilter(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 vastdb.vast_flatbuf.tabular.FilterString import FilterString
            obj = FilterString()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

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

    # GetRowColumnSecurityResponse
    def RowFilterIsNone(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        return o == 0

    # GetRowColumnSecurityResponse
    def ColumnMask(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 vastdb.vast_flatbuf.tabular.ColumnDetails import ColumnDetails
            obj = ColumnDetails()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

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

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

    # GetRowColumnSecurityResponse
    def ColumnAllow(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        if o != 0:
            x = self._tab.Vector(o)
            x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
            x = self._tab.Indirect(x)
            from vastdb.vast_flatbuf.tabular.NameString import NameString
            obj = NameString()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

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

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

    # GetRowColumnSecurityResponse
    def ColumnDeny(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        if o != 0:
            x = self._tab.Vector(o)
            x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
            x = self._tab.Indirect(x)
            from vastdb.vast_flatbuf.tabular.NameString import NameString
            obj = NameString()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

    # GetRowColumnSecurityResponse
    def ColumnDenyLength(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

    # GetRowColumnSecurityResponse
    def ColumnDenyIsNone(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        return o == 0

def Start(builder): builder.StartObject(4)
def GetRowColumnSecurityResponseStart(builder):
    """This method is deprecated. Please switch to Start."""
    return Start(builder)
def AddRowFilter(builder, rowFilter): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(rowFilter), 0)
def GetRowColumnSecurityResponseAddRowFilter(builder, rowFilter):
    """This method is deprecated. Please switch to AddRowFilter."""
    return AddRowFilter(builder, rowFilter)
def StartRowFilterVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def GetRowColumnSecurityResponseStartRowFilterVector(builder, numElems):
    """This method is deprecated. Please switch to Start."""
    return StartRowFilterVector(builder, numElems)
def AddColumnMask(builder, columnMask): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(columnMask), 0)
def GetRowColumnSecurityResponseAddColumnMask(builder, columnMask):
    """This method is deprecated. Please switch to AddColumnMask."""
    return AddColumnMask(builder, columnMask)
def StartColumnMaskVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def GetRowColumnSecurityResponseStartColumnMaskVector(builder, numElems):
    """This method is deprecated. Please switch to Start."""
    return StartColumnMaskVector(builder, numElems)
def AddColumnAllow(builder, columnAllow): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(columnAllow), 0)
def GetRowColumnSecurityResponseAddColumnAllow(builder, columnAllow):
    """This method is deprecated. Please switch to AddColumnAllow."""
    return AddColumnAllow(builder, columnAllow)
def StartColumnAllowVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def GetRowColumnSecurityResponseStartColumnAllowVector(builder, numElems):
    """This method is deprecated. Please switch to Start."""
    return StartColumnAllowVector(builder, numElems)
def AddColumnDeny(builder, columnDeny): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(columnDeny), 0)
def GetRowColumnSecurityResponseAddColumnDeny(builder, columnDeny):
    """This method is deprecated. Please switch to AddColumnDeny."""
    return AddColumnDeny(builder, columnDeny)
def StartColumnDenyVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def GetRowColumnSecurityResponseStartColumnDenyVector(builder, numElems):
    """This method is deprecated. Please switch to Start."""
    return StartColumnDenyVector(builder, numElems)
def End(builder): return builder.EndObject()
def GetRowColumnSecurityResponseEnd(builder):
    """This method is deprecated. Please switch to End."""
    return End(builder)
