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/ec2/model/AttachmentStatus.h> 10 #include <aws/core/utils/memory/stl/AWSString.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace Utils 16 { 17 namespace Xml 18 { 19 class XmlNode; 20 } // namespace Xml 21 } // namespace Utils 22 namespace EC2 23 { 24 namespace Model 25 { 26 27 /** 28 * <p>Describes the attachment of a VPC to an internet gateway or an egress-only 29 * internet gateway.</p><p><h3>See Also:</h3> <a 30 * href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InternetGatewayAttachment">AWS 31 * API Reference</a></p> 32 */ 33 class AWS_EC2_API InternetGatewayAttachment 34 { 35 public: 36 InternetGatewayAttachment(); 37 InternetGatewayAttachment(const Aws::Utils::Xml::XmlNode& xmlNode); 38 InternetGatewayAttachment& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); 39 40 void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; 41 void OutputToStream(Aws::OStream& oStream, const char* location) const; 42 43 44 /** 45 * <p>The current state of the attachment. For an internet gateway, the state is 46 * <code>available</code> when attached to a VPC; otherwise, this value is not 47 * returned.</p> 48 */ GetState()49 inline const AttachmentStatus& GetState() const{ return m_state; } 50 51 /** 52 * <p>The current state of the attachment. For an internet gateway, the state is 53 * <code>available</code> when attached to a VPC; otherwise, this value is not 54 * returned.</p> 55 */ StateHasBeenSet()56 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } 57 58 /** 59 * <p>The current state of the attachment. For an internet gateway, the state is 60 * <code>available</code> when attached to a VPC; otherwise, this value is not 61 * returned.</p> 62 */ SetState(const AttachmentStatus & value)63 inline void SetState(const AttachmentStatus& value) { m_stateHasBeenSet = true; m_state = value; } 64 65 /** 66 * <p>The current state of the attachment. For an internet gateway, the state is 67 * <code>available</code> when attached to a VPC; otherwise, this value is not 68 * returned.</p> 69 */ SetState(AttachmentStatus && value)70 inline void SetState(AttachmentStatus&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } 71 72 /** 73 * <p>The current state of the attachment. For an internet gateway, the state is 74 * <code>available</code> when attached to a VPC; otherwise, this value is not 75 * returned.</p> 76 */ WithState(const AttachmentStatus & value)77 inline InternetGatewayAttachment& WithState(const AttachmentStatus& value) { SetState(value); return *this;} 78 79 /** 80 * <p>The current state of the attachment. For an internet gateway, the state is 81 * <code>available</code> when attached to a VPC; otherwise, this value is not 82 * returned.</p> 83 */ WithState(AttachmentStatus && value)84 inline InternetGatewayAttachment& WithState(AttachmentStatus&& value) { SetState(std::move(value)); return *this;} 85 86 87 /** 88 * <p>The ID of the VPC.</p> 89 */ GetVpcId()90 inline const Aws::String& GetVpcId() const{ return m_vpcId; } 91 92 /** 93 * <p>The ID of the VPC.</p> 94 */ VpcIdHasBeenSet()95 inline bool VpcIdHasBeenSet() const { return m_vpcIdHasBeenSet; } 96 97 /** 98 * <p>The ID of the VPC.</p> 99 */ SetVpcId(const Aws::String & value)100 inline void SetVpcId(const Aws::String& value) { m_vpcIdHasBeenSet = true; m_vpcId = value; } 101 102 /** 103 * <p>The ID of the VPC.</p> 104 */ SetVpcId(Aws::String && value)105 inline void SetVpcId(Aws::String&& value) { m_vpcIdHasBeenSet = true; m_vpcId = std::move(value); } 106 107 /** 108 * <p>The ID of the VPC.</p> 109 */ SetVpcId(const char * value)110 inline void SetVpcId(const char* value) { m_vpcIdHasBeenSet = true; m_vpcId.assign(value); } 111 112 /** 113 * <p>The ID of the VPC.</p> 114 */ WithVpcId(const Aws::String & value)115 inline InternetGatewayAttachment& WithVpcId(const Aws::String& value) { SetVpcId(value); return *this;} 116 117 /** 118 * <p>The ID of the VPC.</p> 119 */ WithVpcId(Aws::String && value)120 inline InternetGatewayAttachment& WithVpcId(Aws::String&& value) { SetVpcId(std::move(value)); return *this;} 121 122 /** 123 * <p>The ID of the VPC.</p> 124 */ WithVpcId(const char * value)125 inline InternetGatewayAttachment& WithVpcId(const char* value) { SetVpcId(value); return *this;} 126 127 private: 128 129 AttachmentStatus m_state; 130 bool m_stateHasBeenSet; 131 132 Aws::String m_vpcId; 133 bool m_vpcIdHasBeenSet; 134 }; 135 136 } // namespace Model 137 } // namespace EC2 138 } // namespace Aws 139