{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-test-labs/json-schema/azure-test-labs-custom-image-list-schema.json",
  "title": "CustomImageList",
  "description": "The response of a list operation.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-test-labs-customimages-api-openapi.yml#/components/schemas/CustomImageList",
  "properties": {
    "nextLink": {
      "description": "Link for next set of results.",
      "type": "string"
    },
    "value": {
      "description": "Results of the list operation.",
      "items": {
        "$ref": "#/$defs/CustomImage"
      },
      "type": "array"
    }
  },
  "type": "object",
  "$defs": {
    "CustomImage": {
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ],
      "description": "A custom image.",
      "properties": {
        "properties": {
          "$ref": "#/$defs/CustomImageProperties",
          "description": "The properties of the resource.",
          "x-ms-client-flatten": true
        }
      },
      "required": [
        "properties"
      ],
      "type": "object"
    },
    "CustomImageProperties": {
      "description": "Properties of a custom image.",
      "properties": {
        "author": {
          "description": "The author of the custom image.",
          "type": "string"
        },
        "creationDate": {
          "description": "The creation date of the custom image.",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "customImagePlan": {
          "$ref": "#/$defs/CustomImagePropertiesFromPlan",
          "description": "Storage information about the plan related to this custom image"
        },
        "dataDiskStorageInfo": {
          "description": "Storage information about the data disks present in the custom image",
          "items": {
            "$ref": "#/$defs/DataDiskStorageTypeInfo"
          },
          "type": "array"
        },
        "description": {
          "description": "The description of the custom image.",
          "type": "string"
        },
        "isPlanAuthorized": {
          "description": "Whether or not the custom images underlying offer/plan has been enabled for programmatic deployment",
          "type": "boolean"
        },
        "managedImageId": {
          "description": "The Managed Image Id backing the custom image.",
          "type": "string"
        },
        "managedSnapshotId": {
          "description": "The Managed Snapshot Id backing the custom image.",
          "type": "string"
        },
        "provisioningState": {
          "description": "The provisioning status of the resource.",
          "readOnly": true,
          "type": "string"
        },
        "uniqueIdentifier": {
          "description": "The unique immutable identifier of a resource (Guid).",
          "readOnly": true,
          "type": "string"
        },
        "vhd": {
          "$ref": "#/$defs/CustomImagePropertiesCustom",
          "description": "The VHD from which the image is to be created."
        },
        "vm": {
          "$ref": "#/$defs/CustomImagePropertiesFromVm",
          "description": "The virtual machine from which the image is to be created."
        }
      },
      "type": "object"
    },
    "CustomImagePropertiesCustom": {
      "description": "Properties for creating a custom image from a VHD.",
      "properties": {
        "imageName": {
          "description": "The image name.",
          "type": "string"
        },
        "osType": {
          "description": "The OS type of the custom image (i.e. Windows, Linux)",
          "enum": [
            "Windows",
            "Linux",
            "None"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "CustomImageOsType"
          }
        },
        "sysPrep": {
          "description": "Indicates whether sysprep has been run on the VHD.",
          "type": "boolean"
        }
      },
      "required": [
        "osType"
      ],
      "type": "object"
    },
    "CustomImagePropertiesFromPlan": {
      "description": "Properties for plan on a custom image.",
      "properties": {
        "id": {
          "description": "The id of the plan, equivalent to name of the plan",
          "type": "string"
        },
        "offer": {
          "description": "The offer for the plan from the marketplace image the custom image is derived from",
          "type": "string"
        },
        "publisher": {
          "description": "The publisher for the plan from the marketplace image the custom image is derived from",
          "type": "string"
        }
      },
      "type": "object"
    },
    "CustomImagePropertiesFromVm": {
      "description": "Properties for creating a custom image from a virtual machine.",
      "properties": {
        "linuxOsInfo": {
          "$ref": "#/$defs/LinuxOsInfo",
          "description": "The Linux OS information of the VM."
        },
        "sourceVmId": {
          "description": "The source vm identifier.",
          "type": "string"
        },
        "windowsOsInfo": {
          "$ref": "#/$defs/WindowsOsInfo",
          "description": "The Windows OS information of the VM."
        }
      },
      "type": "object"
    },
    "DataDiskStorageTypeInfo": {
      "description": "Storage information about the data disks present in the custom image",
      "properties": {
        "lun": {
          "description": "Disk Lun",
          "type": "string"
        },
        "storageType": {
          "description": "Disk Storage Type",
          "enum": [
            "Standard",
            "Premium",
            "StandardSSD"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "StorageType"
          }
        }
      },
      "type": "object"
    },
    "LinuxOsInfo": {
      "description": "Information about a Linux OS.",
      "properties": {
        "linuxOsState": {
          "description": "The state of the Linux OS (i.e. NonDeprovisioned, DeprovisionRequested, DeprovisionApplied).",
          "enum": [
            "NonDeprovisioned",
            "DeprovisionRequested",
            "DeprovisionApplied"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "LinuxOsState"
          }
        }
      },
      "type": "object"
    },
    "Resource": {
      "description": "An Azure resource.",
      "properties": {
        "id": {
          "description": "The identifier of the resource.",
          "readOnly": true,
          "type": "string"
        },
        "location": {
          "description": "The location of the resource.",
          "type": "string"
        },
        "name": {
          "description": "The name of the resource.",
          "readOnly": true,
          "type": "string"
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "The tags of the resource.",
          "type": "object"
        },
        "type": {
          "description": "The type of the resource.",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object",
      "x-ms-azure-resource": true
    },
    "WindowsOsInfo": {
      "description": "Information about a Windows OS.",
      "properties": {
        "windowsOsState": {
          "description": "The state of the Windows OS (i.e. NonSysprepped, SysprepRequested, SysprepApplied).",
          "enum": [
            "NonSysprepped",
            "SysprepRequested",
            "SysprepApplied"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "WindowsOsState"
          }
        }
      },
      "type": "object"
    }
  }
}