{
    "title": "agent",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.agent.Agent",
    "type": "object",
    "required": [
        "agentId",
        "agentName",
        "director"
    ],
    "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
            }
        },
        "director": {
            "javaType": "com.sos.joc.model.agent.SubAgent",
            "type": "object",
            "required": [
                "subagentId",
                "url"
            ],
            "properties": {
                "controllerId": {
                    "type": "string",
                    "pattern": "^[^/\\<>?:\"|*]*$",
                    "maxLength": 100
                },
                "agentId": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255,
                    "minLength": 1
                },
                "subagentId": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255,
                    "minLength": 1
                },
                "url": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255,
                    "minLength": 1
                },
                "isDirector": {
                    "javaType": "com.sos.joc.model.agent.SubagentDirectorType",
                    "type": "string",
                    "enum": [
                        "NO_DIRECTOR",
                        "PRIMARY_DIRECTOR",
                        "STANDBY_DIRECTOR"
                    ],
                    "default": "NO_DIRECTOR"
                }
            }
        },
        "standbyDirector": {
            "javaType": "com.sos.joc.model.agent.SubAgent",
            "type": "object",
            "required": [
                "subagentId",
                "url"
            ],
            "properties": {
                "controllerId": {
                    "type": "string",
                    "pattern": "^[^/\\<>?:\"|*]*$",
                    "maxLength": 100
                },
                "agentId": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255,
                    "minLength": 1
                },
                "subagentId": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255,
                    "minLength": 1
                },
                "url": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255,
                    "minLength": 1
                },
                "isDirector": {
                    "javaType": "com.sos.joc.model.agent.SubagentDirectorType",
                    "type": "string",
                    "enum": [
                        "NO_DIRECTOR",
                        "PRIMARY_DIRECTOR",
                        "STANDBY_DIRECTOR"
                    ],
                    "default": "NO_DIRECTOR"
                }
            }
        },
        "isClusterWatcher": {
            "type": "boolean",
            "default": false
        },
        "disabled": {
            "type": "boolean",
            "default": false
        }
    }
}