{
    "title": "jobscheduler masters (permanent part)",
    "id": "schemas/jobscheduler/masters_p",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.jobscheduler.MastersP",
    "type": "object",
    "required": [
        "deliveryDate",
        "masters"
    ],
    "properties": {
        "deliveryDate": {
            "id": "schemas/common/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"
        },
        "masters": {
            "type": "array",
            "items": {
                "id": "schemas/jobscheduler/jobscheduler_p",
                "javaType": "com.sos.joc.model.jobscheduler.JobSchedulerP",
                "type": "object",
                "required": [
                    "surveyDate",
                    "jobschedulerId",
                    "version",
                    "host",
                    "port",
                    "os",
                    "timeZone",
                    "clusterType",
                    "startedAt"
                ],
                "properties": {
                    "surveyDate": {
                        "id": "schemas/common/surveyDate_p",
                        "description": "Date of the inventory data. Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ",
                        "type": "string",
                        "format": "date-time"
                    },
                    "jobschedulerId": {
                        "type": "string"
                    },
                    "version": {
                        "type": "string"
                    },
                    "host": {
                        "type": "string"
                    },
                    "port": {
                        "id": "schemas/common/port",
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 65535
                    },
                    "os": {
                        "id": "schemas/jobscheduler/os",
                        "javaType": "com.sos.joc.model.jobscheduler.OperatingSystem",
                        "type": "object",
                        "required": [
                            "name",
                            "architecture",
                            "distribution"
                        ],
                        "properties": {
                            "name": {
                                "description": "Windows, Linux, AIX, Solaris, other",
                                "type": "string"
                            },
                            "architecture": {
                                "type": "string"
                            },
                            "distribution": {
                                "description": "e.g. Windows 2012, CentOS Linux release 7.2.1511 (Core)",
                                "type": "string"
                            }
                        }
                    },
                    "timeZone": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string"
                    },
                    "clusterType": {
                        "id": "schemas/jobscheduler/clusterMemberType",
                        "javaType": "com.sos.joc.model.jobscheduler.ClusterMemberType",
                        "type": "object",
                        "required": [
                            "_type"
                        ],
                        "properties": {
                            "_type": {
                                "id": "schemas/jobscheduler/clusterType",
                                "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": {
                                "id": "schemas/common/nonNegativeInteger",
                                "type": "integer",
                                "minimum": 0
                            }
                        }
                    },
                    "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"
                    },
                    "supervisor": {
                        "id": "schemas/jobscheduler/urlParam",
                        "javaType": "com.sos.joc.model.jobscheduler.HostPortParameter",
                        "type": "object",
                        "properties": {
                            "jobschedulerId": {
                                "type": "string"
                            },
                            "host": {
                                "type": "string"
                            },
                            "port": {
                                "id": "schemas/common/port",
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 65535
                            },
                            "auditLog": {
                                "id": "schemas/common/auditParams",
                                "javaType": "com.sos.joc.model.audit.AuditParams",
                                "type": "object",
                                "properties": {
                                    "comment": {
                                        "type": "string"
                                    },
                                    "timeSpent": {
                                        "id": "schemas/common/nonNegativeInteger",
                                        "type": "integer",
                                        "minimum": 0
                                    },
                                    "ticketLink": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}