public S3BucketDefinitionForJob withBuckets(String... buckets) {
        if (this.buckets == null) {
            setBuckets(new java.util.ArrayList<String>(buckets.length));
        }
        for (String ele : buckets) {
            this.buckets.add(ele);
        }
        return this;
    }
<p>
An array that lists the names of the buckets.
</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
       An array that lists the names of the buckets.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-macie2/src/main/java/com/amazonaws/services/macie2/model/S3BucketDefinitionForJob.java