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

Provides text and information about where to highlight the query suggestion * text.

See Also:

AWS * API Reference

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

The query suggestion text to display to the user.

*/ inline const Aws::String& GetText() const{ return m_text; } /** *

The query suggestion text to display to the user.

*/ inline bool TextHasBeenSet() const { return m_textHasBeenSet; } /** *

The query suggestion text to display to the user.

*/ inline void SetText(const Aws::String& value) { m_textHasBeenSet = true; m_text = value; } /** *

The query suggestion text to display to the user.

*/ inline void SetText(Aws::String&& value) { m_textHasBeenSet = true; m_text = std::move(value); } /** *

The query suggestion text to display to the user.

*/ inline void SetText(const char* value) { m_textHasBeenSet = true; m_text.assign(value); } /** *

The query suggestion text to display to the user.

*/ inline SuggestionTextWithHighlights& WithText(const Aws::String& value) { SetText(value); return *this;} /** *

The query suggestion text to display to the user.

*/ inline SuggestionTextWithHighlights& WithText(Aws::String&& value) { SetText(std::move(value)); return *this;} /** *

The query suggestion text to display to the user.

*/ inline SuggestionTextWithHighlights& WithText(const char* value) { SetText(value); return *this;} /** *

The beginning and end of the query suggestion text that should be * highlighted.

*/ inline const Aws::Vector& GetHighlights() const{ return m_highlights; } /** *

The beginning and end of the query suggestion text that should be * highlighted.

*/ inline bool HighlightsHasBeenSet() const { return m_highlightsHasBeenSet; } /** *

The beginning and end of the query suggestion text that should be * highlighted.

*/ inline void SetHighlights(const Aws::Vector& value) { m_highlightsHasBeenSet = true; m_highlights = value; } /** *

The beginning and end of the query suggestion text that should be * highlighted.

*/ inline void SetHighlights(Aws::Vector&& value) { m_highlightsHasBeenSet = true; m_highlights = std::move(value); } /** *

The beginning and end of the query suggestion text that should be * highlighted.

*/ inline SuggestionTextWithHighlights& WithHighlights(const Aws::Vector& value) { SetHighlights(value); return *this;} /** *

The beginning and end of the query suggestion text that should be * highlighted.

*/ inline SuggestionTextWithHighlights& WithHighlights(Aws::Vector&& value) { SetHighlights(std::move(value)); return *this;} /** *

The beginning and end of the query suggestion text that should be * highlighted.

*/ inline SuggestionTextWithHighlights& AddHighlights(const SuggestionHighlight& value) { m_highlightsHasBeenSet = true; m_highlights.push_back(value); return *this; } /** *

The beginning and end of the query suggestion text that should be * highlighted.

*/ inline SuggestionTextWithHighlights& AddHighlights(SuggestionHighlight&& value) { m_highlightsHasBeenSet = true; m_highlights.push_back(std::move(value)); return *this; } private: Aws::String m_text; bool m_textHasBeenSet = false; Aws::Vector m_highlights; bool m_highlightsHasBeenSet = false; }; } // namespace Model } // namespace kendra } // namespace Aws