{
    "title": "register params",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.controller.RegisterParameters",
    "type": "object",
    "required": [
        "controllers"
    ],
    "properties": {
        "controllerId": {
            "type": "string",
            "pattern": "^[^/\\<>?:\"|*]*$",
            "maxLength": 100
        },
        "controllers": {
            "type": "array",
            "minItems": 1,
            "maxItems": 2,
            "items": {
                "type": "object",
                "javaType": "com.sos.joc.model.controller.RegisterParameter",
                "required": [
                    "url",
                    "role"
                ],
                "properties": {
                    "id": {
                        "type": "number",
                        "format": "utc-millisec",
                        "minimum": 0
                    },
                    "title": {
                        "type": "string"
                    },
                    "url": {
                        "description": "URI of a Controller",
                        "type": "string",
                        "format": "uri"
                    },
                    "clusterUrl": {
                        "description": "URI of a Controller",
                        "type": "string",
                        "format": "uri"
                    },
                    "role": {
                        "javaType": "com.sos.joc.model.controller.Role",
                        "type": "string",
                        "enum": [
                            "STANDALONE",
                            "PRIMARY",
                            "BACKUP"
                        ]
                    }
                }
            }
        },
        "clusterWatcher": {
            "javaType": "com.sos.joc.model.agent.Agent",
            "type": "object",
            "required": [
                "agentId",
                "agentName",
                "url"
            ],
            "properties": {
                "controllerId": {
                    "type": "string",
                    "pattern": "^[^/\\<>?:\"|*]*$",
                    "maxLength": 100
                },
                "agentId": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255,
                    "minLength": 1
                },
                "agentName": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255,
                    "minLength": 1
                },
                "agentNameAliases": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    }
                },
                "url": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255,
                    "minLength": 1
                },
                "isClusterWatcher": {
                    "type": "boolean",
                    "default": false
                },
                "disabled": {
                    "type": "boolean",
                    "default": false
                }
            }
        },
        "agents": {
            "type": "array",
            "minItems": 1,
            "items": {
                "javaType": "com.sos.joc.model.agent.Agent",
                "type": "object",
                "required": [
                    "agentId",
                    "agentName",
                    "url"
                ],
                "properties": {
                    "controllerId": {
                        "type": "string",
                        "pattern": "^[^/\\<>?:\"|*]*$",
                        "maxLength": 100
                    },
                    "agentId": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255,
                        "minLength": 1
                    },
                    "agentName": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255,
                        "minLength": 1
                    },
                    "agentNameAliases": {
                        "type": "array",
                        "uniqueItems": true,
                        "items": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        }
                    },
                    "url": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255,
                        "minLength": 1
                    },
                    "isClusterWatcher": {
                        "type": "boolean",
                        "default": false
                    },
                    "disabled": {
                        "type": "boolean",
                        "default": false
                    }
                }
            }
        },
        "auditLog": {
            "javaType": "com.sos.joc.model.audit.AuditParams",
            "type": "object",
            "properties": {
                "comment": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255
                },
                "timeSpent": {
                    "type": "integer",
                    "minimum": 0
                },
                "ticketLink": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255
                }
            }
        }
    }
}