# automatically generated by the FlatBuffers compiler, do not modify

# namespace: AllWatchSerialize

import flatbuffers

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

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

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

    # Id
    def PackageName(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return bytes()

    # Id
    def FriendlyName(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return bytes()

def IdStart(builder): builder.StartObject(2)
def IdAddPackageName(builder, packageName): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(packageName), 0)
def IdAddFriendlyName(builder, friendlyName): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(friendlyName), 0)
def IdEnd(builder): return builder.EndObject()
