{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "definitions": {
        "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
        },
        "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
        }
    },
    "$ref": "#/definitions/EnvironmentSchema"
}