{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-sql-database/json-schema/microsoft-azure-sql-database-database-operation-list-result-schema.json",
  "title": "DatabaseOperationListResult",
  "description": "The response of a DatabaseOperation list operation.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-sql-database-databaseoperations-api-openapi.yml#/components/schemas/DatabaseOperationListResult",
  "type": "object",
  "properties": {
    "value": {
      "type": "array",
      "description": "The DatabaseOperation items on this page",
      "items": {
        "$ref": "#/$defs/DatabaseOperation"
      }
    },
    "nextLink": {
      "type": "string",
      "format": "uri",
      "description": "The link to the next page of items"
    }
  },
  "required": [
    "value"
  ],
  "$defs": {
    "DatabaseOperation": {
      "type": "object",
      "description": "A database operation.",
      "properties": {
        "properties": {
          "$ref": "#/$defs/DatabaseOperationProperties",
          "description": "Resource properties.",
          "x-ms-client-flatten": true
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/ProxyResource"
        }
      ]
    },
    "DatabaseOperationProperties": {
      "type": "object",
      "description": "The properties of a database operation.",
      "properties": {
        "databaseName": {
          "type": "string",
          "description": "The name of the database the operation is being performed on.",
          "readOnly": true
        },
        "operation": {
          "type": "string",
          "description": "The name of operation.",
          "readOnly": true
        },
        "operationFriendlyName": {
          "type": "string",
          "description": "The friendly name of operation.",
          "readOnly": true
        },
        "percentComplete": {
          "type": "integer",
          "format": "int32",
          "description": "The percentage of the operation completed.",
          "readOnly": true
        },
        "serverName": {
          "type": "string",
          "description": "The name of the server.",
          "readOnly": true
        },
        "startTime": {
          "type": "string",
          "format": "date-time",
          "description": "The operation start time.",
          "readOnly": true
        },
        "state": {
          "$ref": "#/$defs/ManagementOperationState",
          "description": "The operation state.",
          "readOnly": true
        },
        "errorCode": {
          "type": "integer",
          "format": "int32",
          "description": "The operation error code.",
          "readOnly": true
        },
        "errorDescription": {
          "type": "string",
          "description": "The operation error description.",
          "readOnly": true
        },
        "errorSeverity": {
          "type": "integer",
          "format": "int32",
          "description": "The operation error severity.",
          "readOnly": true
        },
        "isUserError": {
          "type": "boolean",
          "description": "Whether or not the error is a user error.",
          "readOnly": true
        },
        "estimatedCompletionTime": {
          "type": "string",
          "format": "date-time",
          "description": "The estimated completion time of the operation.",
          "readOnly": true
        },
        "description": {
          "type": "string",
          "description": "The operation description.",
          "readOnly": true
        },
        "isCancellable": {
          "type": "boolean",
          "description": "Whether the operation can be cancelled.",
          "readOnly": true
        },
        "operationPhaseDetails": {
          "$ref": "#/$defs/PhaseDetails",
          "description": "The operation phase details.",
          "readOnly": true
        }
      }
    },
    "ManagementOperationState": {
      "type": "string",
      "description": "The operation state.",
      "enum": [
        "Pending",
        "InProgress",
        "Succeeded",
        "Failed",
        "CancelInProgress",
        "Cancelled"
      ],
      "x-ms-enum": {
        "name": "ManagementOperationState",
        "modelAsString": true,
        "values": [
          {
            "name": "Pending",
            "value": "Pending",
            "description": "Pending"
          },
          {
            "name": "InProgress",
            "value": "InProgress",
            "description": "InProgress"
          },
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "Succeeded"
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Failed"
          },
          {
            "name": "CancelInProgress",
            "value": "CancelInProgress",
            "description": "CancelInProgress"
          },
          {
            "name": "Cancelled",
            "value": "Cancelled",
            "description": "Cancelled"
          }
        ]
      }
    },
    "Phase": {
      "type": "string",
      "description": "The operation phase.",
      "enum": [
        "LogTransitionInProgress",
        "Copying",
        "BuildingHyperscaleComponents",
        "Catchup",
        "WaitingForCutover",
        "CutoverInProgress"
      ],
      "x-ms-enum": {
        "name": "Phase",
        "modelAsString": true,
        "values": [
          {
            "name": "LogTransitionInProgress",
            "value": "LogTransitionInProgress",
            "description": "LogTransitionInProgress"
          },
          {
            "name": "Copying",
            "value": "Copying",
            "description": "Copying"
          },
          {
            "name": "BuildingHyperscaleComponents",
            "value": "BuildingHyperscaleComponents",
            "description": "BuildingHyperscaleComponents"
          },
          {
            "name": "Catchup",
            "value": "Catchup",
            "description": "Catchup"
          },
          {
            "name": "WaitingForCutover",
            "value": "WaitingForCutover",
            "description": "WaitingForCutover"
          },
          {
            "name": "CutoverInProgress",
            "value": "CutoverInProgress",
            "description": "CutoverInProgress"
          }
        ]
      }
    },
    "PhaseDetails": {
      "type": "object",
      "description": "The phase details properties of a database operation.",
      "properties": {
        "phase": {
          "$ref": "#/$defs/Phase",
          "description": "The operation phase.",
          "readOnly": true
        },
        "phaseInformation": {
          "type": "object",
          "description": "The operation phase information.",
          "additionalProperties": {
            "type": "string"
          },
          "readOnly": true
        }
      }
    },
    "ProxyResource": {
      "type": "object",
      "title": "Proxy Resource",
      "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location",
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    }
  }
}