{
    "$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
        },
        "DataCollectorSchema": {
            "properties": {
                "collections": {
                    "title": "collections",
                    "type": "object",
                    "additionalProperties": {
                        "type": "object",
                        "$ref": "#/definitions/DeploymentCollectionSchema"
                    }
                },
                "request_logging": {
                    "type": "object",
                    "$ref": "#/definitions/RequestLoggingSchema"
                },
                "rolling_rate": {
                    "type": "string",
                    "enum": [
                        "minute",
                        "day",
                        "hour"
                    ],
                    "title": "rolling_rate"
                },
                "sampling_rate": {
                    "title": "sampling_rate",
                    "type": "number",
                    "format": "float"
                }
            },
            "type": "object",
            "additionalProperties": false
        },
        "DeploymentCollectionSchema": {
            "properties": {
                "client_id": {
                    "title": "client_id",
                    "type": "string"
                },
                "data": {
                    "anyOf": [
                        {
                            "type": "object",
                            "$ref": "#/definitions/DataAssetSchema"
                        },
                        {
                            "title": "data",
                            "type": "string"
                        }
                    ]
                },
                "enabled": {
                    "type": "string",
                    "enum": [
                        "true",
                        "false"
                    ],
                    "title": "enabled"
                }
            },
            "type": "object",
            "required": [
                "enabled"
            ],
            "additionalProperties": false
        },
        "DataAssetSchema": {
            "properties": {
                "data_id": {
                    "title": "data_id",
                    "type": "string"
                },
                "name": {
                    "title": "name",
                    "type": "string"
                },
                "path": {
                    "title": "path",
                    "type": "string"
                },
                "version": {
                    "title": "version",
                    "type": "string"
                }
            },
            "type": "object",
            "additionalProperties": false
        },
        "RequestLoggingSchema": {
            "properties": {
                "capture_headers": {
                    "title": "capture_headers",
                    "type": "array",
                    "items": {
                        "title": "capture_headers",
                        "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
        },
        "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
        },
        "LivenessProbeSchema": {
            "properties": {
                "failure_threshold": {
                    "title": "failure_threshold",
                    "type": "number",
                    "format": "integer"
                },
                "initial_delay": {
                    "title": "initial_delay",
                    "type": "number",
                    "format": "integer"
                },
                "period": {
                    "title": "period",
                    "type": "number",
                    "format": "integer"
                },
                "success_threshold": {
                    "title": "success_threshold",
                    "type": "number",
                    "format": "integer"
                },
                "timeout": {
                    "title": "timeout",
                    "type": "number",
                    "format": "integer"
                }
            },
            "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
        },
        "RequestSettingsSchema": {
            "properties": {
                "max_concurrent_requests_per_instance": {
                    "title": "max_concurrent_requests_per_instance",
                    "type": "number",
                    "format": "integer"
                },
                "max_queue_wait_ms": {
                    "title": "max_queue_wait_ms",
                    "type": "number",
                    "format": "integer"
                },
                "request_timeout_ms": {
                    "title": "request_timeout_ms",
                    "type": "number",
                    "format": "integer"
                }
            },
            "type": "object",
            "additionalProperties": false
        },
        "ResourceRequirementsSchema": {
            "properties": {
                "limits": {
                    "type": "object",
                    "$ref": "#/definitions/ResourceSettingsSchema"
                },
                "requests": {
                    "type": "object",
                    "$ref": "#/definitions/ResourceSettingsSchema"
                }
            },
            "type": "object",
            "additionalProperties": false
        },
        "ResourceSettingsSchema": {
            "properties": {
                "cpu": {
                    "title": "cpu",
                    "type": "string"
                },
                "gpu": {
                    "title": "gpu",
                    "type": "string"
                },
                "memory": {
                    "title": "memory",
                    "type": "string"
                }
            },
            "type": "object",
            "additionalProperties": false
        },
        "DefaultScaleSettingsSchema": {
            "properties": {
                "type": {
                    "type": "string",
                    "enum": [
                        "default"
                    ],
                    "title": "type"
                }
            },
            "type": "object",
            "required": [
                "type"
            ],
            "additionalProperties": false
        },
        "TargetUtilizationScaleSettingsSchema": {
            "properties": {
                "max_instances": {
                    "title": "max_instances",
                    "type": "number",
                    "format": "integer"
                },
                "min_instances": {
                    "title": "min_instances",
                    "type": "number",
                    "format": "integer"
                },
                "polling_interval": {
                    "title": "polling_interval",
                    "type": "number",
                    "format": "integer"
                },
                "target_utilization_percentage": {
                    "title": "target_utilization_percentage",
                    "type": "number",
                    "format": "integer"
                },
                "type": {
                    "type": "string",
                    "enum": [
                        "target_utilization"
                    ],
                    "title": "type"
                }
            },
            "type": "object",
            "required": [
                "type"
            ],
            "additionalProperties": false
        },
        "KubernetesOnlineDeploymentSchema": {
            "properties": {
                "app_insights_enabled": {
                    "title": "app_insights_enabled",
                    "type": "boolean"
                },
                "code_configuration": {
                    "type": "object",
                    "$ref": "#/definitions/CodeConfigurationSchema",
                    "description": "Code configuration for the endpoint deployment."
                },
                "data_collector": {
                    "type": "object",
                    "$ref": "#/definitions/DataCollectorSchema"
                },
                "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": {}
                },
                "id": {
                    "title": "id",
                    "type": "string"
                },
                "instance_count": {
                    "title": "instance_count",
                    "type": "number",
                    "format": "integer"
                },
                "instance_type": {
                    "title": "instance_type",
                    "type": "string"
                },
                "liveness_probe": {
                    "type": "object",
                    "$ref": "#/definitions/LivenessProbeSchema"
                },
                "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"
                        }
                    ]
                },
                "model_mount_path": {
                    "title": "model_mount_path",
                    "type": "string"
                },
                "name": {
                    "title": "name",
                    "type": "string"
                },
                "properties": {
                    "title": "properties",
                    "type": "object",
                    "additionalProperties": {}
                },
                "provisioning_state": {
                    "title": "provisioning_state",
                    "type": "string"
                },
                "readiness_probe": {
                    "type": "object",
                    "$ref": "#/definitions/LivenessProbeSchema"
                },
                "request_settings": {
                    "type": "object",
                    "$ref": "#/definitions/RequestSettingsSchema"
                },
                "resources": {
                    "type": "object",
                    "$ref": "#/definitions/ResourceRequirementsSchema"
                },
                "scale_settings": {
                    "anyOf": [
                        {
                            "type": "object",
                            "$ref": "#/definitions/DefaultScaleSettingsSchema"
                        },
                        {
                            "type": "object",
                            "$ref": "#/definitions/TargetUtilizationScaleSettingsSchema"
                        }
                    ]
                },
                "$schema": {
                    "title": "$schema",
                    "type": "string",
                    "readonly": true
                },
                "tags": {
                    "title": "tags",
                    "type": "object",
                    "additionalProperties": {}
                },
                "type": {
                    "type": "string",
                    "enum": [
                        "managed",
                        "kubernetes"
                    ],
                    "title": "type"
                }
            },
            "type": "object",
            "required": [
                "endpoint_name",
                "name"
            ],
            "additionalProperties": false
        }
    },
    "$ref": "#/definitions/KubernetesOnlineDeploymentSchema"
}