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

/**
 * Represents an embedded object in an update. This is a wrapper class that can contain a single
 * specific item proto in an extension field. Think of it as a base class like `Message` in Java.
 * Each item proto must declare that it extends this proto: message ExampleObject { option
 * (item_type) = EXAMPLE_OBJECT; extend EmbedClientItem { optional ExampleObject example_object = ;
 * } } See go/es-embeds for details.
 *
 * <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 Search 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 EmbedClientItem extends com.google.api.client.json.GenericJson {

  /**
   * The canonical ID of the embed. If absent, the canonical ID is equal to the ID; if present, then
   * the canonical ID represents an "equivalence class" of embeds which really refer to the same
   * object. (For example, the URLs http://www.foo.com/ and http://foo.com/ refer to the same
   * object) This field may be updated periodically by background processes.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String canonicalId;

  /**
   * Deep-linking data to take the user to the right place in a mobile app. This is only used for
   * preview and attribution. Links that are specific to a given embed type should live on that
   * specific embed's proto by using Link. See http://goto.google.com/mariana-design.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private DeepLinkData deepLinkData;

  /**
   * The ID of the embed. This corresponds to the schema.org ID, as represented in the ItemScope.id
   * field.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String id;

  /**
   * The provenance of the embed, populated when the embed originated from a web fetch. The
   * provenance captures information about the web page the embed had originated, like the URL that
   * was retrieved and the retrieved URL's canonical form. This is useful in the case where the URL
   * shared by the URL redirects (e.g., in the case of a shortened URL).
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Provenance provenance;

  /**
   * The ID used to identify the embed during rendering. This field will match ID, if set, otherwise
   * it will be the ID of the parent activity. This field is only populated on the server for client
   * use and is not persisted to storage.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String renderId;

  /**
   * Signature of the embed, used for verification.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String signature;

  /**
   * Transient generic data that will not be saved on the server.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private TransientData transientData;

  /**
   * The first value in `type` determines which extension field will be set. When creating an
   * EmbedClientItem, you only need to set the first (primary) type in this field. When the server
   * receives the item, it will populate the full type list using the parent annotations in the
   * ItemType enum.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> type;

  /**
   * The canonical ID of the embed. If absent, the canonical ID is equal to the ID; if present, then
   * the canonical ID represents an "equivalence class" of embeds which really refer to the same
   * object. (For example, the URLs http://www.foo.com/ and http://foo.com/ refer to the same
   * object) This field may be updated periodically by background processes.
   * @return value or {@code null} for none
   */
  public java.lang.String getCanonicalId() {
    return canonicalId;
  }

  /**
   * The canonical ID of the embed. If absent, the canonical ID is equal to the ID; if present, then
   * the canonical ID represents an "equivalence class" of embeds which really refer to the same
   * object. (For example, the URLs http://www.foo.com/ and http://foo.com/ refer to the same
   * object) This field may be updated periodically by background processes.
   * @param canonicalId canonicalId or {@code null} for none
   */
  public EmbedClientItem setCanonicalId(java.lang.String canonicalId) {
    this.canonicalId = canonicalId;
    return this;
  }

  /**
   * Deep-linking data to take the user to the right place in a mobile app. This is only used for
   * preview and attribution. Links that are specific to a given embed type should live on that
   * specific embed's proto by using Link. See http://goto.google.com/mariana-design.
   * @return value or {@code null} for none
   */
  public DeepLinkData getDeepLinkData() {
    return deepLinkData;
  }

  /**
   * Deep-linking data to take the user to the right place in a mobile app. This is only used for
   * preview and attribution. Links that are specific to a given embed type should live on that
   * specific embed's proto by using Link. See http://goto.google.com/mariana-design.
   * @param deepLinkData deepLinkData or {@code null} for none
   */
  public EmbedClientItem setDeepLinkData(DeepLinkData deepLinkData) {
    this.deepLinkData = deepLinkData;
    return this;
  }

  /**
   * The ID of the embed. This corresponds to the schema.org ID, as represented in the ItemScope.id
   * field.
   * @return value or {@code null} for none
   */
  public java.lang.String getId() {
    return id;
  }

  /**
   * The ID of the embed. This corresponds to the schema.org ID, as represented in the ItemScope.id
   * field.
   * @param id id or {@code null} for none
   */
  public EmbedClientItem setId(java.lang.String id) {
    this.id = id;
    return this;
  }

  /**
   * The provenance of the embed, populated when the embed originated from a web fetch. The
   * provenance captures information about the web page the embed had originated, like the URL that
   * was retrieved and the retrieved URL's canonical form. This is useful in the case where the URL
   * shared by the URL redirects (e.g., in the case of a shortened URL).
   * @return value or {@code null} for none
   */
  public Provenance getProvenance() {
    return provenance;
  }

  /**
   * The provenance of the embed, populated when the embed originated from a web fetch. The
   * provenance captures information about the web page the embed had originated, like the URL that
   * was retrieved and the retrieved URL's canonical form. This is useful in the case where the URL
   * shared by the URL redirects (e.g., in the case of a shortened URL).
   * @param provenance provenance or {@code null} for none
   */
  public EmbedClientItem setProvenance(Provenance provenance) {
    this.provenance = provenance;
    return this;
  }

  /**
   * The ID used to identify the embed during rendering. This field will match ID, if set, otherwise
   * it will be the ID of the parent activity. This field is only populated on the server for client
   * use and is not persisted to storage.
   * @return value or {@code null} for none
   */
  public java.lang.String getRenderId() {
    return renderId;
  }

  /**
   * The ID used to identify the embed during rendering. This field will match ID, if set, otherwise
   * it will be the ID of the parent activity. This field is only populated on the server for client
   * use and is not persisted to storage.
   * @param renderId renderId or {@code null} for none
   */
  public EmbedClientItem setRenderId(java.lang.String renderId) {
    this.renderId = renderId;
    return this;
  }

  /**
   * Signature of the embed, used for verification.
   * @return value or {@code null} for none
   */
  public java.lang.String getSignature() {
    return signature;
  }

  /**
   * Signature of the embed, used for verification.
   * @param signature signature or {@code null} for none
   */
  public EmbedClientItem setSignature(java.lang.String signature) {
    this.signature = signature;
    return this;
  }

  /**
   * Transient generic data that will not be saved on the server.
   * @return value or {@code null} for none
   */
  public TransientData getTransientData() {
    return transientData;
  }

  /**
   * Transient generic data that will not be saved on the server.
   * @param transientData transientData or {@code null} for none
   */
  public EmbedClientItem setTransientData(TransientData transientData) {
    this.transientData = transientData;
    return this;
  }

  /**
   * The first value in `type` determines which extension field will be set. When creating an
   * EmbedClientItem, you only need to set the first (primary) type in this field. When the server
   * receives the item, it will populate the full type list using the parent annotations in the
   * ItemType enum.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getType() {
    return type;
  }

  /**
   * The first value in `type` determines which extension field will be set. When creating an
   * EmbedClientItem, you only need to set the first (primary) type in this field. When the server
   * receives the item, it will populate the full type list using the parent annotations in the
   * ItemType enum.
   * @param type type or {@code null} for none
   */
  public EmbedClientItem setType(java.util.List<java.lang.String> type) {
    this.type = type;
    return this;
  }

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

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

}
