# automatically generated by the FlatBuffers compiler, do not modify

# namespace: tabular

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

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

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

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

    # ListSchemasResponse
    def BucketName(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

    # ListSchemasResponse
    def Schemas(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.ObjectDetails import ObjectDetails
            obj = ObjectDetails()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

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

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

def Start(builder): builder.StartObject(2)
def ListSchemasResponseStart(builder):
    """This method is deprecated. Please switch to Start."""
    return Start(builder)
def AddBucketName(builder, bucketName): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(bucketName), 0)
def ListSchemasResponseAddBucketName(builder, bucketName):
    """This method is deprecated. Please switch to AddBucketName."""
    return AddBucketName(builder, bucketName)
def AddSchemas(builder, schemas): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(schemas), 0)
def ListSchemasResponseAddSchemas(builder, schemas):
    """This method is deprecated. Please switch to AddSchemas."""
    return AddSchemas(builder, schemas)
def StartSchemasVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def ListSchemasResponseStartSchemasVector(builder, numElems):
    """This method is deprecated. Please switch to Start."""
    return StartSchemasVector(builder, numElems)
def End(builder): return builder.EndObject()
def ListSchemasResponseEnd(builder):
    """This method is deprecated. Please switch to End."""
    return End(builder)