/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.aiplatform.v1.model;

/**
 * Entry for the Quantiles loss type optimization objective.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Vertex AI API. For a detailed explanation see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class GoogleCloudAiplatformV1SchemaModelevaluationMetricsForecastingEvaluationMetricsQuantileMetricsEntry extends com.google.api.client.json.GenericJson {

  /**
   * This is a custom metric that calculates the percentage of true values that were less than the
   * predicted value for that quantile. Only populated when optimization_objective is minimize-
   * quantile-loss and each entry corresponds to an entry in quantiles The percent value can be used
   * to compare with the quantile value, which is the target value.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Double observedQuantile;

  /**
   * The quantile for this entry.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Double quantile;

  /**
   * The scaled pinball loss of this quantile.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Float scaledPinballLoss;

  /**
   * This is a custom metric that calculates the percentage of true values that were less than the
   * predicted value for that quantile. Only populated when optimization_objective is minimize-
   * quantile-loss and each entry corresponds to an entry in quantiles The percent value can be used
   * to compare with the quantile value, which is the target value.
   * @return value or {@code null} for none
   */
  public java.lang.Double getObservedQuantile() {
    return observedQuantile;
  }

  /**
   * This is a custom metric that calculates the percentage of true values that were less than the
   * predicted value for that quantile. Only populated when optimization_objective is minimize-
   * quantile-loss and each entry corresponds to an entry in quantiles The percent value can be used
   * to compare with the quantile value, which is the target value.
   * @param observedQuantile observedQuantile or {@code null} for none
   */
  public GoogleCloudAiplatformV1SchemaModelevaluationMetricsForecastingEvaluationMetricsQuantileMetricsEntry setObservedQuantile(java.lang.Double observedQuantile) {
    this.observedQuantile = observedQuantile;
    return this;
  }

  /**
   * The quantile for this entry.
   * @return value or {@code null} for none
   */
  public java.lang.Double getQuantile() {
    return quantile;
  }

  /**
   * The quantile for this entry.
   * @param quantile quantile or {@code null} for none
   */
  public GoogleCloudAiplatformV1SchemaModelevaluationMetricsForecastingEvaluationMetricsQuantileMetricsEntry setQuantile(java.lang.Double quantile) {
    this.quantile = quantile;
    return this;
  }

  /**
   * The scaled pinball loss of this quantile.
   * @return value or {@code null} for none
   */
  public java.lang.Float getScaledPinballLoss() {
    return scaledPinballLoss;
  }

  /**
   * The scaled pinball loss of this quantile.
   * @param scaledPinballLoss scaledPinballLoss or {@code null} for none
   */
  public GoogleCloudAiplatformV1SchemaModelevaluationMetricsForecastingEvaluationMetricsQuantileMetricsEntry setScaledPinballLoss(java.lang.Float scaledPinballLoss) {
    this.scaledPinballLoss = scaledPinballLoss;
    return this;
  }

  @Override
  public GoogleCloudAiplatformV1SchemaModelevaluationMetricsForecastingEvaluationMetricsQuantileMetricsEntry set(String fieldName, Object value) {
    return (GoogleCloudAiplatformV1SchemaModelevaluationMetricsForecastingEvaluationMetricsQuantileMetricsEntry) super.set(fieldName, value);
  }

  @Override
  public GoogleCloudAiplatformV1SchemaModelevaluationMetricsForecastingEvaluationMetricsQuantileMetricsEntry clone() {
    return (GoogleCloudAiplatformV1SchemaModelevaluationMetricsForecastingEvaluationMetricsQuantileMetricsEntry) super.clone();
  }

}
