public AwsEc2LaunchTemplateDataInstanceRequirementsDetails withInstanceGenerations(String... instanceGenerations) {
        if (this.instanceGenerations == null) {
            setInstanceGenerations(new java.util.ArrayList<String>(instanceGenerations.length));
        }
        for (String ele : instanceGenerations) {
            this.instanceGenerations.add(ele);
        }
        return this;
    }
<p>
Indicates whether current or previous generation instance types are included.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setInstanceGenerations(java.util.Collection)} or {@link #withInstanceGenerations(java.util.Collection)}
if you want to override the existing values.
</p>

@param instanceGenerations
       Indicates whether current or previous generation instance types are included.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-securityhub/src/main/java/com/amazonaws/services/securityhub/model/AwsEc2LaunchTemplateDataInstanceRequirementsDetails.java