/*
 * 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.dialogflow.v3.model;

/**
 * An answer from Knowledge Connector.
 *
 * <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 Dialogflow 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 GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer extends com.google.api.client.json.GenericJson {

  /**
   * The piece of text from the `source` knowledge base document that answers this conversational
   * query.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String answer;

  /**
   * The corresponding FAQ question if the answer was extracted from a FAQ Document, empty
   * otherwise.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String faqQuestion;

  /**
   * The system's confidence score that this Knowledge answer is a good match for this
   * conversational query. The range is from 0.0 (completely uncertain) to 1.0 (completely certain).
   * Note: The confidence score is likely to vary somewhat (possibly even for identical requests),
   * as the underlying model is under constant improvement. It may be deprecated in the future. We
   * recommend using `match_confidence_level` which should be generally more stable.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Float matchConfidence;

  /**
   * The system's confidence level that this knowledge answer is a good match for this
   * conversational query. NOTE: The confidence level for a given `` pair may change without notice,
   * as it depends on models that are constantly being improved. However, it will change less
   * frequently than the confidence score below, and should be preferred for referencing the quality
   * of an answer.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String matchConfidenceLevel;

  /**
   * Indicates which Knowledge Document this answer was extracted from. Format:
   * `projects//knowledgeBases//documents/`.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String source;

  /**
   * The piece of text from the `source` knowledge base document that answers this conversational
   * query.
   * @return value or {@code null} for none
   */
  public java.lang.String getAnswer() {
    return answer;
  }

  /**
   * The piece of text from the `source` knowledge base document that answers this conversational
   * query.
   * @param answer answer or {@code null} for none
   */
  public GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer setAnswer(java.lang.String answer) {
    this.answer = answer;
    return this;
  }

  /**
   * The corresponding FAQ question if the answer was extracted from a FAQ Document, empty
   * otherwise.
   * @return value or {@code null} for none
   */
  public java.lang.String getFaqQuestion() {
    return faqQuestion;
  }

  /**
   * The corresponding FAQ question if the answer was extracted from a FAQ Document, empty
   * otherwise.
   * @param faqQuestion faqQuestion or {@code null} for none
   */
  public GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer setFaqQuestion(java.lang.String faqQuestion) {
    this.faqQuestion = faqQuestion;
    return this;
  }

  /**
   * The system's confidence score that this Knowledge answer is a good match for this
   * conversational query. The range is from 0.0 (completely uncertain) to 1.0 (completely certain).
   * Note: The confidence score is likely to vary somewhat (possibly even for identical requests),
   * as the underlying model is under constant improvement. It may be deprecated in the future. We
   * recommend using `match_confidence_level` which should be generally more stable.
   * @return value or {@code null} for none
   */
  public java.lang.Float getMatchConfidence() {
    return matchConfidence;
  }

  /**
   * The system's confidence score that this Knowledge answer is a good match for this
   * conversational query. The range is from 0.0 (completely uncertain) to 1.0 (completely certain).
   * Note: The confidence score is likely to vary somewhat (possibly even for identical requests),
   * as the underlying model is under constant improvement. It may be deprecated in the future. We
   * recommend using `match_confidence_level` which should be generally more stable.
   * @param matchConfidence matchConfidence or {@code null} for none
   */
  public GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer setMatchConfidence(java.lang.Float matchConfidence) {
    this.matchConfidence = matchConfidence;
    return this;
  }

  /**
   * The system's confidence level that this knowledge answer is a good match for this
   * conversational query. NOTE: The confidence level for a given `` pair may change without notice,
   * as it depends on models that are constantly being improved. However, it will change less
   * frequently than the confidence score below, and should be preferred for referencing the quality
   * of an answer.
   * @return value or {@code null} for none
   */
  public java.lang.String getMatchConfidenceLevel() {
    return matchConfidenceLevel;
  }

  /**
   * The system's confidence level that this knowledge answer is a good match for this
   * conversational query. NOTE: The confidence level for a given `` pair may change without notice,
   * as it depends on models that are constantly being improved. However, it will change less
   * frequently than the confidence score below, and should be preferred for referencing the quality
   * of an answer.
   * @param matchConfidenceLevel matchConfidenceLevel or {@code null} for none
   */
  public GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer setMatchConfidenceLevel(java.lang.String matchConfidenceLevel) {
    this.matchConfidenceLevel = matchConfidenceLevel;
    return this;
  }

  /**
   * Indicates which Knowledge Document this answer was extracted from. Format:
   * `projects//knowledgeBases//documents/`.
   * @return value or {@code null} for none
   */
  public java.lang.String getSource() {
    return source;
  }

  /**
   * Indicates which Knowledge Document this answer was extracted from. Format:
   * `projects//knowledgeBases//documents/`.
   * @param source source or {@code null} for none
   */
  public GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer setSource(java.lang.String source) {
    this.source = source;
    return this;
  }

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

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

}
