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

/**
 * Relation stores the related person between the contact or profile and a third person. See go
 * /relation-vs-relationship for relation vs relationship explanation. This field currently includes
 * RelationshipToMe data in fields value and canonical_value for ContainerType CONTACT_ANNOTATION.
 * This will be moved to RelationshipToMe in b/221081499.
 *
 * <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 AppsPeopleOzExternalMergedpeopleapiRelation extends com.google.api.client.json.GenericJson {

  /**
   * Canonicalized `value` of the relation from this person to the user. This is currently used for
   * data from contact annotations. Possible canonical values are based from
   * http://google3/googledata/quality/aliases/relationship_en.config.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String canonicalValue;

  /**
   * The `type` translated and formatted in the request locale. See go/people-api-howto/localization
   * for details on how to usage.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String formattedType;

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

  /**
   * The person whose email matches the Relation.value field, if it is a valid email address. This
   * field is read-only and ignored on update.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private AppsPeopleOzExternalMergedpeopleapiRelationRelationDetails relationDetails;

  /**
   * The relation type. The type can be free form or one of these predefined values: * `spouse` *
   * `child` * `mother` * `father` * `parent` * `brother` * `sister` * `friend` * `relative` *
   * `domesticPartner` * `manager` * `assistant` * `referredBy` * `partner`
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String type;

  /**
   * The person this relation applies to. Custom value provided by the user.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String value;

  /**
   * Canonicalized `value` of the relation from this person to the user. This is currently used for
   * data from contact annotations. Possible canonical values are based from
   * http://google3/googledata/quality/aliases/relationship_en.config.
   * @return value or {@code null} for none
   */
  public java.lang.String getCanonicalValue() {
    return canonicalValue;
  }

  /**
   * Canonicalized `value` of the relation from this person to the user. This is currently used for
   * data from contact annotations. Possible canonical values are based from
   * http://google3/googledata/quality/aliases/relationship_en.config.
   * @param canonicalValue canonicalValue or {@code null} for none
   */
  public AppsPeopleOzExternalMergedpeopleapiRelation setCanonicalValue(java.lang.String canonicalValue) {
    this.canonicalValue = canonicalValue;
    return this;
  }

  /**
   * The `type` translated and formatted in the request locale. See go/people-api-howto/localization
   * for details on how to usage.
   * @return value or {@code null} for none
   */
  public java.lang.String getFormattedType() {
    return formattedType;
  }

  /**
   * The `type` translated and formatted in the request locale. See go/people-api-howto/localization
   * for details on how to usage.
   * @param formattedType formattedType or {@code null} for none
   */
  public AppsPeopleOzExternalMergedpeopleapiRelation setFormattedType(java.lang.String formattedType) {
    this.formattedType = formattedType;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public AppsPeopleOzExternalMergedpeopleapiPersonFieldMetadata getMetadata() {
    return metadata;
  }

  /**
   * @param metadata metadata or {@code null} for none
   */
  public AppsPeopleOzExternalMergedpeopleapiRelation setMetadata(AppsPeopleOzExternalMergedpeopleapiPersonFieldMetadata metadata) {
    this.metadata = metadata;
    return this;
  }

  /**
   * The person whose email matches the Relation.value field, if it is a valid email address. This
   * field is read-only and ignored on update.
   * @return value or {@code null} for none
   */
  public AppsPeopleOzExternalMergedpeopleapiRelationRelationDetails getRelationDetails() {
    return relationDetails;
  }

  /**
   * The person whose email matches the Relation.value field, if it is a valid email address. This
   * field is read-only and ignored on update.
   * @param relationDetails relationDetails or {@code null} for none
   */
  public AppsPeopleOzExternalMergedpeopleapiRelation setRelationDetails(AppsPeopleOzExternalMergedpeopleapiRelationRelationDetails relationDetails) {
    this.relationDetails = relationDetails;
    return this;
  }

  /**
   * The relation type. The type can be free form or one of these predefined values: * `spouse` *
   * `child` * `mother` * `father` * `parent` * `brother` * `sister` * `friend` * `relative` *
   * `domesticPartner` * `manager` * `assistant` * `referredBy` * `partner`
   * @return value or {@code null} for none
   */
  public java.lang.String getType() {
    return type;
  }

  /**
   * The relation type. The type can be free form or one of these predefined values: * `spouse` *
   * `child` * `mother` * `father` * `parent` * `brother` * `sister` * `friend` * `relative` *
   * `domesticPartner` * `manager` * `assistant` * `referredBy` * `partner`
   * @param type type or {@code null} for none
   */
  public AppsPeopleOzExternalMergedpeopleapiRelation setType(java.lang.String type) {
    this.type = type;
    return this;
  }

  /**
   * The person this relation applies to. Custom value provided by the user.
   * @return value or {@code null} for none
   */
  public java.lang.String getValue() {
    return value;
  }

  /**
   * The person this relation applies to. Custom value provided by the user.
   * @param value value or {@code null} for none
   */
  public AppsPeopleOzExternalMergedpeopleapiRelation setValue(java.lang.String value) {
    this.value = value;
    return this;
  }

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

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

}
