/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 */

package com.microsoft.azure.cognitiveservices.knowledge.qnamaker.models;

import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Represents Search Result.
 */
public class QnASearchResult {
    /**
     * List of questions.
     */
    @JsonProperty(value = "questions")
    private List<String> questions;

    /**
     * Answer.
     */
    @JsonProperty(value = "answer")
    private String answer;

    /**
     * Search result score.
     */
    @JsonProperty(value = "score")
    private Double score;

    /**
     * Id of the QnA result.
     */
    @JsonProperty(value = "id")
    private Integer id;

    /**
     * Source of QnA result.
     */
    @JsonProperty(value = "source")
    private String source;

    /**
     * List of metadata.
     */
    @JsonProperty(value = "metadata")
    private List<MetadataDTO> metadata;

    /**
     * Context object of the QnA.
     */
    @JsonProperty(value = "context")
    private QnASearchResultContext context;

    /**
     * Answer span object of QnA with respect to user's question.
     */
    @JsonProperty(value = "answerSpan")
    private QnASearchResultAnswerSpan answerSpan;

    /**
     * Get the questions value.
     *
     * @return the questions value
     */
    public List<String> questions() {
        return this.questions;
    }

    /**
     * Set the questions value.
     *
     * @param questions the questions value to set
     * @return the QnASearchResult object itself.
     */
    public QnASearchResult withQuestions(List<String> questions) {
        this.questions = questions;
        return this;
    }

    /**
     * Get the answer value.
     *
     * @return the answer value
     */
    public String answer() {
        return this.answer;
    }

    /**
     * Set the answer value.
     *
     * @param answer the answer value to set
     * @return the QnASearchResult object itself.
     */
    public QnASearchResult withAnswer(String answer) {
        this.answer = answer;
        return this;
    }

    /**
     * Get the score value.
     *
     * @return the score value
     */
    public Double score() {
        return this.score;
    }

    /**
     * Set the score value.
     *
     * @param score the score value to set
     * @return the QnASearchResult object itself.
     */
    public QnASearchResult withScore(Double score) {
        this.score = score;
        return this;
    }

    /**
     * Get the id value.
     *
     * @return the id value
     */
    public Integer id() {
        return this.id;
    }

    /**
     * Set the id value.
     *
     * @param id the id value to set
     * @return the QnASearchResult object itself.
     */
    public QnASearchResult withId(Integer id) {
        this.id = id;
        return this;
    }

    /**
     * Get the source value.
     *
     * @return the source value
     */
    public String source() {
        return this.source;
    }

    /**
     * Set the source value.
     *
     * @param source the source value to set
     * @return the QnASearchResult object itself.
     */
    public QnASearchResult withSource(String source) {
        this.source = source;
        return this;
    }

    /**
     * Get the metadata value.
     *
     * @return the metadata value
     */
    public List<MetadataDTO> metadata() {
        return this.metadata;
    }

    /**
     * Set the metadata value.
     *
     * @param metadata the metadata value to set
     * @return the QnASearchResult object itself.
     */
    public QnASearchResult withMetadata(List<MetadataDTO> metadata) {
        this.metadata = metadata;
        return this;
    }

    /**
     * Get the context value.
     *
     * @return the context value
     */
    public QnASearchResultContext context() {
        return this.context;
    }

    /**
     * Set the context value.
     *
     * @param context the context value to set
     * @return the QnASearchResult object itself.
     */
    public QnASearchResult withContext(QnASearchResultContext context) {
        this.context = context;
        return this;
    }

    /**
     * Get the answerSpan value.
     *
     * @return the answerSpan value
     */
    public QnASearchResultAnswerSpan answerSpan() {
        return this.answerSpan;
    }

    /**
     * Set the answerSpan value.
     *
     * @param answerSpan the answerSpan value to set
     * @return the QnASearchResult object itself.
     */
    public QnASearchResult withAnswerSpan(QnASearchResultAnswerSpan answerSpan) {
        this.answerSpan = answerSpan;
        return this;
    }

}
