public OptimizationJobSummary withOptimizationTypes(String... optimizationTypes) {
        if (this.optimizationTypes == null) {
            setOptimizationTypes(new java.util.ArrayList<String>(optimizationTypes.length));
        }
        for (String ele : optimizationTypes) {
            this.optimizationTypes.add(ele);
        }
        return this;
    }
<p>
The optimization techniques that are applied by the optimization job.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setOptimizationTypes(java.util.Collection)} or {@link #withOptimizationTypes(java.util.Collection)} if
you want to override the existing values.
</p>

@param optimizationTypes
       The optimization techniques that are applied by the optimization job.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/model/OptimizationJobSummary.java