{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-migration-center/json-schema/google-cloud-migration-center-utilization-report-schema.json",
  "title": "UtilizationReport",
  "description": "Utilization report details the utilization (CPU, memory, etc.) of selected source VMs.",
  "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/UtilizationReport",
  "type": "object",
  "properties": {
    "displayName": {
      "type": "string",
      "description": "The report display name, as assigned by the user."
    },
    "createTime": {
      "type": "string",
      "readOnly": true,
      "description": "Output only. The time the report was created (this refers to the time of the request, not the time the report creation completed).",
      "format": "google-datetime"
    },
    "frameEndTime": {
      "readOnly": true,
      "description": "Output only. The point in time when the time frame ends. Notice that the time frame is counted backwards. For instance if the \"frame_end_time\" value is 2021/01/20 and the time frame is WEEK then the report covers the week between 2021/01/20 and 2021/01/14.",
      "type": "string",
      "format": "google-datetime"
    },
    "timeFrame": {
      "description": "Time frame of the report.",
      "type": "string",
      "enum": [
        "TIME_FRAME_UNSPECIFIED",
        "WEEK",
        "MONTH",
        "YEAR"
      ]
    },
    "vmCount": {
      "readOnly": true,
      "description": "Output only. Total number of VMs included in the report.",
      "format": "int32",
      "type": "integer"
    },
    "error": {
      "$ref": "#/$defs/Status",
      "description": "Output only. Provides details on the state of the report in case of an error."
    },
    "state": {
      "type": "string",
      "enum": [
        "STATE_UNSPECIFIED",
        "CREATING",
        "SUCCEEDED",
        "FAILED"
      ],
      "readOnly": true,
      "description": "Output only. Current state of the report."
    },
    "vms": {
      "description": "List of utilization information per VM. When sent as part of the request, the \"vm_id\" field is used in order to specify which VMs to include in the report. In that case all other fields are ignored.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/VmUtilizationInfo"
      }
    },
    "name": {
      "description": "Output only. The report unique name.",
      "type": "string",
      "readOnly": true
    },
    "stateTime": {
      "format": "google-datetime",
      "type": "string",
      "description": "Output only. The time the state was last set.",
      "readOnly": true
    }
  },
  "$defs": {
    "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)."
    },
    "VmUtilizationInfo": {
      "description": "Utilization information of a single VM.",
      "properties": {
        "utilization": {
          "$ref": "#/$defs/VmUtilizationMetrics",
          "description": "Utilization metrics for this VM."
        },
        "vmwareVmDetails": {
          "$ref": "#/$defs/VmwareVmDetails",
          "description": "The description of the VM in a Source of type Vmware."
        },
        "vmId": {
          "description": "The VM's ID in the source.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "VmUtilizationMetrics": {
      "description": "Utilization metrics values for a single VM.",
      "properties": {
        "networkThroughputAverageKbps": {
          "format": "int64",
          "description": "Average network throughput (combined transmit-rates and receive-rates), in kilobytes per second.",
          "type": "string"
        },
        "memoryAveragePercent": {
          "format": "int32",
          "description": "Average memory usage, percent.",
          "type": "integer"
        },
        "cpuMaxPercent": {
          "type": "integer",
          "format": "int32",
          "description": "Max CPU usage, percent."
        },
        "cpuAveragePercent": {
          "description": "Average CPU usage, percent.",
          "type": "integer",
          "format": "int32"
        },
        "diskIoRateMaxKbps": {
          "format": "int64",
          "type": "string",
          "description": "Max disk IO rate, in kilobytes per second."
        },
        "diskIoRateAverageKbps": {
          "description": "Average disk IO rate, in kilobytes per second.",
          "format": "int64",
          "type": "string"
        },
        "networkThroughputMaxKbps": {
          "type": "string",
          "format": "int64",
          "description": "Max network throughput (combined transmit-rates and receive-rates), in kilobytes per second."
        },
        "memoryMaxPercent": {
          "type": "integer",
          "description": "Max memory usage, percent.",
          "format": "int32"
        }
      },
      "type": "object"
    },
    "VmwareVmDetails": {
      "type": "object",
      "properties": {
        "committedStorageMb": {
          "format": "int64",
          "description": "The total size of the storage allocated to the VM in MB.",
          "type": "string"
        },
        "cpuCount": {
          "description": "The number of cpus in the VM.",
          "format": "int32",
          "type": "integer"
        },
        "memoryMb": {
          "description": "The size of the memory of the VM in MB.",
          "format": "int32",
          "type": "integer"
        },
        "bootOption": {
          "type": "string",
          "enum": [
            "BOOT_OPTION_UNSPECIFIED",
            "EFI",
            "BIOS"
          ],
          "readOnly": true,
          "description": "Output only. The VM Boot Option."
        },
        "uuid": {
          "type": "string",
          "description": "The unique identifier of the VM in vCenter."
        },
        "diskCount": {
          "format": "int32",
          "type": "integer",
          "description": "The number of disks the VM has."
        },
        "datacenterId": {
          "type": "string",
          "description": "The id of the vCenter's datacenter this VM is contained in."
        },
        "datacenterDescription": {
          "type": "string",
          "description": "The descriptive name of the vCenter's datacenter this VM is contained in."
        },
        "powerState": {
          "description": "The power state of the VM at the moment list was taken.",
          "type": "string",
          "enum": [
            "POWER_STATE_UNSPECIFIED",
            "ON",
            "OFF",
            "SUSPENDED"
          ]
        },
        "vmId": {
          "type": "string",
          "description": "The VM's id in the source (note that this is not the MigratingVm's id). This is the moref id of the VM."
        },
        "displayName": {
          "type": "string",
          "description": "The display name of the VM. Note that this is not necessarily unique."
        },
        "architecture": {
          "readOnly": true,
          "type": "string",
          "enum": [
            "VM_ARCHITECTURE_UNSPECIFIED",
            "VM_ARCHITECTURE_X86_FAMILY",
            "VM_ARCHITECTURE_ARM64"
          ],
          "description": "Output only. The CPU architecture."
        },
        "guestDescription": {
          "type": "string",
          "description": "The VM's OS. See for example https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html for types of strings this might hold."
        }
      },
      "description": "VmwareVmDetails describes a VM in vCenter."
    }
  }
}