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

/**
 * Attachments that follow the message text.
 *
 * <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 Attachment extends com.google.api.client.json.GenericJson {

  /**
   * Revised version of Gmail AddOn attachment approved by API design review.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleChatV1ContextualAddOnMarkup addOnData;

  /**
   * The userId for the bot/app that created this data, to be used for attribution of attachments
   * when the attachment was not created by the message sender.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private UserId appId;

  /**
   * To identify an attachment within repeated in a message
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String attachmentId;

  /**
   * Card AddOn attachment with the possibility for specifying editable widgets.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private AppsDynamiteStorageCard cardAddOnData;

  /**
   * Contains additional metadata that further enhance the annotation when it is returned as part of
   * search response. For example, this can be used to define how the attachment matches the search.
   * Information can be used to highlight in rendering search results. The following are the
   * different attachment text fields that are covered by this field: 1.
   * ContextualAddOn.Card.CardHeader.title 2. CardItem.CardItemHeader.title
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private AppsDynamiteSharedMessageComponentSearchInfo componentSearchInfo;

  /**
   * Deprecated version of Gmail AddOn attachment.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private ContextualAddOnMarkup deprecatedAddOnData;

  /**
   * Slack attachment.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private AppsDynamiteV1ApiCompatV1Attachment slackData;

  /**
   * The height of image url as fetched by fife. This field is asynchronously filled.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer slackDataImageUrlHeight;

  /**
   * Revised version of Gmail AddOn attachment approved by API design review.
   * @return value or {@code null} for none
   */
  public GoogleChatV1ContextualAddOnMarkup getAddOnData() {
    return addOnData;
  }

  /**
   * Revised version of Gmail AddOn attachment approved by API design review.
   * @param addOnData addOnData or {@code null} for none
   */
  public Attachment setAddOnData(GoogleChatV1ContextualAddOnMarkup addOnData) {
    this.addOnData = addOnData;
    return this;
  }

  /**
   * The userId for the bot/app that created this data, to be used for attribution of attachments
   * when the attachment was not created by the message sender.
   * @return value or {@code null} for none
   */
  public UserId getAppId() {
    return appId;
  }

  /**
   * The userId for the bot/app that created this data, to be used for attribution of attachments
   * when the attachment was not created by the message sender.
   * @param appId appId or {@code null} for none
   */
  public Attachment setAppId(UserId appId) {
    this.appId = appId;
    return this;
  }

  /**
   * To identify an attachment within repeated in a message
   * @return value or {@code null} for none
   */
  public java.lang.String getAttachmentId() {
    return attachmentId;
  }

  /**
   * To identify an attachment within repeated in a message
   * @param attachmentId attachmentId or {@code null} for none
   */
  public Attachment setAttachmentId(java.lang.String attachmentId) {
    this.attachmentId = attachmentId;
    return this;
  }

  /**
   * Card AddOn attachment with the possibility for specifying editable widgets.
   * @return value or {@code null} for none
   */
  public AppsDynamiteStorageCard getCardAddOnData() {
    return cardAddOnData;
  }

  /**
   * Card AddOn attachment with the possibility for specifying editable widgets.
   * @param cardAddOnData cardAddOnData or {@code null} for none
   */
  public Attachment setCardAddOnData(AppsDynamiteStorageCard cardAddOnData) {
    this.cardAddOnData = cardAddOnData;
    return this;
  }

  /**
   * Contains additional metadata that further enhance the annotation when it is returned as part of
   * search response. For example, this can be used to define how the attachment matches the search.
   * Information can be used to highlight in rendering search results. The following are the
   * different attachment text fields that are covered by this field: 1.
   * ContextualAddOn.Card.CardHeader.title 2. CardItem.CardItemHeader.title
   * @return value or {@code null} for none
   */
  public AppsDynamiteSharedMessageComponentSearchInfo getComponentSearchInfo() {
    return componentSearchInfo;
  }

  /**
   * Contains additional metadata that further enhance the annotation when it is returned as part of
   * search response. For example, this can be used to define how the attachment matches the search.
   * Information can be used to highlight in rendering search results. The following are the
   * different attachment text fields that are covered by this field: 1.
   * ContextualAddOn.Card.CardHeader.title 2. CardItem.CardItemHeader.title
   * @param componentSearchInfo componentSearchInfo or {@code null} for none
   */
  public Attachment setComponentSearchInfo(AppsDynamiteSharedMessageComponentSearchInfo componentSearchInfo) {
    this.componentSearchInfo = componentSearchInfo;
    return this;
  }

  /**
   * Deprecated version of Gmail AddOn attachment.
   * @return value or {@code null} for none
   */
  public ContextualAddOnMarkup getDeprecatedAddOnData() {
    return deprecatedAddOnData;
  }

  /**
   * Deprecated version of Gmail AddOn attachment.
   * @param deprecatedAddOnData deprecatedAddOnData or {@code null} for none
   */
  public Attachment setDeprecatedAddOnData(ContextualAddOnMarkup deprecatedAddOnData) {
    this.deprecatedAddOnData = deprecatedAddOnData;
    return this;
  }

  /**
   * Slack attachment.
   * @return value or {@code null} for none
   */
  public AppsDynamiteV1ApiCompatV1Attachment getSlackData() {
    return slackData;
  }

  /**
   * Slack attachment.
   * @param slackData slackData or {@code null} for none
   */
  public Attachment setSlackData(AppsDynamiteV1ApiCompatV1Attachment slackData) {
    this.slackData = slackData;
    return this;
  }

  /**
   * The height of image url as fetched by fife. This field is asynchronously filled.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getSlackDataImageUrlHeight() {
    return slackDataImageUrlHeight;
  }

  /**
   * The height of image url as fetched by fife. This field is asynchronously filled.
   * @param slackDataImageUrlHeight slackDataImageUrlHeight or {@code null} for none
   */
  public Attachment setSlackDataImageUrlHeight(java.lang.Integer slackDataImageUrlHeight) {
    this.slackDataImageUrlHeight = slackDataImageUrlHeight;
    return this;
  }

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

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

}
