{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "additionalPropertes": false,
    "description": "Add a new activation to the activations list",
    "properties": {
        "action:": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "additionalProperties": false,
            "description": "Describes the map table entries",
            "patternProperties": {
                "^[a-zA-Z0-9\\-_]+$": {
                    "description": "Unique identifiers of the outputs",
                    "patternProperties": {
                        "^(0|([1-9][0-9]*))$": {
                            "description": "Indexes of channels",
                            "properties": {
                                "channel_index": {
                                    "description": "Index of the input channel to be routed. null for unrouted.",
                                    "type": [
                                        "integer",
                                        "null"
                                    ]
                                },
                                "input": {
                                    "description": "Unique identifier of the input to which the channel to be routed belongs. null for unrouted.",
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                }
                            },
                            "required": [
                                "input",
                                "channel_index"
                            ]
                        }
                    }
                }
            },
            "title": "Map table entries",
            "type": "object"
        },
        "activation": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "additionalProperties": false,
            "description": "Parameters concerned with activation of the channel mapping",
            "properties": {
                "mode": {
                    "description": "Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), or scheduled_relative (when internal clock >= time of message receipt + requested_time)",
                    "enum": [
                        "activate_immediate",
                        "activate_scheduled_absolute",
                        "activate_scheduled_relative"
                    ],
                    "type": "string"
                },
                "requested_time": {
                    "anyOf": [
                        {
                            "pattern": "^[0-9]+:[0-9]+$",
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation"
                }
            },
            "required": [
                "mode"
            ],
            "title": "Activation resource",
            "type": "object"
        }
    },
    "required": [
        "activation",
        "action"
    ],
    "title": "Activations endpoint",
    "type": "object"
}
