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

/**
 * Video annotation request.
 *
 * <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 Cloud Video Intelligence 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 GoogleCloudVideointelligenceV1AnnotateVideoRequest extends com.google.api.client.json.GenericJson {

  /**
   * Requested video annotation features.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> features;

  /**
   * The video data bytes. If unset, the input video(s) should be specified via `input_uri`. If set,
   * `input_uri` should be unset.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String inputContent;

  /**
   * Input video location. Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
   * URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id`
   * (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request
   * URIs](/storage/docs/reference-uris). A video URI may include wildcards in `object-id`, and thus
   * identify multiple videos. Supported wildcards: '*' to match 0 or more characters; '?' to match
   * 1 character. If unset, the input video should be embedded in the request as `input_content`. If
   * set, `input_content` should be unset.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String inputUri;

  /**
   * Optional cloud region where annotation should take place. Supported cloud regions: `us-east1`,
   * `us-west1`, `europe-west1`, `asia-east1`. If no region is specified, a region will be
   * determined based on video file location.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String locationId;

  /**
   * Optional location where the output (in JSON format) should be stored. Currently, only [Google
   * Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified
   * in the following format: `gs://bucket-id/object-id` (other URI formats return
   * google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs
   * /reference-uris).
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String outputUri;

  /**
   * Additional video context and/or feature-specific parameters.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleCloudVideointelligenceV1VideoContext videoContext;

  /**
   * Requested video annotation features.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getFeatures() {
    return features;
  }

  /**
   * Requested video annotation features.
   * @param features features or {@code null} for none
   */
  public GoogleCloudVideointelligenceV1AnnotateVideoRequest setFeatures(java.util.List<java.lang.String> features) {
    this.features = features;
    return this;
  }

  /**
   * The video data bytes. If unset, the input video(s) should be specified via `input_uri`. If set,
   * `input_uri` should be unset.
   * @see #decodeInputContent()
   * @return value or {@code null} for none
   */
  public java.lang.String getInputContent() {
    return inputContent;
  }

  /**
   * The video data bytes. If unset, the input video(s) should be specified via `input_uri`. If set,
   * `input_uri` should be unset.
   * @see #getInputContent()
   * @return Base64 decoded value or {@code null} for none
   *
   * @since 1.14
   */
  public byte[] decodeInputContent() {
    return com.google.api.client.util.Base64.decodeBase64(inputContent);
  }

  /**
   * The video data bytes. If unset, the input video(s) should be specified via `input_uri`. If set,
   * `input_uri` should be unset.
   * @see #encodeInputContent()
   * @param inputContent inputContent or {@code null} for none
   */
  public GoogleCloudVideointelligenceV1AnnotateVideoRequest setInputContent(java.lang.String inputContent) {
    this.inputContent = inputContent;
    return this;
  }

  /**
   * The video data bytes. If unset, the input video(s) should be specified via `input_uri`. If set,
   * `input_uri` should be unset.
   * @see #setInputContent()
   *
   * <p>
   * The value is encoded Base64 or {@code null} for none.
   * </p>
   *
   * @since 1.14
   */
  public GoogleCloudVideointelligenceV1AnnotateVideoRequest encodeInputContent(byte[] inputContent) {
    this.inputContent = com.google.api.client.util.Base64.encodeBase64URLSafeString(inputContent);
    return this;
  }

  /**
   * Input video location. Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
   * URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id`
   * (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request
   * URIs](/storage/docs/reference-uris). A video URI may include wildcards in `object-id`, and thus
   * identify multiple videos. Supported wildcards: '*' to match 0 or more characters; '?' to match
   * 1 character. If unset, the input video should be embedded in the request as `input_content`. If
   * set, `input_content` should be unset.
   * @return value or {@code null} for none
   */
  public java.lang.String getInputUri() {
    return inputUri;
  }

  /**
   * Input video location. Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
   * URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id`
   * (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request
   * URIs](/storage/docs/reference-uris). A video URI may include wildcards in `object-id`, and thus
   * identify multiple videos. Supported wildcards: '*' to match 0 or more characters; '?' to match
   * 1 character. If unset, the input video should be embedded in the request as `input_content`. If
   * set, `input_content` should be unset.
   * @param inputUri inputUri or {@code null} for none
   */
  public GoogleCloudVideointelligenceV1AnnotateVideoRequest setInputUri(java.lang.String inputUri) {
    this.inputUri = inputUri;
    return this;
  }

  /**
   * Optional cloud region where annotation should take place. Supported cloud regions: `us-east1`,
   * `us-west1`, `europe-west1`, `asia-east1`. If no region is specified, a region will be
   * determined based on video file location.
   * @return value or {@code null} for none
   */
  public java.lang.String getLocationId() {
    return locationId;
  }

  /**
   * Optional cloud region where annotation should take place. Supported cloud regions: `us-east1`,
   * `us-west1`, `europe-west1`, `asia-east1`. If no region is specified, a region will be
   * determined based on video file location.
   * @param locationId locationId or {@code null} for none
   */
  public GoogleCloudVideointelligenceV1AnnotateVideoRequest setLocationId(java.lang.String locationId) {
    this.locationId = locationId;
    return this;
  }

  /**
   * Optional location where the output (in JSON format) should be stored. Currently, only [Google
   * Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified
   * in the following format: `gs://bucket-id/object-id` (other URI formats return
   * google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs
   * /reference-uris).
   * @return value or {@code null} for none
   */
  public java.lang.String getOutputUri() {
    return outputUri;
  }

  /**
   * Optional location where the output (in JSON format) should be stored. Currently, only [Google
   * Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified
   * in the following format: `gs://bucket-id/object-id` (other URI formats return
   * google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs
   * /reference-uris).
   * @param outputUri outputUri or {@code null} for none
   */
  public GoogleCloudVideointelligenceV1AnnotateVideoRequest setOutputUri(java.lang.String outputUri) {
    this.outputUri = outputUri;
    return this;
  }

  /**
   * Additional video context and/or feature-specific parameters.
   * @return value or {@code null} for none
   */
  public GoogleCloudVideointelligenceV1VideoContext getVideoContext() {
    return videoContext;
  }

  /**
   * Additional video context and/or feature-specific parameters.
   * @param videoContext videoContext or {@code null} for none
   */
  public GoogleCloudVideointelligenceV1AnnotateVideoRequest setVideoContext(GoogleCloudVideointelligenceV1VideoContext videoContext) {
    this.videoContext = videoContext;
    return this;
  }

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

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

}
