{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-backup/json-schema/microsoft-azure-backup-azure-backup-job-resource-schema.json",
  "title": "AzureBackupJobResource",
  "description": "AzureBackup Job Resource Class",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/microsoft-azure-backup-azurebackupjobresources-api-openapi.yml#/components/schemas/AzureBackupJobResource",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/AzureBackupJob",
      "description": "AzureBackupJobResource properties"
    }
  },
  "allOf": [
    {
      "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource"
    }
  ],
  "$defs": {
    "AzureBackupJob": {
      "type": "object",
      "description": "AzureBackup Job Class",
      "properties": {
        "activityID": {
          "type": "string",
          "description": "Job Activity Id"
        },
        "backupInstanceFriendlyName": {
          "type": "string",
          "description": "Name of the Backup Instance"
        },
        "backupInstanceId": {
          "type": "string",
          "description": "ARM ID of the Backup Instance",
          "readOnly": true
        },
        "dataSourceId": {
          "type": "string",
          "description": "ARM ID of the DataSource"
        },
        "dataSourceLocation": {
          "type": "string",
          "description": "Location of the DataSource"
        },
        "dataSourceName": {
          "type": "string",
          "description": "User Friendly Name of the DataSource"
        },
        "dataSourceSetName": {
          "type": "string",
          "description": "Data Source Set Name of the DataSource"
        },
        "dataSourceType": {
          "type": "string",
          "description": "Type of DataSource"
        },
        "duration": {
          "type": "string",
          "description": "Total run time of the job. ISO 8601 format."
        },
        "endTime": {
          "type": "string",
          "format": "date-time",
          "description": "EndTime of the job(in UTC)",
          "readOnly": true
        },
        "errorDetails": {
          "type": "array",
          "description": "A List, detailing the errors related to the job",
          "items": {
            "$ref": "#/$defs/UserFacingError"
          },
          "readOnly": true,
          "x-ms-identifiers": []
        },
        "extendedInfo": {
          "$ref": "#/$defs/JobExtendedInfo",
          "description": "Extended Information about the job",
          "readOnly": true
        },
        "isUserTriggered": {
          "type": "boolean",
          "description": "Indicated that whether the job is adhoc(true) or scheduled(false)"
        },
        "operation": {
          "type": "string",
          "description": "It indicates the type of Job i.e. Backup:full/log/diff ;Restore:ALR/OLR; Tiering:Backup/Archive ; Management:ConfigureProtection/UnConfigure"
        },
        "operationCategory": {
          "type": "string",
          "description": "It indicates the type of Job i.e. Backup/Restore/Tiering/Management"
        },
        "policyId": {
          "type": "string",
          "description": "ARM ID of the policy",
          "readOnly": true
        },
        "policyName": {
          "type": "string",
          "description": "Name of the policy",
          "readOnly": true
        },
        "progressEnabled": {
          "type": "boolean",
          "description": "Indicated whether progress is enabled for the job"
        },
        "progressUrl": {
          "type": "string",
          "description": "Url which contains job's progress",
          "readOnly": true
        },
        "rehydrationPriority": {
          "type": "string",
          "description": "Priority to be used for rehydration",
          "readOnly": true
        },
        "restoreType": {
          "type": "string",
          "description": "It indicates the sub type of operation i.e. in case of Restore it can be ALR/OLR",
          "readOnly": true
        },
        "sourceResourceGroup": {
          "type": "string",
          "description": "Resource Group Name of the Datasource"
        },
        "sourceSubscriptionID": {
          "type": "string",
          "description": "SubscriptionId corresponding to the DataSource"
        },
        "startTime": {
          "type": "string",
          "format": "date-time",
          "description": "StartTime of the job(in UTC)"
        },
        "status": {
          "type": "string",
          "description": "Status of the job like InProgress/Completed/Failed/Cancelled/CompletedWithWarnings/Cancelling/Paused"
        },
        "subscriptionId": {
          "type": "string",
          "description": "Subscription Id of the corresponding backup vault"
        },
        "supportedActions": {
          "type": "array",
          "description": "List of supported actions",
          "items": {
            "type": "string"
          }
        },
        "vaultName": {
          "type": "string",
          "description": "Name of the vault"
        },
        "etag": {
          "type": "string"
        },
        "sourceDataStoreName": {
          "type": "string"
        },
        "destinationDataStoreName": {
          "type": "string"
        }
      },
      "required": [
        "activityID",
        "backupInstanceFriendlyName",
        "dataSourceId",
        "dataSourceLocation",
        "dataSourceName",
        "dataSourceType",
        "isUserTriggered",
        "operation",
        "operationCategory",
        "progressEnabled",
        "sourceResourceGroup",
        "sourceSubscriptionID",
        "startTime",
        "status",
        "subscriptionId",
        "supportedActions",
        "vaultName"
      ]
    },
    "InnerError": {
      "type": "object",
      "description": "Inner Error",
      "properties": {
        "additionalInfo": {
          "type": "object",
          "description": "Any Key value pairs that can be provided to the client for additional  verbose information.",
          "additionalProperties": {
            "type": "string"
          }
        },
        "code": {
          "type": "string",
          "description": "Unique code for this error"
        },
        "embeddedInnerError": {
          "$ref": "#/$defs/InnerError",
          "description": "Child Inner Error, to allow Nesting."
        }
      }
    },
    "JobExtendedInfo": {
      "type": "object",
      "description": "Extended Information about the job",
      "properties": {
        "additionalDetails": {
          "type": "object",
          "description": "Job's Additional Details",
          "additionalProperties": {
            "type": "string"
          }
        },
        "backupInstanceState": {
          "type": "string",
          "description": "State of the Backup Instance",
          "readOnly": true
        },
        "dataTransferredInBytes": {
          "type": "number",
          "format": "double",
          "description": "Number of bytes transferred",
          "readOnly": true
        },
        "recoveryDestination": {
          "type": "string",
          "description": "Destination where restore is done",
          "readOnly": true
        },
        "sourceRecoverPoint": {
          "$ref": "#/$defs/RestoreJobRecoveryPointDetails",
          "description": "Details of the Source Recovery Point",
          "readOnly": true
        },
        "subTasks": {
          "type": "array",
          "description": "List of Sub Tasks of the job",
          "items": {
            "$ref": "#/$defs/JobSubTask"
          },
          "readOnly": true,
          "x-ms-identifiers": []
        },
        "targetRecoverPoint": {
          "$ref": "#/$defs/RestoreJobRecoveryPointDetails",
          "description": "Details of the Target Recovery Point",
          "readOnly": true
        },
        "warningDetails": {
          "type": "array",
          "description": "A List, detailing the warnings related to the job",
          "items": {
            "$ref": "#/$defs/UserFacingWarningDetail"
          },
          "readOnly": true,
          "x-ms-identifiers": []
        }
      }
    },
    "JobSubTask": {
      "type": "object",
      "description": "Details of Job's Sub Task",
      "properties": {
        "additionalDetails": {
          "type": "object",
          "description": "Additional details of Sub Tasks",
          "additionalProperties": {
            "type": "string"
          }
        },
        "taskId": {
          "type": "integer",
          "format": "int32",
          "description": "Task Id of the Sub Task"
        },
        "taskName": {
          "type": "string",
          "description": "Name of the Sub Task"
        },
        "taskProgress": {
          "type": "string",
          "description": "Progress of the Sub Task",
          "readOnly": true
        },
        "taskStatus": {
          "type": "string",
          "description": "Status of the Sub Task"
        }
      },
      "required": [
        "taskId",
        "taskName",
        "taskStatus"
      ]
    },
    "RestoreJobRecoveryPointDetails": {
      "type": "object",
      "properties": {
        "recoveryPointID": {
          "type": "string"
        },
        "recoveryPointTime": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "UserFacingError": {
      "type": "object",
      "description": "Error object used by layers that have access to localized content, and propagate that to user",
      "properties": {
        "code": {
          "type": "string",
          "description": "Unique code for this error"
        },
        "details": {
          "type": "array",
          "description": "Additional related Errors",
          "items": {
            "$ref": "#/$defs/UserFacingError"
          },
          "x-ms-identifiers": []
        },
        "innerError": {
          "$ref": "#/$defs/InnerError",
          "description": "Inner Error"
        },
        "isRetryable": {
          "type": "boolean",
          "description": "Whether the operation will be retryable or not"
        },
        "isUserError": {
          "type": "boolean",
          "description": "Whether the operation is due to a user error or service error"
        },
        "properties": {
          "type": "object",
          "description": "Any key value pairs that can be injected inside error object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "message": {
          "type": "string"
        },
        "recommendedAction": {
          "type": "array",
          "description": "RecommendedAction � localized.",
          "items": {
            "type": "string"
          }
        },
        "target": {
          "type": "string",
          "description": "Target of the error."
        }
      }
    },
    "UserFacingWarningDetail": {
      "type": "object",
      "description": "Warning object used by layers that have access to localized content, and propagate that to user",
      "properties": {
        "resourceName": {
          "type": "string",
          "description": "Name of resource for which warning is raised."
        },
        "warning": {
          "$ref": "#/$defs/UserFacingError",
          "description": "Error details for the warning."
        }
      },
      "required": [
        "warning"
      ]
    }
  }
}