1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/pinpoint/Pinpoint_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <aws/core/utils/memory/stl/AWSMap.h> 10 #include <utility> 11 12 namespace Aws 13 { 14 namespace Utils 15 { 16 namespace Json 17 { 18 class JsonValue; 19 class JsonView; 20 } // namespace Json 21 } // namespace Utils 22 namespace Pinpoint 23 { 24 namespace Model 25 { 26 27 /** 28 * <p>Specifies the content and settings for a message template that can be used in 29 * text messages that are sent through the SMS channel.</p><p><h3>See Also:</h3> 30 * <a 31 * href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SMSTemplateRequest">AWS 32 * API Reference</a></p> 33 */ 34 class AWS_PINPOINT_API SMSTemplateRequest 35 { 36 public: 37 SMSTemplateRequest(); 38 SMSTemplateRequest(Aws::Utils::Json::JsonView jsonValue); 39 SMSTemplateRequest& operator=(Aws::Utils::Json::JsonView jsonValue); 40 Aws::Utils::Json::JsonValue Jsonize() const; 41 42 43 /** 44 * <p>The message body to use in text messages that are based on the message 45 * template.</p> 46 */ GetBody()47 inline const Aws::String& GetBody() const{ return m_body; } 48 49 /** 50 * <p>The message body to use in text messages that are based on the message 51 * template.</p> 52 */ BodyHasBeenSet()53 inline bool BodyHasBeenSet() const { return m_bodyHasBeenSet; } 54 55 /** 56 * <p>The message body to use in text messages that are based on the message 57 * template.</p> 58 */ SetBody(const Aws::String & value)59 inline void SetBody(const Aws::String& value) { m_bodyHasBeenSet = true; m_body = value; } 60 61 /** 62 * <p>The message body to use in text messages that are based on the message 63 * template.</p> 64 */ SetBody(Aws::String && value)65 inline void SetBody(Aws::String&& value) { m_bodyHasBeenSet = true; m_body = std::move(value); } 66 67 /** 68 * <p>The message body to use in text messages that are based on the message 69 * template.</p> 70 */ SetBody(const char * value)71 inline void SetBody(const char* value) { m_bodyHasBeenSet = true; m_body.assign(value); } 72 73 /** 74 * <p>The message body to use in text messages that are based on the message 75 * template.</p> 76 */ WithBody(const Aws::String & value)77 inline SMSTemplateRequest& WithBody(const Aws::String& value) { SetBody(value); return *this;} 78 79 /** 80 * <p>The message body to use in text messages that are based on the message 81 * template.</p> 82 */ WithBody(Aws::String && value)83 inline SMSTemplateRequest& WithBody(Aws::String&& value) { SetBody(std::move(value)); return *this;} 84 85 /** 86 * <p>The message body to use in text messages that are based on the message 87 * template.</p> 88 */ WithBody(const char * value)89 inline SMSTemplateRequest& WithBody(const char* value) { SetBody(value); return *this;} 90 91 92 /** 93 * <p>A JSON object that specifies the default values to use for message variables 94 * in the message template. This object is a set of key-value pairs. Each key 95 * defines a message variable in the template. The corresponding value defines the 96 * default value for that variable. When you create a message that's based on the 97 * template, you can override these defaults with message-specific and 98 * address-specific variables and values.</p> 99 */ GetDefaultSubstitutions()100 inline const Aws::String& GetDefaultSubstitutions() const{ return m_defaultSubstitutions; } 101 102 /** 103 * <p>A JSON object that specifies the default values to use for message variables 104 * in the message template. This object is a set of key-value pairs. Each key 105 * defines a message variable in the template. The corresponding value defines the 106 * default value for that variable. When you create a message that's based on the 107 * template, you can override these defaults with message-specific and 108 * address-specific variables and values.</p> 109 */ DefaultSubstitutionsHasBeenSet()110 inline bool DefaultSubstitutionsHasBeenSet() const { return m_defaultSubstitutionsHasBeenSet; } 111 112 /** 113 * <p>A JSON object that specifies the default values to use for message variables 114 * in the message template. This object is a set of key-value pairs. Each key 115 * defines a message variable in the template. The corresponding value defines the 116 * default value for that variable. When you create a message that's based on the 117 * template, you can override these defaults with message-specific and 118 * address-specific variables and values.</p> 119 */ SetDefaultSubstitutions(const Aws::String & value)120 inline void SetDefaultSubstitutions(const Aws::String& value) { m_defaultSubstitutionsHasBeenSet = true; m_defaultSubstitutions = value; } 121 122 /** 123 * <p>A JSON object that specifies the default values to use for message variables 124 * in the message template. This object is a set of key-value pairs. Each key 125 * defines a message variable in the template. The corresponding value defines the 126 * default value for that variable. When you create a message that's based on the 127 * template, you can override these defaults with message-specific and 128 * address-specific variables and values.</p> 129 */ SetDefaultSubstitutions(Aws::String && value)130 inline void SetDefaultSubstitutions(Aws::String&& value) { m_defaultSubstitutionsHasBeenSet = true; m_defaultSubstitutions = std::move(value); } 131 132 /** 133 * <p>A JSON object that specifies the default values to use for message variables 134 * in the message template. This object is a set of key-value pairs. Each key 135 * defines a message variable in the template. The corresponding value defines the 136 * default value for that variable. When you create a message that's based on the 137 * template, you can override these defaults with message-specific and 138 * address-specific variables and values.</p> 139 */ SetDefaultSubstitutions(const char * value)140 inline void SetDefaultSubstitutions(const char* value) { m_defaultSubstitutionsHasBeenSet = true; m_defaultSubstitutions.assign(value); } 141 142 /** 143 * <p>A JSON object that specifies the default values to use for message variables 144 * in the message template. This object is a set of key-value pairs. Each key 145 * defines a message variable in the template. The corresponding value defines the 146 * default value for that variable. When you create a message that's based on the 147 * template, you can override these defaults with message-specific and 148 * address-specific variables and values.</p> 149 */ WithDefaultSubstitutions(const Aws::String & value)150 inline SMSTemplateRequest& WithDefaultSubstitutions(const Aws::String& value) { SetDefaultSubstitutions(value); return *this;} 151 152 /** 153 * <p>A JSON object that specifies the default values to use for message variables 154 * in the message template. This object is a set of key-value pairs. Each key 155 * defines a message variable in the template. The corresponding value defines the 156 * default value for that variable. When you create a message that's based on the 157 * template, you can override these defaults with message-specific and 158 * address-specific variables and values.</p> 159 */ WithDefaultSubstitutions(Aws::String && value)160 inline SMSTemplateRequest& WithDefaultSubstitutions(Aws::String&& value) { SetDefaultSubstitutions(std::move(value)); return *this;} 161 162 /** 163 * <p>A JSON object that specifies the default values to use for message variables 164 * in the message template. This object is a set of key-value pairs. Each key 165 * defines a message variable in the template. The corresponding value defines the 166 * default value for that variable. When you create a message that's based on the 167 * template, you can override these defaults with message-specific and 168 * address-specific variables and values.</p> 169 */ WithDefaultSubstitutions(const char * value)170 inline SMSTemplateRequest& WithDefaultSubstitutions(const char* value) { SetDefaultSubstitutions(value); return *this;} 171 172 173 /** 174 * <p>The unique identifier for the recommender model to use for the message 175 * template. Amazon Pinpoint uses this value to determine how to retrieve and 176 * process data from a recommender model when it sends messages that use the 177 * template, if the template contains message variables for recommendation 178 * data.</p> 179 */ GetRecommenderId()180 inline const Aws::String& GetRecommenderId() const{ return m_recommenderId; } 181 182 /** 183 * <p>The unique identifier for the recommender model to use for the message 184 * template. Amazon Pinpoint uses this value to determine how to retrieve and 185 * process data from a recommender model when it sends messages that use the 186 * template, if the template contains message variables for recommendation 187 * data.</p> 188 */ RecommenderIdHasBeenSet()189 inline bool RecommenderIdHasBeenSet() const { return m_recommenderIdHasBeenSet; } 190 191 /** 192 * <p>The unique identifier for the recommender model to use for the message 193 * template. Amazon Pinpoint uses this value to determine how to retrieve and 194 * process data from a recommender model when it sends messages that use the 195 * template, if the template contains message variables for recommendation 196 * data.</p> 197 */ SetRecommenderId(const Aws::String & value)198 inline void SetRecommenderId(const Aws::String& value) { m_recommenderIdHasBeenSet = true; m_recommenderId = value; } 199 200 /** 201 * <p>The unique identifier for the recommender model to use for the message 202 * template. Amazon Pinpoint uses this value to determine how to retrieve and 203 * process data from a recommender model when it sends messages that use the 204 * template, if the template contains message variables for recommendation 205 * data.</p> 206 */ SetRecommenderId(Aws::String && value)207 inline void SetRecommenderId(Aws::String&& value) { m_recommenderIdHasBeenSet = true; m_recommenderId = std::move(value); } 208 209 /** 210 * <p>The unique identifier for the recommender model to use for the message 211 * template. Amazon Pinpoint uses this value to determine how to retrieve and 212 * process data from a recommender model when it sends messages that use the 213 * template, if the template contains message variables for recommendation 214 * data.</p> 215 */ SetRecommenderId(const char * value)216 inline void SetRecommenderId(const char* value) { m_recommenderIdHasBeenSet = true; m_recommenderId.assign(value); } 217 218 /** 219 * <p>The unique identifier for the recommender model to use for the message 220 * template. Amazon Pinpoint uses this value to determine how to retrieve and 221 * process data from a recommender model when it sends messages that use the 222 * template, if the template contains message variables for recommendation 223 * data.</p> 224 */ WithRecommenderId(const Aws::String & value)225 inline SMSTemplateRequest& WithRecommenderId(const Aws::String& value) { SetRecommenderId(value); return *this;} 226 227 /** 228 * <p>The unique identifier for the recommender model to use for the message 229 * template. Amazon Pinpoint uses this value to determine how to retrieve and 230 * process data from a recommender model when it sends messages that use the 231 * template, if the template contains message variables for recommendation 232 * data.</p> 233 */ WithRecommenderId(Aws::String && value)234 inline SMSTemplateRequest& WithRecommenderId(Aws::String&& value) { SetRecommenderId(std::move(value)); return *this;} 235 236 /** 237 * <p>The unique identifier for the recommender model to use for the message 238 * template. Amazon Pinpoint uses this value to determine how to retrieve and 239 * process data from a recommender model when it sends messages that use the 240 * template, if the template contains message variables for recommendation 241 * data.</p> 242 */ WithRecommenderId(const char * value)243 inline SMSTemplateRequest& WithRecommenderId(const char* value) { SetRecommenderId(value); return *this;} 244 245 246 /** 247 * <p>A string-to-string map of key-value pairs that defines the tags to associate 248 * with the message template. Each tag consists of a required tag key and an 249 * associated tag value.</p> 250 */ GetTags()251 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; } 252 253 /** 254 * <p>A string-to-string map of key-value pairs that defines the tags to associate 255 * with the message template. Each tag consists of a required tag key and an 256 * associated tag value.</p> 257 */ TagsHasBeenSet()258 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } 259 260 /** 261 * <p>A string-to-string map of key-value pairs that defines the tags to associate 262 * with the message template. Each tag consists of a required tag key and an 263 * associated tag value.</p> 264 */ SetTags(const Aws::Map<Aws::String,Aws::String> & value)265 inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; } 266 267 /** 268 * <p>A string-to-string map of key-value pairs that defines the tags to associate 269 * with the message template. Each tag consists of a required tag key and an 270 * associated tag value.</p> 271 */ SetTags(Aws::Map<Aws::String,Aws::String> && value)272 inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } 273 274 /** 275 * <p>A string-to-string map of key-value pairs that defines the tags to associate 276 * with the message template. Each tag consists of a required tag key and an 277 * associated tag value.</p> 278 */ WithTags(const Aws::Map<Aws::String,Aws::String> & value)279 inline SMSTemplateRequest& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;} 280 281 /** 282 * <p>A string-to-string map of key-value pairs that defines the tags to associate 283 * with the message template. Each tag consists of a required tag key and an 284 * associated tag value.</p> 285 */ WithTags(Aws::Map<Aws::String,Aws::String> && value)286 inline SMSTemplateRequest& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;} 287 288 /** 289 * <p>A string-to-string map of key-value pairs that defines the tags to associate 290 * with the message template. Each tag consists of a required tag key and an 291 * associated tag value.</p> 292 */ AddTags(const Aws::String & key,const Aws::String & value)293 inline SMSTemplateRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } 294 295 /** 296 * <p>A string-to-string map of key-value pairs that defines the tags to associate 297 * with the message template. Each tag consists of a required tag key and an 298 * associated tag value.</p> 299 */ AddTags(Aws::String && key,const Aws::String & value)300 inline SMSTemplateRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } 301 302 /** 303 * <p>A string-to-string map of key-value pairs that defines the tags to associate 304 * with the message template. Each tag consists of a required tag key and an 305 * associated tag value.</p> 306 */ AddTags(const Aws::String & key,Aws::String && value)307 inline SMSTemplateRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } 308 309 /** 310 * <p>A string-to-string map of key-value pairs that defines the tags to associate 311 * with the message template. Each tag consists of a required tag key and an 312 * associated tag value.</p> 313 */ AddTags(Aws::String && key,Aws::String && value)314 inline SMSTemplateRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } 315 316 /** 317 * <p>A string-to-string map of key-value pairs that defines the tags to associate 318 * with the message template. Each tag consists of a required tag key and an 319 * associated tag value.</p> 320 */ AddTags(const char * key,Aws::String && value)321 inline SMSTemplateRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } 322 323 /** 324 * <p>A string-to-string map of key-value pairs that defines the tags to associate 325 * with the message template. Each tag consists of a required tag key and an 326 * associated tag value.</p> 327 */ AddTags(Aws::String && key,const char * value)328 inline SMSTemplateRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } 329 330 /** 331 * <p>A string-to-string map of key-value pairs that defines the tags to associate 332 * with the message template. Each tag consists of a required tag key and an 333 * associated tag value.</p> 334 */ AddTags(const char * key,const char * value)335 inline SMSTemplateRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } 336 337 338 /** 339 * <p>A custom description of the message template.</p> 340 */ GetTemplateDescription()341 inline const Aws::String& GetTemplateDescription() const{ return m_templateDescription; } 342 343 /** 344 * <p>A custom description of the message template.</p> 345 */ TemplateDescriptionHasBeenSet()346 inline bool TemplateDescriptionHasBeenSet() const { return m_templateDescriptionHasBeenSet; } 347 348 /** 349 * <p>A custom description of the message template.</p> 350 */ SetTemplateDescription(const Aws::String & value)351 inline void SetTemplateDescription(const Aws::String& value) { m_templateDescriptionHasBeenSet = true; m_templateDescription = value; } 352 353 /** 354 * <p>A custom description of the message template.</p> 355 */ SetTemplateDescription(Aws::String && value)356 inline void SetTemplateDescription(Aws::String&& value) { m_templateDescriptionHasBeenSet = true; m_templateDescription = std::move(value); } 357 358 /** 359 * <p>A custom description of the message template.</p> 360 */ SetTemplateDescription(const char * value)361 inline void SetTemplateDescription(const char* value) { m_templateDescriptionHasBeenSet = true; m_templateDescription.assign(value); } 362 363 /** 364 * <p>A custom description of the message template.</p> 365 */ WithTemplateDescription(const Aws::String & value)366 inline SMSTemplateRequest& WithTemplateDescription(const Aws::String& value) { SetTemplateDescription(value); return *this;} 367 368 /** 369 * <p>A custom description of the message template.</p> 370 */ WithTemplateDescription(Aws::String && value)371 inline SMSTemplateRequest& WithTemplateDescription(Aws::String&& value) { SetTemplateDescription(std::move(value)); return *this;} 372 373 /** 374 * <p>A custom description of the message template.</p> 375 */ WithTemplateDescription(const char * value)376 inline SMSTemplateRequest& WithTemplateDescription(const char* value) { SetTemplateDescription(value); return *this;} 377 378 private: 379 380 Aws::String m_body; 381 bool m_bodyHasBeenSet; 382 383 Aws::String m_defaultSubstitutions; 384 bool m_defaultSubstitutionsHasBeenSet; 385 386 Aws::String m_recommenderId; 387 bool m_recommenderIdHasBeenSet; 388 389 Aws::Map<Aws::String, Aws::String> m_tags; 390 bool m_tagsHasBeenSet; 391 392 Aws::String m_templateDescription; 393 bool m_templateDescriptionHasBeenSet; 394 }; 395 396 } // namespace Model 397 } // namespace Pinpoint 398 } // namespace Aws 399