/*
 * 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;

/**
 * Model definition for GoogleCloudAiplatformV1SchemaTrainingjobDefinitionAutoMlTablesInputs.
 *
 * <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 GoogleCloudAiplatformV1SchemaTrainingjobDefinitionAutoMlTablesInputs extends com.google.api.client.json.GenericJson {

  /**
   * Additional experiment flags for the Tables training pipeline.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> additionalExperiments;

  /**
   * Use the entire training budget. This disables the early stopping feature. By default, the early
   * stopping feature is enabled, which means that AutoML Tables might stop training before the
   * entire training budget has been used.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean disableEarlyStopping;

  /**
   * Configuration for exporting test set predictions to a BigQuery table. If this configuration is
   * absent, then the export is not performed.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleCloudAiplatformV1SchemaTrainingjobDefinitionExportEvaluatedDataItemsConfig exportEvaluatedDataItemsConfig;

  /**
   * Objective function the model is optimizing towards. The training process creates a model that
   * maximizes/minimizes the value of the objective function over the validation set. The supported
   * optimization objectives depend on the prediction type. If the field is not set, a default
   * objective function is used. classification (binary): "maximize-au-roc" (default) - Maximize the
   * area under the receiver operating characteristic (ROC) curve. "minimize-log-loss" - Minimize
   * log loss. "maximize-au-prc" - Maximize the area under the precision-recall curve. "maximize-
   * precision-at-recall" - Maximize precision for a specified recall value. "maximize-recall-at-
   * precision" - Maximize recall for a specified precision value. classification (multi-class):
   * "minimize-log-loss" (default) - Minimize log loss. regression: "minimize-rmse" (default) -
   * Minimize root-mean-squared error (RMSE). "minimize-mae" - Minimize mean-absolute error (MAE).
   * "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE).
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String optimizationObjective;

  /**
   * Required when optimization_objective is "maximize-recall-at-precision". Must be between 0 and
   * 1, inclusive.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Float optimizationObjectivePrecisionValue;

  /**
   * Required when optimization_objective is "maximize-precision-at-recall". Must be between 0 and
   * 1, inclusive.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Float optimizationObjectiveRecallValue;

  /**
   * The type of prediction the Model is to produce. "classification" - Predict one out of multiple
   * target values is picked for each row. "regression" - Predict a value based on its relation to
   * other values. This type is available only to columns that contain semantically numeric values,
   * i.e. integers or floating point number, even if stored as e.g. strings.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String predictionType;

  /**
   * The column name of the target column that the model is to predict.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String targetColumn;

  /**
   * Required. The train budget of creating this model, expressed in milli node hours i.e. 1,000
   * value in this field means 1 node hour. The training cost of the model will not exceed this
   * budget. The final cost will be attempted to be close to the budget, though may end up being
   * (even) noticeably smaller - at the backend's discretion. This especially may happen when
   * further model training ceases to provide any improvements. If the budget is set to a value
   * known to be insufficient to train a model for the given dataset, the training won't be
   * attempted and will error. The train budget must be between 1,000 and 72,000 milli node hours,
   * inclusive.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long trainBudgetMilliNodeHours;

  /**
   * Each transformation will apply transform function to given input column. And the result will be
   * used for training. When creating transformation for BigQuery Struct column, the column should
   * be flattened using "." as the delimiter.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<GoogleCloudAiplatformV1SchemaTrainingjobDefinitionAutoMlTablesInputsTransformation> transformations;

  /**
   * Column name that should be used as the weight column. Higher values in this column give more
   * importance to the row during model training. The column must have numeric values between 0 and
   * 10000 inclusively; 0 means the row is ignored for training. If weight column field is not set,
   * then all rows are assumed to have equal weight of 1.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String weightColumnName;

  /**
   * Additional experiment flags for the Tables training pipeline.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getAdditionalExperiments() {
    return additionalExperiments;
  }

  /**
   * Additional experiment flags for the Tables training pipeline.
   * @param additionalExperiments additionalExperiments or {@code null} for none
   */
  public GoogleCloudAiplatformV1SchemaTrainingjobDefinitionAutoMlTablesInputs setAdditionalExperiments(java.util.List<java.lang.String> additionalExperiments) {
    this.additionalExperiments = additionalExperiments;
    return this;
  }

  /**
   * Use the entire training budget. This disables the early stopping feature. By default, the early
   * stopping feature is enabled, which means that AutoML Tables might stop training before the
   * entire training budget has been used.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getDisableEarlyStopping() {
    return disableEarlyStopping;
  }

  /**
   * Use the entire training budget. This disables the early stopping feature. By default, the early
   * stopping feature is enabled, which means that AutoML Tables might stop training before the
   * entire training budget has been used.
   * @param disableEarlyStopping disableEarlyStopping or {@code null} for none
   */
  public GoogleCloudAiplatformV1SchemaTrainingjobDefinitionAutoMlTablesInputs setDisableEarlyStopping(java.lang.Boolean disableEarlyStopping) {
    this.disableEarlyStopping = disableEarlyStopping;
    return this;
  }

  /**
   * Configuration for exporting test set predictions to a BigQuery table. If this configuration is
   * absent, then the export is not performed.
   * @return value or {@code null} for none
   */
  public GoogleCloudAiplatformV1SchemaTrainingjobDefinitionExportEvaluatedDataItemsConfig getExportEvaluatedDataItemsConfig() {
    return exportEvaluatedDataItemsConfig;
  }

  /**
   * Configuration for exporting test set predictions to a BigQuery table. If this configuration is
   * absent, then the export is not performed.
   * @param exportEvaluatedDataItemsConfig exportEvaluatedDataItemsConfig or {@code null} for none
   */
  public GoogleCloudAiplatformV1SchemaTrainingjobDefinitionAutoMlTablesInputs setExportEvaluatedDataItemsConfig(GoogleCloudAiplatformV1SchemaTrainingjobDefinitionExportEvaluatedDataItemsConfig exportEvaluatedDataItemsConfig) {
    this.exportEvaluatedDataItemsConfig = exportEvaluatedDataItemsConfig;
    return this;
  }

  /**
   * Objective function the model is optimizing towards. The training process creates a model that
   * maximizes/minimizes the value of the objective function over the validation set. The supported
   * optimization objectives depend on the prediction type. If the field is not set, a default
   * objective function is used. classification (binary): "maximize-au-roc" (default) - Maximize the
   * area under the receiver operating characteristic (ROC) curve. "minimize-log-loss" - Minimize
   * log loss. "maximize-au-prc" - Maximize the area under the precision-recall curve. "maximize-
   * precision-at-recall" - Maximize precision for a specified recall value. "maximize-recall-at-
   * precision" - Maximize recall for a specified precision value. classification (multi-class):
   * "minimize-log-loss" (default) - Minimize log loss. regression: "minimize-rmse" (default) -
   * Minimize root-mean-squared error (RMSE). "minimize-mae" - Minimize mean-absolute error (MAE).
   * "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE).
   * @return value or {@code null} for none
   */
  public java.lang.String getOptimizationObjective() {
    return optimizationObjective;
  }

  /**
   * Objective function the model is optimizing towards. The training process creates a model that
   * maximizes/minimizes the value of the objective function over the validation set. The supported
   * optimization objectives depend on the prediction type. If the field is not set, a default
   * objective function is used. classification (binary): "maximize-au-roc" (default) - Maximize the
   * area under the receiver operating characteristic (ROC) curve. "minimize-log-loss" - Minimize
   * log loss. "maximize-au-prc" - Maximize the area under the precision-recall curve. "maximize-
   * precision-at-recall" - Maximize precision for a specified recall value. "maximize-recall-at-
   * precision" - Maximize recall for a specified precision value. classification (multi-class):
   * "minimize-log-loss" (default) - Minimize log loss. regression: "minimize-rmse" (default) -
   * Minimize root-mean-squared error (RMSE). "minimize-mae" - Minimize mean-absolute error (MAE).
   * "minimize-rmsle" - Minimize root-mean-squared log error (RMSLE).
   * @param optimizationObjective optimizationObjective or {@code null} for none
   */
  public GoogleCloudAiplatformV1SchemaTrainingjobDefinitionAutoMlTablesInputs setOptimizationObjective(java.lang.String optimizationObjective) {
    this.optimizationObjective = optimizationObjective;
    return this;
  }

  /**
   * Required when optimization_objective is "maximize-recall-at-precision". Must be between 0 and
   * 1, inclusive.
   * @return value or {@code null} for none
   */
  public java.lang.Float getOptimizationObjectivePrecisionValue() {
    return optimizationObjectivePrecisionValue;
  }

  /**
   * Required when optimization_objective is "maximize-recall-at-precision". Must be between 0 and
   * 1, inclusive.
   * @param optimizationObjectivePrecisionValue optimizationObjectivePrecisionValue or {@code null} for none
   */
  public GoogleCloudAiplatformV1SchemaTrainingjobDefinitionAutoMlTablesInputs setOptimizationObjectivePrecisionValue(java.lang.Float optimizationObjectivePrecisionValue) {
    this.optimizationObjectivePrecisionValue = optimizationObjectivePrecisionValue;
    return this;
  }

  /**
   * Required when optimization_objective is "maximize-precision-at-recall". Must be between 0 and
   * 1, inclusive.
   * @return value or {@code null} for none
   */
  public java.lang.Float getOptimizationObjectiveRecallValue() {
    return optimizationObjectiveRecallValue;
  }

  /**
   * Required when optimization_objective is "maximize-precision-at-recall". Must be between 0 and
   * 1, inclusive.
   * @param optimizationObjectiveRecallValue optimizationObjectiveRecallValue or {@code null} for none
   */
  public GoogleCloudAiplatformV1SchemaTrainingjobDefinitionAutoMlTablesInputs setOptimizationObjectiveRecallValue(java.lang.Float optimizationObjectiveRecallValue) {
    this.optimizationObjectiveRecallValue = optimizationObjectiveRecallValue;
    return this;
  }

  /**
   * The type of prediction the Model is to produce. "classification" - Predict one out of multiple
   * target values is picked for each row. "regression" - Predict a value based on its relation to
   * other values. This type is available only to columns that contain semantically numeric values,
   * i.e. integers or floating point number, even if stored as e.g. strings.
   * @return value or {@code null} for none
   */
  public java.lang.String getPredictionType() {
    return predictionType;
  }

  /**
   * The type of prediction the Model is to produce. "classification" - Predict one out of multiple
   * target values is picked for each row. "regression" - Predict a value based on its relation to
   * other values. This type is available only to columns that contain semantically numeric values,
   * i.e. integers or floating point number, even if stored as e.g. strings.
   * @param predictionType predictionType or {@code null} for none
   */
  public GoogleCloudAiplatformV1SchemaTrainingjobDefinitionAutoMlTablesInputs setPredictionType(java.lang.String predictionType) {
    this.predictionType = predictionType;
    return this;
  }

  /**
   * The column name of the target column that the model is to predict.
   * @return value or {@code null} for none
   */
  public java.lang.String getTargetColumn() {
    return targetColumn;
  }

  /**
   * The column name of the target column that the model is to predict.
   * @param targetColumn targetColumn or {@code null} for none
   */
  public GoogleCloudAiplatformV1SchemaTrainingjobDefinitionAutoMlTablesInputs setTargetColumn(java.lang.String targetColumn) {
    this.targetColumn = targetColumn;
    return this;
  }

  /**
   * Required. The train budget of creating this model, expressed in milli node hours i.e. 1,000
   * value in this field means 1 node hour. The training cost of the model will not exceed this
   * budget. The final cost will be attempted to be close to the budget, though may end up being
   * (even) noticeably smaller - at the backend's discretion. This especially may happen when
   * further model training ceases to provide any improvements. If the budget is set to a value
   * known to be insufficient to train a model for the given dataset, the training won't be
   * attempted and will error. The train budget must be between 1,000 and 72,000 milli node hours,
   * inclusive.
   * @return value or {@code null} for none
   */
  public java.lang.Long getTrainBudgetMilliNodeHours() {
    return trainBudgetMilliNodeHours;
  }

  /**
   * Required. The train budget of creating this model, expressed in milli node hours i.e. 1,000
   * value in this field means 1 node hour. The training cost of the model will not exceed this
   * budget. The final cost will be attempted to be close to the budget, though may end up being
   * (even) noticeably smaller - at the backend's discretion. This especially may happen when
   * further model training ceases to provide any improvements. If the budget is set to a value
   * known to be insufficient to train a model for the given dataset, the training won't be
   * attempted and will error. The train budget must be between 1,000 and 72,000 milli node hours,
   * inclusive.
   * @param trainBudgetMilliNodeHours trainBudgetMilliNodeHours or {@code null} for none
   */
  public GoogleCloudAiplatformV1SchemaTrainingjobDefinitionAutoMlTablesInputs setTrainBudgetMilliNodeHours(java.lang.Long trainBudgetMilliNodeHours) {
    this.trainBudgetMilliNodeHours = trainBudgetMilliNodeHours;
    return this;
  }

  /**
   * Each transformation will apply transform function to given input column. And the result will be
   * used for training. When creating transformation for BigQuery Struct column, the column should
   * be flattened using "." as the delimiter.
   * @return value or {@code null} for none
   */
  public java.util.List<GoogleCloudAiplatformV1SchemaTrainingjobDefinitionAutoMlTablesInputsTransformation> getTransformations() {
    return transformations;
  }

  /**
   * Each transformation will apply transform function to given input column. And the result will be
   * used for training. When creating transformation for BigQuery Struct column, the column should
   * be flattened using "." as the delimiter.
   * @param transformations transformations or {@code null} for none
   */
  public GoogleCloudAiplatformV1SchemaTrainingjobDefinitionAutoMlTablesInputs setTransformations(java.util.List<GoogleCloudAiplatformV1SchemaTrainingjobDefinitionAutoMlTablesInputsTransformation> transformations) {
    this.transformations = transformations;
    return this;
  }

  /**
   * Column name that should be used as the weight column. Higher values in this column give more
   * importance to the row during model training. The column must have numeric values between 0 and
   * 10000 inclusively; 0 means the row is ignored for training. If weight column field is not set,
   * then all rows are assumed to have equal weight of 1.
   * @return value or {@code null} for none
   */
  public java.lang.String getWeightColumnName() {
    return weightColumnName;
  }

  /**
   * Column name that should be used as the weight column. Higher values in this column give more
   * importance to the row during model training. The column must have numeric values between 0 and
   * 10000 inclusively; 0 means the row is ignored for training. If weight column field is not set,
   * then all rows are assumed to have equal weight of 1.
   * @param weightColumnName weightColumnName or {@code null} for none
   */
  public GoogleCloudAiplatformV1SchemaTrainingjobDefinitionAutoMlTablesInputs setWeightColumnName(java.lang.String weightColumnName) {
    this.weightColumnName = weightColumnName;
    return this;
  }

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

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

}
