{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "definitions": {
        "CodeConfigurationSchema": {
            "properties": {
                "code": {
                    "title": "code",
                    "type": "string"
                },
                "$schema": {
                    "title": "$schema",
                    "type": "string",
                    "readonly": true
                },
                "scoring_script": {
                    "title": "scoring_script",
                    "type": "string"
                }
            },
            "type": "object",
            "additionalProperties": false
        },
        "CreationContextSchema": {
            "properties": {
                "created_at": {
                    "title": "created_at",
                    "type": "string",
                    "format": "date-time"
                },
                "created_by": {
                    "title": "created_by",
                    "type": "string"
                },
                "created_by_type": {
                    "title": "created_by_type",
                    "type": "string"
                },
                "last_modified_at": {
                    "title": "last_modified_at",
                    "type": "string",
                    "format": "date-time"
                },
                "last_modified_by": {
                    "title": "last_modified_by",
                    "type": "string"
                },
                "last_modified_by_type": {
                    "title": "last_modified_by_type",
                    "type": "string"
                }
            },
            "type": "object",
            "additionalProperties": false
        },
        "EnvironmentSchema": {
            "properties": {
                "auto_delete_setting": {
                    "type": "object",
                    "$ref": "#/definitions/AutoDeleteSettingSchema"
                },
                "build": {
                    "type": "object",
                    "$ref": "#/definitions/BuildContextSchema",
                    "description": "Docker build context to create the environment. Mutually exclusive with image"
                },
                "conda_file": {
                    "anyOf": [
                        {
                            "title": "conda_file",
                            "type": "string"
                        },
                        {
                            "title": "conda_file",
                            "type": "string"
                        }
                    ]
                },
                "creation_context": {
                    "type": "object",
                    "$ref": "#/definitions/CreationContextSchema"
                },
                "datastore": {
                    "title": "datastore",
                    "type": "string",
                    "description": "Name of the datastore to upload to.",
                    "arm_type": "datastores"
                },
                "description": {
                    "title": "description",
                    "type": "string"
                },
                "id": {
                    "anyOf": [
                        {
                            "type": "string",
                            "pattern": "^azureml://registries/.*",
                            "arm_type": null,
                            "title": "id",
                            "readonly": true
                        },
                        {
                            "type": "string",
                            "pattern": "^azureml:.+",
                            "arm_type": "environments",
                            "title": "id",
                            "readonly": true
                        }
                    ]
                },
                "image": {
                    "title": "image",
                    "type": "string"
                },
                "inference_config": {
                    "type": "object",
                    "$ref": "#/definitions/InferenceConfigSchema"
                },
                "intellectual_property": {
                    "type": "object",
                    "$ref": "#/definitions/IntellectualPropertySchema"
                },
                "latest_version": {
                    "title": "latest_version",
                    "type": "string",
                    "readonly": true
                },
                "name": {
                    "title": "name",
                    "type": "string"
                },
                "os_type": {
                    "type": "string",
                    "enum": [
                        "linux",
                        "windows"
                    ],
                    "title": "os_type"
                },
                "$schema": {
                    "title": "$schema",
                    "type": "string",
                    "readonly": true
                },
                "tags": {
                    "title": "tags",
                    "type": "object",
                    "additionalProperties": {}
                },
                "version": {
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "integer"
                        }
                    ],
                    "title": "version"
                }
            },
            "type": "object",
            "required": [
                "name"
            ],
            "additionalProperties": false
        },
        "AutoDeleteSettingSchema": {
            "properties": {
                "condition": {
                    "type": "string",
                    "enum": [
                        "created_greater_than",
                        "last_accessed_greater_than"
                    ],
                    "title": "condition"
                },
                "value": {
                    "title": "value",
                    "type": "string"
                }
            },
            "type": "object",
            "additionalProperties": false
        },
        "BuildContextSchema": {
            "properties": {
                "dockerfile_path": {
                    "title": "dockerfile_path",
                    "type": "string"
                },
                "path": {
                    "anyOf": [
                        {
                            "type": "string",
                            "arm_type": "local_path",
                            "title": "path"
                        },
                        {
                            "title": "path",
                            "type": "string"
                        }
                    ]
                }
            },
            "type": "object",
            "additionalProperties": false
        },
        "InferenceConfigSchema": {
            "properties": {
                "liveness_route": {
                    "type": "object",
                    "$ref": "#/definitions/RouteSchema"
                },
                "readiness_route": {
                    "type": "object",
                    "$ref": "#/definitions/RouteSchema"
                },
                "scoring_route": {
                    "type": "object",
                    "$ref": "#/definitions/RouteSchema"
                }
            },
            "type": "object",
            "required": [
                "liveness_route",
                "readiness_route",
                "scoring_route"
            ],
            "additionalProperties": false
        },
        "RouteSchema": {
            "properties": {
                "path": {
                    "title": "path",
                    "type": "string"
                },
                "port": {
                    "title": "port",
                    "type": "number",
                    "format": "integer"
                }
            },
            "type": "object",
            "required": [
                "path",
                "port"
            ],
            "additionalProperties": false
        },
        "IntellectualPropertySchema": {
            "properties": {
                "protection_level": {
                    "type": "string",
                    "enum": [
                        "all",
                        "none"
                    ],
                    "title": "protection_level"
                },
                "publisher": {
                    "title": "publisher",
                    "type": "string"
                }
            },
            "type": "object",
            "additionalProperties": false
        },
        "AnonymousEnvironmentSchema": {
            "properties": {
                "auto_delete_setting": {
                    "type": "object",
                    "$ref": "#/definitions/AutoDeleteSettingSchema"
                },
                "build": {
                    "type": "object",
                    "$ref": "#/definitions/BuildContextSchema",
                    "description": "Docker build context to create the environment. Mutually exclusive with image"
                },
                "conda_file": {
                    "anyOf": [
                        {
                            "title": "conda_file",
                            "type": "string"
                        },
                        {
                            "title": "conda_file",
                            "type": "string"
                        }
                    ]
                },
                "creation_context": {
                    "type": "object",
                    "$ref": "#/definitions/CreationContextSchema"
                },
                "datastore": {
                    "title": "datastore",
                    "type": "string",
                    "description": "Name of the datastore to upload to.",
                    "arm_type": "datastores"
                },
                "description": {
                    "title": "description",
                    "type": "string"
                },
                "id": {
                    "anyOf": [
                        {
                            "type": "string",
                            "pattern": "^azureml://registries/.*",
                            "arm_type": null,
                            "title": "id",
                            "readonly": true
                        },
                        {
                            "type": "string",
                            "pattern": "^azureml:.+",
                            "arm_type": "environments",
                            "title": "id",
                            "readonly": true
                        }
                    ]
                },
                "image": {
                    "title": "image",
                    "type": "string"
                },
                "inference_config": {
                    "type": "object",
                    "$ref": "#/definitions/InferenceConfigSchema"
                },
                "intellectual_property": {
                    "type": "object",
                    "$ref": "#/definitions/IntellectualPropertySchema"
                },
                "latest_version": {
                    "title": "latest_version",
                    "type": "string",
                    "readonly": true
                },
                "name": {
                    "title": "name",
                    "type": "string"
                },
                "os_type": {
                    "type": "string",
                    "enum": [
                        "linux",
                        "windows"
                    ],
                    "title": "os_type"
                },
                "$schema": {
                    "title": "$schema",
                    "type": "string",
                    "readonly": true
                },
                "tags": {
                    "title": "tags",
                    "type": "object",
                    "additionalProperties": {}
                },
                "version": {
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "integer"
                        }
                    ],
                    "title": "version"
                }
            },
            "type": "object",
            "additionalProperties": false
        },
        "AnonymousModelSchema": {
            "properties": {
                "creation_context": {
                    "type": "object",
                    "$ref": "#/definitions/CreationContextSchema"
                },
                "datastore": {
                    "title": "datastore",
                    "type": "string",
                    "description": "Name of the datastore to upload to."
                },
                "description": {
                    "title": "description",
                    "type": "string"
                },
                "flavors": {
                    "title": "flavors",
                    "type": "object",
                    "additionalProperties": {}
                },
                "id": {
                    "type": "string",
                    "pattern": "^azureml:.+",
                    "arm_type": "models",
                    "title": "id",
                    "readonly": true
                },
                "intellectual_property": {
                    "type": "object",
                    "$ref": "#/definitions/IntellectualPropertySchema"
                },
                "job_name": {
                    "title": "job_name",
                    "type": "string",
                    "readonly": true
                },
                "latest_version": {
                    "title": "latest_version",
                    "type": "string",
                    "readonly": true
                },
                "name": {
                    "title": "name",
                    "type": "string"
                },
                "path": {
                    "title": "path",
                    "type": "string"
                },
                "properties": {
                    "title": "properties",
                    "type": "object",
                    "additionalProperties": {}
                },
                "$schema": {
                    "title": "$schema",
                    "type": "string",
                    "readonly": true
                },
                "stage": {
                    "title": "stage",
                    "type": "string"
                },
                "tags": {
                    "title": "tags",
                    "type": "object",
                    "additionalProperties": {}
                },
                "type": {
                    "type": "string",
                    "enum": [
                        "custom_model",
                        "mlflow_model",
                        "triton_model"
                    ],
                    "title": "type"
                },
                "utc_time_created": {
                    "title": "utc_time_created",
                    "type": "string",
                    "format": "date-time",
                    "readonly": true
                },
                "version": {
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "integer"
                        }
                    ],
                    "title": "version"
                }
            },
            "type": "object",
            "additionalProperties": false
        },
        "JobResourceConfigurationSchema": {
            "properties": {
                "docker_args": {
                    "title": "docker_args",
                    "type": "string",
                    "description": "arguments to pass to the Docker run command."
                },
                "instance_count": {
                    "title": "instance_count",
                    "type": "number",
                    "format": "integer"
                },
                "instance_type": {
                    "title": "instance_type",
                    "type": "string",
                    "description": "The instance type to make available to this job."
                },
                "locations": {
                    "title": "locations",
                    "type": "array",
                    "items": {
                        "title": "locations",
                        "type": "string"
                    }
                },
                "max_instance_count": {
                    "title": "max_instance_count",
                    "type": "number",
                    "format": "integer",
                    "description": "The maximum number of instances to make available to this job."
                },
                "properties": {
                    "title": "properties",
                    "type": "object",
                    "additionalProperties": {}
                },
                "shm_size": {
                    "title": "shm_size",
                    "type": "string",
                    "description": "The size of the docker container's shared memory block. This should be in the format of `<number><unit>` where number as to be greater than 0 and the unit can be one of `b` (bytes), `k` (kilobytes), `m` (megabytes), or `g` (gigabytes)."
                }
            },
            "type": "object",
            "additionalProperties": false
        },
        "BatchRetrySettingsSchema": {
            "properties": {
                "max_retries": {
                    "title": "max_retries",
                    "type": "number",
                    "format": "integer",
                    "description": "The number of maximum tries for a failed or timeout mini batch."
                },
                "timeout": {
                    "title": "timeout",
                    "type": "number",
                    "format": "integer",
                    "description": "The timeout for a mini batch."
                }
            },
            "type": "object",
            "additionalProperties": false
        },
        "BatchDeploymentSchema": {
            "properties": {
                "code_configuration": {
                    "type": "object",
                    "$ref": "#/definitions/CodeConfigurationSchema",
                    "description": "Code configuration for the endpoint deployment."
                },
                "component": {
                    "anyOf": [
                        {
                            "type": "string",
                            "pattern": "^azureml://registries/.*",
                            "arm_type": "components",
                            "title": "component"
                        },
                        {
                            "type": "string",
                            "pattern": "^azureml:.+",
                            "arm_type": "components",
                            "title": "component"
                        },
                        {
                            "type": "string",
                            "title": "component"
                        }
                    ]
                },
                "compute": {
                    "anyOf": [
                        {
                            "type": "string",
                            "enum": [
                                "local"
                            ],
                            "title": "compute"
                        },
                        {
                            "type": "string",
                            "pattern": "^azureml:.+",
                            "arm_type": "computes",
                            "title": "compute"
                        },
                        {
                            "title": "compute",
                            "type": "string"
                        }
                    ]
                },
                "creation_context": {
                    "type": "object",
                    "$ref": "#/definitions/CreationContextSchema"
                },
                "description": {
                    "title": "description",
                    "type": "string",
                    "description": "Description of the endpoint deployment."
                },
                "endpoint_name": {
                    "title": "endpoint_name",
                    "type": "string"
                },
                "environment": {
                    "anyOf": [
                        {
                            "type": "string",
                            "pattern": "^azureml://registries/.*",
                            "arm_type": "environments",
                            "title": "environment"
                        },
                        {
                            "type": "string",
                            "pattern": "^azureml:.+",
                            "arm_type": "environments",
                            "title": "environment"
                        },
                        {
                            "type": "object",
                            "$ref": "#/definitions/EnvironmentSchema"
                        },
                        {
                            "type": "object",
                            "$ref": "#/definitions/AnonymousEnvironmentSchema"
                        },
                        {
                            "type": "string",
                            "pattern": "^file:.*"
                        }
                    ]
                },
                "environment_variables": {
                    "title": "environment_variables",
                    "type": "object",
                    "additionalProperties": {}
                },
                "error_threshold": {
                    "title": "error_threshold",
                    "type": "number",
                    "format": "integer",
                    "description": "Error threshold, if the error count for the entire input goes above this value,\r\n\n            the batch inference will be aborted. Range is [-1, int.MaxValue].\r\n\n            For FileDataset, this value is the count of file failures.\r\n\n            For TabularDataset, this value is the count of record failures.\r\n\n            If set to -1 (the lower bound), all failures during batch inference will be ignored."
                },
                "id": {
                    "title": "id",
                    "type": "string"
                },
                "job_definition": {
                    "type": "string",
                    "pattern": "^azureml:.+",
                    "arm_type": "jobs",
                    "title": "job_definition"
                },
                "logging_level": {
                    "title": "logging_level",
                    "type": "string",
                    "description": "A string of the logging level name, which is defined in 'logging'.\n            Possible values are 'warning', 'info', and 'debug'."
                },
                "max_concurrency_per_instance": {
                    "title": "max_concurrency_per_instance",
                    "type": "number",
                    "format": "integer",
                    "description": "Indicates maximum number of parallelism per instance."
                },
                "mini_batch_size": {
                    "title": "mini_batch_size",
                    "type": "number",
                    "format": "integer"
                },
                "model": {
                    "anyOf": [
                        {
                            "type": "string",
                            "pattern": "^azureml://registries/.*",
                            "arm_type": "models",
                            "title": "model"
                        },
                        {
                            "type": "string",
                            "pattern": "^azureml:.+",
                            "arm_type": "models",
                            "title": "model"
                        },
                        {
                            "type": "object",
                            "$ref": "#/definitions/AnonymousModelSchema"
                        }
                    ]
                },
                "name": {
                    "title": "name",
                    "type": "string"
                },
                "output_action": {
                    "type": "string",
                    "enum": [
                        "append_row",
                        "summary_only"
                    ],
                    "title": "output_action"
                },
                "output_file_name": {
                    "title": "output_file_name",
                    "type": "string",
                    "description": "Customized output file name for append_row output action."
                },
                "properties": {
                    "title": "properties",
                    "type": "object",
                    "additionalProperties": {}
                },
                "provisioning_state": {
                    "title": "provisioning_state",
                    "type": "string",
                    "readonly": true
                },
                "resources": {
                    "type": "object",
                    "$ref": "#/definitions/JobResourceConfigurationSchema"
                },
                "retry_settings": {
                    "type": "object",
                    "$ref": "#/definitions/BatchRetrySettingsSchema"
                },
                "$schema": {
                    "title": "$schema",
                    "type": "string",
                    "readonly": true
                },
                "tags": {
                    "title": "tags",
                    "type": "object",
                    "additionalProperties": {}
                },
                "type": {
                    "type": "string",
                    "enum": [
                        "pipeline",
                        "model"
                    ],
                    "title": "type"
                }
            },
            "type": "object",
            "required": [
                "endpoint_name",
                "name"
            ],
            "additionalProperties": false
        }
    },
    "$ref": "#/definitions/BatchDeploymentSchema"
}