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

/**
 * Image feature embedding proto. It supports various embedding formats: raw bytes, floating point
 * values, and tokens.
 *
 * <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 Document AI Warehouse 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 ImageUnderstandingIndexingFeature extends com.google.api.client.json.GenericJson {

  /**
   * Multiple fields can be set. For example for Starburst V3, they can be used to store compressed
   * byte, raw float feature, and tokens, respectively.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String bytesValue;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.Float> floatValue;

  /**
   * Local features.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private PhotosVisionObjectrecImageTemplate imageTemplate;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.Integer> int32Value;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String version;

  /**
   * Multiple fields can be set. For example for Starburst V3, they can be used to store compressed
   * byte, raw float feature, and tokens, respectively.
   * @see #decodeBytesValue()
   * @return value or {@code null} for none
   */
  public java.lang.String getBytesValue() {
    return bytesValue;
  }

  /**
   * Multiple fields can be set. For example for Starburst V3, they can be used to store compressed
   * byte, raw float feature, and tokens, respectively.
   * @see #getBytesValue()
   * @return Base64 decoded value or {@code null} for none
   *
   * @since 1.14
   */
  public byte[] decodeBytesValue() {
    return com.google.api.client.util.Base64.decodeBase64(bytesValue);
  }

  /**
   * Multiple fields can be set. For example for Starburst V3, they can be used to store compressed
   * byte, raw float feature, and tokens, respectively.
   * @see #encodeBytesValue()
   * @param bytesValue bytesValue or {@code null} for none
   */
  public ImageUnderstandingIndexingFeature setBytesValue(java.lang.String bytesValue) {
    this.bytesValue = bytesValue;
    return this;
  }

  /**
   * Multiple fields can be set. For example for Starburst V3, they can be used to store compressed
   * byte, raw float feature, and tokens, respectively.
   * @see #setBytesValue()
   *
   * <p>
   * The value is encoded Base64 or {@code null} for none.
   * </p>
   *
   * @since 1.14
   */
  public ImageUnderstandingIndexingFeature encodeBytesValue(byte[] bytesValue) {
    this.bytesValue = com.google.api.client.util.Base64.encodeBase64URLSafeString(bytesValue);
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.Float> getFloatValue() {
    return floatValue;
  }

  /**
   * @param floatValue floatValue or {@code null} for none
   */
  public ImageUnderstandingIndexingFeature setFloatValue(java.util.List<java.lang.Float> floatValue) {
    this.floatValue = floatValue;
    return this;
  }

  /**
   * Local features.
   * @return value or {@code null} for none
   */
  public PhotosVisionObjectrecImageTemplate getImageTemplate() {
    return imageTemplate;
  }

  /**
   * Local features.
   * @param imageTemplate imageTemplate or {@code null} for none
   */
  public ImageUnderstandingIndexingFeature setImageTemplate(PhotosVisionObjectrecImageTemplate imageTemplate) {
    this.imageTemplate = imageTemplate;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.Integer> getInt32Value() {
    return int32Value;
  }

  /**
   * @param int32Value int32Value or {@code null} for none
   */
  public ImageUnderstandingIndexingFeature setInt32Value(java.util.List<java.lang.Integer> int32Value) {
    this.int32Value = int32Value;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public java.lang.String getVersion() {
    return version;
  }

  /**
   * @param version version or {@code null} for none
   */
  public ImageUnderstandingIndexingFeature setVersion(java.lang.String version) {
    this.version = version;
    return this;
  }

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

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

}
