{
    "title": "jobscheduler agent (volatile part)",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.jobscheduler.AgentV",
    "type": "object",
    "required": [
        "surveyDate",
        "url",
        "state"
    ],
    "properties": {
        "surveyDate": {
            "description": "Current date of the JobScheduler Master/Agent. Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ",
            "type": "string",
            "format": "date-time"
        },
        "url": {
            "description": "url can be different against host/port if agent behind a proxy",
            "type": "string",
            "pattern": "^https?://.+$"
        },
        "state": {
            "javaType": "com.sos.joc.model.jobscheduler.JobSchedulerState",
            "type": "object",
            "required": [
                "severity",
                "_text"
            ],
            "properties": {
                "severity": {
                    "description": "0=running/starting, 1=paused, 3=waiting_for_activation/terminating, 2=waiting_for_database/dead/unreachable",
                    "type": "integer"
                },
                "_text": {
                    "javaType": "com.sos.joc.model.jobscheduler.JobSchedulerStateText",
                    "type": "string",
                    "enum": [
                        "STARTING",
                        "RUNNING",
                        "PAUSED",
                        "WAITING_FOR_ACTIVATION",
                        "TERMINATING",
                        "WAITING_FOR_DATABASE",
                        "DEAD",
                        "UNREACHABLE",
                        "UNKNOWN_AGENT"
                    ]
                }
            }
        },
        "startedAt": {
            "description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
            "type": "string",
            "format": "date-time"
        },
        "runningTasks": {
            "type": "integer",
            "minimum": 0
        }
    }
}