public S3ClassificationScopeExclusion withBucketNames(String... bucketNames) {
        if (this.bucketNames == null) {
            setBucketNames(new java.util.ArrayList<String>(bucketNames.length));
        }
        for (String ele : bucketNames) {
            this.bucketNames.add(ele);
        }
        return this;
    }
<p>
An array of strings, one for each S3 bucket that is excluded. Each string is the full name of an excluded bucket.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setBucketNames(java.util.Collection)} or {@link #withBucketNames(java.util.Collection)} if you want to
override the existing values.
</p>

@param bucketNames
       An array of strings, one for each S3 bucket that is excluded. Each string is the full name of an excluded
       bucket.
@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/S3ClassificationScopeExclusion.java