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

/**
 * Next Id: 7
 *
 * <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 AppsDynamiteSharedActivityFeedAnnotationData extends com.google.api.client.json.GenericJson {

  /**
   * Timestamp of when the Activity Feed message that contains this annotation was created. This is
   * roughly when the activity happened, such as when a reaction happened, but will have at least
   * some small delay, since the Activity Feed message is created asynchronously after. This
   * timestamp should only be used for display when the activity create time is not available in the
   * Chat UI, like the time of a reaction.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String activityFeedMessageCreateTime;

  /**
   * Unique id of the Activity Feed message used by clients to implement click-to-source. This is
   * the same messageId as the top-level id field for the Activity Feed item.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private MessageId activityFeedMessageId;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private AppsDynamiteSharedChatItem chatItem;

  /**
   * Only populated on read path and should not be persisted in storage.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private UserInfo sharedUserInfo;

  /**
   * Use shared_user_info instead.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private AppsDynamiteSharedActivityFeedAnnotationDataUserInfo userInfo;

  /**
   * Timestamp of when the Activity Feed message that contains this annotation was created. This is
   * roughly when the activity happened, such as when a reaction happened, but will have at least
   * some small delay, since the Activity Feed message is created asynchronously after. This
   * timestamp should only be used for display when the activity create time is not available in the
   * Chat UI, like the time of a reaction.
   * @return value or {@code null} for none
   */
  public String getActivityFeedMessageCreateTime() {
    return activityFeedMessageCreateTime;
  }

  /**
   * Timestamp of when the Activity Feed message that contains this annotation was created. This is
   * roughly when the activity happened, such as when a reaction happened, but will have at least
   * some small delay, since the Activity Feed message is created asynchronously after. This
   * timestamp should only be used for display when the activity create time is not available in the
   * Chat UI, like the time of a reaction.
   * @param activityFeedMessageCreateTime activityFeedMessageCreateTime or {@code null} for none
   */
  public AppsDynamiteSharedActivityFeedAnnotationData setActivityFeedMessageCreateTime(String activityFeedMessageCreateTime) {
    this.activityFeedMessageCreateTime = activityFeedMessageCreateTime;
    return this;
  }

  /**
   * Unique id of the Activity Feed message used by clients to implement click-to-source. This is
   * the same messageId as the top-level id field for the Activity Feed item.
   * @return value or {@code null} for none
   */
  public MessageId getActivityFeedMessageId() {
    return activityFeedMessageId;
  }

  /**
   * Unique id of the Activity Feed message used by clients to implement click-to-source. This is
   * the same messageId as the top-level id field for the Activity Feed item.
   * @param activityFeedMessageId activityFeedMessageId or {@code null} for none
   */
  public AppsDynamiteSharedActivityFeedAnnotationData setActivityFeedMessageId(MessageId activityFeedMessageId) {
    this.activityFeedMessageId = activityFeedMessageId;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public AppsDynamiteSharedChatItem getChatItem() {
    return chatItem;
  }

  /**
   * @param chatItem chatItem or {@code null} for none
   */
  public AppsDynamiteSharedActivityFeedAnnotationData setChatItem(AppsDynamiteSharedChatItem chatItem) {
    this.chatItem = chatItem;
    return this;
  }

  /**
   * Only populated on read path and should not be persisted in storage.
   * @return value or {@code null} for none
   */
  public UserInfo getSharedUserInfo() {
    return sharedUserInfo;
  }

  /**
   * Only populated on read path and should not be persisted in storage.
   * @param sharedUserInfo sharedUserInfo or {@code null} for none
   */
  public AppsDynamiteSharedActivityFeedAnnotationData setSharedUserInfo(UserInfo sharedUserInfo) {
    this.sharedUserInfo = sharedUserInfo;
    return this;
  }

  /**
   * Use shared_user_info instead.
   * @return value or {@code null} for none
   */
  public AppsDynamiteSharedActivityFeedAnnotationDataUserInfo getUserInfo() {
    return userInfo;
  }

  /**
   * Use shared_user_info instead.
   * @param userInfo userInfo or {@code null} for none
   */
  public AppsDynamiteSharedActivityFeedAnnotationData setUserInfo(AppsDynamiteSharedActivityFeedAnnotationDataUserInfo userInfo) {
    this.userInfo = userInfo;
    return this;
  }

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

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

}
