{
    "title": "report run",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.reporting.RunItem",
    "type": "object",
    "extends": {
        "javaType": "com.sos.joc.model.reporting.Report",
        "type": "object",
        "extends": {
            "javaType": "com.sos.inventory.model.report.Report",
            "type": "object",
            "javaInterfaces": [
                "com.sos.joc.model.common.IConfigurationObject",
                "com.sos.joc.model.common.IReleaseObject",
                "com.sos.inventory.model.common.IInventoryObject"
            ],
            "required": [
                "templateName",
                "frequencies",
                "hits",
                "monthFrom"
            ],
            "properties": {
                "version": {
                    "description": "inventory repository version",
                    "type": "string",
                    "pattern": "[0-9]+\\.[0-9]+\\.[0-9]+",
                    "default": "1.5.0",
                    "maxLength": 10
                },
                "title": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255
                },
                "templateName": {
                    "javaType": "com.sos.inventory.model.report.TemplateId",
                    "type": "string",
                    "enum": [
                        "WORKFLOWS_FREQUENTLY_FAILED",
                        "JOBS_FREQUENTLY_FAILED",
                        "AGENTS_PARALLEL_JOB_EXECUTIONS",
                        "JOBS_HIGH_LOW_EXECUTION_PERIODS",
                        "JOBS_EXECUTIONS_FREQUENCY",
                        "ORDERS_EXECUTIONS_FREQUENCY",
                        "WORKFLOWS_LONGEST_EXECUTION_TIMES",
                        "JOBS_LONGEST_EXECUTION_TIMES",
                        "PERIODS_MOST_ORDER_EXECUTIONS",
                        "PERIODS_MOST_JOB_EXECUTIONS"
                    ]
                },
                "frequencies": {
                    "type": "array",
                    "uniqueItems": true,
                    "minItems": 1,
                    "items": {
                        "javaType": "com.sos.inventory.model.report.Frequency",
                        "type": "string",
                        "enum": [
                            "WEEKLY",
                            "TWO_WEEKS",
                            "MONTHLY",
                            "THREE_MONTHS",
                            "SIX_MONTHS",
                            "YEARLY",
                            "THREE_YEARS"
                        ]
                    }
                },
                "hits": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100
                },
                "controllerId": {
                    "type": "string",
                    "pattern": "^[^/\\<>?!&:;()\"|*^]*$",
                    "maxLength": 100
                },
                "monthFrom": {
                    "type": "string",
                    "pattern": "^([1-9][0-9]*\\s*[MmYy]|\\d{4}-(0[1-9]|1[0-2]))$"
                },
                "monthTo": {
                    "type": "string",
                    "pattern": "^([1-9][0-9]*\\s*[MmYy]|\\d{4}-(0[1-9]|1[0-2]))$"
                }
            },
            "additionalProperties": false
        },
        "properties": {
            "path": {
                "description": "absolute path of an object.",
                "type": "string",
                "pattern": "^(/|(/[^/\\\\<>?:\"|*]+)+)$",
                "maxLength": 255,
                "minLength": 1
            }
        },
        "additionalProperties": false
    },
    "properties": {
        "runId": {
            "type": "number",
            "format": "utc-millisec",
            "minimum": 0
        },
        "state": {
            "javaType": "com.sos.joc.model.reporting.ReportRunState",
            "type": "object",
            "required": [
                "severity",
                "_text"
            ],
            "properties": {
                "severity": {
                    "description": "0=SUCCESSFUL, 1=FAILED, 2=IN_PROGRESS, 3=UNKNOWN",
                    "type": "integer"
                },
                "_text": {
                    "javaType": "com.sos.joc.model.reporting.ReportRunStateText",
                    "type": "string",
                    "enum": [
                        "SUCCESSFUL",
                        "FAILED",
                        "IN_PROGRESS",
                        "UNKNOWN"
                    ]
                }
            },
            "additionalProperties": false
        },
        "errorText": {
            "type": "string"
        },
        "modified": {
            "description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
            "type": "string",
            "format": "date-time"
        }
    },
    "additionalProperties": false
}