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

/**
 * Request message for FeaturestoreService.BatchReadFeatureValues.
 *
 * <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 GoogleCloudAiplatformV1BatchReadFeatureValuesRequest extends com.google.api.client.json.GenericJson {

  /**
   * Similar to csv_read_instances, but from BigQuery source.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleCloudAiplatformV1BigQuerySource bigqueryReadInstances;

  /**
   * Each read instance consists of exactly one read timestamp and one or more entity IDs
   * identifying entities of the corresponding EntityTypes whose Features are requested. Each output
   * instance contains Feature values of requested entities concatenated together as of the read
   * time. An example read instance may be `foo_entity_id, bar_entity_id, 2020-01-01T10:00:00.123Z`.
   * An example output instance may be `foo_entity_id, bar_entity_id, 2020-01-01T10:00:00.123Z,
   * foo_entity_feature1_value, bar_entity_feature2_value`. Timestamp in each read instance must be
   * millisecond-aligned. `csv_read_instances` are read instances stored in a plain-text CSV file.
   * The header should be: [ENTITY_TYPE_ID1], [ENTITY_TYPE_ID2], ..., timestamp The columns can be
   * in any order. Values in the timestamp column must use the RFC 3339 format, e.g.
   * `2012-07-30T10:43:17.123Z`.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleCloudAiplatformV1CsvSource csvReadInstances;

  /**
   * Required. Specifies output location and format.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleCloudAiplatformV1FeatureValueDestination destination;

  /**
   * Required. Specifies EntityType grouping Features to read values of and settings.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<GoogleCloudAiplatformV1BatchReadFeatureValuesRequestEntityTypeSpec> entityTypeSpecs;

  /**
   * When not empty, the specified fields in the *_read_instances source will be joined as-is in the
   * output, in addition to those fields from the Featurestore Entity. For BigQuery source, the type
   * of the pass-through values will be automatically inferred. For CSV source, the pass-through
   * values will be passed as opaque bytes.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<GoogleCloudAiplatformV1BatchReadFeatureValuesRequestPassThroughField> passThroughFields;

  /**
   * Optional. Excludes Feature values with feature generation timestamp before this timestamp. If
   * not set, retrieve oldest values kept in Feature Store. Timestamp, if present, must not have
   * higher than millisecond precision.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String startTime;

  /**
   * Similar to csv_read_instances, but from BigQuery source.
   * @return value or {@code null} for none
   */
  public GoogleCloudAiplatformV1BigQuerySource getBigqueryReadInstances() {
    return bigqueryReadInstances;
  }

  /**
   * Similar to csv_read_instances, but from BigQuery source.
   * @param bigqueryReadInstances bigqueryReadInstances or {@code null} for none
   */
  public GoogleCloudAiplatformV1BatchReadFeatureValuesRequest setBigqueryReadInstances(GoogleCloudAiplatformV1BigQuerySource bigqueryReadInstances) {
    this.bigqueryReadInstances = bigqueryReadInstances;
    return this;
  }

  /**
   * Each read instance consists of exactly one read timestamp and one or more entity IDs
   * identifying entities of the corresponding EntityTypes whose Features are requested. Each output
   * instance contains Feature values of requested entities concatenated together as of the read
   * time. An example read instance may be `foo_entity_id, bar_entity_id, 2020-01-01T10:00:00.123Z`.
   * An example output instance may be `foo_entity_id, bar_entity_id, 2020-01-01T10:00:00.123Z,
   * foo_entity_feature1_value, bar_entity_feature2_value`. Timestamp in each read instance must be
   * millisecond-aligned. `csv_read_instances` are read instances stored in a plain-text CSV file.
   * The header should be: [ENTITY_TYPE_ID1], [ENTITY_TYPE_ID2], ..., timestamp The columns can be
   * in any order. Values in the timestamp column must use the RFC 3339 format, e.g.
   * `2012-07-30T10:43:17.123Z`.
   * @return value or {@code null} for none
   */
  public GoogleCloudAiplatformV1CsvSource getCsvReadInstances() {
    return csvReadInstances;
  }

  /**
   * Each read instance consists of exactly one read timestamp and one or more entity IDs
   * identifying entities of the corresponding EntityTypes whose Features are requested. Each output
   * instance contains Feature values of requested entities concatenated together as of the read
   * time. An example read instance may be `foo_entity_id, bar_entity_id, 2020-01-01T10:00:00.123Z`.
   * An example output instance may be `foo_entity_id, bar_entity_id, 2020-01-01T10:00:00.123Z,
   * foo_entity_feature1_value, bar_entity_feature2_value`. Timestamp in each read instance must be
   * millisecond-aligned. `csv_read_instances` are read instances stored in a plain-text CSV file.
   * The header should be: [ENTITY_TYPE_ID1], [ENTITY_TYPE_ID2], ..., timestamp The columns can be
   * in any order. Values in the timestamp column must use the RFC 3339 format, e.g.
   * `2012-07-30T10:43:17.123Z`.
   * @param csvReadInstances csvReadInstances or {@code null} for none
   */
  public GoogleCloudAiplatformV1BatchReadFeatureValuesRequest setCsvReadInstances(GoogleCloudAiplatformV1CsvSource csvReadInstances) {
    this.csvReadInstances = csvReadInstances;
    return this;
  }

  /**
   * Required. Specifies output location and format.
   * @return value or {@code null} for none
   */
  public GoogleCloudAiplatformV1FeatureValueDestination getDestination() {
    return destination;
  }

  /**
   * Required. Specifies output location and format.
   * @param destination destination or {@code null} for none
   */
  public GoogleCloudAiplatformV1BatchReadFeatureValuesRequest setDestination(GoogleCloudAiplatformV1FeatureValueDestination destination) {
    this.destination = destination;
    return this;
  }

  /**
   * Required. Specifies EntityType grouping Features to read values of and settings.
   * @return value or {@code null} for none
   */
  public java.util.List<GoogleCloudAiplatformV1BatchReadFeatureValuesRequestEntityTypeSpec> getEntityTypeSpecs() {
    return entityTypeSpecs;
  }

  /**
   * Required. Specifies EntityType grouping Features to read values of and settings.
   * @param entityTypeSpecs entityTypeSpecs or {@code null} for none
   */
  public GoogleCloudAiplatformV1BatchReadFeatureValuesRequest setEntityTypeSpecs(java.util.List<GoogleCloudAiplatformV1BatchReadFeatureValuesRequestEntityTypeSpec> entityTypeSpecs) {
    this.entityTypeSpecs = entityTypeSpecs;
    return this;
  }

  /**
   * When not empty, the specified fields in the *_read_instances source will be joined as-is in the
   * output, in addition to those fields from the Featurestore Entity. For BigQuery source, the type
   * of the pass-through values will be automatically inferred. For CSV source, the pass-through
   * values will be passed as opaque bytes.
   * @return value or {@code null} for none
   */
  public java.util.List<GoogleCloudAiplatformV1BatchReadFeatureValuesRequestPassThroughField> getPassThroughFields() {
    return passThroughFields;
  }

  /**
   * When not empty, the specified fields in the *_read_instances source will be joined as-is in the
   * output, in addition to those fields from the Featurestore Entity. For BigQuery source, the type
   * of the pass-through values will be automatically inferred. For CSV source, the pass-through
   * values will be passed as opaque bytes.
   * @param passThroughFields passThroughFields or {@code null} for none
   */
  public GoogleCloudAiplatformV1BatchReadFeatureValuesRequest setPassThroughFields(java.util.List<GoogleCloudAiplatformV1BatchReadFeatureValuesRequestPassThroughField> passThroughFields) {
    this.passThroughFields = passThroughFields;
    return this;
  }

  /**
   * Optional. Excludes Feature values with feature generation timestamp before this timestamp. If
   * not set, retrieve oldest values kept in Feature Store. Timestamp, if present, must not have
   * higher than millisecond precision.
   * @return value or {@code null} for none
   */
  public String getStartTime() {
    return startTime;
  }

  /**
   * Optional. Excludes Feature values with feature generation timestamp before this timestamp. If
   * not set, retrieve oldest values kept in Feature Store. Timestamp, if present, must not have
   * higher than millisecond precision.
   * @param startTime startTime or {@code null} for none
   */
  public GoogleCloudAiplatformV1BatchReadFeatureValuesRequest setStartTime(String startTime) {
    this.startTime = startTime;
    return this;
  }

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

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

}
