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

/**
 * Annotation metadata to display system messages for incoming webhook events. Next Tag: 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 IncomingWebhookChangedMetadata extends com.google.api.client.json.GenericJson {

  /**
   * The webhook name at the time of the change. Used in Spanner storage, BE API responses and FE
   * API responses.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String incomingWebhookName;

  /**
   * The user id of the user whose action triggered this system message. Used in Spanner storage, BE
   * API responses and FE API responses.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private UserId initiatorId;

  /**
   * Complete profile when ListTopicsRequest FetchOptions.USER is set. Otherwise, only the id will
   * be filled in. Used in FE API responses.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private User initiatorProfile;

  /**
   * The webhook id of the incoming webhook in question. This field should not be used to load
   * webhook information dynamically and is only present for debugging purposes. Used in Spanner
   * storage, BE API responses and FE API responses.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String obfuscatedIncomingWebhookId;

  /**
   * Only populated for UPDATED_NAME and UPDATED_NAME_AND_AVATAR events, where the webhook name was
   * changed. Used in Spanner storage, BE API responses and FE API responses.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String oldIncomingWebhookName;

  /**
   * Used in Spanner storage, BE API responses and FE API responses.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String type;

  /**
   * The webhook name at the time of the change. Used in Spanner storage, BE API responses and FE
   * API responses.
   * @return value or {@code null} for none
   */
  public java.lang.String getIncomingWebhookName() {
    return incomingWebhookName;
  }

  /**
   * The webhook name at the time of the change. Used in Spanner storage, BE API responses and FE
   * API responses.
   * @param incomingWebhookName incomingWebhookName or {@code null} for none
   */
  public IncomingWebhookChangedMetadata setIncomingWebhookName(java.lang.String incomingWebhookName) {
    this.incomingWebhookName = incomingWebhookName;
    return this;
  }

  /**
   * The user id of the user whose action triggered this system message. Used in Spanner storage, BE
   * API responses and FE API responses.
   * @return value or {@code null} for none
   */
  public UserId getInitiatorId() {
    return initiatorId;
  }

  /**
   * The user id of the user whose action triggered this system message. Used in Spanner storage, BE
   * API responses and FE API responses.
   * @param initiatorId initiatorId or {@code null} for none
   */
  public IncomingWebhookChangedMetadata setInitiatorId(UserId initiatorId) {
    this.initiatorId = initiatorId;
    return this;
  }

  /**
   * Complete profile when ListTopicsRequest FetchOptions.USER is set. Otherwise, only the id will
   * be filled in. Used in FE API responses.
   * @return value or {@code null} for none
   */
  public User getInitiatorProfile() {
    return initiatorProfile;
  }

  /**
   * Complete profile when ListTopicsRequest FetchOptions.USER is set. Otherwise, only the id will
   * be filled in. Used in FE API responses.
   * @param initiatorProfile initiatorProfile or {@code null} for none
   */
  public IncomingWebhookChangedMetadata setInitiatorProfile(User initiatorProfile) {
    this.initiatorProfile = initiatorProfile;
    return this;
  }

  /**
   * The webhook id of the incoming webhook in question. This field should not be used to load
   * webhook information dynamically and is only present for debugging purposes. Used in Spanner
   * storage, BE API responses and FE API responses.
   * @return value or {@code null} for none
   */
  public java.lang.String getObfuscatedIncomingWebhookId() {
    return obfuscatedIncomingWebhookId;
  }

  /**
   * The webhook id of the incoming webhook in question. This field should not be used to load
   * webhook information dynamically and is only present for debugging purposes. Used in Spanner
   * storage, BE API responses and FE API responses.
   * @param obfuscatedIncomingWebhookId obfuscatedIncomingWebhookId or {@code null} for none
   */
  public IncomingWebhookChangedMetadata setObfuscatedIncomingWebhookId(java.lang.String obfuscatedIncomingWebhookId) {
    this.obfuscatedIncomingWebhookId = obfuscatedIncomingWebhookId;
    return this;
  }

  /**
   * Only populated for UPDATED_NAME and UPDATED_NAME_AND_AVATAR events, where the webhook name was
   * changed. Used in Spanner storage, BE API responses and FE API responses.
   * @return value or {@code null} for none
   */
  public java.lang.String getOldIncomingWebhookName() {
    return oldIncomingWebhookName;
  }

  /**
   * Only populated for UPDATED_NAME and UPDATED_NAME_AND_AVATAR events, where the webhook name was
   * changed. Used in Spanner storage, BE API responses and FE API responses.
   * @param oldIncomingWebhookName oldIncomingWebhookName or {@code null} for none
   */
  public IncomingWebhookChangedMetadata setOldIncomingWebhookName(java.lang.String oldIncomingWebhookName) {
    this.oldIncomingWebhookName = oldIncomingWebhookName;
    return this;
  }

  /**
   * Used in Spanner storage, BE API responses and FE API responses.
   * @return value or {@code null} for none
   */
  public java.lang.String getType() {
    return type;
  }

  /**
   * Used in Spanner storage, BE API responses and FE API responses.
   * @param type type or {@code null} for none
   */
  public IncomingWebhookChangedMetadata setType(java.lang.String type) {
    this.type = type;
    return this;
  }

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

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

}
