{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-site-recovery/json-schema/microsoft-azure-site-recovery-fabric-schema.json",
  "title": "Fabric",
  "description": "Fabric definition.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-site-recovery-replicationfabrics-api-openapi.yml#/components/schemas/Fabric",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/FabricProperties",
      "description": "Fabric related data."
    },
    "location": {
      "type": "string",
      "description": "Resource Location"
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "$defs": {
    "EncryptionDetails": {
      "type": "object",
      "description": "Encryption details for the fabric.",
      "properties": {
        "kekState": {
          "type": "string",
          "description": "The key encryption key state for the Vmm."
        },
        "kekCertThumbprint": {
          "type": "string",
          "description": "The key encryption key certificate thumbprint."
        },
        "kekCertExpiryDate": {
          "type": "string",
          "format": "date-time",
          "description": "The key encryption key certificate expiry date."
        }
      }
    },
    "FabricProperties": {
      "type": "object",
      "description": "Fabric properties.",
      "properties": {
        "friendlyName": {
          "type": "string",
          "description": "Friendly name of the fabric."
        },
        "encryptionDetails": {
          "$ref": "#/$defs/EncryptionDetails",
          "description": "Encryption details for the fabric."
        },
        "rolloverEncryptionDetails": {
          "$ref": "#/$defs/EncryptionDetails",
          "description": "Rollover encryption details for the fabric."
        },
        "internalIdentifier": {
          "type": "string",
          "description": "Dra Registration Id."
        },
        "bcdrState": {
          "type": "string",
          "description": "BCDR state of the fabric."
        },
        "customDetails": {
          "$ref": "#/$defs/FabricSpecificDetails",
          "description": "Fabric specific settings."
        },
        "healthErrorDetails": {
          "type": "array",
          "description": "Fabric health error details.",
          "items": {
            "$ref": "#/$defs/HealthError"
          }
        },
        "health": {
          "type": "string",
          "description": "Health of fabric."
        }
      }
    },
    "FabricSpecificDetails": {
      "type": "object",
      "description": "Fabric specific details.",
      "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
    }
  }
}