AWS SDK for C++

AWS SDK for C++ Version 1.11.608

Loading...
Searching...
No Matches
TextWithHighlights.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/Highlight.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 TextWithHighlights() = 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 TextWithHighlights& WithText(TextT&& value) { SetText(std::forward<TextT>(value)); return *this;}
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) { m_highlightsHasBeenSet = true; m_highlights = std::forward<HighlightsT>(value); }
63 template<typename HighlightsT = Aws::Vector<Highlight>>
64 TextWithHighlights& WithHighlights(HighlightsT&& value) { SetHighlights(std::forward<HighlightsT>(value)); return *this;}
65 template<typename HighlightsT = Highlight>
66 TextWithHighlights& AddHighlights(HighlightsT&& value) { m_highlightsHasBeenSet = true; m_highlights.emplace_back(std::forward<HighlightsT>(value)); return *this; }
68 private:
69
70 Aws::String m_text;
71 bool m_textHasBeenSet = false;
72
73 Aws::Vector<Highlight> m_highlights;
74 bool m_highlightsHasBeenSet = false;
75 };
76
77} // namespace Model
78} // namespace kendra
79} // 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