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

Information about a document from a search service such as OpenSearch (self * managed). Amazon Kendra Intelligent Ranking uses this information to rank and * score on.

See Also:

AWS * API Reference

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

The identifier of the document from the search service.

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

The identifier of the document from the search service.

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

The identifier of the document from the search service.

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

The identifier of the document from the search service.

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

The identifier of the document from the search service.

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

The identifier of the document from the search service.

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

The identifier of the document from the search service.

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

The identifier of the document from the search service.

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

The optional group identifier of the document from the search service. * Documents with the same group identifier are grouped together and processed as * one document within the service.

*/ inline const Aws::String& GetGroupId() const{ return m_groupId; } /** *

The optional group identifier of the document from the search service. * Documents with the same group identifier are grouped together and processed as * one document within the service.

*/ inline bool GroupIdHasBeenSet() const { return m_groupIdHasBeenSet; } /** *

The optional group identifier of the document from the search service. * Documents with the same group identifier are grouped together and processed as * one document within the service.

*/ inline void SetGroupId(const Aws::String& value) { m_groupIdHasBeenSet = true; m_groupId = value; } /** *

The optional group identifier of the document from the search service. * Documents with the same group identifier are grouped together and processed as * one document within the service.

*/ inline void SetGroupId(Aws::String&& value) { m_groupIdHasBeenSet = true; m_groupId = std::move(value); } /** *

The optional group identifier of the document from the search service. * Documents with the same group identifier are grouped together and processed as * one document within the service.

*/ inline void SetGroupId(const char* value) { m_groupIdHasBeenSet = true; m_groupId.assign(value); } /** *

The optional group identifier of the document from the search service. * Documents with the same group identifier are grouped together and processed as * one document within the service.

*/ inline Document& WithGroupId(const Aws::String& value) { SetGroupId(value); return *this;} /** *

The optional group identifier of the document from the search service. * Documents with the same group identifier are grouped together and processed as * one document within the service.

*/ inline Document& WithGroupId(Aws::String&& value) { SetGroupId(std::move(value)); return *this;} /** *

The optional group identifier of the document from the search service. * Documents with the same group identifier are grouped together and processed as * one document within the service.

*/ inline Document& WithGroupId(const char* value) { SetGroupId(value); return *this;} /** *

The title of the search service's document.

*/ inline const Aws::String& GetTitle() const{ return m_title; } /** *

The title of the search service's document.

*/ inline bool TitleHasBeenSet() const { return m_titleHasBeenSet; } /** *

The title of the search service's document.

*/ inline void SetTitle(const Aws::String& value) { m_titleHasBeenSet = true; m_title = value; } /** *

The title of the search service's document.

*/ inline void SetTitle(Aws::String&& value) { m_titleHasBeenSet = true; m_title = std::move(value); } /** *

The title of the search service's document.

*/ inline void SetTitle(const char* value) { m_titleHasBeenSet = true; m_title.assign(value); } /** *

The title of the search service's document.

*/ inline Document& WithTitle(const Aws::String& value) { SetTitle(value); return *this;} /** *

The title of the search service's document.

*/ inline Document& WithTitle(Aws::String&& value) { SetTitle(std::move(value)); return *this;} /** *

The title of the search service's document.

*/ inline Document& WithTitle(const char* value) { SetTitle(value); return *this;} /** *

The body text of the search service's document.

*/ inline const Aws::String& GetBody() const{ return m_body; } /** *

The body text of the search service's document.

*/ inline bool BodyHasBeenSet() const { return m_bodyHasBeenSet; } /** *

The body text of the search service's document.

*/ inline void SetBody(const Aws::String& value) { m_bodyHasBeenSet = true; m_body = value; } /** *

The body text of the search service's document.

*/ inline void SetBody(Aws::String&& value) { m_bodyHasBeenSet = true; m_body = std::move(value); } /** *

The body text of the search service's document.

*/ inline void SetBody(const char* value) { m_bodyHasBeenSet = true; m_body.assign(value); } /** *

The body text of the search service's document.

*/ inline Document& WithBody(const Aws::String& value) { SetBody(value); return *this;} /** *

The body text of the search service's document.

*/ inline Document& WithBody(Aws::String&& value) { SetBody(std::move(value)); return *this;} /** *

The body text of the search service's document.

*/ inline Document& WithBody(const char* value) { SetBody(value); return *this;} /** *

The title of the search service's document represented as a list of tokens or * words. You must choose to provide Title or * TokenizedTitle. You cannot provide both.

*/ inline const Aws::Vector& GetTokenizedTitle() const{ return m_tokenizedTitle; } /** *

The title of the search service's document represented as a list of tokens or * words. You must choose to provide Title or * TokenizedTitle. You cannot provide both.

*/ inline bool TokenizedTitleHasBeenSet() const { return m_tokenizedTitleHasBeenSet; } /** *

The title of the search service's document represented as a list of tokens or * words. You must choose to provide Title or * TokenizedTitle. You cannot provide both.

*/ inline void SetTokenizedTitle(const Aws::Vector& value) { m_tokenizedTitleHasBeenSet = true; m_tokenizedTitle = value; } /** *

The title of the search service's document represented as a list of tokens or * words. You must choose to provide Title or * TokenizedTitle. You cannot provide both.

*/ inline void SetTokenizedTitle(Aws::Vector&& value) { m_tokenizedTitleHasBeenSet = true; m_tokenizedTitle = std::move(value); } /** *

The title of the search service's document represented as a list of tokens or * words. You must choose to provide Title or * TokenizedTitle. You cannot provide both.

*/ inline Document& WithTokenizedTitle(const Aws::Vector& value) { SetTokenizedTitle(value); return *this;} /** *

The title of the search service's document represented as a list of tokens or * words. You must choose to provide Title or * TokenizedTitle. You cannot provide both.

*/ inline Document& WithTokenizedTitle(Aws::Vector&& value) { SetTokenizedTitle(std::move(value)); return *this;} /** *

The title of the search service's document represented as a list of tokens or * words. You must choose to provide Title or * TokenizedTitle. You cannot provide both.

*/ inline Document& AddTokenizedTitle(const Aws::String& value) { m_tokenizedTitleHasBeenSet = true; m_tokenizedTitle.push_back(value); return *this; } /** *

The title of the search service's document represented as a list of tokens or * words. You must choose to provide Title or * TokenizedTitle. You cannot provide both.

*/ inline Document& AddTokenizedTitle(Aws::String&& value) { m_tokenizedTitleHasBeenSet = true; m_tokenizedTitle.push_back(std::move(value)); return *this; } /** *

The title of the search service's document represented as a list of tokens or * words. You must choose to provide Title or * TokenizedTitle. You cannot provide both.

*/ inline Document& AddTokenizedTitle(const char* value) { m_tokenizedTitleHasBeenSet = true; m_tokenizedTitle.push_back(value); return *this; } /** *

The body text of the search service's document represented as a list of * tokens or words. You must choose to provide Body or * TokenizedBody. You cannot provide both.

*/ inline const Aws::Vector& GetTokenizedBody() const{ return m_tokenizedBody; } /** *

The body text of the search service's document represented as a list of * tokens or words. You must choose to provide Body or * TokenizedBody. You cannot provide both.

*/ inline bool TokenizedBodyHasBeenSet() const { return m_tokenizedBodyHasBeenSet; } /** *

The body text of the search service's document represented as a list of * tokens or words. You must choose to provide Body or * TokenizedBody. You cannot provide both.

*/ inline void SetTokenizedBody(const Aws::Vector& value) { m_tokenizedBodyHasBeenSet = true; m_tokenizedBody = value; } /** *

The body text of the search service's document represented as a list of * tokens or words. You must choose to provide Body or * TokenizedBody. You cannot provide both.

*/ inline void SetTokenizedBody(Aws::Vector&& value) { m_tokenizedBodyHasBeenSet = true; m_tokenizedBody = std::move(value); } /** *

The body text of the search service's document represented as a list of * tokens or words. You must choose to provide Body or * TokenizedBody. You cannot provide both.

*/ inline Document& WithTokenizedBody(const Aws::Vector& value) { SetTokenizedBody(value); return *this;} /** *

The body text of the search service's document represented as a list of * tokens or words. You must choose to provide Body or * TokenizedBody. You cannot provide both.

*/ inline Document& WithTokenizedBody(Aws::Vector&& value) { SetTokenizedBody(std::move(value)); return *this;} /** *

The body text of the search service's document represented as a list of * tokens or words. You must choose to provide Body or * TokenizedBody. You cannot provide both.

*/ inline Document& AddTokenizedBody(const Aws::String& value) { m_tokenizedBodyHasBeenSet = true; m_tokenizedBody.push_back(value); return *this; } /** *

The body text of the search service's document represented as a list of * tokens or words. You must choose to provide Body or * TokenizedBody. You cannot provide both.

*/ inline Document& AddTokenizedBody(Aws::String&& value) { m_tokenizedBodyHasBeenSet = true; m_tokenizedBody.push_back(std::move(value)); return *this; } /** *

The body text of the search service's document represented as a list of * tokens or words. You must choose to provide Body or * TokenizedBody. You cannot provide both.

*/ inline Document& AddTokenizedBody(const char* value) { m_tokenizedBodyHasBeenSet = true; m_tokenizedBody.push_back(value); return *this; } /** *

The original document score or rank from the search service. Amazon Kendra * Intelligent Ranking gives the document a new score or rank based on its * intelligent search algorithms.

*/ inline double GetOriginalScore() const{ return m_originalScore; } /** *

The original document score or rank from the search service. Amazon Kendra * Intelligent Ranking gives the document a new score or rank based on its * intelligent search algorithms.

*/ inline bool OriginalScoreHasBeenSet() const { return m_originalScoreHasBeenSet; } /** *

The original document score or rank from the search service. Amazon Kendra * Intelligent Ranking gives the document a new score or rank based on its * intelligent search algorithms.

*/ inline void SetOriginalScore(double value) { m_originalScoreHasBeenSet = true; m_originalScore = value; } /** *

The original document score or rank from the search service. Amazon Kendra * Intelligent Ranking gives the document a new score or rank based on its * intelligent search algorithms.

*/ inline Document& WithOriginalScore(double value) { SetOriginalScore(value); return *this;} private: Aws::String m_id; bool m_idHasBeenSet = false; Aws::String m_groupId; bool m_groupIdHasBeenSet = false; Aws::String m_title; bool m_titleHasBeenSet = false; Aws::String m_body; bool m_bodyHasBeenSet = false; Aws::Vector m_tokenizedTitle; bool m_tokenizedTitleHasBeenSet = false; Aws::Vector m_tokenizedBody; bool m_tokenizedBodyHasBeenSet = false; double m_originalScore; bool m_originalScoreHasBeenSet = false; }; } // namespace Model } // namespace KendraRanking } // namespace Aws