public ModifyFpgaImageAttributeRequest withProductCodes(String... productCodes) {
        if (this.productCodes == null) {
            setProductCodes(new com.amazonaws.internal.SdkInternalList<String>(productCodes.length));
        }
        for (String ele : productCodes) {
            this.productCodes.add(ele);
        }
        return this;
    }
<p>
The product codes. After you add a product code to an AFI, it can't be removed. This parameter is valid only when
modifying the <code>productCodes</code> attribute.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setProductCodes(java.util.Collection)} or {@link #withProductCodes(java.util.Collection)} if you want to
override the existing values.
</p>

@param productCodes
       The product codes. After you add a product code to an AFI, it can't be removed. This parameter is valid
       only when modifying the <code>productCodes</code> attribute.
@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/ModifyFpgaImageAttributeRequest.java