# automatically generated by the FlatBuffers compiler, do not modify

# namespace: AllWatchSerialize

import flatbuffers

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

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

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

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

def OpenStart(builder): builder.StartObject(1)
def OpenAddId(builder, id): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(id), 0)
def OpenEnd(builder): return builder.EndObject()
