/*
 * 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 TokenSynonym contains information about synonyms of a Token's ngram. The synonyms were the ones
 * used during parsing for token explanation in place of the original ngrams. Example 1: [present
 * population of nyc] We can generate interpretation kc:/location/statistical_region:population by
 * converting "present" to its synonym "current", which is a context phrase for the intent. The
 * ngram for this token would be "present" and the string "current" would be stored in
 * synonym_ngram. Example 2: [nys important cities] We can generate interpretation
 * kc:/location/us_state:cities by converting "important" to its synonym "major" or its synonym
 * "biggest", because both "major cities" and "biggest cities" are attribute phrases for the intent.
 * In this case, the ngram in this Token is "important cities", and the token_synonyms
 * (specifically, the synonym_ngram field) would store "major cities" and "biggest cities", since
 * those are the actual synonym ngrams that match the attribute phrases. For context phrases, we
 * generally should have only one matched_squery_synonyms, since we try to find the best synonyms to
 * use using the context phrase score. However, for attribute phrase we don't really have enough
 * info to determine which synonym is better if they both trigger the same intent, and hence we will
 * propagate both synonyms.
 *
 * <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 KnowledgeAnswersIntentQueryTokenSynonym extends com.google.api.client.json.GenericJson {

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String source;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String synonymNgram;

  /**
   * @return value or {@code null} for none
   */
  public java.lang.String getSource() {
    return source;
  }

  /**
   * @param source source or {@code null} for none
   */
  public KnowledgeAnswersIntentQueryTokenSynonym setSource(java.lang.String source) {
    this.source = source;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public java.lang.String getSynonymNgram() {
    return synonymNgram;
  }

  /**
   * @param synonymNgram synonymNgram or {@code null} for none
   */
  public KnowledgeAnswersIntentQueryTokenSynonym setSynonymNgram(java.lang.String synonymNgram) {
    this.synonymNgram = synonymNgram;
    return this;
  }

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

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

}
