code: public HyperParameterAlgorithmSpecification withMetricDefinitions(MetricDefinition... metricDefinitions) {
          if (this.metricDefinitions == null) {
              setMetricDefinitions(new java.util.ArrayList<MetricDefinition>(metricDefinitions.length));
          }
          for (MetricDefinition ele : metricDefinitions) {
              this.metricDefinitions.add(ele);
          }
          return this;
      }
docs: <p>
  An array of <a>MetricDefinition</a> objects that specify the metrics that the algorithm emits.
  </p>
  <p>
  <b>NOTE:</b> This method appends the values to the existing list (if any). Use
  {@link #setMetricDefinitions(java.util.Collection)} or {@link #withMetricDefinitions(java.util.Collection)} if
  you want to override the existing values.
  </p>
  
  @param metricDefinitions
  An array of <a>MetricDefinition</a> objects that specify the metrics that the algorithm emits.
  @return Returns a reference to this object so that method calls can be chained together.