{
    "title": "JobScheduler cluster member",
    "id": "schemas/jobscheduler/clusterMember",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.jobscheduler.ClusterMember",
    "type": "object",
    "required": [
        "version",
        "host",
        "port",
        "state",
        "startedAt"
    ],
    "properties": {
        "version": {
            "type": "string"
        },
        "host": {
            "type": "string"
        },
        "port": {
            "id": "schemas/common/port",
            "type": "integer",
            "minimum": 0,
            "maximum": 65535
        },
        "state": {
            "id": "schemas/jobscheduler/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": {
                    "id": "schemas/jobscheduler/stateText",
                    "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": {
            "id": "schemas/common/timestamp",
            "description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
            "type": "string",
            "format": "date-time"
        },
        "precedence": {
            "description": "Only defined for passive cluster (0=primary, 1=secondary, ...)",
            "type": "integer",
            "minimum": 0
        }
    }
}