{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-migration-center/json-schema/google-cloud-migration-center-image-import-job-schema.json",
  "title": "ImageImportJob",
  "description": "ImageImportJob describes the progress and result of an image import.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-migration-center-vmmigration-projects-api-openapi.yml#/components/schemas/ImageImportJob",
  "properties": {
    "createdResources": {
      "description": "Output only. The resource paths of the resources created by the image import job.",
      "readOnly": true,
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "name": {
      "description": "Output only. The resource path of the ImageImportJob.",
      "readOnly": true,
      "type": "string"
    },
    "state": {
      "description": "Output only. The state of the image import.",
      "readOnly": true,
      "type": "string",
      "enum": [
        "STATE_UNSPECIFIED",
        "PENDING",
        "RUNNING",
        "SUCCEEDED",
        "FAILED",
        "CANCELLING",
        "CANCELLED"
      ]
    },
    "steps": {
      "items": {
        "$ref": "#/$defs/ImageImportStep"
      },
      "description": "Output only. The image import steps list representing its progress.",
      "readOnly": true,
      "type": "array"
    },
    "endTime": {
      "description": "Output only. The time the image import was ended.",
      "type": "string",
      "format": "google-datetime",
      "readOnly": true
    },
    "machineImageTargetDetails": {
      "$ref": "#/$defs/MachineImageTargetDetails",
      "description": "Output only. Target details used to import a machine image."
    },
    "createTime": {
      "readOnly": true,
      "description": "Output only. The time the image import was created (as an API call, not when it was actually created in the target).",
      "type": "string",
      "format": "google-datetime"
    },
    "diskImageTargetDetails": {
      "$ref": "#/$defs/DiskImageTargetDetails",
      "description": "Output only. Target details used to import a disk image."
    },
    "errors": {
      "readOnly": true,
      "type": "array",
      "items": {
        "$ref": "#/$defs/Status"
      },
      "description": "Output only. Provides details on the error that led to the image import state in case of an error."
    },
    "warnings": {
      "items": {
        "$ref": "#/$defs/MigrationWarning"
      },
      "description": "Output only. Warnings that occurred during the image import.",
      "type": "array",
      "readOnly": true
    },
    "cloudStorageUri": {
      "type": "string",
      "description": "Output only. The path to the Cloud Storage file from which the image should be imported.",
      "readOnly": true
    }
  },
  "type": "object",
  "$defs": {
    "AdaptationModifier": {
      "description": "AdaptationModifier a modifier to be used for configuration of the OS adaptation process.",
      "type": "object",
      "properties": {
        "modifier": {
          "type": "string",
          "description": "Optional. The modifier name."
        },
        "value": {
          "type": "string",
          "description": "Optional. The value of the modifier. The actual value depends on the modifier and can also be empty."
        }
      }
    },
    "AdaptingOSStep": {
      "type": "object",
      "description": "AdaptingOSStep contains specific step details.",
      "properties": {}
    },
    "CreatingImageStep": {
      "description": "CreatingImageStep contains specific step details.",
      "properties": {},
      "type": "object"
    },
    "DataDiskImageImport": {
      "properties": {
        "guestOsFeatures": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "description": "Optional. A list of guest OS features to apply to the imported image. These features are flags that are used by Compute Engine to enable certain capabilities for virtual machine instances that are created from the image. This field does not change the OS of the image; it only marks the image with the specified features. The user must ensure that the OS is compatible with the features. For a list of available features, see https://cloud.google.com/compute/docs/images/create-custom#guest-os-features."
        }
      },
      "type": "object",
      "description": "Used when the image import is not using OS adaptation process."
    },
    "DiskImageTargetDetails": {
      "properties": {
        "labels": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Optional. A map of labels to associate with the image."
        },
        "targetProject": {
          "description": "Required. Reference to the TargetProject resource that represents the target project in which the imported image will be created.",
          "type": "string"
        },
        "encryption": {
          "$ref": "#/$defs/Encryption",
          "description": "Immutable. The encryption to apply to the image."
        },
        "imageName": {
          "type": "string",
          "description": "Required. The name of the image to be created."
        },
        "singleRegionStorage": {
          "description": "Optional. Set to true to set the image storageLocations to the single region of the import job. When false, the closest multi-region is selected.",
          "type": "boolean"
        },
        "osAdaptationParameters": {
          "$ref": "#/$defs/ImageImportOsAdaptationParameters",
          "description": "Optional. Use to set the parameters relevant for the OS adaptation process."
        },
        "familyName": {
          "type": "string",
          "description": "Optional. The name of the image family to which the new image belongs."
        },
        "description": {
          "type": "string",
          "description": "Optional. An optional description of the image."
        },
        "dataDiskImageImport": {
          "$ref": "#/$defs/DataDiskImageImport",
          "description": "Optional. Use to skip OS adaptation process."
        },
        "additionalLicenses": {
          "description": "Optional. Additional licenses to assign to the image. Format: https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME Or https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "description": "The target details of the image resource that will be created by the import job.",
      "type": "object"
    },
    "Encryption": {
      "type": "object",
      "description": "Encryption message describes the details of the applied encryption.",
      "properties": {
        "kmsKey": {
          "description": "Required. The name of the encryption key that is stored in Google Cloud KMS.",
          "type": "string"
        }
      }
    },
    "ImageImportOsAdaptationParameters": {
      "description": "Parameters affecting the OS adaptation process.",
      "properties": {
        "bootConversion": {
          "type": "string",
          "enum": [
            "BOOT_CONVERSION_UNSPECIFIED",
            "NONE",
            "BIOS_TO_EFI"
          ],
          "description": "Optional. By default the image will keep its existing boot option. Setting this property will trigger an internal process which will convert the image from using the existing boot option to another. The size of the boot disk might be increased to allow the conversion"
        },
        "licenseType": {
          "description": "Optional. Choose which type of license to apply to the imported image.",
          "type": "string",
          "enum": [
            "COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT",
            "COMPUTE_ENGINE_LICENSE_TYPE_PAYG",
            "COMPUTE_ENGINE_LICENSE_TYPE_BYOL"
          ]
        },
        "generalize": {
          "description": "Optional. Set to true in order to generalize the imported image. The generalization process enables co-existence of multiple VMs created from the same image. For Windows, generalizing the image removes computer-specific information such as installed drivers and the computer security identifier (SID).",
          "type": "boolean"
        },
        "adaptationModifiers": {
          "type": "array",
          "description": "Optional. Modifiers to be used as configuration of the OS adaptation process.",
          "items": {
            "$ref": "#/$defs/AdaptationModifier"
          }
        }
      },
      "type": "object"
    },
    "ImageImportStep": {
      "description": "ImageImportStep holds information about the image import step progress.",
      "properties": {
        "initializing": {
          "$ref": "#/$defs/InitializingImageImportStep",
          "description": "Initializing step."
        },
        "endTime": {
          "type": "string",
          "format": "google-datetime",
          "description": "Output only. The time the step has ended.",
          "readOnly": true
        },
        "adaptingOs": {
          "$ref": "#/$defs/AdaptingOSStep",
          "description": "Adapting OS step."
        },
        "creatingImage": {
          "$ref": "#/$defs/CreatingImageStep",
          "description": "Creating image step."
        },
        "loadingSourceFiles": {
          "$ref": "#/$defs/LoadingImageSourceFilesStep",
          "description": "Loading source files step."
        },
        "startTime": {
          "type": "string",
          "format": "google-datetime",
          "readOnly": true,
          "description": "Output only. The time the step has started."
        }
      },
      "type": "object"
    },
    "InitializingImageImportStep": {
      "type": "object",
      "description": "InitializingImageImportStep contains specific step details.",
      "properties": {}
    },
    "Link": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "The URL of the link."
        },
        "description": {
          "description": "Describes what the link offers.",
          "type": "string"
        }
      },
      "description": "Describes a URL link."
    },
    "LoadingImageSourceFilesStep": {
      "properties": {},
      "description": "LoadingImageSourceFilesStep contains specific step details.",
      "type": "object"
    },
    "LocalizedMessage": {
      "properties": {
        "locale": {
          "description": "The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: \"en-US\", \"fr-CH\", \"es-MX\"",
          "type": "string"
        },
        "message": {
          "description": "The localized error message in the above locale.",
          "type": "string"
        }
      },
      "description": "Provides a localized error message that is safe to return to the user which can be attached to an RPC error.",
      "type": "object"
    },
    "MachineImageParametersOverrides": {
      "type": "object",
      "description": "Parameters overriding decisions based on the source machine image configurations.",
      "properties": {
        "machineType": {
          "type": "string",
          "description": "Optional. The machine type to create the MachineImage with. If empty, the service will choose a relevant machine type based on the information from the source image. For more information about machine types, please refer to https://cloud.google.com/compute/docs/machine-resource."
        }
      }
    },
    "MachineImageTargetDetails": {
      "properties": {
        "machineImageParametersOverrides": {
          "$ref": "#/$defs/MachineImageParametersOverrides",
          "description": "Optional. Parameters overriding decisions based on the source machine image configurations."
        },
        "shieldedInstanceConfig": {
          "$ref": "#/$defs/ShieldedInstanceConfig",
          "description": "Optional. Shielded instance configuration."
        },
        "tags": {
          "items": {
            "type": "string"
          },
          "description": "Optional. The tags to apply to the instance created by the machine image.",
          "type": "array"
        },
        "encryption": {
          "$ref": "#/$defs/Encryption",
          "description": "Immutable. The encryption to apply to the machine image. If the Image Import resource has an encryption, this field must be set to the same encryption key."
        },
        "description": {
          "description": "Optional. An optional description of the machine image.",
          "type": "string"
        },
        "labels": {
          "description": "Optional. The labels to apply to the instance created by the machine image.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "skipOsAdaptation": {
          "$ref": "#/$defs/SkipOsAdaptation",
          "description": "Optional. Use to skip OS adaptation process."
        },
        "singleRegionStorage": {
          "description": "Optional. Set to true to set the machine image storageLocations to the single region of the import job. When false, the closest multi-region is selected.",
          "type": "boolean"
        },
        "serviceAccount": {
          "$ref": "#/$defs/ServiceAccount",
          "description": "Optional. The service account to assign to the instance created by the machine image."
        },
        "machineImageName": {
          "description": "Required. The name of the machine image to be created.",
          "type": "string"
        },
        "targetProject": {
          "description": "Required. Reference to the TargetProject resource that represents the target project in which the imported machine image will be created.",
          "type": "string"
        },
        "additionalLicenses": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Optional. Additional licenses to assign to the instance created by the machine image. Format: https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME Or https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME"
        },
        "osAdaptationParameters": {
          "$ref": "#/$defs/ImageImportOsAdaptationParameters",
          "description": "Optional. Use to set the parameters relevant for the OS adaptation process."
        },
        "networkInterfaces": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NetworkInterface"
          },
          "description": "Optional. The network interfaces to create with the instance created by the machine image. Internal and external IP addresses, and network tiers are ignored for machine image import."
        }
      },
      "description": "The target details of the machine image resource that will be created by the image import job.",
      "type": "object"
    },
    "MigrationWarning": {
      "properties": {
        "code": {
          "description": "The warning code.",
          "type": "string",
          "enum": [
            "WARNING_CODE_UNSPECIFIED",
            "ADAPTATION_WARNING"
          ]
        },
        "helpLinks": {
          "items": {
            "$ref": "#/$defs/Link"
          },
          "description": "Output only. URL(s) pointing to additional information on handling the current warning.",
          "type": "array",
          "readOnly": true
        },
        "actionItem": {
          "$ref": "#/$defs/LocalizedMessage",
          "description": "Output only. Suggested action for solving the warning."
        },
        "warningMessage": {
          "$ref": "#/$defs/LocalizedMessage",
          "description": "Output only. The localized warning message."
        },
        "warningTime": {
          "format": "google-datetime",
          "description": "The time the warning occurred.",
          "type": "string"
        }
      },
      "type": "object",
      "description": "Represents migration resource warning information that can be used with google.rpc.Status message. MigrationWarning is used to present the user with warning information in migration operations."
    },
    "NetworkInterface": {
      "properties": {
        "internalIp": {
          "type": "string",
          "description": "Optional. The internal IP to define in the NIC. The formats accepted are: `ephemeral` \\ ipv4 address \\ a named address resource full path."
        },
        "subnetwork": {
          "description": "Optional. The subnetwork to connect the NIC to.",
          "type": "string"
        },
        "network": {
          "type": "string",
          "description": "Optional. The network to connect the NIC to."
        },
        "externalIp": {
          "description": "Optional. The external IP to define in the NIC.",
          "type": "string"
        },
        "networkTier": {
          "description": "Optional. The networking tier used for optimizing connectivity between instances and systems on the internet. Applies only for external ephemeral IP addresses. If left empty, will default to PREMIUM.",
          "type": "string",
          "enum": [
            "COMPUTE_ENGINE_NETWORK_TIER_UNSPECIFIED",
            "NETWORK_TIER_STANDARD",
            "NETWORK_TIER_PREMIUM"
          ]
        }
      },
      "type": "object",
      "description": "NetworkInterface represents a NIC of a VM."
    },
    "ServiceAccount": {
      "properties": {
        "scopes": {
          "type": "array",
          "description": "Optional. The list of scopes to be made available for this service account.",
          "items": {
            "type": "string"
          }
        },
        "email": {
          "description": "Required. The email address of the service account.",
          "type": "string"
        }
      },
      "description": "Service account to assign to the instance created by the machine image.",
      "type": "object"
    },
    "ShieldedInstanceConfig": {
      "description": "Shielded instance configuration.",
      "properties": {
        "secureBoot": {
          "type": "string",
          "enum": [
            "SECURE_BOOT_UNSPECIFIED",
            "TRUE",
            "FALSE"
          ],
          "description": "Optional. Defines whether the instance created by the machine image has Secure Boot enabled. This can be set to true only if the image boot option is EFI."
        },
        "enableIntegrityMonitoring": {
          "description": "Optional. Defines whether the instance created by the machine image has integrity monitoring enabled. This can be set to true only if the image boot option is EFI, and vTPM is enabled.",
          "type": "boolean"
        },
        "enableVtpm": {
          "type": "boolean",
          "description": "Optional. Defines whether the instance created by the machine image has vTPM enabled. This can be set to true only if the image boot option is EFI."
        }
      },
      "type": "object"
    },
    "SkipOsAdaptation": {
      "type": "object",
      "properties": {},
      "description": "Mentions that the machine image import is not using OS adaptation process."
    },
    "Status": {
      "type": "object",
      "properties": {
        "code": {
          "description": "The status code, which should be an enum value of google.rpc.Code.",
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string",
          "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client."
        },
        "details": {
          "type": "array",
          "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.",
          "items": {
            "additionalProperties": {
              "description": "Properties of the object. Contains field @type with type URL."
            },
            "type": "object"
          }
        }
      },
      "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors)."
    }
  }
}