/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace kendra { namespace Model { /** *

A single featured result item. A featured result is displayed at the top of * the search results page, placed above all other results for certain queries. If * there's an exact match of a query, then certain documents are featured in the * search results.

See Also:

AWS * API Reference

*/ class FeaturedResultsItem { public: AWS_KENDRA_API FeaturedResultsItem(); AWS_KENDRA_API FeaturedResultsItem(Aws::Utils::Json::JsonView jsonValue); AWS_KENDRA_API FeaturedResultsItem& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_KENDRA_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The identifier of the featured result.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The identifier of the featured result.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The identifier of the featured result.

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The identifier of the featured result.

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The identifier of the featured result.

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The identifier of the featured result.

*/ inline FeaturedResultsItem& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The identifier of the featured result.

*/ inline FeaturedResultsItem& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The identifier of the featured result.

*/ inline FeaturedResultsItem& WithId(const char* value) { SetId(value); return *this;} /** *

The type of document within the featured result response. For example, a * response could include a question-answer type that's relevant to the query.

*/ inline const QueryResultType& GetType() const{ return m_type; } /** *

The type of document within the featured result response. For example, a * response could include a question-answer type that's relevant to the query.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The type of document within the featured result response. For example, a * response could include a question-answer type that's relevant to the query.

*/ inline void SetType(const QueryResultType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The type of document within the featured result response. For example, a * response could include a question-answer type 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 featured result response. For example, a * response could include a question-answer type that's relevant to the query.

*/ inline FeaturedResultsItem& WithType(const QueryResultType& value) { SetType(value); return *this;} /** *

The type of document within the featured result response. For example, a * response could include a question-answer type that's relevant to the query.

*/ inline FeaturedResultsItem& WithType(QueryResultType&& value) { SetType(std::move(value)); return *this;} /** *

One or more additional attributes associated with the featured result.

*/ inline const Aws::Vector& GetAdditionalAttributes() const{ return m_additionalAttributes; } /** *

One or more additional attributes associated with the featured result.

*/ inline bool AdditionalAttributesHasBeenSet() const { return m_additionalAttributesHasBeenSet; } /** *

One or more additional attributes associated with the featured result.

*/ inline void SetAdditionalAttributes(const Aws::Vector& value) { m_additionalAttributesHasBeenSet = true; m_additionalAttributes = value; } /** *

One or more additional attributes associated with the featured result.

*/ inline void SetAdditionalAttributes(Aws::Vector&& value) { m_additionalAttributesHasBeenSet = true; m_additionalAttributes = std::move(value); } /** *

One or more additional attributes associated with the featured result.

*/ inline FeaturedResultsItem& WithAdditionalAttributes(const Aws::Vector& value) { SetAdditionalAttributes(value); return *this;} /** *

One or more additional attributes associated with the featured result.

*/ inline FeaturedResultsItem& WithAdditionalAttributes(Aws::Vector&& value) { SetAdditionalAttributes(std::move(value)); return *this;} /** *

One or more additional attributes associated with the featured result.

*/ inline FeaturedResultsItem& AddAdditionalAttributes(const AdditionalResultAttribute& value) { m_additionalAttributesHasBeenSet = true; m_additionalAttributes.push_back(value); return *this; } /** *

One or more additional attributes associated with the featured result.

*/ inline FeaturedResultsItem& AddAdditionalAttributes(AdditionalResultAttribute&& value) { m_additionalAttributesHasBeenSet = true; m_additionalAttributes.push_back(std::move(value)); return *this; } /** *

The identifier of the featured document.

*/ inline const Aws::String& GetDocumentId() const{ return m_documentId; } /** *

The identifier of the featured document.

*/ inline bool DocumentIdHasBeenSet() const { return m_documentIdHasBeenSet; } /** *

The identifier of the featured document.

*/ inline void SetDocumentId(const Aws::String& value) { m_documentIdHasBeenSet = true; m_documentId = value; } /** *

The identifier of the featured document.

*/ inline void SetDocumentId(Aws::String&& value) { m_documentIdHasBeenSet = true; m_documentId = std::move(value); } /** *

The identifier of the featured document.

*/ inline void SetDocumentId(const char* value) { m_documentIdHasBeenSet = true; m_documentId.assign(value); } /** *

The identifier of the featured document.

*/ inline FeaturedResultsItem& WithDocumentId(const Aws::String& value) { SetDocumentId(value); return *this;} /** *

The identifier of the featured document.

*/ inline FeaturedResultsItem& WithDocumentId(Aws::String&& value) { SetDocumentId(std::move(value)); return *this;} /** *

The identifier of the featured document.

*/ inline FeaturedResultsItem& WithDocumentId(const char* value) { SetDocumentId(value); return *this;} inline const TextWithHighlights& GetDocumentTitle() const{ return m_documentTitle; } inline bool DocumentTitleHasBeenSet() const { return m_documentTitleHasBeenSet; } inline void SetDocumentTitle(const TextWithHighlights& value) { m_documentTitleHasBeenSet = true; m_documentTitle = value; } inline void SetDocumentTitle(TextWithHighlights&& value) { m_documentTitleHasBeenSet = true; m_documentTitle = std::move(value); } inline FeaturedResultsItem& WithDocumentTitle(const TextWithHighlights& value) { SetDocumentTitle(value); return *this;} inline FeaturedResultsItem& WithDocumentTitle(TextWithHighlights&& value) { SetDocumentTitle(std::move(value)); return *this;} inline const TextWithHighlights& GetDocumentExcerpt() const{ return m_documentExcerpt; } inline bool DocumentExcerptHasBeenSet() const { return m_documentExcerptHasBeenSet; } inline void SetDocumentExcerpt(const TextWithHighlights& value) { m_documentExcerptHasBeenSet = true; m_documentExcerpt = value; } inline void SetDocumentExcerpt(TextWithHighlights&& value) { m_documentExcerptHasBeenSet = true; m_documentExcerpt = std::move(value); } inline FeaturedResultsItem& WithDocumentExcerpt(const TextWithHighlights& value) { SetDocumentExcerpt(value); return *this;} inline FeaturedResultsItem& WithDocumentExcerpt(TextWithHighlights&& value) { SetDocumentExcerpt(std::move(value)); return *this;} /** *

The source URI location of the featured document.

*/ inline const Aws::String& GetDocumentURI() const{ return m_documentURI; } /** *

The source URI location of the featured document.

*/ inline bool DocumentURIHasBeenSet() const { return m_documentURIHasBeenSet; } /** *

The source URI location of the featured document.

*/ inline void SetDocumentURI(const Aws::String& value) { m_documentURIHasBeenSet = true; m_documentURI = value; } /** *

The source URI location of the featured document.

*/ inline void SetDocumentURI(Aws::String&& value) { m_documentURIHasBeenSet = true; m_documentURI = std::move(value); } /** *

The source URI location of the featured document.

*/ inline void SetDocumentURI(const char* value) { m_documentURIHasBeenSet = true; m_documentURI.assign(value); } /** *

The source URI location of the featured document.

*/ inline FeaturedResultsItem& WithDocumentURI(const Aws::String& value) { SetDocumentURI(value); return *this;} /** *

The source URI location of the featured document.

*/ inline FeaturedResultsItem& WithDocumentURI(Aws::String&& value) { SetDocumentURI(std::move(value)); return *this;} /** *

The source URI location of the featured document.

*/ inline FeaturedResultsItem& WithDocumentURI(const char* value) { SetDocumentURI(value); return *this;} /** *

An array of document attributes assigned to a featured document in the search * results. For example, the document author (_author) or the source * URI (_source_uri) of the document.

*/ inline const Aws::Vector& GetDocumentAttributes() const{ return m_documentAttributes; } /** *

An array of document attributes assigned to a featured document in the search * results. For example, the document author (_author) or the source * URI (_source_uri) of the document.

*/ inline bool DocumentAttributesHasBeenSet() const { return m_documentAttributesHasBeenSet; } /** *

An array of document attributes assigned to a featured document in the search * results. For example, the document author (_author) or the source * URI (_source_uri) of the document.

*/ inline void SetDocumentAttributes(const Aws::Vector& value) { m_documentAttributesHasBeenSet = true; m_documentAttributes = value; } /** *

An array of document attributes assigned to a featured document in the search * results. For example, the document author (_author) or the source * URI (_source_uri) of the document.

*/ inline void SetDocumentAttributes(Aws::Vector&& value) { m_documentAttributesHasBeenSet = true; m_documentAttributes = std::move(value); } /** *

An array of document attributes assigned to a featured document in the search * results. For example, the document author (_author) or the source * URI (_source_uri) of the document.

*/ inline FeaturedResultsItem& WithDocumentAttributes(const Aws::Vector& value) { SetDocumentAttributes(value); return *this;} /** *

An array of document attributes assigned to a featured document in the search * results. For example, the document author (_author) or the source * URI (_source_uri) of the document.

*/ inline FeaturedResultsItem& WithDocumentAttributes(Aws::Vector&& value) { SetDocumentAttributes(std::move(value)); return *this;} /** *

An array of document attributes assigned to a featured document in the search * results. For example, the document author (_author) or the source * URI (_source_uri) of the document.

*/ inline FeaturedResultsItem& AddDocumentAttributes(const DocumentAttribute& value) { m_documentAttributesHasBeenSet = true; m_documentAttributes.push_back(value); return *this; } /** *

An array of document attributes assigned to a featured document in the search * results. For example, the document author (_author) or the source * URI (_source_uri) of the document.

*/ inline FeaturedResultsItem& AddDocumentAttributes(DocumentAttribute&& value) { m_documentAttributesHasBeenSet = true; m_documentAttributes.push_back(std::move(value)); return *this; } /** *

A token that identifies a particular featured 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 featured 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 featured 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 featured 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 featured 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 featured result from a particular query. * Use this token to provide click-through feedback for the result. For more * information, see Submitting * feedback.

*/ inline FeaturedResultsItem& WithFeedbackToken(const Aws::String& value) { SetFeedbackToken(value); return *this;} /** *

A token that identifies a particular featured result from a particular query. * Use this token to provide click-through feedback for the result. For more * information, see Submitting * feedback.

*/ inline FeaturedResultsItem& WithFeedbackToken(Aws::String&& value) { SetFeedbackToken(std::move(value)); return *this;} /** *

A token that identifies a particular featured result from a particular query. * Use this token to provide click-through feedback for the result. For more * information, see Submitting * feedback.

*/ inline FeaturedResultsItem& WithFeedbackToken(const char* value) { SetFeedbackToken(value); return *this;} private: Aws::String m_id; bool m_idHasBeenSet = false; QueryResultType m_type; bool m_typeHasBeenSet = false; Aws::Vector m_additionalAttributes; bool m_additionalAttributesHasBeenSet = false; Aws::String m_documentId; bool m_documentIdHasBeenSet = false; TextWithHighlights m_documentTitle; bool m_documentTitleHasBeenSet = false; TextWithHighlights m_documentExcerpt; bool m_documentExcerptHasBeenSet = false; Aws::String m_documentURI; bool m_documentURIHasBeenSet = false; Aws::Vector m_documentAttributes; bool m_documentAttributesHasBeenSet = false; Aws::String m_feedbackToken; bool m_feedbackTokenHasBeenSet = false; }; } // namespace Model } // namespace kendra } // namespace Aws