public GetBucketsAggregationResult withBuckets(Bucket... buckets) {
        if (this.buckets == null) {
            setBuckets(new java.util.ArrayList<Bucket>(buckets.length));
        }
        for (Bucket ele : buckets) {
            this.buckets.add(ele);
        }
        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>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setBuckets(java.util.Collection)} or {@link #withBuckets(java.util.Collection)} if you want to override
the existing values.
</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