AWS SDK for C++

AWS SDK for C++ Version 1.11.608

Loading...
Searching...
No Matches
SuggestionTextWithHighlights.h
1
6#pragma once
7#include <aws/kendra/Kendra_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/kendra/model/SuggestionHighlight.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Json
18{
19 class JsonValue;
20 class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace kendra
24{
25namespace Model
26{
27
35 {
36 public:
37 AWS_KENDRA_API SuggestionTextWithHighlights() = default;
40 AWS_KENDRA_API Aws::Utils::Json::JsonValue Jsonize() const;
41
42
44
47 inline const Aws::String& GetText() const { return m_text; }
48 inline bool TextHasBeenSet() const { return m_textHasBeenSet; }
49 template<typename TextT = Aws::String>
50 void SetText(TextT&& value) { m_textHasBeenSet = true; m_text = std::forward<TextT>(value); }
51 template<typename TextT = Aws::String>
52 SuggestionTextWithHighlights& WithText(TextT&& value) { SetText(std::forward<TextT>(value)); return *this;}
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) { m_highlightsHasBeenSet = true; m_highlights = std::forward<HighlightsT>(value); }
64 template<typename HighlightsT = Aws::Vector<SuggestionHighlight>>
65 SuggestionTextWithHighlights& WithHighlights(HighlightsT&& value) { SetHighlights(std::forward<HighlightsT>(value)); return *this;}
66 template<typename HighlightsT = SuggestionHighlight>
67 SuggestionTextWithHighlights& AddHighlights(HighlightsT&& value) { m_highlightsHasBeenSet = true; m_highlights.emplace_back(std::forward<HighlightsT>(value)); return *this; }
69 private:
70
71 Aws::String m_text;
72 bool m_textHasBeenSet = false;
73
75 bool m_highlightsHasBeenSet = false;
76 };
77
78} // namespace Model
79} // namespace kendra
80} // 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