{
    "type": "object",
    "$id": "host_update.schema.json",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Host Handlers Input",
    "properties": {
        "update": {
            "description": "All information related to the update process of a host (containing all authentication repositories linked to that host)",
            "type": "object",
            "title": "Update data",
            "properties": {
                "changed": {
                    "title": "Change Indicator",
                    "description": "Indicates if at least one of the host's repositories was updated (will be false if pull was successful, but there were no new commits)",
                    "type": "boolean"
                },
                "event": {
                    "title": "Update Event",
                    "description": "Event type - succeeded, changed, unchanged, failed, completed",
                    "type": "string"
                },
                "host_name": {
                    "title": "Name",
                    "description": "Name of the host whose update was attempted",
                    "type": "string"
                },
                "error_msg": {
                    "title": "Error message",
                    "description": "Error message that was raised while updating the host's repositories",
                    "type": "string"
                },
                "auth_repos": {
                    "title": "Authentication Repositories",
                    "type": "array",
                    "items": {
                        "$ref": "repo_update.schema.json#"
                    }
                },
                "custom": {
                    "title": "Custom",
                    "description": "Additional host data. Not used by the framework",
                    "type": "object"
                }
            },
            "required": [
                "changed",
                "event",
                "host_name",
                "error_msg",
                "auth_repos"
            ],
            "additionalProperties": false
        },
        "state": {
            "title": "State",
            "description": "Persistent and transient states",
            "type": "object",
            "properties": {
                "transient": {
                    "title": "Transient",
                    "type": "object",
                    "description": "Transient data is arbitrary data passed from one script execution to the next one. It is discarded at the end of the process"
                },
                "persistent": {
                    "title": "Persistent",
                    "type": "object",
                    "description": "Persistent data is arbitrary date passed from one script execution the next one and stored to disk (to a file called persistent.json directly inside the library root)"
                }
            }
        },
        "config": {
            "title": "Configuration data",
            "description": "Additional configuration, loaded from config.json located inside the library root",
            "type": "object"
        }
    },
    "required": [
        "update"
    ],
    "additionalProperties": false
}