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/sns/SNS_EXPORTS.h> 8 #include <aws/sns/SNSRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/core/utils/memory/stl/AWSMap.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace SNS 16 { 17 namespace Model 18 { 19 20 /** 21 * <p>Input for SetEndpointAttributes action.</p><p><h3>See Also:</h3> <a 22 * href="http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SetEndpointAttributesInput">AWS 23 * API Reference</a></p> 24 */ 25 class AWS_SNS_API SetEndpointAttributesRequest : public SNSRequest 26 { 27 public: 28 SetEndpointAttributesRequest(); 29 30 // Service request name is the Operation name which will send this request out, 31 // each operation should has unique request name, so that we can get operation's name from this request. 32 // Note: this is not true for response, multiple operations may have the same response name, 33 // so we can not get operation's name from response. GetServiceRequestName()34 inline virtual const char* GetServiceRequestName() const override { return "SetEndpointAttributes"; } 35 36 Aws::String SerializePayload() const override; 37 38 protected: 39 void DumpBodyToUrl(Aws::Http::URI& uri ) const override; 40 41 public: 42 43 /** 44 * <p>EndpointArn used for SetEndpointAttributes action.</p> 45 */ GetEndpointArn()46 inline const Aws::String& GetEndpointArn() const{ return m_endpointArn; } 47 48 /** 49 * <p>EndpointArn used for SetEndpointAttributes action.</p> 50 */ EndpointArnHasBeenSet()51 inline bool EndpointArnHasBeenSet() const { return m_endpointArnHasBeenSet; } 52 53 /** 54 * <p>EndpointArn used for SetEndpointAttributes action.</p> 55 */ SetEndpointArn(const Aws::String & value)56 inline void SetEndpointArn(const Aws::String& value) { m_endpointArnHasBeenSet = true; m_endpointArn = value; } 57 58 /** 59 * <p>EndpointArn used for SetEndpointAttributes action.</p> 60 */ SetEndpointArn(Aws::String && value)61 inline void SetEndpointArn(Aws::String&& value) { m_endpointArnHasBeenSet = true; m_endpointArn = std::move(value); } 62 63 /** 64 * <p>EndpointArn used for SetEndpointAttributes action.</p> 65 */ SetEndpointArn(const char * value)66 inline void SetEndpointArn(const char* value) { m_endpointArnHasBeenSet = true; m_endpointArn.assign(value); } 67 68 /** 69 * <p>EndpointArn used for SetEndpointAttributes action.</p> 70 */ WithEndpointArn(const Aws::String & value)71 inline SetEndpointAttributesRequest& WithEndpointArn(const Aws::String& value) { SetEndpointArn(value); return *this;} 72 73 /** 74 * <p>EndpointArn used for SetEndpointAttributes action.</p> 75 */ WithEndpointArn(Aws::String && value)76 inline SetEndpointAttributesRequest& WithEndpointArn(Aws::String&& value) { SetEndpointArn(std::move(value)); return *this;} 77 78 /** 79 * <p>EndpointArn used for SetEndpointAttributes action.</p> 80 */ WithEndpointArn(const char * value)81 inline SetEndpointAttributesRequest& WithEndpointArn(const char* value) { SetEndpointArn(value); return *this;} 82 83 84 /** 85 * <p>A map of the endpoint attributes. Attributes in this map include the 86 * following:</p> <ul> <li> <p> <code>CustomUserData</code> – arbitrary user data 87 * to associate with the endpoint. Amazon SNS does not use this data. The data must 88 * be in UTF-8 format and less than 2KB.</p> </li> <li> <p> <code>Enabled</code> – 89 * flag that enables/disables delivery to the endpoint. Amazon SNS will set this to 90 * false when a notification service indicates to Amazon SNS that the endpoint is 91 * invalid. Users can set it back to true, typically after updating Token.</p> 92 * </li> <li> <p> <code>Token</code> – device token, also referred to as a 93 * registration id, for an app and mobile device. This is returned from the 94 * notification service when an app and mobile device are registered with the 95 * notification service.</p> </li> </ul> 96 */ GetAttributes()97 inline const Aws::Map<Aws::String, Aws::String>& GetAttributes() const{ return m_attributes; } 98 99 /** 100 * <p>A map of the endpoint attributes. Attributes in this map include the 101 * following:</p> <ul> <li> <p> <code>CustomUserData</code> – arbitrary user data 102 * to associate with the endpoint. Amazon SNS does not use this data. The data must 103 * be in UTF-8 format and less than 2KB.</p> </li> <li> <p> <code>Enabled</code> – 104 * flag that enables/disables delivery to the endpoint. Amazon SNS will set this to 105 * false when a notification service indicates to Amazon SNS that the endpoint is 106 * invalid. Users can set it back to true, typically after updating Token.</p> 107 * </li> <li> <p> <code>Token</code> – device token, also referred to as a 108 * registration id, for an app and mobile device. This is returned from the 109 * notification service when an app and mobile device are registered with the 110 * notification service.</p> </li> </ul> 111 */ AttributesHasBeenSet()112 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; } 113 114 /** 115 * <p>A map of the endpoint attributes. Attributes in this map include the 116 * following:</p> <ul> <li> <p> <code>CustomUserData</code> – arbitrary user data 117 * to associate with the endpoint. Amazon SNS does not use this data. The data must 118 * be in UTF-8 format and less than 2KB.</p> </li> <li> <p> <code>Enabled</code> – 119 * flag that enables/disables delivery to the endpoint. Amazon SNS will set this to 120 * false when a notification service indicates to Amazon SNS that the endpoint is 121 * invalid. Users can set it back to true, typically after updating Token.</p> 122 * </li> <li> <p> <code>Token</code> – device token, also referred to as a 123 * registration id, for an app and mobile device. This is returned from the 124 * notification service when an app and mobile device are registered with the 125 * notification service.</p> </li> </ul> 126 */ SetAttributes(const Aws::Map<Aws::String,Aws::String> & value)127 inline void SetAttributes(const Aws::Map<Aws::String, Aws::String>& value) { m_attributesHasBeenSet = true; m_attributes = value; } 128 129 /** 130 * <p>A map of the endpoint attributes. Attributes in this map include the 131 * following:</p> <ul> <li> <p> <code>CustomUserData</code> – arbitrary user data 132 * to associate with the endpoint. Amazon SNS does not use this data. The data must 133 * be in UTF-8 format and less than 2KB.</p> </li> <li> <p> <code>Enabled</code> – 134 * flag that enables/disables delivery to the endpoint. Amazon SNS will set this to 135 * false when a notification service indicates to Amazon SNS that the endpoint is 136 * invalid. Users can set it back to true, typically after updating Token.</p> 137 * </li> <li> <p> <code>Token</code> – device token, also referred to as a 138 * registration id, for an app and mobile device. This is returned from the 139 * notification service when an app and mobile device are registered with the 140 * notification service.</p> </li> </ul> 141 */ SetAttributes(Aws::Map<Aws::String,Aws::String> && value)142 inline void SetAttributes(Aws::Map<Aws::String, Aws::String>&& value) { m_attributesHasBeenSet = true; m_attributes = std::move(value); } 143 144 /** 145 * <p>A map of the endpoint attributes. Attributes in this map include the 146 * following:</p> <ul> <li> <p> <code>CustomUserData</code> – arbitrary user data 147 * to associate with the endpoint. Amazon SNS does not use this data. The data must 148 * be in UTF-8 format and less than 2KB.</p> </li> <li> <p> <code>Enabled</code> – 149 * flag that enables/disables delivery to the endpoint. Amazon SNS will set this to 150 * false when a notification service indicates to Amazon SNS that the endpoint is 151 * invalid. Users can set it back to true, typically after updating Token.</p> 152 * </li> <li> <p> <code>Token</code> – device token, also referred to as a 153 * registration id, for an app and mobile device. This is returned from the 154 * notification service when an app and mobile device are registered with the 155 * notification service.</p> </li> </ul> 156 */ WithAttributes(const Aws::Map<Aws::String,Aws::String> & value)157 inline SetEndpointAttributesRequest& WithAttributes(const Aws::Map<Aws::String, Aws::String>& value) { SetAttributes(value); return *this;} 158 159 /** 160 * <p>A map of the endpoint attributes. Attributes in this map include the 161 * following:</p> <ul> <li> <p> <code>CustomUserData</code> – arbitrary user data 162 * to associate with the endpoint. Amazon SNS does not use this data. The data must 163 * be in UTF-8 format and less than 2KB.</p> </li> <li> <p> <code>Enabled</code> – 164 * flag that enables/disables delivery to the endpoint. Amazon SNS will set this to 165 * false when a notification service indicates to Amazon SNS that the endpoint is 166 * invalid. Users can set it back to true, typically after updating Token.</p> 167 * </li> <li> <p> <code>Token</code> – device token, also referred to as a 168 * registration id, for an app and mobile device. This is returned from the 169 * notification service when an app and mobile device are registered with the 170 * notification service.</p> </li> </ul> 171 */ WithAttributes(Aws::Map<Aws::String,Aws::String> && value)172 inline SetEndpointAttributesRequest& WithAttributes(Aws::Map<Aws::String, Aws::String>&& value) { SetAttributes(std::move(value)); return *this;} 173 174 /** 175 * <p>A map of the endpoint attributes. Attributes in this map include the 176 * following:</p> <ul> <li> <p> <code>CustomUserData</code> – arbitrary user data 177 * to associate with the endpoint. Amazon SNS does not use this data. The data must 178 * be in UTF-8 format and less than 2KB.</p> </li> <li> <p> <code>Enabled</code> – 179 * flag that enables/disables delivery to the endpoint. Amazon SNS will set this to 180 * false when a notification service indicates to Amazon SNS that the endpoint is 181 * invalid. Users can set it back to true, typically after updating Token.</p> 182 * </li> <li> <p> <code>Token</code> – device token, also referred to as a 183 * registration id, for an app and mobile device. This is returned from the 184 * notification service when an app and mobile device are registered with the 185 * notification service.</p> </li> </ul> 186 */ AddAttributes(const Aws::String & key,const Aws::String & value)187 inline SetEndpointAttributesRequest& AddAttributes(const Aws::String& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; } 188 189 /** 190 * <p>A map of the endpoint attributes. Attributes in this map include the 191 * following:</p> <ul> <li> <p> <code>CustomUserData</code> – arbitrary user data 192 * to associate with the endpoint. Amazon SNS does not use this data. The data must 193 * be in UTF-8 format and less than 2KB.</p> </li> <li> <p> <code>Enabled</code> – 194 * flag that enables/disables delivery to the endpoint. Amazon SNS will set this to 195 * false when a notification service indicates to Amazon SNS that the endpoint is 196 * invalid. Users can set it back to true, typically after updating Token.</p> 197 * </li> <li> <p> <code>Token</code> – device token, also referred to as a 198 * registration id, for an app and mobile device. This is returned from the 199 * notification service when an app and mobile device are registered with the 200 * notification service.</p> </li> </ul> 201 */ AddAttributes(Aws::String && key,const Aws::String & value)202 inline SetEndpointAttributesRequest& AddAttributes(Aws::String&& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; } 203 204 /** 205 * <p>A map of the endpoint attributes. Attributes in this map include the 206 * following:</p> <ul> <li> <p> <code>CustomUserData</code> – arbitrary user data 207 * to associate with the endpoint. Amazon SNS does not use this data. The data must 208 * be in UTF-8 format and less than 2KB.</p> </li> <li> <p> <code>Enabled</code> – 209 * flag that enables/disables delivery to the endpoint. Amazon SNS will set this to 210 * false when a notification service indicates to Amazon SNS that the endpoint is 211 * invalid. Users can set it back to true, typically after updating Token.</p> 212 * </li> <li> <p> <code>Token</code> – device token, also referred to as a 213 * registration id, for an app and mobile device. This is returned from the 214 * notification service when an app and mobile device are registered with the 215 * notification service.</p> </li> </ul> 216 */ AddAttributes(const Aws::String & key,Aws::String && value)217 inline SetEndpointAttributesRequest& AddAttributes(const Aws::String& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; } 218 219 /** 220 * <p>A map of the endpoint attributes. Attributes in this map include the 221 * following:</p> <ul> <li> <p> <code>CustomUserData</code> – arbitrary user data 222 * to associate with the endpoint. Amazon SNS does not use this data. The data must 223 * be in UTF-8 format and less than 2KB.</p> </li> <li> <p> <code>Enabled</code> – 224 * flag that enables/disables delivery to the endpoint. Amazon SNS will set this to 225 * false when a notification service indicates to Amazon SNS that the endpoint is 226 * invalid. Users can set it back to true, typically after updating Token.</p> 227 * </li> <li> <p> <code>Token</code> – device token, also referred to as a 228 * registration id, for an app and mobile device. This is returned from the 229 * notification service when an app and mobile device are registered with the 230 * notification service.</p> </li> </ul> 231 */ AddAttributes(Aws::String && key,Aws::String && value)232 inline SetEndpointAttributesRequest& AddAttributes(Aws::String&& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), std::move(value)); return *this; } 233 234 /** 235 * <p>A map of the endpoint attributes. Attributes in this map include the 236 * following:</p> <ul> <li> <p> <code>CustomUserData</code> – arbitrary user data 237 * to associate with the endpoint. Amazon SNS does not use this data. The data must 238 * be in UTF-8 format and less than 2KB.</p> </li> <li> <p> <code>Enabled</code> – 239 * flag that enables/disables delivery to the endpoint. Amazon SNS will set this to 240 * false when a notification service indicates to Amazon SNS that the endpoint is 241 * invalid. Users can set it back to true, typically after updating Token.</p> 242 * </li> <li> <p> <code>Token</code> – device token, also referred to as a 243 * registration id, for an app and mobile device. This is returned from the 244 * notification service when an app and mobile device are registered with the 245 * notification service.</p> </li> </ul> 246 */ AddAttributes(const char * key,Aws::String && value)247 inline SetEndpointAttributesRequest& AddAttributes(const char* key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; } 248 249 /** 250 * <p>A map of the endpoint attributes. Attributes in this map include the 251 * following:</p> <ul> <li> <p> <code>CustomUserData</code> – arbitrary user data 252 * to associate with the endpoint. Amazon SNS does not use this data. The data must 253 * be in UTF-8 format and less than 2KB.</p> </li> <li> <p> <code>Enabled</code> – 254 * flag that enables/disables delivery to the endpoint. Amazon SNS will set this to 255 * false when a notification service indicates to Amazon SNS that the endpoint is 256 * invalid. Users can set it back to true, typically after updating Token.</p> 257 * </li> <li> <p> <code>Token</code> – device token, also referred to as a 258 * registration id, for an app and mobile device. This is returned from the 259 * notification service when an app and mobile device are registered with the 260 * notification service.</p> </li> </ul> 261 */ AddAttributes(Aws::String && key,const char * value)262 inline SetEndpointAttributesRequest& AddAttributes(Aws::String&& key, const char* value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; } 263 264 /** 265 * <p>A map of the endpoint attributes. Attributes in this map include the 266 * following:</p> <ul> <li> <p> <code>CustomUserData</code> – arbitrary user data 267 * to associate with the endpoint. Amazon SNS does not use this data. The data must 268 * be in UTF-8 format and less than 2KB.</p> </li> <li> <p> <code>Enabled</code> – 269 * flag that enables/disables delivery to the endpoint. Amazon SNS will set this to 270 * false when a notification service indicates to Amazon SNS that the endpoint is 271 * invalid. Users can set it back to true, typically after updating Token.</p> 272 * </li> <li> <p> <code>Token</code> – device token, also referred to as a 273 * registration id, for an app and mobile device. This is returned from the 274 * notification service when an app and mobile device are registered with the 275 * notification service.</p> </li> </ul> 276 */ AddAttributes(const char * key,const char * value)277 inline SetEndpointAttributesRequest& AddAttributes(const char* key, const char* value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; } 278 279 private: 280 281 Aws::String m_endpointArn; 282 bool m_endpointArnHasBeenSet; 283 284 Aws::Map<Aws::String, Aws::String> m_attributes; 285 bool m_attributesHasBeenSet; 286 }; 287 288 } // namespace Model 289 } // namespace SNS 290 } // namespace Aws 291