AWS SDK for C++

AWS SDK for C++ Version 1.11.935

Loading...
Searching...
No Matches
CreateContactRequest.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/sesv2/SESV2Request.h>
10#include <aws/sesv2/SESV2_EXPORTS.h>
11#include <aws/sesv2/model/TopicPreference.h>
12
13#include <utility>
14
15namespace Aws {
16namespace SESV2 {
17namespace Model {
18
22 public:
23 AWS_SESV2_API CreateContactRequest() = default;
24
25 // Service request name is the Operation name which will send this request out,
26 // each operation should has unique request name, so that we can get operation's name from this request.
27 // Note: this is not true for response, multiple operations may have the same response name,
28 // so we can not get operation's name from response.
29 inline virtual const char* GetServiceRequestName() const override { return "CreateContact"; }
30
31 AWS_SESV2_API Aws::String SerializePayload() const override;
32
34
37 inline const Aws::String& GetContactListName() const { return m_contactListName; }
38 inline bool ContactListNameHasBeenSet() const { return m_contactListNameHasBeenSet; }
39 template <typename ContactListNameT = Aws::String>
40 void SetContactListName(ContactListNameT&& value) {
41 m_contactListNameHasBeenSet = true;
42 m_contactListName = std::forward<ContactListNameT>(value);
43 }
44 template <typename ContactListNameT = Aws::String>
45 CreateContactRequest& WithContactListName(ContactListNameT&& value) {
46 SetContactListName(std::forward<ContactListNameT>(value));
47 return *this;
48 }
50
52
55 inline const Aws::String& GetEmailAddress() const { return m_emailAddress; }
56 inline bool EmailAddressHasBeenSet() const { return m_emailAddressHasBeenSet; }
57 template <typename EmailAddressT = Aws::String>
58 void SetEmailAddress(EmailAddressT&& value) {
59 m_emailAddressHasBeenSet = true;
60 m_emailAddress = std::forward<EmailAddressT>(value);
61 }
62 template <typename EmailAddressT = Aws::String>
63 CreateContactRequest& WithEmailAddress(EmailAddressT&& value) {
64 SetEmailAddress(std::forward<EmailAddressT>(value));
65 return *this;
66 }
68
70
73 inline const Aws::Vector<TopicPreference>& GetTopicPreferences() const { return m_topicPreferences; }
74 inline bool TopicPreferencesHasBeenSet() const { return m_topicPreferencesHasBeenSet; }
75 template <typename TopicPreferencesT = Aws::Vector<TopicPreference>>
76 void SetTopicPreferences(TopicPreferencesT&& value) {
77 m_topicPreferencesHasBeenSet = true;
78 m_topicPreferences = std::forward<TopicPreferencesT>(value);
79 }
80 template <typename TopicPreferencesT = Aws::Vector<TopicPreference>>
81 CreateContactRequest& WithTopicPreferences(TopicPreferencesT&& value) {
82 SetTopicPreferences(std::forward<TopicPreferencesT>(value));
83 return *this;
84 }
85 template <typename TopicPreferencesT = TopicPreference>
86 CreateContactRequest& AddTopicPreferences(TopicPreferencesT&& value) {
87 m_topicPreferencesHasBeenSet = true;
88 m_topicPreferences.emplace_back(std::forward<TopicPreferencesT>(value));
89 return *this;
90 }
92
94
98 inline bool GetUnsubscribeAll() const { return m_unsubscribeAll; }
99 inline bool UnsubscribeAllHasBeenSet() const { return m_unsubscribeAllHasBeenSet; }
100 inline void SetUnsubscribeAll(bool value) {
101 m_unsubscribeAllHasBeenSet = true;
102 m_unsubscribeAll = value;
103 }
105 SetUnsubscribeAll(value);
106 return *this;
107 }
109
111
114 inline const Aws::String& GetAttributesData() const { return m_attributesData; }
115 inline bool AttributesDataHasBeenSet() const { return m_attributesDataHasBeenSet; }
116 template <typename AttributesDataT = Aws::String>
117 void SetAttributesData(AttributesDataT&& value) {
118 m_attributesDataHasBeenSet = true;
119 m_attributesData = std::forward<AttributesDataT>(value);
120 }
121 template <typename AttributesDataT = Aws::String>
122 CreateContactRequest& WithAttributesData(AttributesDataT&& value) {
123 SetAttributesData(std::forward<AttributesDataT>(value));
124 return *this;
125 }
127 private:
128 Aws::String m_contactListName;
129
130 Aws::String m_emailAddress;
131
132 Aws::Vector<TopicPreference> m_topicPreferences;
133
134 bool m_unsubscribeAll{false};
135
136 Aws::String m_attributesData;
137 bool m_contactListNameHasBeenSet = false;
138 bool m_emailAddressHasBeenSet = false;
139 bool m_topicPreferencesHasBeenSet = false;
140 bool m_unsubscribeAllHasBeenSet = false;
141 bool m_attributesDataHasBeenSet = false;
142};
143
144} // namespace Model
145} // namespace SESV2
146} // namespace Aws
const Aws::String & GetAttributesData() const
void SetEmailAddress(EmailAddressT &&value)
CreateContactRequest & WithTopicPreferences(TopicPreferencesT &&value)
CreateContactRequest & WithEmailAddress(EmailAddressT &&value)
void SetContactListName(ContactListNameT &&value)
const Aws::String & GetEmailAddress() const
void SetAttributesData(AttributesDataT &&value)
CreateContactRequest & AddTopicPreferences(TopicPreferencesT &&value)
CreateContactRequest & WithContactListName(ContactListNameT &&value)
virtual const char * GetServiceRequestName() const override
CreateContactRequest & WithAttributesData(AttributesDataT &&value)
AWS_SESV2_API CreateContactRequest()=default
CreateContactRequest & WithUnsubscribeAll(bool value)
const Aws::Vector< TopicPreference > & GetTopicPreferences() const
void SetTopicPreferences(TopicPreferencesT &&value)
const Aws::String & GetContactListName() const
AWS_SESV2_API Aws::String SerializePayload() const override
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector