{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-compute-engine/json-schema/google-cloud-compute-engine-capacity-history-request-schema.json",
  "title": "CapacityHistoryRequest",
  "description": "A request to get the capacity history.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-compute-engine-advice-api-openapi.yml#/components/schemas/CapacityHistoryRequest",
  "type": "object",
  "properties": {
    "instanceProperties": {
      "$ref": "#/$defs/CapacityHistoryRequestInstanceProperties",
      "description": "Instance properties for this request."
    },
    "types": {
      "description": "List of history types to get capacity history for.",
      "items": {
        "enum": [
          "HISTORY_TYPE_UNSPECIFIED",
          "PREEMPTION",
          "PRICE"
        ],
        "type": "string"
      },
      "type": "array"
    },
    "locationPolicy": {
      "$ref": "#/$defs/CapacityHistoryRequestLocationPolicy",
      "description": "Location policy for this request."
    }
  },
  "$defs": {
    "CapacityHistoryRequestInstanceProperties": {
      "type": "object",
      "description": "Instance properties for this request.",
      "properties": {
        "scheduling": {
          "$ref": "#/$defs/CapacityHistoryRequestInstancePropertiesScheduling",
          "description": "Specifies the scheduling options."
        },
        "machineType": {
          "type": "string",
          "description": "The machine type for the VM, such as `n2-standard-4`."
        }
      }
    },
    "CapacityHistoryRequestInstancePropertiesScheduling": {
      "properties": {
        "provisioningModel": {
          "type": "string",
          "description": "The provisioning model to get capacity history for.\nThis field must be set to SPOT.\n\nFor more information, see\nCompute Engine instances provisioning models.",
          "enum": [
            "FLEX_START",
            "RESERVATION_BOUND",
            "SPOT",
            "STANDARD"
          ]
        }
      },
      "type": "object",
      "description": "Scheduling options."
    },
    "CapacityHistoryRequestLocationPolicy": {
      "description": "Location policy for this request.",
      "type": "object",
      "properties": {
        "location": {
          "type": "string",
          "description": "The region or zone to get capacity history for.\n\nIt can be a partial or full URL. For example, the following are valid\nvalues: \n   \n   \n     - https://www.googleapis.com/compute/v1/projects/project/zones/zone \n   - projects/project/zones/zone \n   - zones/zone\n\n\n\nThis field is optional."
        }
      }
    }
  }
}