public GetBucketsAggregationResult withBuckets(java.util.Collection<Bucket> buckets) {
        setBuckets(buckets);
        return this;
    }
<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>

@param buckets
       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.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-iot/src/main/java/com/amazonaws/services/iot/model/GetBucketsAggregationResult.java