{
    "title": "executable script",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.inventory.model.job.ExecutableScript",
    "type": "object",
    "extends": {
        "javaType": "com.sos.inventory.model.job.Executable",
        "type": "object",
        "required": [
            "TYPE"
        ],
        "properties": {
            "TYPE": {
                "javaType": "com.sos.inventory.model.job.ExecutableType",
                "type": "string",
                "enum": [
                    "ShellScriptExecutable",
                    "ScriptExecutable",
                    "InternalExecutable"
                ],
                "javaEnumNames": [
                    "ShellScriptExecutable",
                    "ScriptExecutable",
                    "InternalExecutable"
                ]
            }
        },
        "additionalProperties": false
    },
    "required": [
        "script"
    ],
    "propertyOrder": [
        "TYPE",
        "script",
        "env",
        "v1Compatible"
    ],
    "description": "executable with fixed property 'TYPE':'ShellScriptExecutable'",
    "properties": {
        "script": {
            "type": "string",
            "minLength": 1
        },
        "env": {
            "description": "a map for arbitrary key-value pairs",
            "javaType": "com.sos.inventory.model.job.Environment",
            "type": "object",
            "additionalProperties": {
                "type": "string"
            }
        },
        "v1Compatible": {
            "type": "boolean",
            "default": false
        },
        "returnCodeMeaning": {
            "javaType": "com.sos.inventory.model.job.JobReturnCode",
            "type": "object",
            "extends": {
                "javaType": "com.sos.inventory.model.job.JobReturnCodeWarning",
                "type": "object",
                "properties": {
                    "warning": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        }
                    }
                },
                "additionalProperties": false
            },
            "oneOf": [
                {
                    "required": [
                        "success"
                    ]
                },
                {
                    "required": [
                        "failure"
                    ]
                }
            ],
            "properties": {
                "success": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                        "type": "integer"
                    }
                },
                "failure": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                        "type": "integer"
                    }
                }
            },
            "additionalProperties": false
        },
        "login": {
            "type": "object",
            "javaType": "com.sos.inventory.model.job.ExecutableScriptLogin",
            "required": [
                "credentialKey"
            ],
            "properties": {
                "credentialKey": {
                    "type": "string",
                    "minLength": 1
                },
                "withUserProfile": {
                    "type": "boolean",
                    "default": false
                }
            },
            "additionalProperties": false
        }
    },
    "additionalProperties": false
}