{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-arc/json-schema/microsoft-azure-arc-machine-assess-patches-result-schema.json",
  "title": "MachineAssessPatchesResult",
  "description": "Describes the properties of an AssessPatches result.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-arc-hybridcompute-openapi.yml#/components/schemas/MachineAssessPatchesResult",
  "type": "object",
  "properties": {
    "status": {
      "$ref": "#/$defs/PatchOperationStatus"
    },
    "assessmentActivityId": {
      "type": "string",
      "format": "uuid",
      "description": "The activity ID of the operation that produced this result.",
      "readOnly": true
    },
    "rebootPending": {
      "type": "boolean",
      "description": "The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred.",
      "readOnly": true
    },
    "availablePatchCountByClassification": {
      "$ref": "#/$defs/AvailablePatchCountByClassification"
    },
    "startDateTime": {
      "type": "string",
      "format": "date-time",
      "description": "The UTC timestamp when the operation began.",
      "readOnly": true
    },
    "lastModifiedDateTime": {
      "type": "string",
      "format": "date-time",
      "description": "The UTC timestamp when the operation finished.",
      "readOnly": true
    },
    "startedBy": {
      "$ref": "#/$defs/PatchOperationStartedBy"
    },
    "patchServiceUsed": {
      "$ref": "#/$defs/PatchServiceUsed"
    },
    "osType": {
      "$ref": "#/$defs/OsType"
    },
    "errorDetails": {
      "$ref": "#/$defs/ErrorDetail"
    }
  },
  "$defs": {
    "AvailablePatchCountByClassification": {
      "type": "object",
      "description": "Summarization of patches available for installation on the machine by classification.",
      "properties": {
        "security": {
          "type": "integer",
          "format": "int32",
          "description": "Number of security patches available for installation.",
          "readOnly": true
        },
        "critical": {
          "type": "integer",
          "format": "int32",
          "description": "Number of critical patches available for installation.",
          "readOnly": true
        },
        "definition": {
          "type": "integer",
          "format": "int32",
          "description": "Number of definition patches available for installation.",
          "readOnly": true
        },
        "updateRollup": {
          "type": "integer",
          "format": "int32",
          "description": "Number of update Rollup patches available for installation.",
          "readOnly": true
        },
        "featurePack": {
          "type": "integer",
          "format": "int32",
          "description": "Number of feature pack patches available for installation.",
          "readOnly": true
        },
        "servicePack": {
          "type": "integer",
          "format": "int32",
          "description": "Number of service pack patches available for installation.",
          "readOnly": true
        },
        "tools": {
          "type": "integer",
          "format": "int32",
          "description": "Number of tools patches available for installation.",
          "readOnly": true
        },
        "updates": {
          "type": "integer",
          "format": "int32",
          "description": "Number of updates category patches available for installation.",
          "readOnly": true
        },
        "other": {
          "type": "integer",
          "format": "int32",
          "description": "Number of other patches available for installation.",
          "readOnly": true
        }
      }
    },
    "ErrorAdditionalInfo": {
      "type": "object",
      "description": "The resource management error additional info.",
      "properties": {
        "type": {
          "type": "string",
          "description": "The additional info type.",
          "readOnly": true
        },
        "info": {
          "type": "object",
          "description": "The additional info.",
          "readOnly": true
        }
      }
    },
    "ErrorDetail": {
      "type": "object",
      "description": "The error detail.",
      "properties": {
        "code": {
          "type": "string",
          "description": "The error code.",
          "readOnly": true
        },
        "message": {
          "type": "string",
          "description": "The error message.",
          "readOnly": true
        },
        "target": {
          "type": "string",
          "description": "The error target.",
          "readOnly": true
        },
        "details": {
          "type": "array",
          "description": "The error details.",
          "items": {
            "$ref": "#/$defs/ErrorDetail"
          },
          "readOnly": true,
          "x-ms-identifiers": [
            "message",
            "target"
          ]
        },
        "additionalInfo": {
          "type": "array",
          "description": "The error additional info.",
          "items": {
            "$ref": "#/$defs/ErrorAdditionalInfo"
          },
          "readOnly": true,
          "x-ms-identifiers": []
        }
      }
    },
    "OsType": {
      "type": "string",
      "description": "The operating system type of the machine.",
      "enum": [
        "Windows",
        "Linux"
      ],
      "x-ms-enum": {
        "name": "OsType",
        "modelAsString": true,
        "values": [
          {
            "name": "Windows",
            "value": "Windows",
            "description": "Windows"
          },
          {
            "name": "Linux",
            "value": "Linux",
            "description": "Linux"
          }
        ]
      }
    },
    "PatchOperationStartedBy": {
      "type": "string",
      "description": "Indicates if operation was triggered by user or by platform.",
      "enum": [
        "User",
        "Platform"
      ],
      "x-ms-enum": {
        "name": "PatchOperationStartedBy",
        "modelAsString": true,
        "values": [
          {
            "name": "User",
            "value": "User",
            "description": "User"
          },
          {
            "name": "Platform",
            "value": "Platform",
            "description": "Platform"
          }
        ]
      }
    },
    "PatchOperationStatus": {
      "type": "string",
      "description": "The overall success or failure status of the operation. It remains \"InProgress\" until the operation completes. At that point it will become \"Unknown\", \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\"",
      "enum": [
        "Unknown",
        "InProgress",
        "Failed",
        "Succeeded",
        "CompletedWithWarnings"
      ],
      "x-ms-enum": {
        "name": "PatchOperationStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "Unknown",
            "value": "Unknown",
            "description": "Unknown"
          },
          {
            "name": "InProgress",
            "value": "InProgress",
            "description": "InProgress"
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Failed"
          },
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "Succeeded"
          },
          {
            "name": "CompletedWithWarnings",
            "value": "CompletedWithWarnings",
            "description": "CompletedWithWarnings"
          }
        ]
      }
    },
    "PatchServiceUsed": {
      "type": "string",
      "description": "Specifies the patch service used for the operation.",
      "enum": [
        "Unknown",
        "WU",
        "WU_WSUS",
        "YUM",
        "APT",
        "Zypper"
      ],
      "x-ms-enum": {
        "name": "PatchServiceUsed",
        "modelAsString": true,
        "values": [
          {
            "name": "Unknown",
            "value": "Unknown",
            "description": "Unknown"
          },
          {
            "name": "WU",
            "value": "WU",
            "description": "WU"
          },
          {
            "name": "WU_WSUS",
            "value": "WU_WSUS",
            "description": "WU_WSUS"
          },
          {
            "name": "YUM",
            "value": "YUM",
            "description": "YUM"
          },
          {
            "name": "APT",
            "value": "APT",
            "description": "APT"
          },
          {
            "name": "Zypper",
            "value": "Zypper",
            "description": "Zypper"
          }
        ]
      }
    }
  }
}