/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include A single query result. A query result contains information about a
* document returned by the query. This includes the original location of the
* document, a list of attributes assigned to the document, and relevant text from
* the document that satisfies the query.See Also:
AWS
* API Reference
The identifier for the query result.
*/ inline const Aws::String& GetId() const{ return m_id; } /** *The identifier for the query result.
*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *The identifier for the query result.
*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *The identifier for the query result.
*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *The identifier for the query result.
*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *The identifier for the query result.
*/ inline QueryResultItem& WithId(const Aws::String& value) { SetId(value); return *this;} /** *The identifier for the query result.
*/ inline QueryResultItem& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *The identifier for the query result.
*/ inline QueryResultItem& WithId(const char* value) { SetId(value); return *this;} /** *The type of document within the response. For example, a response could * include a question-answer that's relevant to the query.
*/ inline const QueryResultType& GetType() const{ return m_type; } /** *The type of document within the response. For example, a response could * include a question-answer that's relevant to the query.
*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *The type of document within the response. For example, a response could * include a question-answer that's relevant to the query.
*/ inline void SetType(const QueryResultType& value) { m_typeHasBeenSet = true; m_type = value; } /** *The type of document within the response. For example, a response could * include a question-answer that's relevant to the query.
*/ inline void SetType(QueryResultType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *The type of document within the response. For example, a response could * include a question-answer that's relevant to the query.
*/ inline QueryResultItem& WithType(const QueryResultType& value) { SetType(value); return *this;} /** *The type of document within the response. For example, a response could * include a question-answer that's relevant to the query.
*/ inline QueryResultItem& WithType(QueryResultType&& value) { SetType(std::move(value)); return *this;} /** *If the Type
of document within the response is
* ANSWER
, then it is either a TABLE
answer or
* TEXT
answer. If it's a table answer, a table excerpt is returned in
* TableExcerpt
. If it's a text answer, a text excerpt is returned in
* DocumentExcerpt
.
If the Type
of document within the response is
* ANSWER
, then it is either a TABLE
answer or
* TEXT
answer. If it's a table answer, a table excerpt is returned in
* TableExcerpt
. If it's a text answer, a text excerpt is returned in
* DocumentExcerpt
.
If the Type
of document within the response is
* ANSWER
, then it is either a TABLE
answer or
* TEXT
answer. If it's a table answer, a table excerpt is returned in
* TableExcerpt
. If it's a text answer, a text excerpt is returned in
* DocumentExcerpt
.
If the Type
of document within the response is
* ANSWER
, then it is either a TABLE
answer or
* TEXT
answer. If it's a table answer, a table excerpt is returned in
* TableExcerpt
. If it's a text answer, a text excerpt is returned in
* DocumentExcerpt
.
If the Type
of document within the response is
* ANSWER
, then it is either a TABLE
answer or
* TEXT
answer. If it's a table answer, a table excerpt is returned in
* TableExcerpt
. If it's a text answer, a text excerpt is returned in
* DocumentExcerpt
.
If the Type
of document within the response is
* ANSWER
, then it is either a TABLE
answer or
* TEXT
answer. If it's a table answer, a table excerpt is returned in
* TableExcerpt
. If it's a text answer, a text excerpt is returned in
* DocumentExcerpt
.
One or more additional fields/attributes associated with the query * result.
*/ inline const Aws::VectorOne or more additional fields/attributes associated with the query * result.
*/ inline bool AdditionalAttributesHasBeenSet() const { return m_additionalAttributesHasBeenSet; } /** *One or more additional fields/attributes associated with the query * result.
*/ inline void SetAdditionalAttributes(const Aws::VectorOne or more additional fields/attributes associated with the query * result.
*/ inline void SetAdditionalAttributes(Aws::VectorOne or more additional fields/attributes associated with the query * result.
*/ inline QueryResultItem& WithAdditionalAttributes(const Aws::VectorOne or more additional fields/attributes associated with the query * result.
*/ inline QueryResultItem& WithAdditionalAttributes(Aws::VectorOne or more additional fields/attributes associated with the query * result.
*/ inline QueryResultItem& AddAdditionalAttributes(const AdditionalResultAttribute& value) { m_additionalAttributesHasBeenSet = true; m_additionalAttributes.push_back(value); return *this; } /** *One or more additional fields/attributes associated with the query * result.
*/ inline QueryResultItem& AddAdditionalAttributes(AdditionalResultAttribute&& value) { m_additionalAttributesHasBeenSet = true; m_additionalAttributes.push_back(std::move(value)); return *this; } /** *The identifier for the document.
*/ inline const Aws::String& GetDocumentId() const{ return m_documentId; } /** *The identifier for the document.
*/ inline bool DocumentIdHasBeenSet() const { return m_documentIdHasBeenSet; } /** *The identifier for the document.
*/ inline void SetDocumentId(const Aws::String& value) { m_documentIdHasBeenSet = true; m_documentId = value; } /** *The identifier for the document.
*/ inline void SetDocumentId(Aws::String&& value) { m_documentIdHasBeenSet = true; m_documentId = std::move(value); } /** *The identifier for the document.
*/ inline void SetDocumentId(const char* value) { m_documentIdHasBeenSet = true; m_documentId.assign(value); } /** *The identifier for the document.
*/ inline QueryResultItem& WithDocumentId(const Aws::String& value) { SetDocumentId(value); return *this;} /** *The identifier for the document.
*/ inline QueryResultItem& WithDocumentId(Aws::String&& value) { SetDocumentId(std::move(value)); return *this;} /** *The identifier for the document.
*/ inline QueryResultItem& WithDocumentId(const char* value) { SetDocumentId(value); return *this;} /** *The title of the document. Contains the text of the title and information for * highlighting the relevant terms in the title.
*/ inline const TextWithHighlights& GetDocumentTitle() const{ return m_documentTitle; } /** *The title of the document. Contains the text of the title and information for * highlighting the relevant terms in the title.
*/ inline bool DocumentTitleHasBeenSet() const { return m_documentTitleHasBeenSet; } /** *The title of the document. Contains the text of the title and information for * highlighting the relevant terms in the title.
*/ inline void SetDocumentTitle(const TextWithHighlights& value) { m_documentTitleHasBeenSet = true; m_documentTitle = value; } /** *The title of the document. Contains the text of the title and information for * highlighting the relevant terms in the title.
*/ inline void SetDocumentTitle(TextWithHighlights&& value) { m_documentTitleHasBeenSet = true; m_documentTitle = std::move(value); } /** *The title of the document. Contains the text of the title and information for * highlighting the relevant terms in the title.
*/ inline QueryResultItem& WithDocumentTitle(const TextWithHighlights& value) { SetDocumentTitle(value); return *this;} /** *The title of the document. Contains the text of the title and information for * highlighting the relevant terms in the title.
*/ inline QueryResultItem& WithDocumentTitle(TextWithHighlights&& value) { SetDocumentTitle(std::move(value)); return *this;} /** *An extract of the text in the document. Contains information about * highlighting the relevant terms in the excerpt.
*/ inline const TextWithHighlights& GetDocumentExcerpt() const{ return m_documentExcerpt; } /** *An extract of the text in the document. Contains information about * highlighting the relevant terms in the excerpt.
*/ inline bool DocumentExcerptHasBeenSet() const { return m_documentExcerptHasBeenSet; } /** *An extract of the text in the document. Contains information about * highlighting the relevant terms in the excerpt.
*/ inline void SetDocumentExcerpt(const TextWithHighlights& value) { m_documentExcerptHasBeenSet = true; m_documentExcerpt = value; } /** *An extract of the text in the document. Contains information about * highlighting the relevant terms in the excerpt.
*/ inline void SetDocumentExcerpt(TextWithHighlights&& value) { m_documentExcerptHasBeenSet = true; m_documentExcerpt = std::move(value); } /** *An extract of the text in the document. Contains information about * highlighting the relevant terms in the excerpt.
*/ inline QueryResultItem& WithDocumentExcerpt(const TextWithHighlights& value) { SetDocumentExcerpt(value); return *this;} /** *An extract of the text in the document. Contains information about * highlighting the relevant terms in the excerpt.
*/ inline QueryResultItem& WithDocumentExcerpt(TextWithHighlights&& value) { SetDocumentExcerpt(std::move(value)); return *this;} /** *The URI of the original location of the document.
*/ inline const Aws::String& GetDocumentURI() const{ return m_documentURI; } /** *The URI of the original location of the document.
*/ inline bool DocumentURIHasBeenSet() const { return m_documentURIHasBeenSet; } /** *The URI of the original location of the document.
*/ inline void SetDocumentURI(const Aws::String& value) { m_documentURIHasBeenSet = true; m_documentURI = value; } /** *The URI of the original location of the document.
*/ inline void SetDocumentURI(Aws::String&& value) { m_documentURIHasBeenSet = true; m_documentURI = std::move(value); } /** *The URI of the original location of the document.
*/ inline void SetDocumentURI(const char* value) { m_documentURIHasBeenSet = true; m_documentURI.assign(value); } /** *The URI of the original location of the document.
*/ inline QueryResultItem& WithDocumentURI(const Aws::String& value) { SetDocumentURI(value); return *this;} /** *The URI of the original location of the document.
*/ inline QueryResultItem& WithDocumentURI(Aws::String&& value) { SetDocumentURI(std::move(value)); return *this;} /** *The URI of the original location of the document.
*/ inline QueryResultItem& WithDocumentURI(const char* value) { SetDocumentURI(value); return *this;} /** *An array of document fields/attributes assigned to a document in the search
* results. For example, the document author (_author
) or the source
* URI (_source_uri
) of the document.
An array of document fields/attributes assigned to a document in the search
* results. For example, the document author (_author
) or the source
* URI (_source_uri
) of the document.
An array of document fields/attributes assigned to a document in the search
* results. For example, the document author (_author
) or the source
* URI (_source_uri
) of the document.
An array of document fields/attributes assigned to a document in the search
* results. For example, the document author (_author
) or the source
* URI (_source_uri
) of the document.
An array of document fields/attributes assigned to a document in the search
* results. For example, the document author (_author
) or the source
* URI (_source_uri
) of the document.
An array of document fields/attributes assigned to a document in the search
* results. For example, the document author (_author
) or the source
* URI (_source_uri
) of the document.
An array of document fields/attributes assigned to a document in the search
* results. For example, the document author (_author
) or the source
* URI (_source_uri
) of the document.
An array of document fields/attributes assigned to a document in the search
* results. For example, the document author (_author
) or the source
* URI (_source_uri
) of the document.
Indicates the confidence level of Amazon Kendra providing a relevant result
* for the query. Each result is placed into a bin that indicates the confidence,
* VERY_HIGH
, HIGH
, MEDIUM
and
* LOW
. You can use the score to determine if a response meets the
* confidence needed for your application.
The field is only set to
* LOW
when the Type
field is set to
* DOCUMENT
and Amazon Kendra is not confident that the result is
* relevant to the query.
Indicates the confidence level of Amazon Kendra providing a relevant result
* for the query. Each result is placed into a bin that indicates the confidence,
* VERY_HIGH
, HIGH
, MEDIUM
and
* LOW
. You can use the score to determine if a response meets the
* confidence needed for your application.
The field is only set to
* LOW
when the Type
field is set to
* DOCUMENT
and Amazon Kendra is not confident that the result is
* relevant to the query.
Indicates the confidence level of Amazon Kendra providing a relevant result
* for the query. Each result is placed into a bin that indicates the confidence,
* VERY_HIGH
, HIGH
, MEDIUM
and
* LOW
. You can use the score to determine if a response meets the
* confidence needed for your application.
The field is only set to
* LOW
when the Type
field is set to
* DOCUMENT
and Amazon Kendra is not confident that the result is
* relevant to the query.
Indicates the confidence level of Amazon Kendra providing a relevant result
* for the query. Each result is placed into a bin that indicates the confidence,
* VERY_HIGH
, HIGH
, MEDIUM
and
* LOW
. You can use the score to determine if a response meets the
* confidence needed for your application.
The field is only set to
* LOW
when the Type
field is set to
* DOCUMENT
and Amazon Kendra is not confident that the result is
* relevant to the query.
Indicates the confidence level of Amazon Kendra providing a relevant result
* for the query. Each result is placed into a bin that indicates the confidence,
* VERY_HIGH
, HIGH
, MEDIUM
and
* LOW
. You can use the score to determine if a response meets the
* confidence needed for your application.
The field is only set to
* LOW
when the Type
field is set to
* DOCUMENT
and Amazon Kendra is not confident that the result is
* relevant to the query.
Indicates the confidence level of Amazon Kendra providing a relevant result
* for the query. Each result is placed into a bin that indicates the confidence,
* VERY_HIGH
, HIGH
, MEDIUM
and
* LOW
. You can use the score to determine if a response meets the
* confidence needed for your application.
The field is only set to
* LOW
when the Type
field is set to
* DOCUMENT
and Amazon Kendra is not confident that the result is
* relevant to the query.
A token that identifies a particular result from a particular query. Use this * token to provide click-through feedback for the result. For more information, * see Submitting * feedback.
*/ inline const Aws::String& GetFeedbackToken() const{ return m_feedbackToken; } /** *A token that identifies a particular result from a particular query. Use this * token to provide click-through feedback for the result. For more information, * see Submitting * feedback.
*/ inline bool FeedbackTokenHasBeenSet() const { return m_feedbackTokenHasBeenSet; } /** *A token that identifies a particular result from a particular query. Use this * token to provide click-through feedback for the result. For more information, * see Submitting * feedback.
*/ inline void SetFeedbackToken(const Aws::String& value) { m_feedbackTokenHasBeenSet = true; m_feedbackToken = value; } /** *A token that identifies a particular result from a particular query. Use this * token to provide click-through feedback for the result. For more information, * see Submitting * feedback.
*/ inline void SetFeedbackToken(Aws::String&& value) { m_feedbackTokenHasBeenSet = true; m_feedbackToken = std::move(value); } /** *A token that identifies a particular result from a particular query. Use this * token to provide click-through feedback for the result. For more information, * see Submitting * feedback.
*/ inline void SetFeedbackToken(const char* value) { m_feedbackTokenHasBeenSet = true; m_feedbackToken.assign(value); } /** *A token that identifies a particular result from a particular query. Use this * token to provide click-through feedback for the result. For more information, * see Submitting * feedback.
*/ inline QueryResultItem& WithFeedbackToken(const Aws::String& value) { SetFeedbackToken(value); return *this;} /** *A token that identifies a particular result from a particular query. Use this * token to provide click-through feedback for the result. For more information, * see Submitting * feedback.
*/ inline QueryResultItem& WithFeedbackToken(Aws::String&& value) { SetFeedbackToken(std::move(value)); return *this;} /** *A token that identifies a particular result from a particular query. Use this * token to provide click-through feedback for the result. For more information, * see Submitting * feedback.
*/ inline QueryResultItem& WithFeedbackToken(const char* value) { SetFeedbackToken(value); return *this;} /** *An excerpt from a table within a document.
*/ inline const TableExcerpt& GetTableExcerpt() const{ return m_tableExcerpt; } /** *An excerpt from a table within a document.
*/ inline bool TableExcerptHasBeenSet() const { return m_tableExcerptHasBeenSet; } /** *An excerpt from a table within a document.
*/ inline void SetTableExcerpt(const TableExcerpt& value) { m_tableExcerptHasBeenSet = true; m_tableExcerpt = value; } /** *An excerpt from a table within a document.
*/ inline void SetTableExcerpt(TableExcerpt&& value) { m_tableExcerptHasBeenSet = true; m_tableExcerpt = std::move(value); } /** *An excerpt from a table within a document.
*/ inline QueryResultItem& WithTableExcerpt(const TableExcerpt& value) { SetTableExcerpt(value); return *this;} /** *An excerpt from a table within a document.
*/ inline QueryResultItem& WithTableExcerpt(TableExcerpt&& value) { SetTableExcerpt(std::move(value)); return *this;} private: Aws::String m_id; bool m_idHasBeenSet = false; QueryResultType m_type; bool m_typeHasBeenSet = false; QueryResultFormat m_format; bool m_formatHasBeenSet = false; Aws::Vector