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/ec2/EC2_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <utility> 11 12 namespace Aws 13 { 14 namespace Utils 15 { 16 namespace Xml 17 { 18 class XmlNode; 19 } // namespace Xml 20 } // namespace Utils 21 namespace EC2 22 { 23 namespace Model 24 { 25 26 /** 27 * <p>Describes a security group and Amazon Web Services account ID 28 * pair.</p><p><h3>See Also:</h3> <a 29 * href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UserIdGroupPair">AWS 30 * API Reference</a></p> 31 */ 32 class AWS_EC2_API UserIdGroupPair 33 { 34 public: 35 UserIdGroupPair(); 36 UserIdGroupPair(const Aws::Utils::Xml::XmlNode& xmlNode); 37 UserIdGroupPair& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); 38 39 void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; 40 void OutputToStream(Aws::OStream& oStream, const char* location) const; 41 42 43 /** 44 * <p>A description for the security group rule that references this user ID group 45 * pair.</p> <p>Constraints: Up to 255 characters in length. Allowed characters are 46 * a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*</p> 47 */ GetDescription()48 inline const Aws::String& GetDescription() const{ return m_description; } 49 50 /** 51 * <p>A description for the security group rule that references this user ID group 52 * pair.</p> <p>Constraints: Up to 255 characters in length. Allowed characters are 53 * a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*</p> 54 */ DescriptionHasBeenSet()55 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } 56 57 /** 58 * <p>A description for the security group rule that references this user ID group 59 * pair.</p> <p>Constraints: Up to 255 characters in length. Allowed characters are 60 * a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*</p> 61 */ SetDescription(const Aws::String & value)62 inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } 63 64 /** 65 * <p>A description for the security group rule that references this user ID group 66 * pair.</p> <p>Constraints: Up to 255 characters in length. Allowed characters are 67 * a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*</p> 68 */ SetDescription(Aws::String && value)69 inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } 70 71 /** 72 * <p>A description for the security group rule that references this user ID group 73 * pair.</p> <p>Constraints: Up to 255 characters in length. Allowed characters are 74 * a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*</p> 75 */ SetDescription(const char * value)76 inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } 77 78 /** 79 * <p>A description for the security group rule that references this user ID group 80 * pair.</p> <p>Constraints: Up to 255 characters in length. Allowed characters are 81 * a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*</p> 82 */ WithDescription(const Aws::String & value)83 inline UserIdGroupPair& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} 84 85 /** 86 * <p>A description for the security group rule that references this user ID group 87 * pair.</p> <p>Constraints: Up to 255 characters in length. Allowed characters are 88 * a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*</p> 89 */ WithDescription(Aws::String && value)90 inline UserIdGroupPair& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} 91 92 /** 93 * <p>A description for the security group rule that references this user ID group 94 * pair.</p> <p>Constraints: Up to 255 characters in length. Allowed characters are 95 * a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*</p> 96 */ WithDescription(const char * value)97 inline UserIdGroupPair& WithDescription(const char* value) { SetDescription(value); return *this;} 98 99 100 /** 101 * <p>The ID of the security group.</p> 102 */ GetGroupId()103 inline const Aws::String& GetGroupId() const{ return m_groupId; } 104 105 /** 106 * <p>The ID of the security group.</p> 107 */ GroupIdHasBeenSet()108 inline bool GroupIdHasBeenSet() const { return m_groupIdHasBeenSet; } 109 110 /** 111 * <p>The ID of the security group.</p> 112 */ SetGroupId(const Aws::String & value)113 inline void SetGroupId(const Aws::String& value) { m_groupIdHasBeenSet = true; m_groupId = value; } 114 115 /** 116 * <p>The ID of the security group.</p> 117 */ SetGroupId(Aws::String && value)118 inline void SetGroupId(Aws::String&& value) { m_groupIdHasBeenSet = true; m_groupId = std::move(value); } 119 120 /** 121 * <p>The ID of the security group.</p> 122 */ SetGroupId(const char * value)123 inline void SetGroupId(const char* value) { m_groupIdHasBeenSet = true; m_groupId.assign(value); } 124 125 /** 126 * <p>The ID of the security group.</p> 127 */ WithGroupId(const Aws::String & value)128 inline UserIdGroupPair& WithGroupId(const Aws::String& value) { SetGroupId(value); return *this;} 129 130 /** 131 * <p>The ID of the security group.</p> 132 */ WithGroupId(Aws::String && value)133 inline UserIdGroupPair& WithGroupId(Aws::String&& value) { SetGroupId(std::move(value)); return *this;} 134 135 /** 136 * <p>The ID of the security group.</p> 137 */ WithGroupId(const char * value)138 inline UserIdGroupPair& WithGroupId(const char* value) { SetGroupId(value); return *this;} 139 140 141 /** 142 * <p>The name of the security group. In a request, use this parameter for a 143 * security group in EC2-Classic or a default VPC only. For a security group in a 144 * nondefault VPC, use the security group ID. </p> <p>For a referenced security 145 * group in another VPC, this value is not returned if the referenced security 146 * group is deleted.</p> 147 */ GetGroupName()148 inline const Aws::String& GetGroupName() const{ return m_groupName; } 149 150 /** 151 * <p>The name of the security group. In a request, use this parameter for a 152 * security group in EC2-Classic or a default VPC only. For a security group in a 153 * nondefault VPC, use the security group ID. </p> <p>For a referenced security 154 * group in another VPC, this value is not returned if the referenced security 155 * group is deleted.</p> 156 */ GroupNameHasBeenSet()157 inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; } 158 159 /** 160 * <p>The name of the security group. In a request, use this parameter for a 161 * security group in EC2-Classic or a default VPC only. For a security group in a 162 * nondefault VPC, use the security group ID. </p> <p>For a referenced security 163 * group in another VPC, this value is not returned if the referenced security 164 * group is deleted.</p> 165 */ SetGroupName(const Aws::String & value)166 inline void SetGroupName(const Aws::String& value) { m_groupNameHasBeenSet = true; m_groupName = value; } 167 168 /** 169 * <p>The name of the security group. In a request, use this parameter for a 170 * security group in EC2-Classic or a default VPC only. For a security group in a 171 * nondefault VPC, use the security group ID. </p> <p>For a referenced security 172 * group in another VPC, this value is not returned if the referenced security 173 * group is deleted.</p> 174 */ SetGroupName(Aws::String && value)175 inline void SetGroupName(Aws::String&& value) { m_groupNameHasBeenSet = true; m_groupName = std::move(value); } 176 177 /** 178 * <p>The name of the security group. In a request, use this parameter for a 179 * security group in EC2-Classic or a default VPC only. For a security group in a 180 * nondefault VPC, use the security group ID. </p> <p>For a referenced security 181 * group in another VPC, this value is not returned if the referenced security 182 * group is deleted.</p> 183 */ SetGroupName(const char * value)184 inline void SetGroupName(const char* value) { m_groupNameHasBeenSet = true; m_groupName.assign(value); } 185 186 /** 187 * <p>The name of the security group. In a request, use this parameter for a 188 * security group in EC2-Classic or a default VPC only. For a security group in a 189 * nondefault VPC, use the security group ID. </p> <p>For a referenced security 190 * group in another VPC, this value is not returned if the referenced security 191 * group is deleted.</p> 192 */ WithGroupName(const Aws::String & value)193 inline UserIdGroupPair& WithGroupName(const Aws::String& value) { SetGroupName(value); return *this;} 194 195 /** 196 * <p>The name of the security group. In a request, use this parameter for a 197 * security group in EC2-Classic or a default VPC only. For a security group in a 198 * nondefault VPC, use the security group ID. </p> <p>For a referenced security 199 * group in another VPC, this value is not returned if the referenced security 200 * group is deleted.</p> 201 */ WithGroupName(Aws::String && value)202 inline UserIdGroupPair& WithGroupName(Aws::String&& value) { SetGroupName(std::move(value)); return *this;} 203 204 /** 205 * <p>The name of the security group. In a request, use this parameter for a 206 * security group in EC2-Classic or a default VPC only. For a security group in a 207 * nondefault VPC, use the security group ID. </p> <p>For a referenced security 208 * group in another VPC, this value is not returned if the referenced security 209 * group is deleted.</p> 210 */ WithGroupName(const char * value)211 inline UserIdGroupPair& WithGroupName(const char* value) { SetGroupName(value); return *this;} 212 213 214 /** 215 * <p>The status of a VPC peering connection, if applicable.</p> 216 */ GetPeeringStatus()217 inline const Aws::String& GetPeeringStatus() const{ return m_peeringStatus; } 218 219 /** 220 * <p>The status of a VPC peering connection, if applicable.</p> 221 */ PeeringStatusHasBeenSet()222 inline bool PeeringStatusHasBeenSet() const { return m_peeringStatusHasBeenSet; } 223 224 /** 225 * <p>The status of a VPC peering connection, if applicable.</p> 226 */ SetPeeringStatus(const Aws::String & value)227 inline void SetPeeringStatus(const Aws::String& value) { m_peeringStatusHasBeenSet = true; m_peeringStatus = value; } 228 229 /** 230 * <p>The status of a VPC peering connection, if applicable.</p> 231 */ SetPeeringStatus(Aws::String && value)232 inline void SetPeeringStatus(Aws::String&& value) { m_peeringStatusHasBeenSet = true; m_peeringStatus = std::move(value); } 233 234 /** 235 * <p>The status of a VPC peering connection, if applicable.</p> 236 */ SetPeeringStatus(const char * value)237 inline void SetPeeringStatus(const char* value) { m_peeringStatusHasBeenSet = true; m_peeringStatus.assign(value); } 238 239 /** 240 * <p>The status of a VPC peering connection, if applicable.</p> 241 */ WithPeeringStatus(const Aws::String & value)242 inline UserIdGroupPair& WithPeeringStatus(const Aws::String& value) { SetPeeringStatus(value); return *this;} 243 244 /** 245 * <p>The status of a VPC peering connection, if applicable.</p> 246 */ WithPeeringStatus(Aws::String && value)247 inline UserIdGroupPair& WithPeeringStatus(Aws::String&& value) { SetPeeringStatus(std::move(value)); return *this;} 248 249 /** 250 * <p>The status of a VPC peering connection, if applicable.</p> 251 */ WithPeeringStatus(const char * value)252 inline UserIdGroupPair& WithPeeringStatus(const char* value) { SetPeeringStatus(value); return *this;} 253 254 255 /** 256 * <p>The ID of an Amazon Web Services account.</p> <p>For a referenced security 257 * group in another VPC, the account ID of the referenced security group is 258 * returned in the response. If the referenced security group is deleted, this 259 * value is not returned.</p> <p>[EC2-Classic] Required when adding or removing 260 * rules that reference a security group in another Amazon Web Services 261 * account.</p> 262 */ GetUserId()263 inline const Aws::String& GetUserId() const{ return m_userId; } 264 265 /** 266 * <p>The ID of an Amazon Web Services account.</p> <p>For a referenced security 267 * group in another VPC, the account ID of the referenced security group is 268 * returned in the response. If the referenced security group is deleted, this 269 * value is not returned.</p> <p>[EC2-Classic] Required when adding or removing 270 * rules that reference a security group in another Amazon Web Services 271 * account.</p> 272 */ UserIdHasBeenSet()273 inline bool UserIdHasBeenSet() const { return m_userIdHasBeenSet; } 274 275 /** 276 * <p>The ID of an Amazon Web Services account.</p> <p>For a referenced security 277 * group in another VPC, the account ID of the referenced security group is 278 * returned in the response. If the referenced security group is deleted, this 279 * value is not returned.</p> <p>[EC2-Classic] Required when adding or removing 280 * rules that reference a security group in another Amazon Web Services 281 * account.</p> 282 */ SetUserId(const Aws::String & value)283 inline void SetUserId(const Aws::String& value) { m_userIdHasBeenSet = true; m_userId = value; } 284 285 /** 286 * <p>The ID of an Amazon Web Services account.</p> <p>For a referenced security 287 * group in another VPC, the account ID of the referenced security group is 288 * returned in the response. If the referenced security group is deleted, this 289 * value is not returned.</p> <p>[EC2-Classic] Required when adding or removing 290 * rules that reference a security group in another Amazon Web Services 291 * account.</p> 292 */ SetUserId(Aws::String && value)293 inline void SetUserId(Aws::String&& value) { m_userIdHasBeenSet = true; m_userId = std::move(value); } 294 295 /** 296 * <p>The ID of an Amazon Web Services account.</p> <p>For a referenced security 297 * group in another VPC, the account ID of the referenced security group is 298 * returned in the response. If the referenced security group is deleted, this 299 * value is not returned.</p> <p>[EC2-Classic] Required when adding or removing 300 * rules that reference a security group in another Amazon Web Services 301 * account.</p> 302 */ SetUserId(const char * value)303 inline void SetUserId(const char* value) { m_userIdHasBeenSet = true; m_userId.assign(value); } 304 305 /** 306 * <p>The ID of an Amazon Web Services account.</p> <p>For a referenced security 307 * group in another VPC, the account ID of the referenced security group is 308 * returned in the response. If the referenced security group is deleted, this 309 * value is not returned.</p> <p>[EC2-Classic] Required when adding or removing 310 * rules that reference a security group in another Amazon Web Services 311 * account.</p> 312 */ WithUserId(const Aws::String & value)313 inline UserIdGroupPair& WithUserId(const Aws::String& value) { SetUserId(value); return *this;} 314 315 /** 316 * <p>The ID of an Amazon Web Services account.</p> <p>For a referenced security 317 * group in another VPC, the account ID of the referenced security group is 318 * returned in the response. If the referenced security group is deleted, this 319 * value is not returned.</p> <p>[EC2-Classic] Required when adding or removing 320 * rules that reference a security group in another Amazon Web Services 321 * account.</p> 322 */ WithUserId(Aws::String && value)323 inline UserIdGroupPair& WithUserId(Aws::String&& value) { SetUserId(std::move(value)); return *this;} 324 325 /** 326 * <p>The ID of an Amazon Web Services account.</p> <p>For a referenced security 327 * group in another VPC, the account ID of the referenced security group is 328 * returned in the response. If the referenced security group is deleted, this 329 * value is not returned.</p> <p>[EC2-Classic] Required when adding or removing 330 * rules that reference a security group in another Amazon Web Services 331 * account.</p> 332 */ WithUserId(const char * value)333 inline UserIdGroupPair& WithUserId(const char* value) { SetUserId(value); return *this;} 334 335 336 /** 337 * <p>The ID of the VPC for the referenced security group, if applicable.</p> 338 */ GetVpcId()339 inline const Aws::String& GetVpcId() const{ return m_vpcId; } 340 341 /** 342 * <p>The ID of the VPC for the referenced security group, if applicable.</p> 343 */ VpcIdHasBeenSet()344 inline bool VpcIdHasBeenSet() const { return m_vpcIdHasBeenSet; } 345 346 /** 347 * <p>The ID of the VPC for the referenced security group, if applicable.</p> 348 */ SetVpcId(const Aws::String & value)349 inline void SetVpcId(const Aws::String& value) { m_vpcIdHasBeenSet = true; m_vpcId = value; } 350 351 /** 352 * <p>The ID of the VPC for the referenced security group, if applicable.</p> 353 */ SetVpcId(Aws::String && value)354 inline void SetVpcId(Aws::String&& value) { m_vpcIdHasBeenSet = true; m_vpcId = std::move(value); } 355 356 /** 357 * <p>The ID of the VPC for the referenced security group, if applicable.</p> 358 */ SetVpcId(const char * value)359 inline void SetVpcId(const char* value) { m_vpcIdHasBeenSet = true; m_vpcId.assign(value); } 360 361 /** 362 * <p>The ID of the VPC for the referenced security group, if applicable.</p> 363 */ WithVpcId(const Aws::String & value)364 inline UserIdGroupPair& WithVpcId(const Aws::String& value) { SetVpcId(value); return *this;} 365 366 /** 367 * <p>The ID of the VPC for the referenced security group, if applicable.</p> 368 */ WithVpcId(Aws::String && value)369 inline UserIdGroupPair& WithVpcId(Aws::String&& value) { SetVpcId(std::move(value)); return *this;} 370 371 /** 372 * <p>The ID of the VPC for the referenced security group, if applicable.</p> 373 */ WithVpcId(const char * value)374 inline UserIdGroupPair& WithVpcId(const char* value) { SetVpcId(value); return *this;} 375 376 377 /** 378 * <p>The ID of the VPC peering connection, if applicable.</p> 379 */ GetVpcPeeringConnectionId()380 inline const Aws::String& GetVpcPeeringConnectionId() const{ return m_vpcPeeringConnectionId; } 381 382 /** 383 * <p>The ID of the VPC peering connection, if applicable.</p> 384 */ VpcPeeringConnectionIdHasBeenSet()385 inline bool VpcPeeringConnectionIdHasBeenSet() const { return m_vpcPeeringConnectionIdHasBeenSet; } 386 387 /** 388 * <p>The ID of the VPC peering connection, if applicable.</p> 389 */ SetVpcPeeringConnectionId(const Aws::String & value)390 inline void SetVpcPeeringConnectionId(const Aws::String& value) { m_vpcPeeringConnectionIdHasBeenSet = true; m_vpcPeeringConnectionId = value; } 391 392 /** 393 * <p>The ID of the VPC peering connection, if applicable.</p> 394 */ SetVpcPeeringConnectionId(Aws::String && value)395 inline void SetVpcPeeringConnectionId(Aws::String&& value) { m_vpcPeeringConnectionIdHasBeenSet = true; m_vpcPeeringConnectionId = std::move(value); } 396 397 /** 398 * <p>The ID of the VPC peering connection, if applicable.</p> 399 */ SetVpcPeeringConnectionId(const char * value)400 inline void SetVpcPeeringConnectionId(const char* value) { m_vpcPeeringConnectionIdHasBeenSet = true; m_vpcPeeringConnectionId.assign(value); } 401 402 /** 403 * <p>The ID of the VPC peering connection, if applicable.</p> 404 */ WithVpcPeeringConnectionId(const Aws::String & value)405 inline UserIdGroupPair& WithVpcPeeringConnectionId(const Aws::String& value) { SetVpcPeeringConnectionId(value); return *this;} 406 407 /** 408 * <p>The ID of the VPC peering connection, if applicable.</p> 409 */ WithVpcPeeringConnectionId(Aws::String && value)410 inline UserIdGroupPair& WithVpcPeeringConnectionId(Aws::String&& value) { SetVpcPeeringConnectionId(std::move(value)); return *this;} 411 412 /** 413 * <p>The ID of the VPC peering connection, if applicable.</p> 414 */ WithVpcPeeringConnectionId(const char * value)415 inline UserIdGroupPair& WithVpcPeeringConnectionId(const char* value) { SetVpcPeeringConnectionId(value); return *this;} 416 417 private: 418 419 Aws::String m_description; 420 bool m_descriptionHasBeenSet; 421 422 Aws::String m_groupId; 423 bool m_groupIdHasBeenSet; 424 425 Aws::String m_groupName; 426 bool m_groupNameHasBeenSet; 427 428 Aws::String m_peeringStatus; 429 bool m_peeringStatusHasBeenSet; 430 431 Aws::String m_userId; 432 bool m_userIdHasBeenSet; 433 434 Aws::String m_vpcId; 435 bool m_vpcIdHasBeenSet; 436 437 Aws::String m_vpcPeeringConnectionId; 438 bool m_vpcPeeringConnectionIdHasBeenSet; 439 }; 440 441 } // namespace Model 442 } // namespace EC2 443 } // namespace Aws 444