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

/**
 * A VideoId is the unique identifier of a video. Privacy: VideoIds are visible in logs,
 * notifications, etc and must not contain PII.
 *
 * <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 VideoAssetsVenomVideoId extends com.google.api.client.json.GenericJson {

  /**
   * REQUIRED. IDs have some constraints: - 32 bytes max: this is enforced by the server - for the
   * time being, must be parseable as a youtube ID (basically a base64-encoded string which maps to
   * a 64-bit integer). This restriction will eventually be lifted.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String id;

  /**
   * LINT.ThenChange( //depot/google3/googledata/production/playbooks/video-assets/clients.md,
   * //depot/google3/video/assets/venom/proto/namespace.proto ) REQUIRED.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String ns;

  /**
   * REQUIRED. IDs have some constraints: - 32 bytes max: this is enforced by the server - for the
   * time being, must be parseable as a youtube ID (basically a base64-encoded string which maps to
   * a 64-bit integer). This restriction will eventually be lifted.
   * @see #decodeId()
   * @return value or {@code null} for none
   */
  public java.lang.String getId() {
    return id;
  }

  /**
   * REQUIRED. IDs have some constraints: - 32 bytes max: this is enforced by the server - for the
   * time being, must be parseable as a youtube ID (basically a base64-encoded string which maps to
   * a 64-bit integer). This restriction will eventually be lifted.
   * @see #getId()
   * @return Base64 decoded value or {@code null} for none
   *
   * @since 1.14
   */
  public byte[] decodeId() {
    return com.google.api.client.util.Base64.decodeBase64(id);
  }

  /**
   * REQUIRED. IDs have some constraints: - 32 bytes max: this is enforced by the server - for the
   * time being, must be parseable as a youtube ID (basically a base64-encoded string which maps to
   * a 64-bit integer). This restriction will eventually be lifted.
   * @see #encodeId()
   * @param id id or {@code null} for none
   */
  public VideoAssetsVenomVideoId setId(java.lang.String id) {
    this.id = id;
    return this;
  }

  /**
   * REQUIRED. IDs have some constraints: - 32 bytes max: this is enforced by the server - for the
   * time being, must be parseable as a youtube ID (basically a base64-encoded string which maps to
   * a 64-bit integer). This restriction will eventually be lifted.
   * @see #setId()
   *
   * <p>
   * The value is encoded Base64 or {@code null} for none.
   * </p>
   *
   * @since 1.14
   */
  public VideoAssetsVenomVideoId encodeId(byte[] id) {
    this.id = com.google.api.client.util.Base64.encodeBase64URLSafeString(id);
    return this;
  }

  /**
   * LINT.ThenChange( //depot/google3/googledata/production/playbooks/video-assets/clients.md,
   * //depot/google3/video/assets/venom/proto/namespace.proto ) REQUIRED.
   * @return value or {@code null} for none
   */
  public java.lang.String getNs() {
    return ns;
  }

  /**
   * LINT.ThenChange( //depot/google3/googledata/production/playbooks/video-assets/clients.md,
   * //depot/google3/video/assets/venom/proto/namespace.proto ) REQUIRED.
   * @param ns ns or {@code null} for none
   */
  public VideoAssetsVenomVideoId setNs(java.lang.String ns) {
    this.ns = ns;
    return this;
  }

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

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

}
