{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "id": "http://snowflakepowe.red/stone/schema/controller",
    "type": "object",
    "additionalProperties": false,
    "definitions": {
        "ControllerElement": {
            "type": "object",
            "id": "http://snowflakepowe.red/stone/schema/controller/definitions/ControllerElement",
            "properties": {
                "Label": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/definitions/ControllerElement/Label",
                    "type": "string"
                },
                "Type": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/definitions/ControllerElement/Type",
                    "type": "string",
                    "enum": [
                        "Button",
                        "Directional",
                        "AxisPositive",
                        "AxisNegative",
                        "Trigger",
                        "Rumble",
                        "Keyboard",
                        "Pointer",
                        "PointerAxisPositive",
                        "PointerAxisNegative",
                        "Touchscreen",
                        "Gyroscope"
                    ]
                }
            },
            "required": [
                "Label",
                "Type"
            ]
        }
    },
    "properties": {
        "LayoutID": {
            "id": "http://snowflakepowe.red/stone/schema/controller/LayoutID",
            "type": "string",
            "pattern": "^[A-Z0-9_]+(_CONTROLLER|_DEVICE|_LAYOUT)$"
        },
        "FriendlyName": {
            "id": "http://snowflakepowe.red/stone/schema/controller/FriendlyName",
            "type": "string"
        },
        "Platforms": {
            "id": "http://snowflakepowe.red/stone/schema/controller/Platforms",
            "type": "array",
            "minItems": 1,
            "_uniqueItems": true,
            "additionalItems": true,
            "items": {
                "id": "http://snowflakepowe.red/stone/schema/controller/Platforms/0",
                "type": "string"
            }
        },
        "Layout": {
            "id": "http://snowflakepowe.red/stone/schema/controller/Layout",
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "ButtonA": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/ButtonA",
                    "$ref": "#/definitions/ControllerElement"
                },
                "ButtonB": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/ButtonB",
                    "$ref": "#/definitions/ControllerElement"
                },
                "ButtonC": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/ButtonC",
                    "$ref": "#/definitions/ControllerElement"
                },
                "ButtonX": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/ButtonX",
                    "$ref": "#/definitions/ControllerElement"
                },
                "ButtonY": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/ButtonY",
                    "$ref": "#/definitions/ControllerElement"
                },
                "ButtonZ": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/ButtonZ",
                    "$ref": "#/definitions/ControllerElement"
                },
                "ButtonL": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/ButtonL",
                    "$ref": "#/definitions/ControllerElement"
                },
                "ButtonR": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/ButtonR",
                    "$ref": "#/definitions/ControllerElement"
                },
                "ButtonStart": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/ButtonStart",
                    "$ref": "#/definitions/ControllerElement"
                },
                "ButtonSelect": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/ButtonSelect",
                    "$ref": "#/definitions/ControllerElement"
                },
                "ButtonGuide": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/ButtonGuide",
                    "$ref": "#/definitions/ControllerElement"
                },
                "ButtonClickL": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/ButtonClickL",
                    "$ref": "#/definitions/ControllerElement"
                },
                "ButtonClickR": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/ButtonClickR",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button0": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button0",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button1": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button1",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button2": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button2",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button3": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button3",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button4": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button4",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button5": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button5",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button6": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button6",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button7": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button7",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button8": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button8",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button9": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button9",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button10": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button10",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button11": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button11",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button12": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button12",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button13": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button13",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button14": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button14",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button15": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button15",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button16": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button16",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button17": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button17",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button18": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button18",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button19": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button19",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button20": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button20",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button21": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button21",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button22": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button22",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button23": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button23",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button24": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button24",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button25": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button25",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button26": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button26",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button27": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button27",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button28": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button28",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button29": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button29",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button30": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button30",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Button31": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Button31",
                    "$ref": "#/definitions/ControllerElement"
                },
                "DirectionalN": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/DirectionalN",
                    "$ref": "#/definitions/ControllerElement"
                },
                "DirectionalE": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/DirectionalE",
                    "$ref": "#/definitions/ControllerElement"
                },
                "DirectionalS": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/DirectionalS",
                    "$ref": "#/definitions/ControllerElement"
                },
                "DirectionalW": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/DirectionalW",
                    "$ref": "#/definitions/ControllerElement"
                },
                "DirectionalNE": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/DirectionalNE",
                    "$ref": "#/definitions/ControllerElement"
                },
                "DirectionalNW": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/DirectionalNW",
                    "$ref": "#/definitions/ControllerElement"
                },
                "DirectionalSE": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/DirectionalSE",
                    "$ref": "#/definitions/ControllerElement"
                },
                "DirectionalSW": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/DirectionalSW",
                    "$ref": "#/definitions/ControllerElement"
                },
                "TriggerLeft": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/TriggerLeft",
                    "$ref": "#/definitions/ControllerElement"
                },
                "TriggerRight": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/TriggerRight",
                    "$ref": "#/definitions/ControllerElement"
                },
                "AxisLeftAnalogPositiveX": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/AxisLeftAnalogPositiveX",
                    "$ref": "#/definitions/ControllerElement"
                },
                "AxisLeftAnalogNegativeX": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/AxisLeftAnalogNegativeX",
                    "$ref": "#/definitions/ControllerElement"
                },
                "AxisLeftAnalogPositiveY": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/AxisLeftAnalogPositiveY",
                    "$ref": "#/definitions/ControllerElement"
                },
                "AxisLeftAnalogNegativeY": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/AxisLeftAnalogNegativeY",
                    "$ref": "#/definitions/ControllerElement"
                },
                "AxisRightAnalogPositiveX": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/AxisRightAnalogPositiveX",
                    "$ref": "#/definitions/ControllerElement"
                },
                "AxisRightAnalogNegativeX": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/AxisRightAnalogNegativeX",
                    "$ref": "#/definitions/ControllerElement"
                },
                "AxisRightAnalogPositiveY": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/AxisRightAnalogPositiveY",
                    "$ref": "#/definitions/ControllerElement"
                },
                "AxisRightAnalogNegativeY": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/AxisRightAnalogNegativeY",
                    "$ref": "#/definitions/ControllerElement"
                },
                "RumbleBig": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/RumbleBig",
                    "$ref": "#/definitions/ControllerElement"
                },
                "RumbleSmall": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/RumbleSmall",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Pointer2D": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Pointer2D",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Pointer3D": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Pointer3D",
                    "$ref": "#/definitions/ControllerElement"
                },
                "PointerAxisPositiveX": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/PointerAxisPositiveX",
                    "$ref": "#/definitions/ControllerElement"
                },
                "PointerAxisNegativeX": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/PointerAxisNegativeX",
                    "$ref": "#/definitions/ControllerElement"
                },
                "PointerAxisPositiveY": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/PointerAxisPositiveY",
                    "$ref": "#/definitions/ControllerElement"
                },
                "PointerAxisNegativeY": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/PointerAxisNegativeY",
                    "$ref": "#/definitions/ControllerElement"
                },
                "PointerAxisPositiveZ": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/PointerAxisPositiveZ",
                    "$ref": "#/definitions/ControllerElement"
                },
                "PointerAxisNegativeZ": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/PointerAxisNegativeZ",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Keyboard": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Keyboard",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Touchscreen": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Touchscreen",
                    "$ref": "#/definitions/ControllerElement"
                },
                "Gyroscope": {
                    "id": "http://snowflakepowe.red/stone/schema/controller/Layout/Gyroscope",
                    "$ref": "#/definitions/ControllerElement"
                }
            }
        }
    },
    "required": [
        "LayoutID",
        "FriendlyName",
        "Platforms",
        "Layout"
    ]
}