/*
 * 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.v1beta1.model;

/**
 * Metadata of the input of a feature. Fields other than InputMetadata.input_baselines are
 * applicable only for Models that are using Vertex AI-provided images for Tensorflow.
 *
 * <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 GoogleCloudAiplatformV1beta1ExplanationMetadataInputMetadata extends com.google.api.client.json.GenericJson {

  /**
   * Specifies the shape of the values of the input if the input is a sparse representation. Refer
   * to Tensorflow documentation for more details:
   * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String denseShapeTensorName;

  /**
   * A list of baselines for the encoded tensor. The shape of each baseline should match the shape
   * of the encoded tensor. If a scalar is provided, Vertex AI broadcasts to the same shape as the
   * encoded tensor.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.Object> encodedBaselines;

  /**
   * Encoded tensor is a transformation of the input tensor. Must be provided if choosing Integrated
   * Gradients attribution or XRAI attribution and the input tensor is not differentiable. An
   * encoded tensor is generated if the input tensor is encoded by a lookup table.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String encodedTensorName;

  /**
   * Defines how the feature is encoded into the input tensor. Defaults to IDENTITY.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String encoding;

  /**
   * The domain details of the input feature value. Like min/max, original mean or standard
   * deviation if normalized.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleCloudAiplatformV1beta1ExplanationMetadataInputMetadataFeatureValueDomain featureValueDomain;

  /**
   * Name of the group that the input belongs to. Features with the same group name will be treated
   * as one feature when computing attributions. Features grouped together can have different shapes
   * in value. If provided, there will be one single attribution generated in
   * Attribution.feature_attributions, keyed by the group name.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String groupName;

  /**
   * A list of feature names for each index in the input tensor. Required when the input
   * InputMetadata.encoding is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> indexFeatureMapping;

  /**
   * Specifies the index of the values of the input tensor. Required when the input tensor is a
   * sparse representation. Refer to Tensorflow documentation for more details:
   * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String indicesTensorName;

  /**
   * Baseline inputs for this feature. If no baseline is specified, Vertex AI chooses the baseline
   * for this feature. If multiple baselines are specified, Vertex AI returns the average
   * attributions across them in Attribution.feature_attributions. For Vertex AI-provided Tensorflow
   * images (both 1.x and 2.x), the shape of each baseline must match the shape of the input tensor.
   * If a scalar is provided, we broadcast to the same shape as the input tensor. For custom images,
   * the element of the baselines must be in the same format as the feature's input in the
   * instance[]. The schema of any single instance may be specified via Endpoint's DeployedModels'
   * Model's PredictSchemata's instance_schema_uri.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.Object> inputBaselines;

  /**
   * Name of the input tensor for this feature. Required and is only applicable to Vertex AI-
   * provided images for Tensorflow.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String inputTensorName;

  /**
   * Modality of the feature. Valid values are: numeric, image. Defaults to numeric.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String modality;

  /**
   * Visualization configurations for image explanation.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleCloudAiplatformV1beta1ExplanationMetadataInputMetadataVisualization visualization;

  /**
   * Specifies the shape of the values of the input if the input is a sparse representation. Refer
   * to Tensorflow documentation for more details:
   * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
   * @return value or {@code null} for none
   */
  public java.lang.String getDenseShapeTensorName() {
    return denseShapeTensorName;
  }

  /**
   * Specifies the shape of the values of the input if the input is a sparse representation. Refer
   * to Tensorflow documentation for more details:
   * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
   * @param denseShapeTensorName denseShapeTensorName or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1ExplanationMetadataInputMetadata setDenseShapeTensorName(java.lang.String denseShapeTensorName) {
    this.denseShapeTensorName = denseShapeTensorName;
    return this;
  }

  /**
   * A list of baselines for the encoded tensor. The shape of each baseline should match the shape
   * of the encoded tensor. If a scalar is provided, Vertex AI broadcasts to the same shape as the
   * encoded tensor.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.Object> getEncodedBaselines() {
    return encodedBaselines;
  }

  /**
   * A list of baselines for the encoded tensor. The shape of each baseline should match the shape
   * of the encoded tensor. If a scalar is provided, Vertex AI broadcasts to the same shape as the
   * encoded tensor.
   * @param encodedBaselines encodedBaselines or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1ExplanationMetadataInputMetadata setEncodedBaselines(java.util.List<java.lang.Object> encodedBaselines) {
    this.encodedBaselines = encodedBaselines;
    return this;
  }

  /**
   * Encoded tensor is a transformation of the input tensor. Must be provided if choosing Integrated
   * Gradients attribution or XRAI attribution and the input tensor is not differentiable. An
   * encoded tensor is generated if the input tensor is encoded by a lookup table.
   * @return value or {@code null} for none
   */
  public java.lang.String getEncodedTensorName() {
    return encodedTensorName;
  }

  /**
   * Encoded tensor is a transformation of the input tensor. Must be provided if choosing Integrated
   * Gradients attribution or XRAI attribution and the input tensor is not differentiable. An
   * encoded tensor is generated if the input tensor is encoded by a lookup table.
   * @param encodedTensorName encodedTensorName or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1ExplanationMetadataInputMetadata setEncodedTensorName(java.lang.String encodedTensorName) {
    this.encodedTensorName = encodedTensorName;
    return this;
  }

  /**
   * Defines how the feature is encoded into the input tensor. Defaults to IDENTITY.
   * @return value or {@code null} for none
   */
  public java.lang.String getEncoding() {
    return encoding;
  }

  /**
   * Defines how the feature is encoded into the input tensor. Defaults to IDENTITY.
   * @param encoding encoding or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1ExplanationMetadataInputMetadata setEncoding(java.lang.String encoding) {
    this.encoding = encoding;
    return this;
  }

  /**
   * The domain details of the input feature value. Like min/max, original mean or standard
   * deviation if normalized.
   * @return value or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1ExplanationMetadataInputMetadataFeatureValueDomain getFeatureValueDomain() {
    return featureValueDomain;
  }

  /**
   * The domain details of the input feature value. Like min/max, original mean or standard
   * deviation if normalized.
   * @param featureValueDomain featureValueDomain or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1ExplanationMetadataInputMetadata setFeatureValueDomain(GoogleCloudAiplatformV1beta1ExplanationMetadataInputMetadataFeatureValueDomain featureValueDomain) {
    this.featureValueDomain = featureValueDomain;
    return this;
  }

  /**
   * Name of the group that the input belongs to. Features with the same group name will be treated
   * as one feature when computing attributions. Features grouped together can have different shapes
   * in value. If provided, there will be one single attribution generated in
   * Attribution.feature_attributions, keyed by the group name.
   * @return value or {@code null} for none
   */
  public java.lang.String getGroupName() {
    return groupName;
  }

  /**
   * Name of the group that the input belongs to. Features with the same group name will be treated
   * as one feature when computing attributions. Features grouped together can have different shapes
   * in value. If provided, there will be one single attribution generated in
   * Attribution.feature_attributions, keyed by the group name.
   * @param groupName groupName or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1ExplanationMetadataInputMetadata setGroupName(java.lang.String groupName) {
    this.groupName = groupName;
    return this;
  }

  /**
   * A list of feature names for each index in the input tensor. Required when the input
   * InputMetadata.encoding is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getIndexFeatureMapping() {
    return indexFeatureMapping;
  }

  /**
   * A list of feature names for each index in the input tensor. Required when the input
   * InputMetadata.encoding is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.
   * @param indexFeatureMapping indexFeatureMapping or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1ExplanationMetadataInputMetadata setIndexFeatureMapping(java.util.List<java.lang.String> indexFeatureMapping) {
    this.indexFeatureMapping = indexFeatureMapping;
    return this;
  }

  /**
   * Specifies the index of the values of the input tensor. Required when the input tensor is a
   * sparse representation. Refer to Tensorflow documentation for more details:
   * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
   * @return value or {@code null} for none
   */
  public java.lang.String getIndicesTensorName() {
    return indicesTensorName;
  }

  /**
   * Specifies the index of the values of the input tensor. Required when the input tensor is a
   * sparse representation. Refer to Tensorflow documentation for more details:
   * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
   * @param indicesTensorName indicesTensorName or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1ExplanationMetadataInputMetadata setIndicesTensorName(java.lang.String indicesTensorName) {
    this.indicesTensorName = indicesTensorName;
    return this;
  }

  /**
   * Baseline inputs for this feature. If no baseline is specified, Vertex AI chooses the baseline
   * for this feature. If multiple baselines are specified, Vertex AI returns the average
   * attributions across them in Attribution.feature_attributions. For Vertex AI-provided Tensorflow
   * images (both 1.x and 2.x), the shape of each baseline must match the shape of the input tensor.
   * If a scalar is provided, we broadcast to the same shape as the input tensor. For custom images,
   * the element of the baselines must be in the same format as the feature's input in the
   * instance[]. The schema of any single instance may be specified via Endpoint's DeployedModels'
   * Model's PredictSchemata's instance_schema_uri.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.Object> getInputBaselines() {
    return inputBaselines;
  }

  /**
   * Baseline inputs for this feature. If no baseline is specified, Vertex AI chooses the baseline
   * for this feature. If multiple baselines are specified, Vertex AI returns the average
   * attributions across them in Attribution.feature_attributions. For Vertex AI-provided Tensorflow
   * images (both 1.x and 2.x), the shape of each baseline must match the shape of the input tensor.
   * If a scalar is provided, we broadcast to the same shape as the input tensor. For custom images,
   * the element of the baselines must be in the same format as the feature's input in the
   * instance[]. The schema of any single instance may be specified via Endpoint's DeployedModels'
   * Model's PredictSchemata's instance_schema_uri.
   * @param inputBaselines inputBaselines or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1ExplanationMetadataInputMetadata setInputBaselines(java.util.List<java.lang.Object> inputBaselines) {
    this.inputBaselines = inputBaselines;
    return this;
  }

  /**
   * Name of the input tensor for this feature. Required and is only applicable to Vertex AI-
   * provided images for Tensorflow.
   * @return value or {@code null} for none
   */
  public java.lang.String getInputTensorName() {
    return inputTensorName;
  }

  /**
   * Name of the input tensor for this feature. Required and is only applicable to Vertex AI-
   * provided images for Tensorflow.
   * @param inputTensorName inputTensorName or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1ExplanationMetadataInputMetadata setInputTensorName(java.lang.String inputTensorName) {
    this.inputTensorName = inputTensorName;
    return this;
  }

  /**
   * Modality of the feature. Valid values are: numeric, image. Defaults to numeric.
   * @return value or {@code null} for none
   */
  public java.lang.String getModality() {
    return modality;
  }

  /**
   * Modality of the feature. Valid values are: numeric, image. Defaults to numeric.
   * @param modality modality or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1ExplanationMetadataInputMetadata setModality(java.lang.String modality) {
    this.modality = modality;
    return this;
  }

  /**
   * Visualization configurations for image explanation.
   * @return value or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1ExplanationMetadataInputMetadataVisualization getVisualization() {
    return visualization;
  }

  /**
   * Visualization configurations for image explanation.
   * @param visualization visualization or {@code null} for none
   */
  public GoogleCloudAiplatformV1beta1ExplanationMetadataInputMetadata setVisualization(GoogleCloudAiplatformV1beta1ExplanationMetadataInputMetadataVisualization visualization) {
    this.visualization = visualization;
    return this;
  }

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

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

}
