{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-migration-center/json-schema/google-cloud-migration-center-clone-job-schema.json",
  "title": "CloneJob",
  "description": "CloneJob describes the process of creating a clone of a MigratingVM to the requested target based on the latest successful uploaded snapshots. While the migration cycles of a MigratingVm take place, it is possible to verify the uploaded VM can be started in the cloud, by creating a clone. The clone can be created without any downtime, and it is created using the latest snapshots which are already in the cloud. The cloneJob is only responsible for its work, not its products, which means once it is finished, it will never touch the instance it created. It will only delete it in case of the CloneJob being cancelled or upon failure to clone.",
  "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/CloneJob",
  "properties": {
    "endTime": {
      "description": "Output only. The time the clone job was ended.",
      "readOnly": true,
      "type": "string",
      "format": "google-datetime"
    },
    "createTime": {
      "type": "string",
      "format": "google-datetime",
      "readOnly": true,
      "description": "Output only. The time the clone job was created (as an API call, not when it was actually created in the target)."
    },
    "name": {
      "type": "string",
      "description": "Output only. The name of the clone.",
      "readOnly": true
    },
    "steps": {
      "items": {
        "$ref": "#/$defs/CloneStep"
      },
      "type": "array",
      "description": "Output only. The clone steps list representing its progress.",
      "readOnly": true
    },
    "error": {
      "$ref": "#/$defs/Status",
      "description": "Output only. Provides details for the errors that led to the Clone Job's state."
    },
    "computeEngineDisksTargetDetails": {
      "$ref": "#/$defs/ComputeEngineDisksTargetDetails",
      "description": "Output only. Details of the target Persistent Disks in Compute Engine."
    },
    "stateTime": {
      "readOnly": true,
      "format": "google-datetime",
      "description": "Output only. The time the state was last updated.",
      "type": "string"
    },
    "state": {
      "type": "string",
      "enum": [
        "STATE_UNSPECIFIED",
        "PENDING",
        "ACTIVE",
        "FAILED",
        "SUCCEEDED",
        "CANCELLED",
        "CANCELLING",
        "ADAPTING_OS"
      ],
      "description": "Output only. State of the clone job.",
      "readOnly": true
    },
    "computeEngineTargetDetails": {
      "$ref": "#/$defs/ComputeEngineTargetDetails",
      "description": "Output only. Details of the target VM in Compute Engine."
    }
  },
  "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": {}
    },
    "AppliedLicense": {
      "properties": {
        "osLicense": {
          "description": "The OS license returned from the adaptation module's report.",
          "type": "string"
        },
        "type": {
          "description": "The license type that was used in OS adaptation.",
          "type": "string",
          "enum": [
            "TYPE_UNSPECIFIED",
            "NONE",
            "PAYG",
            "BYOL"
          ]
        }
      },
      "type": "object",
      "description": "AppliedLicense holds the license data returned by adaptation module report."
    },
    "CloneStep": {
      "type": "object",
      "description": "CloneStep holds information about the clone step progress.",
      "properties": {
        "endTime": {
          "format": "google-datetime",
          "type": "string",
          "description": "The time the step has ended."
        },
        "adaptingOs": {
          "$ref": "#/$defs/AdaptingOSStep",
          "description": "Adapting OS step."
        },
        "instantiatingMigratedVm": {
          "$ref": "#/$defs/InstantiatingMigratedVMStep",
          "description": "Instantiating migrated VM step."
        },
        "preparingVmDisks": {
          "$ref": "#/$defs/PreparingVMDisksStep",
          "description": "Preparing VM disks step."
        },
        "startTime": {
          "type": "string",
          "description": "The time the step has started.",
          "format": "google-datetime"
        }
      }
    },
    "ComputeEngineDisksTargetDetails": {
      "properties": {
        "disksTargetDetails": {
          "$ref": "#/$defs/DisksMigrationDisksTargetDetails",
          "description": "Details of the disks-only migration target."
        },
        "disks": {
          "items": {
            "$ref": "#/$defs/PersistentDisk"
          },
          "description": "The details of each created Persistent Disk.",
          "type": "array"
        },
        "vmTargetDetails": {
          "$ref": "#/$defs/DisksMigrationVmTargetDetails",
          "description": "Details for the VM the migrated data disks are attached to."
        }
      },
      "description": "ComputeEngineDisksTargetDetails is a collection of created Persistent Disks details.",
      "type": "object"
    },
    "ComputeEngineTargetDetails": {
      "type": "object",
      "description": "ComputeEngineTargetDetails is a collection of details for creating a VM in a target Compute Engine project.",
      "properties": {
        "bootConversion": {
          "description": "Optional. By default the virtual machine will keep its existing boot option. Setting this property will trigger an internal process which will convert the virtual machine from using the existing boot option to another.",
          "type": "string",
          "enum": [
            "BOOT_CONVERSION_UNSPECIFIED",
            "NONE",
            "BIOS_TO_EFI"
          ]
        },
        "machineType": {
          "description": "The machine type to create the VM with.",
          "type": "string"
        },
        "adaptationModifiers": {
          "items": {
            "$ref": "#/$defs/AdaptationModifier"
          },
          "description": "Optional. Modifiers to be used as configuration of the OS adaptation process.",
          "type": "array"
        },
        "storagePool": {
          "type": "string",
          "description": "Optional. The storage pool used for the VM disks. If specified this will be the storage pool in which the disk is created. This is the full path of the storage pool resource, for example: \"projects/my-project/zones/us-central1-a/storagePools/my-storage-pool\". The storage pool must be in the same project and zone as the target disks. The storage pool's type must match the disk type."
        },
        "networkTags": {
          "type": "array",
          "description": "A list of network tags to associate with the VM.",
          "items": {
            "type": "string"
          }
        },
        "machineTypeSeries": {
          "type": "string",
          "description": "The machine type series to create the VM with."
        },
        "vmName": {
          "type": "string",
          "description": "The name of the VM to create."
        },
        "networkInterfaces": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NetworkInterface"
          },
          "description": "List of NICs connected to this VM."
        },
        "serviceAccount": {
          "description": "The service account to associate the VM with.",
          "type": "string"
        },
        "appliedLicense": {
          "$ref": "#/$defs/AppliedLicense",
          "description": "The OS license returned from the adaptation module report."
        },
        "metadata": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The metadata key/value pairs to assign to the VM."
        },
        "licenseType": {
          "type": "string",
          "enum": [
            "COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT",
            "COMPUTE_ENGINE_LICENSE_TYPE_PAYG",
            "COMPUTE_ENGINE_LICENSE_TYPE_BYOL"
          ],
          "description": "The license type to use in OS adaptation."
        },
        "enableIntegrityMonitoring": {
          "description": "Optional. Defines whether the instance has integrity monitoring enabled.",
          "type": "boolean"
        },
        "hostname": {
          "description": "The hostname to assign to the VM.",
          "type": "string"
        },
        "computeScheduling": {
          "$ref": "#/$defs/ComputeScheduling",
          "description": "Compute instance scheduling information (if empty default is used)."
        },
        "bootOption": {
          "type": "string",
          "enum": [
            "COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED",
            "COMPUTE_ENGINE_BOOT_OPTION_EFI",
            "COMPUTE_ENGINE_BOOT_OPTION_BIOS"
          ],
          "description": "The VM Boot Option, as set in the source VM."
        },
        "diskReplicaZones": {
          "description": "Optional. Additional replica zones of the target regional disks. If this list is not empty a regional disk will be created. The first supported zone would be the one stated in the zone field. The rest are taken from this list. Please refer to the [regional disk creation API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) for further details about regional vs zonal disks. If not specified, a zonal disk will be created in the same zone the VM is created.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "diskType": {
          "type": "string",
          "enum": [
            "COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED",
            "COMPUTE_ENGINE_DISK_TYPE_STANDARD",
            "COMPUTE_ENGINE_DISK_TYPE_SSD",
            "COMPUTE_ENGINE_DISK_TYPE_BALANCED",
            "COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED",
            "COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED_HIGH_AVAILABILITY"
          ],
          "description": "The disk type to use in the VM."
        },
        "secureBoot": {
          "description": "Defines whether the instance has Secure Boot enabled. This can be set to true only if the VM boot option is EFI.",
          "type": "boolean"
        },
        "encryption": {
          "$ref": "#/$defs/Encryption",
          "description": "Optional. The encryption to apply to the VM disks."
        },
        "labels": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "A map of labels to associate with the VM."
        },
        "enableVtpm": {
          "description": "Optional. Defines whether the instance has vTPM enabled.",
          "type": "boolean"
        },
        "zone": {
          "description": "The zone in which to create the VM.",
          "type": "string"
        },
        "project": {
          "description": "The Google Cloud target project ID or project name.",
          "type": "string"
        },
        "additionalLicenses": {
          "items": {
            "type": "string"
          },
          "description": "Additional licenses to assign to the VM.",
          "type": "array"
        }
      }
    },
    "ComputeScheduling": {
      "type": "object",
      "description": "Scheduling information for VM on maintenance/restart behaviour and node allocation in sole tenant nodes. Options for instance behavior when the host machine undergoes maintenance that may temporarily impact instance performance.",
      "properties": {
        "restartType": {
          "description": "Whether the Instance should be automatically restarted whenever it is terminated by Compute Engine (not terminated by user). This configuration is identical to `automaticRestart` field in Compute Engine create instance under scheduling. It was changed to an enum (instead of a boolean) to match the default value in Compute Engine which is automatic restart.",
          "type": "string",
          "enum": [
            "RESTART_TYPE_UNSPECIFIED",
            "AUTOMATIC_RESTART",
            "NO_AUTOMATIC_RESTART"
          ]
        },
        "minNodeCpus": {
          "type": "integer",
          "format": "int32",
          "description": "The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node. Ignored if no node_affinites are configured."
        },
        "nodeAffinities": {
          "items": {
            "$ref": "#/$defs/SchedulingNodeAffinity"
          },
          "description": "A set of node affinity and anti-affinity configurations for sole tenant nodes.",
          "type": "array"
        },
        "onHostMaintenance": {
          "type": "string",
          "enum": [
            "ON_HOST_MAINTENANCE_UNSPECIFIED",
            "TERMINATE",
            "MIGRATE"
          ],
          "description": "How the instance should behave when the host machine undergoes maintenance that may temporarily impact instance performance."
        }
      }
    },
    "DisksMigrationDisksTargetDetails": {
      "description": "Details for a disks-only migration.",
      "properties": {},
      "type": "object"
    },
    "DisksMigrationVmTargetDetails": {
      "type": "object",
      "description": "Details for the VM created VM as part of disks migration.",
      "properties": {
        "vmUri": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. The URI of the Compute Engine VM."
        }
      }
    },
    "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"
        }
      }
    },
    "InstantiatingMigratedVMStep": {
      "description": "InstantiatingMigratedVMStep contains specific step details.",
      "properties": {},
      "type": "object"
    },
    "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."
    },
    "PersistentDisk": {
      "properties": {
        "sourceDiskNumber": {
          "type": "integer",
          "readOnly": true,
          "description": "Output only. The ordinal number of the source VM disk.",
          "format": "int32"
        },
        "diskUri": {
          "description": "Output only. The URI of the Persistent Disk.",
          "type": "string",
          "readOnly": true
        }
      },
      "description": "Details of a created Persistent Disk.",
      "type": "object"
    },
    "PreparingVMDisksStep": {
      "type": "object",
      "properties": {},
      "description": "PreparingVMDisksStep contains specific step details."
    },
    "SchedulingNodeAffinity": {
      "description": "Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled. Based on https://cloud.google.com/compute/docs/reference/rest/v1/instances/setScheduling",
      "properties": {
        "values": {
          "description": "Corresponds to the label values of Node resource.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "operator": {
          "description": "The operator to use for the node resources specified in the `values` parameter.",
          "type": "string",
          "enum": [
            "OPERATOR_UNSPECIFIED",
            "IN",
            "NOT_IN"
          ]
        },
        "key": {
          "type": "string",
          "description": "The label key of Node resource to reference."
        }
      },
      "type": "object"
    },
    "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)."
    }
  }
}