{
    "title": "store/deploy sub agents",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.agent.StoreSubAgents",
    "type": "object",
    "required": [
        "controllerId",
        "subagents"
    ],
    "properties": {
        "controllerId": {
            "type": "string",
            "pattern": "^[^/\\<>?:\"|*]*$",
            "maxLength": 100,
            "minLength": 1
        },
        "agentId": {
            "type": "string",
            "pattern": "^[^<>]*$",
            "maxLength": 255,
            "minLength": 1
        },
        "subagents": {
            "type": "array",
            "uniqueItems": true,
            "minItems": 1,
            "items": {
                "javaType": "com.sos.joc.model.agent.SubAgent",
                "type": "object",
                "required": [
                    "subagentId",
                    "url",
                    "isDirector"
                ],
                "properties": {
                    "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",
                            "SECONDARY_DIRECTOR"
                        ]
                    },
                    "isClusterWatcher": {
                        "type": "boolean",
                        "default": false
                    },
                    "position": {
                        "type": "integer",
                        "minimum": 1
                    }
                },
                "additionalProperties": 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
                }
            }
        }
    },
    "additionalProperties": false
}