{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure/json-schema/microsoft-azure-change-resource-result-schema.json",
  "title": "ChangeResourceResult",
  "description": "Change Resource",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-getchange-api-openapi.yml#/components/schemas/ChangeResourceResult",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/Resource"
    }
  ],
  "properties": {
    "properties": {
      "$ref": "#/$defs/ChangeProperties"
    }
  },
  "$defs": {
    "ChangeAttributes": {
      "description": "Details about the change resource",
      "type": "object",
      "properties": {
        "correlationId": {
          "description": "The ARM correlation ID of the change resource",
          "type": "string",
          "readOnly": true
        },
        "timestamp": {
          "description": "The time the change(s) on the target resource ocurred",
          "type": "string",
          "readOnly": true
        },
        "changesCount": {
          "type": "integer",
          "format": "int64",
          "readOnly": true,
          "description": "The number of changes this resource captures"
        },
        "previousResourceSnapshotId": {
          "description": "The GUID of the previous snapshot",
          "type": "string",
          "readOnly": true
        },
        "newResourceSnapshotId": {
          "description": "The GUID of the new snapshot",
          "type": "string",
          "readOnly": true
        }
      }
    },
    "ChangeBase": {
      "description": "An individual change on the target resource",
      "type": "object",
      "properties": {
        "propertyChangeType": {
          "description": "The type of change that occurred",
          "type": "string",
          "readOnly": true,
          "enum": [
            "Insert",
            "Update",
            "Remove"
          ],
          "x-ms-enum": {
            "name": "PropertyChangeType",
            "modelAsString": false,
            "values": [
              {
                "value": "Update",
                "description": "An existing property underwent a change",
                "name": "Update"
              },
              {
                "value": "Insert",
                "description": "A property was newly created",
                "name": "Insert"
              },
              {
                "value": "Remove",
                "description": "An existing property was deleted",
                "name": "Remove"
              }
            ]
          }
        },
        "changeCategory": {
          "description": "The entity that made the change",
          "type": "string",
          "readOnly": true,
          "enum": [
            "User",
            "System"
          ],
          "x-ms-enum": {
            "name": "ChangeCategory",
            "modelAsString": false,
            "values": [
              {
                "value": "User",
                "description": "User initiated change",
                "name": "User"
              },
              {
                "value": "System",
                "description": "System initiated change",
                "name": "System"
              }
            ]
          }
        },
        "previousValue": {
          "description": "The target resource property value before the change",
          "type": "string",
          "readOnly": true
        },
        "newValue": {
          "description": "The target resource property value after the change",
          "type": "string",
          "readOnly": true
        }
      }
    },
    "ChangeProperties": {
      "description": "The properties of a change",
      "type": "object",
      "properties": {
        "targetResourceId": {
          "description": "The fully qualified ID of the target resource that was changed",
          "type": "string",
          "readOnly": true
        },
        "targetResourceType": {
          "description": "The namespace and type of the resource",
          "type": "string",
          "readOnly": true
        },
        "changeType": {
          "description": "The type of change that was captured in the resource",
          "type": "string",
          "readOnly": true,
          "enum": [
            "Update",
            "Delete",
            "Create"
          ],
          "x-ms-enum": {
            "name": "ChangeType",
            "modelAsString": false,
            "values": [
              {
                "value": "Update",
                "description": "An existing resource underwent a change",
                "name": "Update"
              },
              {
                "value": "Delete",
                "description": "An existing resource was deleted",
                "name": "Delete"
              },
              {
                "value": "Create",
                "description": "A newly created resource",
                "name": "Create"
              }
            ]
          }
        },
        "changeAttributes": {
          "$ref": "#/$defs/ChangeAttributes"
        },
        "changes": {
          "$ref": "#/$defs/ChangesDictionary"
        }
      }
    },
    "ChangesDictionary": {
      "description": "A dictionary with changed property name as a key and the change details as the value",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/ChangeBase"
      }
    },
    "Resource": {
      "title": "Resource",
      "description": "Common fields that are returned in the response for all Azure Resource Manager resources",
      "type": "object",
      "properties": {
        "id": {
          "readOnly": true,
          "type": "string",
          "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
        },
        "name": {
          "readOnly": true,
          "type": "string",
          "description": "The name of the resource"
        },
        "type": {
          "readOnly": true,
          "type": "string",
          "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\""
        }
      },
      "x-ms-azure-resource": true
    }
  }
}