{
    "title": "JobTemplate used by Workflows",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.jobtemplate.JobTemplateUsedBy",
    "type": "object",
    "required": [
        "path"
    ],
    "properties": {
        "name": {
            "type": "string",
            "pattern": "^[^<>]*$",
            "maxLength": 255
        },
        "path": {
            "description": "absolute path of an object.",
            "type": "string",
            "pattern": "^(/|(/[^/\\\\<>?:\"|*]+)+)$",
            "maxLength": 255,
            "minLength": 1
        },
        "hash": {
            "type": "string",
            "pattern": "^[^<>]*$",
            "maxLength": 255
        },
        "workflows": {
            "type": "array",
            "uniqueItems": true,
            "items": {
                "type": "object",
                "javaType": "com.sos.joc.model.jobtemplate.JobTemplateUsedByWorkflow",
                "required": [
                    "path"
                ],
                "properties": {
                    "name": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    },
                    "path": {
                        "description": "absolute path of an object.",
                        "type": "string",
                        "pattern": "^(/|(/[^/\\\\<>?:\"|*]+)+)$",
                        "maxLength": 255,
                        "minLength": 1
                    },
                    "deployed": {
                        "type": "boolean",
                        "default": false
                    },
                    "state": {
                        "javaType": "com.sos.joc.model.jobtemplate.JobTemplateWorkflowState",
                        "type": "object",
                        "required": [
                            "severity",
                            "_text"
                        ],
                        "properties": {
                            "severity": {
                                "description": "6=IN_SYNC, 5=NOT_IN_SYNC",
                                "type": "integer"
                            },
                            "_text": {
                                "javaType": "com.sos.joc.model.jobtemplate.JobTemplateWorkflowStateText",
                                "type": "string",
                                "enum": [
                                    "IN_SYNC",
                                    "NOT_IN_SYNC"
                                ]
                            }
                        },
                        "additionalProperties": false
                    },
                    "jobs": {
                        "type": "object",
                        "javaType": "com.sos.joc.model.jobtemplate.JobTemplateUsedByJobs",
                        "additionalProperties": {
                            "javaType": "com.sos.joc.model.jobtemplate.JobTemplateState",
                            "type": "object",
                            "required": [
                                "severity",
                                "_text"
                            ],
                            "properties": {
                                "severity": {
                                    "description": "6=IN_SYNC, 5=NOT_IN_SYNC, 11=DELETED, 2=UNKNOWN",
                                    "type": "integer"
                                },
                                "_text": {
                                    "javaType": "com.sos.joc.model.jobtemplate.JobTemplateStateText",
                                    "type": "string",
                                    "enum": [
                                        "IN_SYNC",
                                        "NOT_IN_SYNC",
                                        "DELETED",
                                        "UNKNOWN"
                                    ]
                                }
                            },
                            "additionalProperties": false
                        }
                    }
                },
                "additionalProperties": false
            }
        }
    },
    "additionalProperties": false
}