AWS SDK for C++

AWS SDK for C++ Version 1.11.935

Loading...
Searching...
No Matches
Contact.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/sesv2/SESV2_EXPORTS.h>
11#include <aws/sesv2/model/TopicPreference.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace SESV2 {
23namespace Model {
24
31class Contact {
32 public:
33 AWS_SESV2_API Contact() = default;
34 AWS_SESV2_API Contact(Aws::Utils::Json::JsonView jsonValue);
35 AWS_SESV2_API Contact& operator=(Aws::Utils::Json::JsonView jsonValue);
36 AWS_SESV2_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
42 inline const Aws::String& GetEmailAddress() const { return m_emailAddress; }
43 inline bool EmailAddressHasBeenSet() const { return m_emailAddressHasBeenSet; }
44 template <typename EmailAddressT = Aws::String>
45 void SetEmailAddress(EmailAddressT&& value) {
46 m_emailAddressHasBeenSet = true;
47 m_emailAddress = std::forward<EmailAddressT>(value);
48 }
49 template <typename EmailAddressT = Aws::String>
50 Contact& WithEmailAddress(EmailAddressT&& value) {
51 SetEmailAddress(std::forward<EmailAddressT>(value));
52 return *this;
53 }
55
57
60 inline const Aws::Vector<TopicPreference>& GetTopicPreferences() const { return m_topicPreferences; }
61 inline bool TopicPreferencesHasBeenSet() const { return m_topicPreferencesHasBeenSet; }
62 template <typename TopicPreferencesT = Aws::Vector<TopicPreference>>
63 void SetTopicPreferences(TopicPreferencesT&& value) {
64 m_topicPreferencesHasBeenSet = true;
65 m_topicPreferences = std::forward<TopicPreferencesT>(value);
66 }
67 template <typename TopicPreferencesT = Aws::Vector<TopicPreference>>
68 Contact& WithTopicPreferences(TopicPreferencesT&& value) {
69 SetTopicPreferences(std::forward<TopicPreferencesT>(value));
70 return *this;
71 }
72 template <typename TopicPreferencesT = TopicPreference>
73 Contact& AddTopicPreferences(TopicPreferencesT&& value) {
74 m_topicPreferencesHasBeenSet = true;
75 m_topicPreferences.emplace_back(std::forward<TopicPreferencesT>(value));
76 return *this;
77 }
79
81
84 inline const Aws::Vector<TopicPreference>& GetTopicDefaultPreferences() const { return m_topicDefaultPreferences; }
85 inline bool TopicDefaultPreferencesHasBeenSet() const { return m_topicDefaultPreferencesHasBeenSet; }
86 template <typename TopicDefaultPreferencesT = Aws::Vector<TopicPreference>>
87 void SetTopicDefaultPreferences(TopicDefaultPreferencesT&& value) {
88 m_topicDefaultPreferencesHasBeenSet = true;
89 m_topicDefaultPreferences = std::forward<TopicDefaultPreferencesT>(value);
90 }
91 template <typename TopicDefaultPreferencesT = Aws::Vector<TopicPreference>>
92 Contact& WithTopicDefaultPreferences(TopicDefaultPreferencesT&& value) {
93 SetTopicDefaultPreferences(std::forward<TopicDefaultPreferencesT>(value));
94 return *this;
95 }
96 template <typename TopicDefaultPreferencesT = TopicPreference>
97 Contact& AddTopicDefaultPreferences(TopicDefaultPreferencesT&& value) {
98 m_topicDefaultPreferencesHasBeenSet = true;
99 m_topicDefaultPreferences.emplace_back(std::forward<TopicDefaultPreferencesT>(value));
100 return *this;
101 }
103
105
109 inline bool GetUnsubscribeAll() const { return m_unsubscribeAll; }
110 inline bool UnsubscribeAllHasBeenSet() const { return m_unsubscribeAllHasBeenSet; }
111 inline void SetUnsubscribeAll(bool value) {
112 m_unsubscribeAllHasBeenSet = true;
113 m_unsubscribeAll = value;
114 }
115 inline Contact& WithUnsubscribeAll(bool value) {
116 SetUnsubscribeAll(value);
117 return *this;
118 }
120
122
125 inline const Aws::Utils::DateTime& GetLastUpdatedTimestamp() const { return m_lastUpdatedTimestamp; }
126 inline bool LastUpdatedTimestampHasBeenSet() const { return m_lastUpdatedTimestampHasBeenSet; }
127 template <typename LastUpdatedTimestampT = Aws::Utils::DateTime>
128 void SetLastUpdatedTimestamp(LastUpdatedTimestampT&& value) {
129 m_lastUpdatedTimestampHasBeenSet = true;
130 m_lastUpdatedTimestamp = std::forward<LastUpdatedTimestampT>(value);
131 }
132 template <typename LastUpdatedTimestampT = Aws::Utils::DateTime>
133 Contact& WithLastUpdatedTimestamp(LastUpdatedTimestampT&& value) {
134 SetLastUpdatedTimestamp(std::forward<LastUpdatedTimestampT>(value));
135 return *this;
136 }
138 private:
139 Aws::String m_emailAddress;
140
141 Aws::Vector<TopicPreference> m_topicPreferences;
142
143 Aws::Vector<TopicPreference> m_topicDefaultPreferences;
144
145 bool m_unsubscribeAll{false};
146
147 Aws::Utils::DateTime m_lastUpdatedTimestamp{};
148 bool m_emailAddressHasBeenSet = false;
149 bool m_topicPreferencesHasBeenSet = false;
150 bool m_topicDefaultPreferencesHasBeenSet = false;
151 bool m_unsubscribeAllHasBeenSet = false;
152 bool m_lastUpdatedTimestampHasBeenSet = false;
153};
154
155} // namespace Model
156} // namespace SESV2
157} // namespace Aws
Contact & AddTopicDefaultPreferences(TopicDefaultPreferencesT &&value)
Definition Contact.h:97
const Aws::Utils::DateTime & GetLastUpdatedTimestamp() const
Definition Contact.h:125
AWS_SESV2_API Contact(Aws::Utils::Json::JsonView jsonValue)
void SetTopicPreferences(TopicPreferencesT &&value)
Definition Contact.h:63
bool GetUnsubscribeAll() const
Definition Contact.h:109
bool TopicPreferencesHasBeenSet() const
Definition Contact.h:61
void SetEmailAddress(EmailAddressT &&value)
Definition Contact.h:45
Contact & WithTopicPreferences(TopicPreferencesT &&value)
Definition Contact.h:68
AWS_SESV2_API Aws::Utils::Json::JsonValue Jsonize() const
void SetLastUpdatedTimestamp(LastUpdatedTimestampT &&value)
Definition Contact.h:128
Contact & WithTopicDefaultPreferences(TopicDefaultPreferencesT &&value)
Definition Contact.h:92
const Aws::String & GetEmailAddress() const
Definition Contact.h:42
bool LastUpdatedTimestampHasBeenSet() const
Definition Contact.h:126
const Aws::Vector< TopicPreference > & GetTopicDefaultPreferences() const
Definition Contact.h:84
bool UnsubscribeAllHasBeenSet() const
Definition Contact.h:110
Contact & WithUnsubscribeAll(bool value)
Definition Contact.h:115
Contact & AddTopicPreferences(TopicPreferencesT &&value)
Definition Contact.h:73
void SetUnsubscribeAll(bool value)
Definition Contact.h:111
bool EmailAddressHasBeenSet() const
Definition Contact.h:43
void SetTopicDefaultPreferences(TopicDefaultPreferencesT &&value)
Definition Contact.h:87
bool TopicDefaultPreferencesHasBeenSet() const
Definition Contact.h:85
const Aws::Vector< TopicPreference > & GetTopicPreferences() const
Definition Contact.h:60
Contact & WithLastUpdatedTimestamp(LastUpdatedTimestampT &&value)
Definition Contact.h:133
Contact & WithEmailAddress(EmailAddressT &&value)
Definition Contact.h:50
AWS_SESV2_API Contact()=default
AWS_SESV2_API Contact & operator=(Aws::Utils::Json::JsonView jsonValue)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue