# automatically generated by the FlatBuffers compiler, do not modify

# namespace: Packets

class ActionParam(object):
    NONE = 0
    Actions_SleepParam = 1
    Actions_InputKeyParam = 2
    Actions_InputMouseParam = 3
    Actions_InputSetTextParam = 4
    Actions_MovePlayerParam = 5
    Actions_AppQuitParam = 6

def ActionParamCreator(unionType, table):
    from flatbuffers.table import Table
    if not isinstance(table, Table):
        return None
    if unionType == ActionParam().Actions_SleepParam:
        import gamium.protocol.generated.Packets.Actions.SleepParam
        return gamium.protocol.generated.Packets.Actions.SleepParam.SleepParamT.InitFromBuf(table.Bytes, table.Pos)
    if unionType == ActionParam().Actions_InputKeyParam:
        import gamium.protocol.generated.Packets.Actions.InputKeyParam
        return gamium.protocol.generated.Packets.Actions.InputKeyParam.InputKeyParamT.InitFromBuf(table.Bytes, table.Pos)
    if unionType == ActionParam().Actions_InputMouseParam:
        import gamium.protocol.generated.Packets.Actions.InputMouseParam
        return gamium.protocol.generated.Packets.Actions.InputMouseParam.InputMouseParamT.InitFromBuf(table.Bytes, table.Pos)
    if unionType == ActionParam().Actions_InputSetTextParam:
        import gamium.protocol.generated.Packets.Actions.InputSetTextParam
        return gamium.protocol.generated.Packets.Actions.InputSetTextParam.InputSetTextParamT.InitFromBuf(table.Bytes, table.Pos)
    if unionType == ActionParam().Actions_MovePlayerParam:
        import gamium.protocol.generated.Packets.Actions.MovePlayerParam
        return gamium.protocol.generated.Packets.Actions.MovePlayerParam.MovePlayerParamT.InitFromBuf(table.Bytes, table.Pos)
    if unionType == ActionParam().Actions_AppQuitParam:
        import gamium.protocol.generated.Packets.Actions.AppQuitParam
        return gamium.protocol.generated.Packets.Actions.AppQuitParam.AppQuitParamT.InitFromBuf(table.Bytes, table.Pos)
    return None
