{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-site-recovery/json-schema/microsoft-azure-site-recovery-event-collection-schema.json",
  "title": "EventCollection",
  "description": "Collection of fabric details.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-site-recovery-replicationevents-api-openapi.yml#/components/schemas/EventCollection",
  "type": "object",
  "properties": {
    "value": {
      "type": "array",
      "description": "The Event items on this page",
      "items": {
        "$ref": "#/$defs/Event"
      }
    },
    "nextLink": {
      "type": "string",
      "format": "uri",
      "description": "The link to the next page of items"
    }
  },
  "required": [
    "value"
  ],
  "$defs": {
    "Event": {
      "type": "object",
      "description": "Implements the Event class.",
      "properties": {
        "properties": {
          "$ref": "#/$defs/EventProperties",
          "description": "Event related data."
        },
        "location": {
          "type": "string",
          "description": "Resource Location"
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/ProxyResource"
        }
      ]
    },
    "EventProperties": {
      "type": "object",
      "description": "The properties of a monitoring event.",
      "properties": {
        "eventCode": {
          "type": "string",
          "description": "The Id of the monitoring event."
        },
        "description": {
          "type": "string",
          "description": "The event name."
        },
        "eventType": {
          "type": "string",
          "description": "The type of the event. for example: VM Health, Server Health, Job Failure etc."
        },
        "affectedObjectFriendlyName": {
          "type": "string",
          "description": "The friendly name of the source of the event on which it is raised (for example, VM, VMM etc)."
        },
        "affectedObjectCorrelationId": {
          "type": "string",
          "description": "The affected object correlationId for the event."
        },
        "severity": {
          "type": "string",
          "description": "The severity of the event."
        },
        "timeOfOccurrence": {
          "type": "string",
          "format": "date-time",
          "description": "The time of occurrence of the event."
        },
        "fabricId": {
          "type": "string",
          "description": "The ARM ID of the fabric."
        },
        "providerSpecificDetails": {
          "$ref": "#/$defs/EventProviderSpecificDetails",
          "description": "The provider specific settings."
        },
        "eventSpecificDetails": {
          "$ref": "#/$defs/EventSpecificDetails",
          "description": "The event specific settings."
        },
        "healthErrors": {
          "type": "array",
          "description": "The list of errors / warnings capturing details associated with the issue(s).",
          "items": {
            "$ref": "#/$defs/HealthError"
          }
        }
      }
    },
    "EventProviderSpecificDetails": {
      "type": "object",
      "description": "Model class for provider specific details for an event.",
      "properties": {
        "instanceType": {
          "type": "string",
          "description": "Gets the class type. Overridden in derived classes."
        }
      },
      "required": [
        "instanceType"
      ]
    },
    "EventSpecificDetails": {
      "type": "object",
      "description": "Model class for event specific details for an event.",
      "properties": {
        "instanceType": {
          "type": "string",
          "description": "Gets the class type. Overridden in derived classes."
        }
      },
      "required": [
        "instanceType"
      ]
    },
    "HealthError": {
      "type": "object",
      "description": "Health Error.",
      "properties": {
        "innerHealthErrors": {
          "type": "array",
          "description": "The inner health errors. HealthError having a list of HealthError as child errors is problematic. InnerHealthError is used because this will prevent an infinite loop of structures when Hydra tries to auto-generate the contract. We are exposing the related health errors as inner health errors and all API consumers can utilize this in the same fashion as Exception -&gt; InnerException.",
          "items": {
            "$ref": "#/$defs/InnerHealthError"
          }
        },
        "errorSource": {
          "type": "string",
          "description": "Source of error."
        },
        "errorType": {
          "type": "string",
          "description": "Type of error."
        },
        "errorLevel": {
          "type": "string",
          "description": "Level of error."
        },
        "errorCategory": {
          "type": "string",
          "description": "Category of error."
        },
        "errorCode": {
          "type": "string",
          "description": "Error code."
        },
        "summaryMessage": {
          "type": "string",
          "description": "Summary message of the entity."
        },
        "errorMessage": {
          "type": "string",
          "description": "Error message."
        },
        "possibleCauses": {
          "type": "string",
          "description": "Possible causes of error."
        },
        "recommendedAction": {
          "type": "string",
          "description": "Recommended action to resolve error."
        },
        "creationTimeUtc": {
          "type": "string",
          "format": "date-time",
          "description": "Error creation time (UTC)."
        },
        "recoveryProviderErrorMessage": {
          "type": "string",
          "description": "DRA error message."
        },
        "entityId": {
          "type": "string",
          "description": "ID of the entity."
        },
        "errorId": {
          "type": "string",
          "description": "The health error unique id."
        },
        "customerResolvability": {
          "$ref": "#/$defs/HealthErrorCustomerResolvability",
          "description": "Value indicating whether the health error is customer resolvable."
        }
      }
    },
    "HealthErrorCustomerResolvability": {
      "type": "string",
      "description": "Value indicating whether the health error is customer resolvable.",
      "enum": [
        "Allowed",
        "NotAllowed"
      ],
      "x-ms-enum": {
        "name": "HealthErrorCustomerResolvability",
        "modelAsString": true,
        "values": [
          {
            "name": "Allowed",
            "value": "Allowed",
            "description": "Allowed"
          },
          {
            "name": "NotAllowed",
            "value": "NotAllowed",
            "description": "NotAllowed"
          }
        ]
      }
    },
    "InnerHealthError": {
      "type": "object",
      "description": "Implements InnerHealthError class. HealthError object has a list of InnerHealthErrors as child errors. InnerHealthError is used because this will prevent an infinite loop of structures when Hydra tries to auto-generate the contract. We are exposing the related health errors as inner health errors and all API consumers can utilize this in the same fashion as Exception -&gt; InnerException.",
      "properties": {
        "errorSource": {
          "type": "string",
          "description": "Source of error."
        },
        "errorType": {
          "type": "string",
          "description": "Type of error."
        },
        "errorLevel": {
          "type": "string",
          "description": "Level of error."
        },
        "errorCategory": {
          "type": "string",
          "description": "Category of error."
        },
        "errorCode": {
          "type": "string",
          "description": "Error code."
        },
        "summaryMessage": {
          "type": "string",
          "description": "Summary message of the entity."
        },
        "errorMessage": {
          "type": "string",
          "description": "Error message."
        },
        "possibleCauses": {
          "type": "string",
          "description": "Possible causes of error."
        },
        "recommendedAction": {
          "type": "string",
          "description": "Recommended action to resolve error."
        },
        "creationTimeUtc": {
          "type": "string",
          "format": "date-time",
          "description": "Error creation time (UTC)."
        },
        "recoveryProviderErrorMessage": {
          "type": "string",
          "description": "DRA error message."
        },
        "entityId": {
          "type": "string",
          "description": "ID of the entity."
        },
        "errorId": {
          "type": "string",
          "description": "The health error unique id."
        },
        "customerResolvability": {
          "$ref": "#/$defs/HealthErrorCustomerResolvability",
          "description": "Value indicating whether the health error is customer resolvable."
        }
      }
    },
    "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
    }
  }
}