# automatically generated by the FlatBuffers compiler, do not modify

# namespace: flat

import flatbuffers

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

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

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

    # QuickChat
    def QuickChatSelection(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
        return 0

# /// The index of the player that sent the quick chat
    # QuickChat
    def PlayerIndex(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
        return 0

# /// True if the chat is team only false if everyone can see it.
    # QuickChat
    def TeamOnly(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)
        return 0

    # QuickChat
    def MessageIndex(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
        return 0

    # QuickChat
    def TimeStamp(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
        return 0.0

def QuickChatStart(builder): builder.StartObject(5)
def QuickChatAddQuickChatSelection(builder, quickChatSelection): builder.PrependInt8Slot(0, quickChatSelection, 0)
def QuickChatAddPlayerIndex(builder, playerIndex): builder.PrependInt32Slot(1, playerIndex, 0)
def QuickChatAddTeamOnly(builder, teamOnly): builder.PrependBoolSlot(2, teamOnly, 0)
def QuickChatAddMessageIndex(builder, messageIndex): builder.PrependInt32Slot(3, messageIndex, 0)
def QuickChatAddTimeStamp(builder, timeStamp): builder.PrependFloat32Slot(4, timeStamp, 0.0)
def QuickChatEnd(builder): return builder.EndObject()
