{
  "$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-advice-response-schema.json",
  "title": "CapacityAdviceResponse",
  "description": "A response contains scoring recommendations.",
  "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/CapacityAdviceResponse",
  "type": "object",
  "properties": {
    "recommendations": {
      "items": {
        "$ref": "#/$defs/CapacityAdviceResponseRecommendation"
      },
      "type": "array",
      "description": "Initially the API will provide one recommendation which balances the\nindividual scores according to the service provider's preference."
    }
  },
  "$defs": {
    "CapacityAdviceResponseRecommendation": {
      "properties": {
        "scores": {
          "$ref": "#/$defs/CapacityAdviceResponseRecommendationScores",
          "description": "Scores for the recommendation."
        },
        "shards": {
          "type": "array",
          "description": "Shards represent blocks of uniform capacity in recommendations.",
          "items": {
            "$ref": "#/$defs/CapacityAdviceResponseRecommendationShard"
          }
        }
      },
      "description": "Recommendation.",
      "type": "object"
    },
    "CapacityAdviceResponseRecommendationScores": {
      "type": "object",
      "description": "Groups information about a shard of capacity.",
      "properties": {
        "obtainability": {
          "format": "double",
          "type": "number",
          "description": "The obtainability score indicates the likelihood of successfully\nobtaining (provisioning) the requested number of VMs.\nThe score range is 0.0 through 1.0. Higher is better."
        },
        "estimatedUptime": {
          "type": "string",
          "description": "The estimated run time of the majority of Spot VMs in the request\nbefore preemption. The estimate is best-effort only. It is based on\nhistorical data and current conditions.",
          "format": "google-duration"
        }
      }
    },
    "CapacityAdviceResponseRecommendationShard": {
      "type": "object",
      "properties": {
        "provisioningModel": {
          "type": "string",
          "description": "The provisioning model that you want to view recommendations for.",
          "enum": [
            "FLEX_START",
            "RESERVATION_BOUND",
            "SPOT",
            "STANDARD"
          ]
        },
        "machineType": {
          "type": "string",
          "description": "The machine type corresponds to the instance selection in the request."
        },
        "instanceCount": {
          "format": "int32",
          "description": "The number of instances.",
          "type": "integer"
        },
        "zone": {
          "readOnly": true,
          "description": "Output only. The zone name for this shard.",
          "type": "string"
        }
      },
      "description": "Shards represent blocks of uniform capacity in recommendations.\nEach shard is for a single zone and a single machine shape. Each shard\ndefines a size expressed as the number of VMs."
    }
  }
}