Class QnASearchResult
- java.lang.Object
-
- com.microsoft.azure.cognitiveservices.knowledge.qnamaker.models.QnASearchResult
-
public class QnASearchResult extends Object
Represents Search Result.
-
-
Constructor Summary
Constructors Constructor Description QnASearchResult()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
answer()
Get the answer value.QnASearchResultAnswerSpan
answerSpan()
Get the answerSpan value.QnASearchResultContext
context()
Get the context value.Integer
id()
Get the id value.List<MetadataDTO>
metadata()
Get the metadata value.List<String>
questions()
Get the questions value.Double
score()
Get the score value.String
source()
Get the source value.QnASearchResult
withAnswer(String answer)
Set the answer value.QnASearchResult
withAnswerSpan(QnASearchResultAnswerSpan answerSpan)
Set the answerSpan value.QnASearchResult
withContext(QnASearchResultContext context)
Set the context value.QnASearchResult
withId(Integer id)
Set the id value.QnASearchResult
withMetadata(List<MetadataDTO> metadata)
Set the metadata value.QnASearchResult
withQuestions(List<String> questions)
Set the questions value.QnASearchResult
withScore(Double score)
Set the score value.QnASearchResult
withSource(String source)
Set the source value.
-
-
-
Method Detail
-
withQuestions
public QnASearchResult withQuestions(List<String> questions)
Set the questions value.- Parameters:
questions
- the questions value to set- Returns:
- the QnASearchResult object itself.
-
answer
public String answer()
Get the answer value.- Returns:
- the answer value
-
withAnswer
public QnASearchResult withAnswer(String answer)
Set the answer value.- Parameters:
answer
- the answer value to set- Returns:
- the QnASearchResult object itself.
-
score
public Double score()
Get the score value.- Returns:
- the score value
-
withScore
public QnASearchResult withScore(Double score)
Set the score value.- Parameters:
score
- the score value to set- Returns:
- the QnASearchResult object itself.
-
id
public Integer id()
Get the id value.- Returns:
- the id value
-
withId
public QnASearchResult withId(Integer id)
Set the id value.- Parameters:
id
- the id value to set- Returns:
- the QnASearchResult object itself.
-
source
public String source()
Get the source value.- Returns:
- the source value
-
withSource
public QnASearchResult withSource(String source)
Set the source value.- Parameters:
source
- the source value to set- Returns:
- the QnASearchResult object itself.
-
metadata
public List<MetadataDTO> metadata()
Get the metadata value.- Returns:
- the metadata value
-
withMetadata
public QnASearchResult withMetadata(List<MetadataDTO> metadata)
Set the metadata value.- Parameters:
metadata
- the metadata value to set- Returns:
- the QnASearchResult object itself.
-
context
public QnASearchResultContext context()
Get the context value.- Returns:
- the context value
-
withContext
public QnASearchResult withContext(QnASearchResultContext context)
Set the context value.- Parameters:
context
- the context value to set- Returns:
- the QnASearchResult object itself.
-
answerSpan
public QnASearchResultAnswerSpan answerSpan()
Get the answerSpan value.- Returns:
- the answerSpan value
-
withAnswerSpan
public QnASearchResult withAnswerSpan(QnASearchResultAnswerSpan answerSpan)
Set the answerSpan value.- Parameters:
answerSpan
- the answerSpan value to set- Returns:
- the QnASearchResult object itself.
-
-