# automatically generated by the FlatBuffers compiler, do not modify

# namespace: tabular

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

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

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

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

    # VectorIndexMetadata
    def ColumnName(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

    # VectorIndexMetadata
    def DistanceMetric(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

    # VectorIndexMetadata
    def SqlFunctionName(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

def Start(builder): builder.StartObject(3)
def VectorIndexMetadataStart(builder):
    """This method is deprecated. Please switch to Start."""
    return Start(builder)
def AddColumnName(builder, columnName): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(columnName), 0)
def VectorIndexMetadataAddColumnName(builder, columnName):
    """This method is deprecated. Please switch to AddColumnName."""
    return AddColumnName(builder, columnName)
def AddDistanceMetric(builder, distanceMetric): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(distanceMetric), 0)
def VectorIndexMetadataAddDistanceMetric(builder, distanceMetric):
    """This method is deprecated. Please switch to AddDistanceMetric."""
    return AddDistanceMetric(builder, distanceMetric)
def AddSqlFunctionName(builder, sqlFunctionName): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(sqlFunctionName), 0)
def VectorIndexMetadataAddSqlFunctionName(builder, sqlFunctionName):
    """This method is deprecated. Please switch to AddSqlFunctionName."""
    return AddSqlFunctionName(builder, sqlFunctionName)
def End(builder): return builder.EndObject()
def VectorIndexMetadataEnd(builder):
    """This method is deprecated. Please switch to End."""
    return End(builder)
