public CreateServiceTemplateVersionRequest withCompatibleEnvironmentTemplates(CompatibleEnvironmentTemplateInput... compatibleEnvironmentTemplates) {
        if (this.compatibleEnvironmentTemplates == null) {
            setCompatibleEnvironmentTemplates(new java.util.ArrayList<CompatibleEnvironmentTemplateInput>(compatibleEnvironmentTemplates.length));
        }
        for (CompatibleEnvironmentTemplateInput ele : compatibleEnvironmentTemplates) {
            this.compatibleEnvironmentTemplates.add(ele);
        }
        return this;
    }
<p>
An array of environment template objects that are compatible with the new service template version. A service
instance based on this service template version can run in environments based on compatible templates.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setCompatibleEnvironmentTemplates(java.util.Collection)} or
{@link #withCompatibleEnvironmentTemplates(java.util.Collection)} if you want to override the existing values.
</p>

@param compatibleEnvironmentTemplates
       An array of environment template objects that are compatible with the new service template version. A
       service instance based on this service template version can run in environments based on compatible
       templates.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-proton/src/main/java/com/amazonaws/services/proton/model/CreateServiceTemplateVersionRequest.java