{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-postgresql/json-schema/microsoft-azure-postgresql-maintenance-event-resource-list-result-schema.json",
  "title": "MaintenanceEventResourceListResult",
  "description": "The response of a MaintenanceEventResource list operation.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-postgresql-maintenanceevents-api-openapi.yml#/components/schemas/MaintenanceEventResourceListResult",
  "type": "object",
  "properties": {
    "value": {
      "type": "array",
      "description": "The MaintenanceEventResource items on this page",
      "items": {
        "$ref": "#/$defs/MaintenanceEventResource"
      }
    },
    "nextLink": {
      "type": "string",
      "format": "uri",
      "description": "The link to the next page of items"
    }
  },
  "required": [
    "value"
  ],
  "$defs": {
    "MaintenanceEventResource": {
      "type": "object",
      "description": "Maintenance event resource for a PostgreSQL flexible server.",
      "properties": {
        "properties": {
          "$ref": "#/$defs/MaintenanceEventResourceProperties",
          "description": "The resource-specific properties for this resource."
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/ProxyResource"
        }
      ]
    },
    "MaintenanceEventResourceProperties": {
      "type": "object",
      "description": "Properties of a maintenance event resource.",
      "properties": {
        "maintenanceEventId": {
          "type": "string",
          "description": "A service-generated identifier for this maintenance event, assigned by the platform (e.g., 'YL1T-HFG'). The format is not contractual and clients should not attempt to parse or construct this value.",
          "readOnly": true
        },
        "maintenanceType": {
          "$ref": "#/$defs/MaintenanceType",
          "description": "The maintenance type (e.g., 'PlannedMaintenance').",
          "readOnly": true
        },
        "description": {
          "type": "string",
          "description": "The human-readable description of the maintenance event.",
          "readOnly": true
        },
        "status": {
          "$ref": "#/$defs/MaintenanceEventStatus",
          "description": "The customer-facing status of the maintenance event.",
          "readOnly": true
        },
        "startTime": {
          "type": "string",
          "format": "date-time",
          "description": "The scheduled start time of the maintenance event (UTC).",
          "readOnly": true
        },
        "endTime": {
          "type": "string",
          "format": "date-time",
          "description": "The scheduled end time of the maintenance event (UTC).",
          "readOnly": true
        },
        "estimatedDowntime": {
          "type": "string",
          "description": "The estimated downtime as an ISO 8601 duration string (e.g., 'PT60S' = 60 seconds).",
          "readOnly": true
        },
        "deferrable": {
          "type": "boolean",
          "description": "A value indicating whether this maintenance event can be rescheduled by the customer.",
          "readOnly": true
        },
        "deferralDeadline": {
          "type": "string",
          "format": "date-time",
          "description": "The latest date/time this maintenance event can be postponed to (UTC). Present only when deferrable is true.",
          "readOnly": true
        },
        "rescheduledFrom": {
          "type": "string",
          "format": "date-time",
          "description": "The previous scheduled start time before the most recent reschedule (UTC). Null if the event has never been rescheduled.",
          "readOnly": true
        },
        "lastUpdatedTime": {
          "type": "string",
          "format": "date-time",
          "description": "The time this maintenance event record was last updated (UTC).",
          "readOnly": true
        },
        "originalStartTime": {
          "type": "string",
          "format": "date-time",
          "description": "The initial scheduled start time before any reschedule (UTC). Equals startTime when the event has never been rescheduled.",
          "readOnly": true
        }
      },
      "required": [
        "maintenanceType",
        "status",
        "startTime",
        "endTime",
        "deferrable",
        "originalStartTime"
      ]
    },
    "MaintenanceEventStatus": {
      "type": "string",
      "description": "The status of a maintenance event.",
      "enum": [
        "Planned",
        "InProgress",
        "Complete",
        "Rescheduled",
        "Canceled"
      ],
      "x-ms-enum": {
        "name": "MaintenanceEventStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "Planned",
            "value": "Planned",
            "description": "The maintenance event is scheduled and has not yet started."
          },
          {
            "name": "InProgress",
            "value": "InProgress",
            "description": "The maintenance event is currently in progress."
          },
          {
            "name": "Complete",
            "value": "Complete",
            "description": "The maintenance event has completed successfully."
          },
          {
            "name": "Rescheduled",
            "value": "Rescheduled",
            "description": "The maintenance event has been rescheduled (postponed) by the customer."
          },
          {
            "name": "Canceled",
            "value": "Canceled",
            "description": "The maintenance event was canceled, failed, or timed out."
          }
        ]
      }
    },
    "MaintenanceType": {
      "type": "string",
      "description": "Type of a maintenance event resource.",
      "enum": [
        "PlannedMaintenance"
      ],
      "x-ms-enum": {
        "name": "MaintenanceType",
        "modelAsString": true,
        "values": [
          {
            "name": "PlannedMaintenance",
            "value": "PlannedMaintenance",
            "description": "Planned maintenance event."
          }
        ]
      }
    },
    "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
    }
  }
}