public RunInstancesRequest withElasticGpuSpecification(ElasticGpuSpecification... elasticGpuSpecification) {
        if (this.elasticGpuSpecification == null) {
            setElasticGpuSpecification(new com.amazonaws.internal.SdkInternalList<ElasticGpuSpecification>(elasticGpuSpecification.length));
        }
        for (ElasticGpuSpecification ele : elasticGpuSpecification) {
            this.elasticGpuSpecification.add(ele);
        }
        return this;
    }
<p>
An elastic GPU to associate with the instance.
</p>
<note>
<p>
Amazon Elastic Graphics reached end of life on January 8, 2024.
</p>
</note>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setElasticGpuSpecification(java.util.Collection)} or
{@link #withElasticGpuSpecification(java.util.Collection)} if you want to override the existing values.
</p>

@param elasticGpuSpecification
       An elastic GPU to associate with the instance.</p> <note>
       <p>
       Amazon Elastic Graphics reached end of life on January 8, 2024.
       </p>
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/RunInstancesRequest.java