{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "additionalProperties": true,
    "definitions": {
        "gateState": {
            "description": "for actions that are apply gates, true if the gate has been passed for this specific candidate + job, false if it was failed - this field should only be present when there is a result",
            "type": "boolean"
        },
        "name": {
            "description": "fixed name for this action, containing only lower case alpha, digits and '-' characters, length <= 30",
            "type": "string"
        }
    },
    "description": "the logical information needed to populate a button/control at runtime",
    "properties": {
        "backgroundColor": {
            "description": "the color that the button's background should be rendered in, in 6 character hex format without leading #, e.g. 00ff00",
            "type": "string"
        },
        "disabled": {
            "description": "true if the button/control should appear disabled, i.e. the action can be seen but not performed",
            "type": "boolean"
        },
        "gateState": {
            "$ref": "#/definitions/gateState"
        },
        "imageUri": {
            "_format": "uri",
            "description": "the url of an image to be displayed for this action (i.e. instead of a dynamically set up button)",
            "type": "string"
        },
        "label": {
            "description": "a string indicating what the action will do, used as the label on its button/control",
            "type": "string"
        },
        "name": {
            "$ref": "#/definitions/name",
            "description": "fixed name for this action, containing only lower case alpha, digits and '-' characters, length <= 30"
        },
        "textColor": {
            "description": "the color that the button's text should be rendered in, in 6 character hex format without leading #, e.g. 00ff00",
            "type": "string"
        },
        "type": {
            "enum": [
                "image",
                "button"
            ]
        },
        "uri": {
            "_format": "uri",
            "description": "the url that the button/control will redirect the user to when pressed, or use to populate an iframe inside a modal",
            "type": "string"
        }
    },
    "required": [
        "name",
        "label",
        "uri",
        "disabled"
    ],
    "type": "object"
}