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

/**
 * A collection of any number of QRefAnnotations that designate a Copley Personal Reference and its
 * Resolutions. This is used to handle personalized intents such as "navigate to my hotel" or "when
 * is my mom's anniversary". See go/copley. This Annotation may contain only a reference with no
 * resolutions for the failure case (go/copley-punts). TODO(bhorst) Rename this to remove the Copley
 * codename.
 *
 * <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 NlpSemanticParsingPersonalReferenceAnnotation extends com.google.api.client.json.GenericJson {

  /**
   * A Copley Personal Reference represents a user's reference to a something that could be personal
   * entity, e.g. "my hotel", "mom", "brunch".
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private NlpSemanticParsingQRefAnnotation reference;

  /**
   * A Copley Personal Resolution represents the resolution of a Reference, e.g. if the user has a
   * reservation at The Kendall Hotel, the reference "my hotel" could be resolved to The Kendall
   * Hotel, and there would be a QRefAnnotation containing the mid and other data. It is possible
   * for there to be zero resolutions for a given reference.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<NlpSemanticParsingQRefAnnotation> resolutions;

  /**
   * A Copley Personal Reference represents a user's reference to a something that could be personal
   * entity, e.g. "my hotel", "mom", "brunch".
   * @return value or {@code null} for none
   */
  public NlpSemanticParsingQRefAnnotation getReference() {
    return reference;
  }

  /**
   * A Copley Personal Reference represents a user's reference to a something that could be personal
   * entity, e.g. "my hotel", "mom", "brunch".
   * @param reference reference or {@code null} for none
   */
  public NlpSemanticParsingPersonalReferenceAnnotation setReference(NlpSemanticParsingQRefAnnotation reference) {
    this.reference = reference;
    return this;
  }

  /**
   * A Copley Personal Resolution represents the resolution of a Reference, e.g. if the user has a
   * reservation at The Kendall Hotel, the reference "my hotel" could be resolved to The Kendall
   * Hotel, and there would be a QRefAnnotation containing the mid and other data. It is possible
   * for there to be zero resolutions for a given reference.
   * @return value or {@code null} for none
   */
  public java.util.List<NlpSemanticParsingQRefAnnotation> getResolutions() {
    return resolutions;
  }

  /**
   * A Copley Personal Resolution represents the resolution of a Reference, e.g. if the user has a
   * reservation at The Kendall Hotel, the reference "my hotel" could be resolved to The Kendall
   * Hotel, and there would be a QRefAnnotation containing the mid and other data. It is possible
   * for there to be zero resolutions for a given reference.
   * @param resolutions resolutions or {@code null} for none
   */
  public NlpSemanticParsingPersonalReferenceAnnotation setResolutions(java.util.List<NlpSemanticParsingQRefAnnotation> resolutions) {
    this.resolutions = resolutions;
    return this;
  }

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

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

}
