{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "definitions": {
        "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
        },
        "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
        },
        "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
        },
        "ProbeSettingsSchema": {
            "properties": {
                "failure_threshold": {
                    "title": "failure_threshold",
                    "type": "number",
                    "format": "integer"
                },
                "initial_delay": {
                    "title": "initial_delay",
                    "type": "number",
                    "format": "integer"
                },
                "method": {
                    "title": "method",
                    "type": "string"
                },
                "path": {
                    "title": "path",
                    "type": "string"
                },
                "period": {
                    "title": "period",
                    "type": "number",
                    "format": "integer"
                },
                "port": {
                    "title": "port",
                    "type": "number",
                    "format": "integer"
                },
                "scheme": {
                    "title": "scheme",
                    "type": "string"
                },
                "success_threshold": {
                    "title": "success_threshold",
                    "type": "number",
                    "format": "integer"
                },
                "timeout": {
                    "title": "timeout",
                    "type": "number",
                    "format": "integer"
                }
            },
            "type": "object",
            "additionalProperties": false
        },
        "RequestSettingsSchema": {
            "properties": {
                "max_concurrent_requests_per_instance": {
                    "title": "max_concurrent_requests_per_instance",
                    "type": "number",
                    "format": "integer"
                },
                "request_timeout_ms": {
                    "title": "request_timeout_ms",
                    "type": "number",
                    "format": "integer"
                }
            },
            "type": "object",
            "additionalProperties": false
        },
        "DeploymentTemplateSchema": {
            "properties": {
                "allowed_instance_types": {
                    "title": "allowed_instance_types",
                    "type": "string"
                },
                "default_instance_type": {
                    "title": "default_instance_type",
                    "type": "string"
                },
                "deployment_template_type": {
                    "title": "deployment_template_type",
                    "type": "string"
                },
                "description": {
                    "title": "description",
                    "type": "string",
                    "description": "Description of the deployment template ."
                },
                "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": {}
                },
                "instance_count": {
                    "title": "instance_count",
                    "type": "number",
                    "format": "integer"
                },
                "liveness_probe": {
                    "type": "object",
                    "$ref": "#/definitions/ProbeSettingsSchema"
                },
                "model_mount_path": {
                    "title": "model_mount_path",
                    "type": "string"
                },
                "name": {
                    "title": "name",
                    "type": "string"
                },
                "readiness_probe": {
                    "type": "object",
                    "$ref": "#/definitions/ProbeSettingsSchema"
                },
                "request_settings": {
                    "type": "object",
                    "$ref": "#/definitions/RequestSettingsSchema"
                },
                "$schema": {
                    "title": "$schema",
                    "type": "string",
                    "readonly": true
                },
                "scoring_path": {
                    "title": "scoring_path",
                    "type": "string"
                },
                "scoring_port": {
                    "title": "scoring_port",
                    "type": "number",
                    "format": "integer"
                },
                "tags": {
                    "title": "tags",
                    "type": "object",
                    "additionalProperties": {}
                },
                "type": {
                    "title": "type",
                    "type": "string"
                },
                "version": {
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "integer"
                        }
                    ],
                    "title": "version"
                }
            },
            "type": "object",
            "required": [
                "name"
            ],
            "additionalProperties": false
        }
    },
    "$ref": "#/definitions/DeploymentTemplateSchema"
}