{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-migrate/json-schema/microsoft-azure-migrate-database-schema.json",
  "title": "Database",
  "description": "Database REST resource.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-migrate-databasescontroller-api-openapi.yml#/components/schemas/Database",
  "type": "object",
  "properties": {
    "id": {
      "description": "Gets or sets the relative URL to get to this REST resource.",
      "type": "string"
    },
    "name": {
      "description": "Gets or sets the name of this REST resource.",
      "type": "string"
    },
    "type": {
      "description": "Gets the type of this REST resource.",
      "type": "string",
      "readOnly": true
    },
    "properties": {
      "$ref": "#/$defs/DatabaseProperties",
      "description": "Gets or sets the properties of the database."
    }
  },
  "$defs": {
    "DatabaseAssessmentDetails": {
      "description": "Assessment properties that can be shared by various publishers.",
      "type": "object",
      "properties": {
        "assessmentId": {
          "description": "Gets or sets the database assessment scope/Id.",
          "type": "string"
        },
        "id": {
          "description": "Gets the relative URL to get to this DatabaseAssessmentDetails resource.",
          "type": "string"
        },
        "migrationBlockersCount": {
          "format": "int32",
          "description": "Gets or sets the number of blocking changes found.",
          "type": "integer"
        },
        "breakingChangesCount": {
          "format": "int32",
          "description": "Gets or sets the number of breaking changes found.",
          "type": "integer"
        },
        "isReadyForMigration": {
          "description": "Gets or sets a value indicating whether the database is ready for migration.",
          "type": "boolean"
        },
        "assessmentTargetType": {
          "description": "Gets or sets the assessed target database type.",
          "type": "string"
        },
        "lastAssessedTime": {
          "format": "date-time",
          "description": "Gets or sets the time when the database was last assessed.",
          "type": "string"
        },
        "compatibilityLevel": {
          "description": "Gets or sets the compatibility level of the database.",
          "type": "string"
        },
        "databaseSizeInMB": {
          "description": "Gets or sets the database size.",
          "type": "string"
        },
        "lastUpdatedTime": {
          "format": "date-time",
          "description": "Gets or sets the time of the last modification of the database details.",
          "type": "string"
        },
        "enqueueTime": {
          "description": "Gets or sets the time the message was enqueued.",
          "type": "string"
        },
        "solutionName": {
          "description": "Gets or sets the name of the solution that sent the data.",
          "type": "string"
        },
        "instanceId": {
          "description": "Gets or sets the database server instance Id.",
          "type": "string"
        },
        "databaseName": {
          "description": "Gets or sets the database name.",
          "type": "string"
        },
        "extendedInfo": {
          "description": "Gets or sets the extended properties of the database.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    },
    "DatabaseProperties": {
      "description": "Properties of the database resource.",
      "type": "object",
      "properties": {
        "assessmentData": {
          "description": "Gets or sets the assessment details of the database published by various sources.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/DatabaseAssessmentDetails"
          },
          "x-ms-identifiers": [
            "assessmentId"
          ]
        },
        "lastUpdatedTime": {
          "format": "date-time",
          "description": "Gets or sets the time of the last modification of the database.",
          "type": "string"
        }
      }
    }
  }
}