{
    "title": "jobscheduler with delivry date (volatile part)",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.jobscheduler.JobSchedulerV200",
    "type": "object",
    "required": [
        "deliveryDate",
        "jobscheduler"
    ],
    "properties": {
        "deliveryDate": {
            "description": "Current date of the JOC server/REST service. Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ",
            "type": "string",
            "format": "date-time"
        },
        "jobscheduler": {
            "javaType": "com.sos.joc.model.jobscheduler.JobSchedulerV",
            "type": "object",
            "oneOf": [
                {
                    "description": "if state.text=unreachable",
                    "required": [
                        "jobschedulerId",
                        "host",
                        "port",
                        "state"
                    ]
                },
                {
                    "required": [
                        "surveyDate",
                        "jobschedulerId",
                        "host",
                        "port",
                        "state",
                        "startedAt"
                    ]
                }
            ],
            "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"
                },
                "jobschedulerId": {
                    "type": "string"
                },
                "host": {
                    "type": "string"
                },
                "port": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 65535
                },
                "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"
                            ]
                        }
                    }
                },
                "url": {
                    "type": "string"
                },
                "clusterType": {
                    "javaType": "com.sos.joc.model.jobscheduler.ClusterMemberType",
                    "type": "object",
                    "required": [
                        "_type"
                    ],
                    "properties": {
                        "_type": {
                            "javaType": "com.sos.joc.model.jobscheduler.ClusterType",
                            "type": "string",
                            "description": "Possible values are: 'standalone','active','passive'; JobScheduler doesn't run in a cluster (standalone) or is member of an active (distributed orders) or passive cluster (backup)",
                            "enum": [
                                "standalone",
                                "active",
                                "passive"
                            ]
                        },
                        "precedence": {
                            "type": "integer",
                            "minimum": 0
                        }
                    }
                },
                "startedAt": {
                    "description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
                    "type": "string",
                    "format": "date-time"
                },
                "error": {
                    "javaType": "com.sos.joc.model.common.Err",
                    "type": "object",
                    "required": [
                        "code",
                        "message"
                    ],
                    "properties": {
                        "code": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        },
                        "message": {
                            "type": "string"
                        }
                    }
                }
            }
        }
    }
}