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

/**
 * This message is the generic mutation message which will encapsulate the fields which are shared
 * between the create, update, and delete actions, including source of change, timestamp, and
 * metadata messages passed in from the source for any source specific data (such as phone
 * name/model from FSA).
 *
 * <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 SocialGraphApiProtoContactMutationContext extends com.google.api.client.json.GenericJson {

  /**
   * Android device info should always be set when using either ANDROID_FSA1 or ANDROID_FSA2 as the
   * source of the delete.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private SocialGraphApiProtoAndroidDeviceInfo androidDeviceInfo;

  /**
   * Host app info should always be set when using CONTACTS_COMPANION as the source.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private SocialGraphApiProtoHostAppInfo hostAppInfo;

  /**
   * The source of a mutate should provide all needed information a user should know, and should be
   * enough information for the front end to generate a proper human readable string to describe the
   * mutate to the user.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String source;

  /**
   * Third party info should always be set when using THIRD_PARTY as the source.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private SocialGraphApiProtoThirdPartyInfo thirdPartyInfo;

  /**
   * Timestamp representing when the contact was mutated. This should not be set on write, as it is
   * the job of focus backend to determine this timestamp. This field will be populated on read with
   * the data written by FBS.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String timestamp;

  /**
   * Android device info should always be set when using either ANDROID_FSA1 or ANDROID_FSA2 as the
   * source of the delete.
   * @return value or {@code null} for none
   */
  public SocialGraphApiProtoAndroidDeviceInfo getAndroidDeviceInfo() {
    return androidDeviceInfo;
  }

  /**
   * Android device info should always be set when using either ANDROID_FSA1 or ANDROID_FSA2 as the
   * source of the delete.
   * @param androidDeviceInfo androidDeviceInfo or {@code null} for none
   */
  public SocialGraphApiProtoContactMutationContext setAndroidDeviceInfo(SocialGraphApiProtoAndroidDeviceInfo androidDeviceInfo) {
    this.androidDeviceInfo = androidDeviceInfo;
    return this;
  }

  /**
   * Host app info should always be set when using CONTACTS_COMPANION as the source.
   * @return value or {@code null} for none
   */
  public SocialGraphApiProtoHostAppInfo getHostAppInfo() {
    return hostAppInfo;
  }

  /**
   * Host app info should always be set when using CONTACTS_COMPANION as the source.
   * @param hostAppInfo hostAppInfo or {@code null} for none
   */
  public SocialGraphApiProtoContactMutationContext setHostAppInfo(SocialGraphApiProtoHostAppInfo hostAppInfo) {
    this.hostAppInfo = hostAppInfo;
    return this;
  }

  /**
   * The source of a mutate should provide all needed information a user should know, and should be
   * enough information for the front end to generate a proper human readable string to describe the
   * mutate to the user.
   * @return value or {@code null} for none
   */
  public java.lang.String getSource() {
    return source;
  }

  /**
   * The source of a mutate should provide all needed information a user should know, and should be
   * enough information for the front end to generate a proper human readable string to describe the
   * mutate to the user.
   * @param source source or {@code null} for none
   */
  public SocialGraphApiProtoContactMutationContext setSource(java.lang.String source) {
    this.source = source;
    return this;
  }

  /**
   * Third party info should always be set when using THIRD_PARTY as the source.
   * @return value or {@code null} for none
   */
  public SocialGraphApiProtoThirdPartyInfo getThirdPartyInfo() {
    return thirdPartyInfo;
  }

  /**
   * Third party info should always be set when using THIRD_PARTY as the source.
   * @param thirdPartyInfo thirdPartyInfo or {@code null} for none
   */
  public SocialGraphApiProtoContactMutationContext setThirdPartyInfo(SocialGraphApiProtoThirdPartyInfo thirdPartyInfo) {
    this.thirdPartyInfo = thirdPartyInfo;
    return this;
  }

  /**
   * Timestamp representing when the contact was mutated. This should not be set on write, as it is
   * the job of focus backend to determine this timestamp. This field will be populated on read with
   * the data written by FBS.
   * @return value or {@code null} for none
   */
  public String getTimestamp() {
    return timestamp;
  }

  /**
   * Timestamp representing when the contact was mutated. This should not be set on write, as it is
   * the job of focus backend to determine this timestamp. This field will be populated on read with
   * the data written by FBS.
   * @param timestamp timestamp or {@code null} for none
   */
  public SocialGraphApiProtoContactMutationContext setTimestamp(String timestamp) {
    this.timestamp = timestamp;
    return this;
  }

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

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

}
