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

An autocomplete suggestion that matches the query string specified in a * SuggestRequest.

See Also:

AWS * API Reference

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

The string that matches the query string specified in the * SuggestRequest.

*/ inline const Aws::String& GetSuggestion() const{ return m_suggestion; } /** *

The string that matches the query string specified in the * SuggestRequest.

*/ inline bool SuggestionHasBeenSet() const { return m_suggestionHasBeenSet; } /** *

The string that matches the query string specified in the * SuggestRequest.

*/ inline void SetSuggestion(const Aws::String& value) { m_suggestionHasBeenSet = true; m_suggestion = value; } /** *

The string that matches the query string specified in the * SuggestRequest.

*/ inline void SetSuggestion(Aws::String&& value) { m_suggestionHasBeenSet = true; m_suggestion = std::move(value); } /** *

The string that matches the query string specified in the * SuggestRequest.

*/ inline void SetSuggestion(const char* value) { m_suggestionHasBeenSet = true; m_suggestion.assign(value); } /** *

The string that matches the query string specified in the * SuggestRequest.

*/ inline SuggestionMatch& WithSuggestion(const Aws::String& value) { SetSuggestion(value); return *this;} /** *

The string that matches the query string specified in the * SuggestRequest.

*/ inline SuggestionMatch& WithSuggestion(Aws::String&& value) { SetSuggestion(std::move(value)); return *this;} /** *

The string that matches the query string specified in the * SuggestRequest.

*/ inline SuggestionMatch& WithSuggestion(const char* value) { SetSuggestion(value); return *this;} /** *

The relevance score of a suggested match.

*/ inline long long GetScore() const{ return m_score; } /** *

The relevance score of a suggested match.

*/ inline bool ScoreHasBeenSet() const { return m_scoreHasBeenSet; } /** *

The relevance score of a suggested match.

*/ inline void SetScore(long long value) { m_scoreHasBeenSet = true; m_score = value; } /** *

The relevance score of a suggested match.

*/ inline SuggestionMatch& WithScore(long long value) { SetScore(value); return *this;} /** *

The document ID of the suggested document.

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

The document ID of the suggested document.

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

The document ID of the suggested document.

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

The document ID of the suggested document.

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

The document ID of the suggested document.

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

The document ID of the suggested document.

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

The document ID of the suggested document.

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

The document ID of the suggested document.

*/ inline SuggestionMatch& WithId(const char* value) { SetId(value); return *this;} private: Aws::String m_suggestion; bool m_suggestionHasBeenSet = false; long long m_score; bool m_scoreHasBeenSet = false; Aws::String m_id; bool m_idHasBeenSet = false; }; } // namespace Model } // namespace CloudSearchDomain } // namespace Aws