public TrafficPattern withPhases(java.util.Collection<Phase> phases) {
        setPhases(phases);
        return this;
    }
<p>
Defines the phases traffic specification.
</p>

@param phases
       Defines the phases traffic specification.
@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/TrafficPattern.java