{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-postgresql/json-schema/microsoft-azure-postgresql-major-version-upgrade-precheck-resource-list-result-schema.json",
  "title": "MajorVersionUpgradePrecheckResourceListResult",
  "description": "The response of a MajorVersionUpgradePrecheckResource list operation.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-postgresql-majorversionupgradeprecheck-api-openapi.yml#/components/schemas/MajorVersionUpgradePrecheckResourceListResult",
  "type": "object",
  "properties": {
    "value": {
      "type": "array",
      "description": "The MajorVersionUpgradePrecheckResource items on this page",
      "items": {
        "$ref": "#/$defs/MajorVersionUpgradePrecheckResource"
      }
    },
    "nextLink": {
      "type": "string",
      "format": "uri",
      "description": "The link to the next page of items"
    }
  },
  "required": [
    "value"
  ],
  "$defs": {
    "MajorVersionUpgradePrecheckResource": {
      "type": "object",
      "description": "Major version upgrade precheck resource for a PostgreSQL flexible server.",
      "properties": {
        "properties": {
          "$ref": "#/$defs/MajorVersionUpgradePrecheckResourceProperties",
          "description": "The resource-specific properties for this resource."
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/ProxyResource"
        }
      ]
    },
    "MajorVersionUpgradePrecheckResourceProperties": {
      "type": "object",
      "description": "Major version upgrade precheck resource with validation results.",
      "properties": {
        "createTime": {
          "type": "string",
          "format": "date-time",
          "description": "The time when the precheck was created."
        },
        "status": {
          "$ref": "#/$defs/MajorVersionUpgradePrecheckStatus",
          "description": "The status of the precheck validation."
        },
        "precheckResult": {
          "$ref": "#/$defs/PrecheckResult",
          "description": "The detailed result of the precheck operation."
        },
        "targetVersion": {
          "type": "string",
          "description": "The target PostgreSQL major version for the upgrade."
        },
        "policyDetails": {
          "type": "array",
          "description": "Array of policy validation details.",
          "items": {
            "$ref": "#/$defs/PolicyDetail"
          },
          "x-ms-identifiers": [
            "policyName"
          ]
        }
      }
    },
    "MajorVersionUpgradePrecheckStatus": {
      "type": "string",
      "description": "The status of the major version upgrade precheck.",
      "enum": [
        "Validating",
        "Succeeded",
        "Failed",
        "Canceled"
      ],
      "x-ms-enum": {
        "name": "MajorVersionUpgradePrecheckStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "Validating",
            "value": "Validating",
            "description": "Executing prechecks against the source server"
          },
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "Validation succeeded"
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Validation failed"
          },
          {
            "name": "Canceled",
            "value": "Canceled",
            "description": "Validation canceled"
          }
        ]
      }
    },
    "PolicyDetail": {
      "type": "object",
      "description": "Policy validation details.",
      "properties": {
        "policyName": {
          "type": "string",
          "description": "The name of the policy."
        },
        "passed": {
          "type": "boolean",
          "description": "Whether the policy validation passed."
        },
        "errorCode": {
          "type": "integer",
          "format": "int32",
          "description": "The error code if validation failed."
        },
        "errorMessage": {
          "type": "string",
          "description": "The error message if validation failed."
        },
        "policyDescription": {
          "type": "string",
          "description": "Description of what the policy validates."
        }
      }
    },
    "PrecheckErrorInfo": {
      "type": "object",
      "description": "Error information from precheck validation.",
      "properties": {
        "errorCode": {
          "type": "integer",
          "format": "int32",
          "description": "The error code."
        },
        "errorMessage": {
          "type": "string",
          "description": "The error message."
        }
      }
    },
    "PrecheckResult": {
      "type": "object",
      "description": "Precheck result details.",
      "properties": {
        "action": {
          "type": "string",
          "description": "The action performed."
        },
        "upgradeSequence": {
          "$ref": "#/$defs/UpgradeSequence",
          "description": "The upgrade sequence information."
        },
        "errorInfo": {
          "type": "array",
          "description": "Array of error information.",
          "items": {
            "$ref": "#/$defs/PrecheckErrorInfo"
          },
          "x-ms-identifiers": [
            "errorCode"
          ]
        }
      }
    },
    "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"
        }
      ]
    },
    "Resource": {
      "type": "object",
      "title": "Resource",
      "description": "Common fields that are returned in the response for all Azure Resource Manager resources",
      "properties": {
        "id": {
          "type": "string",
          "format": "arm-id",
          "description": "Fully qualified resource ID for the resource. E.g. \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}\"",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "The name of the resource",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"",
          "readOnly": true
        },
        "systemData": {
          "$ref": "#/$defs/systemData",
          "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.",
          "readOnly": true
        }
      },
      "x-ms-azure-resource": true
    },
    "UpgradeSequence": {
      "type": "object",
      "description": "Upgrade sequence information.",
      "properties": {
        "sourceVersion": {
          "type": "string",
          "description": "The source PostgreSQL version."
        },
        "targetVersion": {
          "type": "string",
          "description": "The target PostgreSQL version."
        }
      }
    }
  }
}