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/pinpoint/PinpointRequest.h> 9 #include <aws/pinpoint/model/PushNotificationTemplateRequest.h> 10 #include <aws/core/utils/memory/stl/AWSString.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace Http 16 { 17 class URI; 18 } //namespace Http 19 namespace Pinpoint 20 { 21 namespace Model 22 { 23 24 /** 25 */ 26 class AWS_PINPOINT_API UpdatePushTemplateRequest : public PinpointRequest 27 { 28 public: 29 UpdatePushTemplateRequest(); 30 31 // Service request name is the Operation name which will send this request out, 32 // each operation should has unique request name, so that we can get operation's name from this request. 33 // Note: this is not true for response, multiple operations may have the same response name, 34 // so we can not get operation's name from response. GetServiceRequestName()35 inline virtual const char* GetServiceRequestName() const override { return "UpdatePushTemplate"; } 36 37 Aws::String SerializePayload() const override; 38 39 void AddQueryStringParameters(Aws::Http::URI& uri) const override; 40 41 42 /** 43 * <p>Specifies whether to save the updates as a new version of the message 44 * template. Valid values are: true, save the updates as a new version; and, false, 45 * save the updates to (overwrite) the latest existing version of the template.</p> 46 * <p>If you don't specify a value for this parameter, Amazon Pinpoint saves the 47 * updates to (overwrites) the latest existing version of the template. If you 48 * specify a value of true for this parameter, don't specify a value for the 49 * version parameter. Otherwise, an error will occur.</p> 50 */ GetCreateNewVersion()51 inline bool GetCreateNewVersion() const{ return m_createNewVersion; } 52 53 /** 54 * <p>Specifies whether to save the updates as a new version of the message 55 * template. Valid values are: true, save the updates as a new version; and, false, 56 * save the updates to (overwrite) the latest existing version of the template.</p> 57 * <p>If you don't specify a value for this parameter, Amazon Pinpoint saves the 58 * updates to (overwrites) the latest existing version of the template. If you 59 * specify a value of true for this parameter, don't specify a value for the 60 * version parameter. Otherwise, an error will occur.</p> 61 */ CreateNewVersionHasBeenSet()62 inline bool CreateNewVersionHasBeenSet() const { return m_createNewVersionHasBeenSet; } 63 64 /** 65 * <p>Specifies whether to save the updates as a new version of the message 66 * template. Valid values are: true, save the updates as a new version; and, false, 67 * save the updates to (overwrite) the latest existing version of the template.</p> 68 * <p>If you don't specify a value for this parameter, Amazon Pinpoint saves the 69 * updates to (overwrites) the latest existing version of the template. If you 70 * specify a value of true for this parameter, don't specify a value for the 71 * version parameter. Otherwise, an error will occur.</p> 72 */ SetCreateNewVersion(bool value)73 inline void SetCreateNewVersion(bool value) { m_createNewVersionHasBeenSet = true; m_createNewVersion = value; } 74 75 /** 76 * <p>Specifies whether to save the updates as a new version of the message 77 * template. Valid values are: true, save the updates as a new version; and, false, 78 * save the updates to (overwrite) the latest existing version of the template.</p> 79 * <p>If you don't specify a value for this parameter, Amazon Pinpoint saves the 80 * updates to (overwrites) the latest existing version of the template. If you 81 * specify a value of true for this parameter, don't specify a value for the 82 * version parameter. Otherwise, an error will occur.</p> 83 */ WithCreateNewVersion(bool value)84 inline UpdatePushTemplateRequest& WithCreateNewVersion(bool value) { SetCreateNewVersion(value); return *this;} 85 86 87 GetPushNotificationTemplateRequest()88 inline const PushNotificationTemplateRequest& GetPushNotificationTemplateRequest() const{ return m_pushNotificationTemplateRequest; } 89 90 PushNotificationTemplateRequestHasBeenSet()91 inline bool PushNotificationTemplateRequestHasBeenSet() const { return m_pushNotificationTemplateRequestHasBeenSet; } 92 93 SetPushNotificationTemplateRequest(const PushNotificationTemplateRequest & value)94 inline void SetPushNotificationTemplateRequest(const PushNotificationTemplateRequest& value) { m_pushNotificationTemplateRequestHasBeenSet = true; m_pushNotificationTemplateRequest = value; } 95 96 SetPushNotificationTemplateRequest(PushNotificationTemplateRequest && value)97 inline void SetPushNotificationTemplateRequest(PushNotificationTemplateRequest&& value) { m_pushNotificationTemplateRequestHasBeenSet = true; m_pushNotificationTemplateRequest = std::move(value); } 98 99 WithPushNotificationTemplateRequest(const PushNotificationTemplateRequest & value)100 inline UpdatePushTemplateRequest& WithPushNotificationTemplateRequest(const PushNotificationTemplateRequest& value) { SetPushNotificationTemplateRequest(value); return *this;} 101 102 WithPushNotificationTemplateRequest(PushNotificationTemplateRequest && value)103 inline UpdatePushTemplateRequest& WithPushNotificationTemplateRequest(PushNotificationTemplateRequest&& value) { SetPushNotificationTemplateRequest(std::move(value)); return *this;} 104 105 106 /** 107 * <p>The name of the message template. A template name must start with an 108 * alphanumeric character and can contain a maximum of 128 characters. The 109 * characters can be alphanumeric characters, underscores (_), or hyphens (-). 110 * Template names are case sensitive.</p> 111 */ GetTemplateName()112 inline const Aws::String& GetTemplateName() const{ return m_templateName; } 113 114 /** 115 * <p>The name of the message template. A template name must start with an 116 * alphanumeric character and can contain a maximum of 128 characters. The 117 * characters can be alphanumeric characters, underscores (_), or hyphens (-). 118 * Template names are case sensitive.</p> 119 */ TemplateNameHasBeenSet()120 inline bool TemplateNameHasBeenSet() const { return m_templateNameHasBeenSet; } 121 122 /** 123 * <p>The name of the message template. A template name must start with an 124 * alphanumeric character and can contain a maximum of 128 characters. The 125 * characters can be alphanumeric characters, underscores (_), or hyphens (-). 126 * Template names are case sensitive.</p> 127 */ SetTemplateName(const Aws::String & value)128 inline void SetTemplateName(const Aws::String& value) { m_templateNameHasBeenSet = true; m_templateName = value; } 129 130 /** 131 * <p>The name of the message template. A template name must start with an 132 * alphanumeric character and can contain a maximum of 128 characters. The 133 * characters can be alphanumeric characters, underscores (_), or hyphens (-). 134 * Template names are case sensitive.</p> 135 */ SetTemplateName(Aws::String && value)136 inline void SetTemplateName(Aws::String&& value) { m_templateNameHasBeenSet = true; m_templateName = std::move(value); } 137 138 /** 139 * <p>The name of the message template. A template name must start with an 140 * alphanumeric character and can contain a maximum of 128 characters. The 141 * characters can be alphanumeric characters, underscores (_), or hyphens (-). 142 * Template names are case sensitive.</p> 143 */ SetTemplateName(const char * value)144 inline void SetTemplateName(const char* value) { m_templateNameHasBeenSet = true; m_templateName.assign(value); } 145 146 /** 147 * <p>The name of the message template. A template name must start with an 148 * alphanumeric character and can contain a maximum of 128 characters. The 149 * characters can be alphanumeric characters, underscores (_), or hyphens (-). 150 * Template names are case sensitive.</p> 151 */ WithTemplateName(const Aws::String & value)152 inline UpdatePushTemplateRequest& WithTemplateName(const Aws::String& value) { SetTemplateName(value); return *this;} 153 154 /** 155 * <p>The name of the message template. A template name must start with an 156 * alphanumeric character and can contain a maximum of 128 characters. The 157 * characters can be alphanumeric characters, underscores (_), or hyphens (-). 158 * Template names are case sensitive.</p> 159 */ WithTemplateName(Aws::String && value)160 inline UpdatePushTemplateRequest& WithTemplateName(Aws::String&& value) { SetTemplateName(std::move(value)); return *this;} 161 162 /** 163 * <p>The name of the message template. A template name must start with an 164 * alphanumeric character and can contain a maximum of 128 characters. The 165 * characters can be alphanumeric characters, underscores (_), or hyphens (-). 166 * Template names are case sensitive.</p> 167 */ WithTemplateName(const char * value)168 inline UpdatePushTemplateRequest& WithTemplateName(const char* value) { SetTemplateName(value); return *this;} 169 170 171 /** 172 * <p>The unique identifier for the version of the message template to update, 173 * retrieve information about, or delete. To retrieve identifiers and other 174 * information for all the versions of a template, use the <link 175 * linkend="templates-template-name-template-type-versions">Template 176 * Versions</link> resource.</p> <p>If specified, this value must match the 177 * identifier for an existing template version. If specified for an update 178 * operation, this value must match the identifier for the latest existing version 179 * of the template. This restriction helps ensure that race conditions don't 180 * occur.</p> <p>If you don't specify a value for this parameter, Amazon Pinpoint 181 * does the following:</p> <ul><li><p>For a get operation, retrieves information 182 * about the active version of the template.</p></li> <li><p>For an update 183 * operation, saves the updates to (overwrites) the latest existing version of the 184 * template, if the create-new-version parameter isn't used or is set to 185 * false.</p></li> <li><p>For a delete operation, deletes the template, including 186 * all versions of the template.</p></li></ul> 187 */ GetVersion()188 inline const Aws::String& GetVersion() const{ return m_version; } 189 190 /** 191 * <p>The unique identifier for the version of the message template to update, 192 * retrieve information about, or delete. To retrieve identifiers and other 193 * information for all the versions of a template, use the <link 194 * linkend="templates-template-name-template-type-versions">Template 195 * Versions</link> resource.</p> <p>If specified, this value must match the 196 * identifier for an existing template version. If specified for an update 197 * operation, this value must match the identifier for the latest existing version 198 * of the template. This restriction helps ensure that race conditions don't 199 * occur.</p> <p>If you don't specify a value for this parameter, Amazon Pinpoint 200 * does the following:</p> <ul><li><p>For a get operation, retrieves information 201 * about the active version of the template.</p></li> <li><p>For an update 202 * operation, saves the updates to (overwrites) the latest existing version of the 203 * template, if the create-new-version parameter isn't used or is set to 204 * false.</p></li> <li><p>For a delete operation, deletes the template, including 205 * all versions of the template.</p></li></ul> 206 */ VersionHasBeenSet()207 inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; } 208 209 /** 210 * <p>The unique identifier for the version of the message template to update, 211 * retrieve information about, or delete. To retrieve identifiers and other 212 * information for all the versions of a template, use the <link 213 * linkend="templates-template-name-template-type-versions">Template 214 * Versions</link> resource.</p> <p>If specified, this value must match the 215 * identifier for an existing template version. If specified for an update 216 * operation, this value must match the identifier for the latest existing version 217 * of the template. This restriction helps ensure that race conditions don't 218 * occur.</p> <p>If you don't specify a value for this parameter, Amazon Pinpoint 219 * does the following:</p> <ul><li><p>For a get operation, retrieves information 220 * about the active version of the template.</p></li> <li><p>For an update 221 * operation, saves the updates to (overwrites) the latest existing version of the 222 * template, if the create-new-version parameter isn't used or is set to 223 * false.</p></li> <li><p>For a delete operation, deletes the template, including 224 * all versions of the template.</p></li></ul> 225 */ SetVersion(const Aws::String & value)226 inline void SetVersion(const Aws::String& value) { m_versionHasBeenSet = true; m_version = value; } 227 228 /** 229 * <p>The unique identifier for the version of the message template to update, 230 * retrieve information about, or delete. To retrieve identifiers and other 231 * information for all the versions of a template, use the <link 232 * linkend="templates-template-name-template-type-versions">Template 233 * Versions</link> resource.</p> <p>If specified, this value must match the 234 * identifier for an existing template version. If specified for an update 235 * operation, this value must match the identifier for the latest existing version 236 * of the template. This restriction helps ensure that race conditions don't 237 * occur.</p> <p>If you don't specify a value for this parameter, Amazon Pinpoint 238 * does the following:</p> <ul><li><p>For a get operation, retrieves information 239 * about the active version of the template.</p></li> <li><p>For an update 240 * operation, saves the updates to (overwrites) the latest existing version of the 241 * template, if the create-new-version parameter isn't used or is set to 242 * false.</p></li> <li><p>For a delete operation, deletes the template, including 243 * all versions of the template.</p></li></ul> 244 */ SetVersion(Aws::String && value)245 inline void SetVersion(Aws::String&& value) { m_versionHasBeenSet = true; m_version = std::move(value); } 246 247 /** 248 * <p>The unique identifier for the version of the message template to update, 249 * retrieve information about, or delete. To retrieve identifiers and other 250 * information for all the versions of a template, use the <link 251 * linkend="templates-template-name-template-type-versions">Template 252 * Versions</link> resource.</p> <p>If specified, this value must match the 253 * identifier for an existing template version. If specified for an update 254 * operation, this value must match the identifier for the latest existing version 255 * of the template. This restriction helps ensure that race conditions don't 256 * occur.</p> <p>If you don't specify a value for this parameter, Amazon Pinpoint 257 * does the following:</p> <ul><li><p>For a get operation, retrieves information 258 * about the active version of the template.</p></li> <li><p>For an update 259 * operation, saves the updates to (overwrites) the latest existing version of the 260 * template, if the create-new-version parameter isn't used or is set to 261 * false.</p></li> <li><p>For a delete operation, deletes the template, including 262 * all versions of the template.</p></li></ul> 263 */ SetVersion(const char * value)264 inline void SetVersion(const char* value) { m_versionHasBeenSet = true; m_version.assign(value); } 265 266 /** 267 * <p>The unique identifier for the version of the message template to update, 268 * retrieve information about, or delete. To retrieve identifiers and other 269 * information for all the versions of a template, use the <link 270 * linkend="templates-template-name-template-type-versions">Template 271 * Versions</link> resource.</p> <p>If specified, this value must match the 272 * identifier for an existing template version. If specified for an update 273 * operation, this value must match the identifier for the latest existing version 274 * of the template. This restriction helps ensure that race conditions don't 275 * occur.</p> <p>If you don't specify a value for this parameter, Amazon Pinpoint 276 * does the following:</p> <ul><li><p>For a get operation, retrieves information 277 * about the active version of the template.</p></li> <li><p>For an update 278 * operation, saves the updates to (overwrites) the latest existing version of the 279 * template, if the create-new-version parameter isn't used or is set to 280 * false.</p></li> <li><p>For a delete operation, deletes the template, including 281 * all versions of the template.</p></li></ul> 282 */ WithVersion(const Aws::String & value)283 inline UpdatePushTemplateRequest& WithVersion(const Aws::String& value) { SetVersion(value); return *this;} 284 285 /** 286 * <p>The unique identifier for the version of the message template to update, 287 * retrieve information about, or delete. To retrieve identifiers and other 288 * information for all the versions of a template, use the <link 289 * linkend="templates-template-name-template-type-versions">Template 290 * Versions</link> resource.</p> <p>If specified, this value must match the 291 * identifier for an existing template version. If specified for an update 292 * operation, this value must match the identifier for the latest existing version 293 * of the template. This restriction helps ensure that race conditions don't 294 * occur.</p> <p>If you don't specify a value for this parameter, Amazon Pinpoint 295 * does the following:</p> <ul><li><p>For a get operation, retrieves information 296 * about the active version of the template.</p></li> <li><p>For an update 297 * operation, saves the updates to (overwrites) the latest existing version of the 298 * template, if the create-new-version parameter isn't used or is set to 299 * false.</p></li> <li><p>For a delete operation, deletes the template, including 300 * all versions of the template.</p></li></ul> 301 */ WithVersion(Aws::String && value)302 inline UpdatePushTemplateRequest& WithVersion(Aws::String&& value) { SetVersion(std::move(value)); return *this;} 303 304 /** 305 * <p>The unique identifier for the version of the message template to update, 306 * retrieve information about, or delete. To retrieve identifiers and other 307 * information for all the versions of a template, use the <link 308 * linkend="templates-template-name-template-type-versions">Template 309 * Versions</link> resource.</p> <p>If specified, this value must match the 310 * identifier for an existing template version. If specified for an update 311 * operation, this value must match the identifier for the latest existing version 312 * of the template. This restriction helps ensure that race conditions don't 313 * occur.</p> <p>If you don't specify a value for this parameter, Amazon Pinpoint 314 * does the following:</p> <ul><li><p>For a get operation, retrieves information 315 * about the active version of the template.</p></li> <li><p>For an update 316 * operation, saves the updates to (overwrites) the latest existing version of the 317 * template, if the create-new-version parameter isn't used or is set to 318 * false.</p></li> <li><p>For a delete operation, deletes the template, including 319 * all versions of the template.</p></li></ul> 320 */ WithVersion(const char * value)321 inline UpdatePushTemplateRequest& WithVersion(const char* value) { SetVersion(value); return *this;} 322 323 private: 324 325 bool m_createNewVersion; 326 bool m_createNewVersionHasBeenSet; 327 328 PushNotificationTemplateRequest m_pushNotificationTemplateRequest; 329 bool m_pushNotificationTemplateRequestHasBeenSet; 330 331 Aws::String m_templateName; 332 bool m_templateNameHasBeenSet; 333 334 Aws::String m_version; 335 bool m_versionHasBeenSet; 336 }; 337 338 } // namespace Model 339 } // namespace Pinpoint 340 } // namespace Aws 341