public HPOObjective withMetricRegex(String metricRegex) {
        setMetricRegex(metricRegex);
        return this;
    }
<p>
A regular expression for finding the metric in the training job logs.
</p>

@param metricRegex
       A regular expression for finding the metric in the training job logs.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-personalize/src/main/java/com/amazonaws/services/personalize/model/HPOObjective.java