AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
TextWithHighlights.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/Highlight.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 TextWithHighlights() = 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>
49 TextWithHighlights& WithText(TextT&& value) {
50 SetText(std::forward<TextT>(value));
51 return *this;
52 }
54
56
59 inline const Aws::Vector<Highlight>& GetHighlights() const { return m_highlights; }
60 inline bool HighlightsHasBeenSet() const { return m_highlightsHasBeenSet; }
61 template <typename HighlightsT = Aws::Vector<Highlight>>
62 void SetHighlights(HighlightsT&& value) {
63 m_highlightsHasBeenSet = true;
64 m_highlights = std::forward<HighlightsT>(value);
65 }
66 template <typename HighlightsT = Aws::Vector<Highlight>>
67 TextWithHighlights& WithHighlights(HighlightsT&& value) {
68 SetHighlights(std::forward<HighlightsT>(value));
69 return *this;
70 }
71 template <typename HighlightsT = Highlight>
72 TextWithHighlights& AddHighlights(HighlightsT&& value) {
73 m_highlightsHasBeenSet = true;
74 m_highlights.emplace_back(std::forward<HighlightsT>(value));
75 return *this;
76 }
78 private:
79 Aws::String m_text;
80
81 Aws::Vector<Highlight> m_highlights;
82 bool m_textHasBeenSet = false;
83 bool m_highlightsHasBeenSet = false;
84};
85
86} // namespace Model
87} // namespace kendra
88} // namespace Aws
AWS_KENDRA_API TextWithHighlights()=default
const Aws::Vector< Highlight > & GetHighlights() const
TextWithHighlights & WithHighlights(HighlightsT &&value)
AWS_KENDRA_API TextWithHighlights(Aws::Utils::Json::JsonView jsonValue)
AWS_KENDRA_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_KENDRA_API TextWithHighlights & operator=(Aws::Utils::Json::JsonView jsonValue)
TextWithHighlights & WithText(TextT &&value)
TextWithHighlights & AddHighlights(HighlightsT &&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