public RegisterTaskDefinitionRequest withInferenceAccelerators(InferenceAccelerator... inferenceAccelerators) {
        if (this.inferenceAccelerators == null) {
            setInferenceAccelerators(new com.amazonaws.internal.SdkInternalList<InferenceAccelerator>(inferenceAccelerators.length));
        }
        for (InferenceAccelerator ele : inferenceAccelerators) {
            this.inferenceAccelerators.add(ele);
        }
        return this;
    }
<p>
The Elastic Inference accelerators to use for the containers in the task.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setInferenceAccelerators(java.util.Collection)} or
{@link #withInferenceAccelerators(java.util.Collection)} if you want to override the existing values.
</p>

@param inferenceAccelerators
       The Elastic Inference accelerators to use for the containers in the task.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/model/RegisterTaskDefinitionRequest.java