AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
TextPartValue.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/notifications/Notifications_EXPORTS.h>
10#include <aws/notifications/model/LocaleCode.h>
11#include <aws/notifications/model/TextPartType.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace Notifications {
23namespace Model {
24
32 public:
33 AWS_NOTIFICATIONS_API TextPartValue() = default;
34 AWS_NOTIFICATIONS_API TextPartValue(Aws::Utils::Json::JsonView jsonValue);
35 AWS_NOTIFICATIONS_API TextPartValue& operator=(Aws::Utils::Json::JsonView jsonValue);
36 AWS_NOTIFICATIONS_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
43 inline TextPartType GetType() const { return m_type; }
44 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
45 inline void SetType(TextPartType value) {
46 m_typeHasBeenSet = true;
47 m_type = value;
48 }
50 SetType(value);
51 return *this;
52 }
54
56
60 inline const Aws::String& GetDisplayText() const { return m_displayText; }
61 inline bool DisplayTextHasBeenSet() const { return m_displayTextHasBeenSet; }
62 template <typename DisplayTextT = Aws::String>
63 void SetDisplayText(DisplayTextT&& value) {
64 m_displayTextHasBeenSet = true;
65 m_displayText = std::forward<DisplayTextT>(value);
66 }
67 template <typename DisplayTextT = Aws::String>
68 TextPartValue& WithDisplayText(DisplayTextT&& value) {
69 SetDisplayText(std::forward<DisplayTextT>(value));
70 return *this;
71 }
73
75
78 inline const Aws::Map<LocaleCode, Aws::String>& GetTextByLocale() const { return m_textByLocale; }
79 inline bool TextByLocaleHasBeenSet() const { return m_textByLocaleHasBeenSet; }
80 template <typename TextByLocaleT = Aws::Map<LocaleCode, Aws::String>>
81 void SetTextByLocale(TextByLocaleT&& value) {
82 m_textByLocaleHasBeenSet = true;
83 m_textByLocale = std::forward<TextByLocaleT>(value);
84 }
85 template <typename TextByLocaleT = Aws::Map<LocaleCode, Aws::String>>
86 TextPartValue& WithTextByLocale(TextByLocaleT&& value) {
87 SetTextByLocale(std::forward<TextByLocaleT>(value));
88 return *this;
89 }
91 m_textByLocaleHasBeenSet = true;
92 m_textByLocale.emplace(key, value);
93 return *this;
94 }
96
98
101 inline const Aws::String& GetUrl() const { return m_url; }
102 inline bool UrlHasBeenSet() const { return m_urlHasBeenSet; }
103 template <typename UrlT = Aws::String>
104 void SetUrl(UrlT&& value) {
105 m_urlHasBeenSet = true;
106 m_url = std::forward<UrlT>(value);
107 }
108 template <typename UrlT = Aws::String>
109 TextPartValue& WithUrl(UrlT&& value) {
110 SetUrl(std::forward<UrlT>(value));
111 return *this;
112 }
114 private:
116
117 Aws::String m_displayText;
118
120
121 Aws::String m_url;
122 bool m_typeHasBeenSet = false;
123 bool m_displayTextHasBeenSet = false;
124 bool m_textByLocaleHasBeenSet = false;
125 bool m_urlHasBeenSet = false;
126};
127
128} // namespace Model
129} // namespace Notifications
130} // namespace Aws
void SetTextByLocale(TextByLocaleT &&value)
TextPartValue & AddTextByLocale(LocaleCode key, Aws::String value)
TextPartValue & WithDisplayText(DisplayTextT &&value)
const Aws::String & GetDisplayText() const
AWS_NOTIFICATIONS_API TextPartValue()=default
const Aws::String & GetUrl() const
TextPartValue & WithTextByLocale(TextByLocaleT &&value)
TextPartValue & WithUrl(UrlT &&value)
const Aws::Map< LocaleCode, Aws::String > & GetTextByLocale() const
AWS_NOTIFICATIONS_API TextPartValue & operator=(Aws::Utils::Json::JsonView jsonValue)
TextPartValue & WithType(TextPartType value)
AWS_NOTIFICATIONS_API Aws::Utils::Json::JsonValue Jsonize() const
void SetDisplayText(DisplayTextT &&value)
AWS_NOTIFICATIONS_API TextPartValue(Aws::Utils::Json::JsonView jsonValue)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue