/**
* 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 unique identifier for the query result.
*/ inline const Aws::String& GetId() const{ return m_id; } /** *The unique identifier for the query result.
*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *The unique identifier for the query result.
*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *The unique identifier for the query result.
*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *The unique identifier for the query result.
*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *The unique identifier for the query result.
*/ inline QueryResultItem& WithId(const Aws::String& value) { SetId(value); return *this;} /** *The unique identifier for the query result.
*/ inline QueryResultItem& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *The unique identifier for the query result.
*/ inline QueryResultItem& WithId(const char* value) { SetId(value); return *this;} /** *The type of document.
*/ inline const QueryResultType& GetType() const{ return m_type; } /** *The type of document.
*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *The type of document.
*/ inline void SetType(const QueryResultType& value) { m_typeHasBeenSet = true; m_type = value; } /** *The type of document.
*/ inline void SetType(QueryResultType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *The type of document.
*/ inline QueryResultItem& WithType(const QueryResultType& value) { SetType(value); return *this;} /** *The type of document.
*/ inline QueryResultItem& WithType(QueryResultType&& value) { SetType(std::move(value)); return *this;} /** *One or more additional attribues associated with the query result.
*/ inline const Aws::VectorOne or more additional attribues associated with the query result.
*/ inline bool AdditionalAttributesHasBeenSet() const { return m_additionalAttributesHasBeenSet; } /** *One or more additional attribues associated with the query result.
*/ inline void SetAdditionalAttributes(const Aws::VectorOne or more additional attribues associated with the query result.
*/ inline void SetAdditionalAttributes(Aws::VectorOne or more additional attribues associated with the query result.
*/ inline QueryResultItem& WithAdditionalAttributes(const Aws::VectorOne or more additional attribues associated with the query result.
*/ inline QueryResultItem& WithAdditionalAttributes(Aws::VectorOne or more additional attribues 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 attribues associated with the query result.
*/ inline QueryResultItem& AddAdditionalAttributes(AdditionalResultAttribute&& value) { m_additionalAttributesHasBeenSet = true; m_additionalAttributes.push_back(std::move(value)); return *this; } /** *The unique identifier for the document.
*/ inline const Aws::String& GetDocumentId() const{ return m_documentId; } /** *The unique identifier for the document.
*/ inline bool DocumentIdHasBeenSet() const { return m_documentIdHasBeenSet; } /** *The unique identifier for the document.
*/ inline void SetDocumentId(const Aws::String& value) { m_documentIdHasBeenSet = true; m_documentId = value; } /** *The unique identifier for the document.
*/ inline void SetDocumentId(Aws::String&& value) { m_documentIdHasBeenSet = true; m_documentId = std::move(value); } /** *The unique identifier for the document.
*/ inline void SetDocumentId(const char* value) { m_documentIdHasBeenSet = true; m_documentId.assign(value); } /** *The unique identifier for the document.
*/ inline QueryResultItem& WithDocumentId(const Aws::String& value) { SetDocumentId(value); return *this;} /** *The unique identifier for the document.
*/ inline QueryResultItem& WithDocumentId(Aws::String&& value) { SetDocumentId(std::move(value)); return *this;} /** *The unique 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 attributes for the document that the query result maps * to. For example, the document author (Author) or the source URI (SourceUri) of * the document.
*/ inline const Aws::VectorAn array of document attributes for the document that the query result maps * to. For example, the document author (Author) or the source URI (SourceUri) of * the document.
*/ inline bool DocumentAttributesHasBeenSet() const { return m_documentAttributesHasBeenSet; } /** *An array of document attributes for the document that the query result maps * to. For example, the document author (Author) or the source URI (SourceUri) of * the document.
*/ inline void SetDocumentAttributes(const Aws::VectorAn array of document attributes for the document that the query result maps * to. For example, the document author (Author) or the source URI (SourceUri) of * the document.
*/ inline void SetDocumentAttributes(Aws::VectorAn array of document attributes for the document that the query result maps * to. For example, the document author (Author) or the source URI (SourceUri) of * the document.
*/ inline QueryResultItem& WithDocumentAttributes(const Aws::VectorAn array of document attributes for the document that the query result maps * to. For example, the document author (Author) or the source URI (SourceUri) of * the document.
*/ inline QueryResultItem& WithDocumentAttributes(Aws::VectorAn array of document attributes for the document that the query result maps * to. For example, the document author (Author) or the source URI (SourceUri) of * the document.
*/ inline QueryResultItem& AddDocumentAttributes(const DocumentAttribute& value) { m_documentAttributesHasBeenSet = true; m_documentAttributes.push_back(value); return *this; } /** *An array of document attributes for the document that the query result maps * to. For example, the document author (Author) or the source URI (SourceUri) of * the document.
*/ inline QueryResultItem& AddDocumentAttributes(DocumentAttribute&& value) { m_documentAttributesHasBeenSet = true; m_documentAttributes.push_back(std::move(value)); return *this; } private: Aws::String m_id; bool m_idHasBeenSet; QueryResultType m_type; bool m_typeHasBeenSet; Aws::Vector