AWS SDK for C++

AWS SDK for C++ Version 1.11.685

Loading...
Searching...
No Matches
SuggestionTextWithHighlights.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/kendra/Kendra_EXPORTS.h>
10#include <aws/kendra/model/SuggestionHighlight.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace kendra {
22namespace Model {
23
31 public:
32 AWS_KENDRA_API SuggestionTextWithHighlights() = default;
35 AWS_KENDRA_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline const Aws::String& GetText() const { return m_text; }
42 inline bool TextHasBeenSet() const { return m_textHasBeenSet; }
43 template <typename TextT = Aws::String>
44 void SetText(TextT&& value) {
45 m_textHasBeenSet = true;
46 m_text = std::forward<TextT>(value);
47 }
48 template <typename TextT = Aws::String>
50 SetText(std::forward<TextT>(value));
51 return *this;
52 }
54
56
60 inline const Aws::Vector<SuggestionHighlight>& GetHighlights() const { return m_highlights; }
61 inline bool HighlightsHasBeenSet() const { return m_highlightsHasBeenSet; }
62 template <typename HighlightsT = Aws::Vector<SuggestionHighlight>>
63 void SetHighlights(HighlightsT&& value) {
64 m_highlightsHasBeenSet = true;
65 m_highlights = std::forward<HighlightsT>(value);
66 }
67 template <typename HighlightsT = Aws::Vector<SuggestionHighlight>>
69 SetHighlights(std::forward<HighlightsT>(value));
70 return *this;
71 }
72 template <typename HighlightsT = SuggestionHighlight>
74 m_highlightsHasBeenSet = true;
75 m_highlights.emplace_back(std::forward<HighlightsT>(value));
76 return *this;
77 }
79 private:
80 Aws::String m_text;
81 bool m_textHasBeenSet = false;
82
84 bool m_highlightsHasBeenSet = false;
85};
86
87} // namespace Model
88} // namespace kendra
89} // namespace Aws
AWS_KENDRA_API SuggestionTextWithHighlights & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_KENDRA_API SuggestionTextWithHighlights()=default
SuggestionTextWithHighlights & AddHighlights(HighlightsT &&value)
const Aws::Vector< SuggestionHighlight > & GetHighlights() const
SuggestionTextWithHighlights & WithHighlights(HighlightsT &&value)
AWS_KENDRA_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_KENDRA_API SuggestionTextWithHighlights(Aws::Utils::Json::JsonView jsonValue)
SuggestionTextWithHighlights & WithText(TextT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue