{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/harness/main/json-schema/harness-compute-coverages-detail-response-schema.json",
  "title": "ComputeCoveragesDetailResponse",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/harness-coverage-detail-api-openapi.yml#/components/schemas/ComputeCoveragesDetailResponse",
  "type": "object",
  "properties": {
    "ts": {
      "type": "integer",
      "format": "int64",
      "description": "Timestamp of the response"
    },
    "success": {
      "type": "boolean",
      "description": "Indicates whether the request was successful"
    },
    "errors": {
      "type": "string",
      "description": "Error message, if any"
    },
    "response": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/ComputeCoveragesDetail"
      }
    }
  },
  "$defs": {
    "ComputeCoverageChart": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "format": "date-time",
          "description": "Date for the chart data point"
        },
        "coverage_cost": {
          "type": "number",
          "format": "double",
          "description": "Coverage cost for the date"
        }
      }
    },
    "ComputeCoveragesDetail": {
      "type": "object",
      "properties": {
        "table": {
          "$ref": "#/$defs/ComputeCoveragesDetailTable"
        },
        "chart": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ComputeCoverageChart"
          }
        }
      }
    },
    "ComputeCoveragesDetailTable": {
      "type": "object",
      "properties": {
        "reservation_cost": {
          "type": [
            "number",
            "null"
          ],
          "format": "double",
          "description": "Total cost for reserved instances"
        },
        "total_cost": {
          "type": [
            "number",
            "null"
          ],
          "format": "double",
          "description": "Total cost including all coverage types"
        },
        "on_demand_cost": {
          "type": [
            "number",
            "null"
          ],
          "format": "double",
          "description": "Cost for on-demand instances"
        },
        "total_hours": {
          "type": [
            "number",
            "null"
          ],
          "format": "double",
          "description": "Total hours of usage"
        },
        "total_covered_hours": {
          "type": [
            "number",
            "null"
          ],
          "format": "double",
          "description": "Total hours covered by RI or SP"
        },
        "on_demand_hours": {
          "type": [
            "number",
            "null"
          ],
          "format": "double",
          "description": "Hours billed at on-demand rates"
        },
        "savings_plan_hours": {
          "type": [
            "number",
            "null"
          ],
          "format": "double",
          "description": "Hours covered by savings plans"
        },
        "ri_coverage_hours": {
          "type": [
            "number",
            "null"
          ],
          "format": "double",
          "description": "Hours covered by reserved instances"
        },
        "coverage": {
          "type": [
            "number",
            "null"
          ],
          "format": "float",
          "description": "Coverage percentage"
        },
        "region": {
          "type": [
            "string",
            "null"
          ],
          "description": "Region information when grouped by region"
        },
        "machine_type": {
          "type": [
            "string",
            "null"
          ],
          "description": "Machine type information when grouped by machine type"
        },
        "trend": {
          "type": [
            "number",
            "null"
          ],
          "format": "float",
          "description": "Trend in coverage percentage compared to previous period"
        },
        "spot_cost": {
          "type": [
            "number",
            "null"
          ],
          "format": "double",
          "description": "Cost for spot instances"
        },
        "spot_hours": {
          "type": [
            "number",
            "null"
          ],
          "format": "double",
          "description": "Hours covered by spot instances"
        }
      }
    }
  }
}