{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-backup/json-schema/microsoft-azure-backup-protection-intent-resource-schema.json",
  "title": "ProtectionIntentResource",
  "description": "Base class for backup ProtectionIntent.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/microsoft-azure-backup-protectionintentresources-api-openapi.yml#/components/schemas/ProtectionIntentResource",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/ProtectionIntent",
      "description": "ProtectionIntentResource properties"
    },
    "tags": {
      "type": "object",
      "description": "Resource tags.",
      "additionalProperties": {
        "type": "string"
      }
    },
    "location": {
      "$ref": "#/$defs/Azure.Core.azureLocation",
      "description": "The geo-location where the resource lives",
      "x-ms-mutability": [
        "read",
        "create"
      ]
    },
    "eTag": {
      "type": "string",
      "description": "Optional ETag."
    }
  },
  "allOf": [
    {
      "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource"
    }
  ],
  "$defs": {
    "Azure.Core.azureLocation": {
      "type": "string",
      "description": "Represents an Azure geography region where supported resource providers live."
    },
    "BackupManagementType": {
      "type": "string",
      "description": "Backup management type to execute the current job.",
      "enum": [
        "Invalid",
        "AzureIaasVM",
        "MAB",
        "DPM",
        "AzureBackupServer",
        "AzureSql",
        "AzureStorage",
        "AzureWorkload",
        "DefaultBackup"
      ],
      "x-ms-enum": {
        "name": "BackupManagementType",
        "modelAsString": true,
        "values": [
          {
            "name": "Invalid",
            "value": "Invalid"
          },
          {
            "name": "AzureIaasVM",
            "value": "AzureIaasVM"
          },
          {
            "name": "MAB",
            "value": "MAB"
          },
          {
            "name": "DPM",
            "value": "DPM"
          },
          {
            "name": "AzureBackupServer",
            "value": "AzureBackupServer"
          },
          {
            "name": "AzureSql",
            "value": "AzureSql"
          },
          {
            "name": "AzureStorage",
            "value": "AzureStorage"
          },
          {
            "name": "AzureWorkload",
            "value": "AzureWorkload"
          },
          {
            "name": "DefaultBackup",
            "value": "DefaultBackup"
          }
        ]
      }
    },
    "ProtectionIntent": {
      "type": "object",
      "description": "Base class for backup ProtectionIntent.",
      "properties": {
        "protectionIntentItemType": {
          "$ref": "#/$defs/ProtectionIntentItemType",
          "description": "backup protectionIntent type."
        },
        "backupManagementType": {
          "$ref": "#/$defs/BackupManagementType",
          "description": "Type of backup management for the backed up item."
        },
        "sourceResourceId": {
          "type": "string",
          "description": "ARM ID of the resource to be backed up."
        },
        "itemId": {
          "type": "string",
          "description": "ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId"
        },
        "policyId": {
          "type": "string",
          "description": "ID of the backup policy with which this item is backed up."
        },
        "protectionState": {
          "$ref": "#/$defs/ProtectionStatus",
          "description": "Backup state of this backup item."
        }
      },
      "required": [
        "protectionIntentItemType"
      ]
    },
    "ProtectionIntentItemType": {
      "type": "string",
      "description": "backup protectionIntent type.",
      "enum": [
        "Invalid",
        "AzureResourceItem",
        "RecoveryServiceVaultItem",
        "AzureWorkloadContainerAutoProtectionIntent",
        "AzureWorkloadAutoProtectionIntent",
        "AzureWorkloadSQLAutoProtectionIntent"
      ],
      "x-ms-enum": {
        "name": "ProtectionIntentItemType",
        "modelAsString": true,
        "values": [
          {
            "name": "Invalid",
            "value": "Invalid"
          },
          {
            "name": "AzureResourceItem",
            "value": "AzureResourceItem"
          },
          {
            "name": "RecoveryServiceVaultItem",
            "value": "RecoveryServiceVaultItem"
          },
          {
            "name": "AzureWorkloadContainerAutoProtectionIntent",
            "value": "AzureWorkloadContainerAutoProtectionIntent"
          },
          {
            "name": "AzureWorkloadAutoProtectionIntent",
            "value": "AzureWorkloadAutoProtectionIntent"
          },
          {
            "name": "AzureWorkloadSQLAutoProtectionIntent",
            "value": "AzureWorkloadSQLAutoProtectionIntent"
          }
        ]
      }
    },
    "ProtectionStatus": {
      "type": "string",
      "description": "Specifies whether the container is registered or not",
      "enum": [
        "Invalid",
        "NotProtected",
        "Protecting",
        "Protected",
        "ProtectionFailed"
      ],
      "x-ms-enum": {
        "name": "ProtectionStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "Invalid",
            "value": "Invalid"
          },
          {
            "name": "NotProtected",
            "value": "NotProtected"
          },
          {
            "name": "Protecting",
            "value": "Protecting"
          },
          {
            "name": "Protected",
            "value": "Protected"
          },
          {
            "name": "ProtectionFailed",
            "value": "ProtectionFailed"
          }
        ]
      }
    }
  }
}