# automatically generated by the FlatBuffers compiler, do not modify

# namespace: AllWatchSerialize

import flatbuffers

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

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

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

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

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

def BackStart(builder): builder.StartObject(1)
def BackAddExtras(builder, extras): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(extras), 0)
def BackStartExtrasVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def BackEnd(builder): return builder.EndObject()
