{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-device-management/json-schema/amazon-iot-device-management-get-buckets-aggregation-response-schema.json",
  "title": "GetBucketsAggregationResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-device-management-indices-api-openapi.yml#/components/schemas/GetBucketsAggregationResponse",
  "type": "object",
  "properties": {
    "totalCount": {
      "allOf": [
        {
          "$ref": "#/$defs/Count"
        },
        {
          "description": "The total number of things that fit the query string criteria."
        }
      ]
    },
    "buckets": {
      "allOf": [
        {
          "$ref": "#/$defs/Buckets"
        },
        {
          "description": "<p>The main part of the response with a list of buckets. Each bucket contains a <code>keyValue</code> and a <code>count</code>.</p> <p> <code>keyValue</code>: The aggregation field value counted for the particular bucket.</p> <p> <code>count</code>: The number of documents that have that value.</p>"
        }
      ]
    }
  },
  "$defs": {
    "Bucket": {
      "type": "object",
      "properties": {
        "keyValue": {
          "allOf": [
            {
              "$ref": "#/$defs/BucketKeyValue"
            },
            {
              "description": "The value counted for the particular bucket."
            }
          ]
        },
        "count": {
          "allOf": [
            {
              "$ref": "#/$defs/Count"
            },
            {
              "description": "The number of documents that have the value counted for the particular bucket."
            }
          ]
        }
      },
      "description": "A count of documents that meets a specific aggregation criteria."
    },
    "BucketKeyValue": {
      "type": "string"
    },
    "Buckets": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Bucket"
      }
    },
    "Count": {
      "type": "integer"
    }
  }
}