AWS SDK for C++

AWS SDK for C++ Version 1.11.683

Loading...
Searching...
No Matches
WriteCampaignRequest.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/core/utils/memory/stl/AWSVector.h>
10#include <aws/pinpoint/Pinpoint_EXPORTS.h>
11#include <aws/pinpoint/model/CampaignHook.h>
12#include <aws/pinpoint/model/CampaignLimits.h>
13#include <aws/pinpoint/model/CustomDeliveryConfiguration.h>
14#include <aws/pinpoint/model/MessageConfiguration.h>
15#include <aws/pinpoint/model/Schedule.h>
16#include <aws/pinpoint/model/TemplateConfiguration.h>
17#include <aws/pinpoint/model/WriteTreatmentResource.h>
18
19#include <utility>
20
21namespace Aws {
22namespace Utils {
23namespace Json {
24class JsonValue;
25class JsonView;
26} // namespace Json
27} // namespace Utils
28namespace Pinpoint {
29namespace Model {
30
38 public:
39 AWS_PINPOINT_API WriteCampaignRequest() = default;
42 AWS_PINPOINT_API Aws::Utils::Json::JsonValue Jsonize() const;
43
45
49 inline const Aws::Vector<WriteTreatmentResource>& GetAdditionalTreatments() const { return m_additionalTreatments; }
50 inline bool AdditionalTreatmentsHasBeenSet() const { return m_additionalTreatmentsHasBeenSet; }
51 template <typename AdditionalTreatmentsT = Aws::Vector<WriteTreatmentResource>>
52 void SetAdditionalTreatments(AdditionalTreatmentsT&& value) {
53 m_additionalTreatmentsHasBeenSet = true;
54 m_additionalTreatments = std::forward<AdditionalTreatmentsT>(value);
55 }
56 template <typename AdditionalTreatmentsT = Aws::Vector<WriteTreatmentResource>>
57 WriteCampaignRequest& WithAdditionalTreatments(AdditionalTreatmentsT&& value) {
58 SetAdditionalTreatments(std::forward<AdditionalTreatmentsT>(value));
59 return *this;
60 }
61 template <typename AdditionalTreatmentsT = WriteTreatmentResource>
62 WriteCampaignRequest& AddAdditionalTreatments(AdditionalTreatmentsT&& value) {
63 m_additionalTreatmentsHasBeenSet = true;
64 m_additionalTreatments.emplace_back(std::forward<AdditionalTreatmentsT>(value));
65 return *this;
66 }
68
70
75 inline const CustomDeliveryConfiguration& GetCustomDeliveryConfiguration() const { return m_customDeliveryConfiguration; }
76 inline bool CustomDeliveryConfigurationHasBeenSet() const { return m_customDeliveryConfigurationHasBeenSet; }
77 template <typename CustomDeliveryConfigurationT = CustomDeliveryConfiguration>
78 void SetCustomDeliveryConfiguration(CustomDeliveryConfigurationT&& value) {
79 m_customDeliveryConfigurationHasBeenSet = true;
80 m_customDeliveryConfiguration = std::forward<CustomDeliveryConfigurationT>(value);
81 }
82 template <typename CustomDeliveryConfigurationT = CustomDeliveryConfiguration>
83 WriteCampaignRequest& WithCustomDeliveryConfiguration(CustomDeliveryConfigurationT&& value) {
84 SetCustomDeliveryConfiguration(std::forward<CustomDeliveryConfigurationT>(value));
85 return *this;
86 }
88
90
93 inline const Aws::String& GetDescription() const { return m_description; }
94 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
95 template <typename DescriptionT = Aws::String>
96 void SetDescription(DescriptionT&& value) {
97 m_descriptionHasBeenSet = true;
98 m_description = std::forward<DescriptionT>(value);
99 }
100 template <typename DescriptionT = Aws::String>
101 WriteCampaignRequest& WithDescription(DescriptionT&& value) {
102 SetDescription(std::forward<DescriptionT>(value));
103 return *this;
104 }
106
108
112 inline int GetHoldoutPercent() const { return m_holdoutPercent; }
113 inline bool HoldoutPercentHasBeenSet() const { return m_holdoutPercentHasBeenSet; }
114 inline void SetHoldoutPercent(int value) {
115 m_holdoutPercentHasBeenSet = true;
116 m_holdoutPercent = value;
117 }
119 SetHoldoutPercent(value);
120 return *this;
121 }
123
125
130 inline const CampaignHook& GetHook() const { return m_hook; }
131 inline bool HookHasBeenSet() const { return m_hookHasBeenSet; }
132 template <typename HookT = CampaignHook>
133 void SetHook(HookT&& value) {
134 m_hookHasBeenSet = true;
135 m_hook = std::forward<HookT>(value);
136 }
137 template <typename HookT = CampaignHook>
139 SetHook(std::forward<HookT>(value));
140 return *this;
141 }
143
145
149 inline bool GetIsPaused() const { return m_isPaused; }
150 inline bool IsPausedHasBeenSet() const { return m_isPausedHasBeenSet; }
151 inline void SetIsPaused(bool value) {
152 m_isPausedHasBeenSet = true;
153 m_isPaused = value;
154 }
155 inline WriteCampaignRequest& WithIsPaused(bool value) {
156 SetIsPaused(value);
157 return *this;
158 }
160
162
165 inline const CampaignLimits& GetLimits() const { return m_limits; }
166 inline bool LimitsHasBeenSet() const { return m_limitsHasBeenSet; }
167 template <typename LimitsT = CampaignLimits>
168 void SetLimits(LimitsT&& value) {
169 m_limitsHasBeenSet = true;
170 m_limits = std::forward<LimitsT>(value);
171 }
172 template <typename LimitsT = CampaignLimits>
174 SetLimits(std::forward<LimitsT>(value));
175 return *this;
176 }
178
180
183 inline const MessageConfiguration& GetMessageConfiguration() const { return m_messageConfiguration; }
184 inline bool MessageConfigurationHasBeenSet() const { return m_messageConfigurationHasBeenSet; }
185 template <typename MessageConfigurationT = MessageConfiguration>
186 void SetMessageConfiguration(MessageConfigurationT&& value) {
187 m_messageConfigurationHasBeenSet = true;
188 m_messageConfiguration = std::forward<MessageConfigurationT>(value);
189 }
190 template <typename MessageConfigurationT = MessageConfiguration>
191 WriteCampaignRequest& WithMessageConfiguration(MessageConfigurationT&& value) {
192 SetMessageConfiguration(std::forward<MessageConfigurationT>(value));
193 return *this;
194 }
196
198
201 inline const Aws::String& GetName() const { return m_name; }
202 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
203 template <typename NameT = Aws::String>
204 void SetName(NameT&& value) {
205 m_nameHasBeenSet = true;
206 m_name = std::forward<NameT>(value);
207 }
208 template <typename NameT = Aws::String>
210 SetName(std::forward<NameT>(value));
211 return *this;
212 }
214
216
219 inline const Schedule& GetSchedule() const { return m_schedule; }
220 inline bool ScheduleHasBeenSet() const { return m_scheduleHasBeenSet; }
221 template <typename ScheduleT = Schedule>
222 void SetSchedule(ScheduleT&& value) {
223 m_scheduleHasBeenSet = true;
224 m_schedule = std::forward<ScheduleT>(value);
225 }
226 template <typename ScheduleT = Schedule>
227 WriteCampaignRequest& WithSchedule(ScheduleT&& value) {
228 SetSchedule(std::forward<ScheduleT>(value));
229 return *this;
230 }
232
234
237 inline const Aws::String& GetSegmentId() const { return m_segmentId; }
238 inline bool SegmentIdHasBeenSet() const { return m_segmentIdHasBeenSet; }
239 template <typename SegmentIdT = Aws::String>
240 void SetSegmentId(SegmentIdT&& value) {
241 m_segmentIdHasBeenSet = true;
242 m_segmentId = std::forward<SegmentIdT>(value);
243 }
244 template <typename SegmentIdT = Aws::String>
245 WriteCampaignRequest& WithSegmentId(SegmentIdT&& value) {
246 SetSegmentId(std::forward<SegmentIdT>(value));
247 return *this;
248 }
250
252
255 inline int GetSegmentVersion() const { return m_segmentVersion; }
256 inline bool SegmentVersionHasBeenSet() const { return m_segmentVersionHasBeenSet; }
257 inline void SetSegmentVersion(int value) {
258 m_segmentVersionHasBeenSet = true;
259 m_segmentVersion = value;
260 }
262 SetSegmentVersion(value);
263 return *this;
264 }
266
268
281 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
282 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
283 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
284 void SetTags(TagsT&& value) {
285 m_tagsHasBeenSet = true;
286 m_tags = std::forward<TagsT>(value);
287 }
288 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
290 SetTags(std::forward<TagsT>(value));
291 return *this;
292 }
293 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
294 WriteCampaignRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
295 m_tagsHasBeenSet = true;
296 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
297 return *this;
298 }
300
302
305 inline const TemplateConfiguration& GetTemplateConfiguration() const { return m_templateConfiguration; }
306 inline bool TemplateConfigurationHasBeenSet() const { return m_templateConfigurationHasBeenSet; }
307 template <typename TemplateConfigurationT = TemplateConfiguration>
308 void SetTemplateConfiguration(TemplateConfigurationT&& value) {
309 m_templateConfigurationHasBeenSet = true;
310 m_templateConfiguration = std::forward<TemplateConfigurationT>(value);
311 }
312 template <typename TemplateConfigurationT = TemplateConfiguration>
313 WriteCampaignRequest& WithTemplateConfiguration(TemplateConfigurationT&& value) {
314 SetTemplateConfiguration(std::forward<TemplateConfigurationT>(value));
315 return *this;
316 }
318
320
323 inline const Aws::String& GetTreatmentDescription() const { return m_treatmentDescription; }
324 inline bool TreatmentDescriptionHasBeenSet() const { return m_treatmentDescriptionHasBeenSet; }
325 template <typename TreatmentDescriptionT = Aws::String>
326 void SetTreatmentDescription(TreatmentDescriptionT&& value) {
327 m_treatmentDescriptionHasBeenSet = true;
328 m_treatmentDescription = std::forward<TreatmentDescriptionT>(value);
329 }
330 template <typename TreatmentDescriptionT = Aws::String>
331 WriteCampaignRequest& WithTreatmentDescription(TreatmentDescriptionT&& value) {
332 SetTreatmentDescription(std::forward<TreatmentDescriptionT>(value));
333 return *this;
334 }
336
338
343 inline const Aws::String& GetTreatmentName() const { return m_treatmentName; }
344 inline bool TreatmentNameHasBeenSet() const { return m_treatmentNameHasBeenSet; }
345 template <typename TreatmentNameT = Aws::String>
346 void SetTreatmentName(TreatmentNameT&& value) {
347 m_treatmentNameHasBeenSet = true;
348 m_treatmentName = std::forward<TreatmentNameT>(value);
349 }
350 template <typename TreatmentNameT = Aws::String>
351 WriteCampaignRequest& WithTreatmentName(TreatmentNameT&& value) {
352 SetTreatmentName(std::forward<TreatmentNameT>(value));
353 return *this;
354 }
356
358
363 inline int GetPriority() const { return m_priority; }
364 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
365 inline void SetPriority(int value) {
366 m_priorityHasBeenSet = true;
367 m_priority = value;
368 }
370 SetPriority(value);
371 return *this;
372 }
374 private:
375 Aws::Vector<WriteTreatmentResource> m_additionalTreatments;
376 bool m_additionalTreatmentsHasBeenSet = false;
377
378 CustomDeliveryConfiguration m_customDeliveryConfiguration;
379 bool m_customDeliveryConfigurationHasBeenSet = false;
380
381 Aws::String m_description;
382 bool m_descriptionHasBeenSet = false;
383
384 int m_holdoutPercent{0};
385 bool m_holdoutPercentHasBeenSet = false;
386
387 CampaignHook m_hook;
388 bool m_hookHasBeenSet = false;
389
390 bool m_isPaused{false};
391 bool m_isPausedHasBeenSet = false;
392
393 CampaignLimits m_limits;
394 bool m_limitsHasBeenSet = false;
395
396 MessageConfiguration m_messageConfiguration;
397 bool m_messageConfigurationHasBeenSet = false;
398
399 Aws::String m_name;
400 bool m_nameHasBeenSet = false;
401
402 Schedule m_schedule;
403 bool m_scheduleHasBeenSet = false;
404
405 Aws::String m_segmentId;
406 bool m_segmentIdHasBeenSet = false;
407
408 int m_segmentVersion{0};
409 bool m_segmentVersionHasBeenSet = false;
410
412 bool m_tagsHasBeenSet = false;
413
414 TemplateConfiguration m_templateConfiguration;
415 bool m_templateConfigurationHasBeenSet = false;
416
417 Aws::String m_treatmentDescription;
418 bool m_treatmentDescriptionHasBeenSet = false;
419
420 Aws::String m_treatmentName;
421 bool m_treatmentNameHasBeenSet = false;
422
423 int m_priority{0};
424 bool m_priorityHasBeenSet = false;
425};
426
427} // namespace Model
428} // namespace Pinpoint
429} // namespace Aws
void SetCustomDeliveryConfiguration(CustomDeliveryConfigurationT &&value)
WriteCampaignRequest & WithMessageConfiguration(MessageConfigurationT &&value)
WriteCampaignRequest & WithCustomDeliveryConfiguration(CustomDeliveryConfigurationT &&value)
void SetTemplateConfiguration(TemplateConfigurationT &&value)
AWS_PINPOINT_API Aws::Utils::Json::JsonValue Jsonize() const
WriteCampaignRequest & WithHoldoutPercent(int value)
WriteCampaignRequest & AddAdditionalTreatments(AdditionalTreatmentsT &&value)
const MessageConfiguration & GetMessageConfiguration() const
const CustomDeliveryConfiguration & GetCustomDeliveryConfiguration() const
WriteCampaignRequest & WithTemplateConfiguration(TemplateConfigurationT &&value)
WriteCampaignRequest & WithTreatmentDescription(TreatmentDescriptionT &&value)
AWS_PINPOINT_API WriteCampaignRequest(Aws::Utils::Json::JsonView jsonValue)
AWS_PINPOINT_API WriteCampaignRequest & operator=(Aws::Utils::Json::JsonView jsonValue)
WriteCampaignRequest & WithTreatmentName(TreatmentNameT &&value)
WriteCampaignRequest & WithSegmentVersion(int value)
void SetAdditionalTreatments(AdditionalTreatmentsT &&value)
WriteCampaignRequest & WithAdditionalTreatments(AdditionalTreatmentsT &&value)
WriteCampaignRequest & WithTags(TagsT &&value)
const Aws::Vector< WriteTreatmentResource > & GetAdditionalTreatments() const
const Aws::Map< Aws::String, Aws::String > & GetTags() const
WriteCampaignRequest & WithIsPaused(bool value)
WriteCampaignRequest & WithHook(HookT &&value)
WriteCampaignRequest & WithPriority(int value)
WriteCampaignRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
void SetMessageConfiguration(MessageConfigurationT &&value)
WriteCampaignRequest & WithSchedule(ScheduleT &&value)
WriteCampaignRequest & WithLimits(LimitsT &&value)
AWS_PINPOINT_API WriteCampaignRequest()=default
const Aws::String & GetTreatmentDescription() const
WriteCampaignRequest & WithSegmentId(SegmentIdT &&value)
void SetTreatmentDescription(TreatmentDescriptionT &&value)
WriteCampaignRequest & WithDescription(DescriptionT &&value)
const TemplateConfiguration & GetTemplateConfiguration() const
WriteCampaignRequest & WithName(NameT &&value)
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
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue