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 <aws/core/utils/memory/stl/AWSVector.h> 11 #include <aws/ec2/model/VpcPeeringConnectionOptionsDescription.h> 12 #include <aws/ec2/model/Ipv6CidrBlock.h> 13 #include <aws/ec2/model/CidrBlock.h> 14 #include <utility> 15 16 namespace Aws 17 { 18 namespace Utils 19 { 20 namespace Xml 21 { 22 class XmlNode; 23 } // namespace Xml 24 } // namespace Utils 25 namespace EC2 26 { 27 namespace Model 28 { 29 30 /** 31 * <p>Describes a VPC in a VPC peering connection.</p><p><h3>See Also:</h3> <a 32 * href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpcPeeringConnectionVpcInfo">AWS 33 * API Reference</a></p> 34 */ 35 class AWS_EC2_API VpcPeeringConnectionVpcInfo 36 { 37 public: 38 VpcPeeringConnectionVpcInfo(); 39 VpcPeeringConnectionVpcInfo(const Aws::Utils::Xml::XmlNode& xmlNode); 40 VpcPeeringConnectionVpcInfo& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); 41 42 void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; 43 void OutputToStream(Aws::OStream& oStream, const char* location) const; 44 45 46 /** 47 * <p>The IPv4 CIDR block for the VPC.</p> 48 */ GetCidrBlock()49 inline const Aws::String& GetCidrBlock() const{ return m_cidrBlock; } 50 51 /** 52 * <p>The IPv4 CIDR block for the VPC.</p> 53 */ CidrBlockHasBeenSet()54 inline bool CidrBlockHasBeenSet() const { return m_cidrBlockHasBeenSet; } 55 56 /** 57 * <p>The IPv4 CIDR block for the VPC.</p> 58 */ SetCidrBlock(const Aws::String & value)59 inline void SetCidrBlock(const Aws::String& value) { m_cidrBlockHasBeenSet = true; m_cidrBlock = value; } 60 61 /** 62 * <p>The IPv4 CIDR block for the VPC.</p> 63 */ SetCidrBlock(Aws::String && value)64 inline void SetCidrBlock(Aws::String&& value) { m_cidrBlockHasBeenSet = true; m_cidrBlock = std::move(value); } 65 66 /** 67 * <p>The IPv4 CIDR block for the VPC.</p> 68 */ SetCidrBlock(const char * value)69 inline void SetCidrBlock(const char* value) { m_cidrBlockHasBeenSet = true; m_cidrBlock.assign(value); } 70 71 /** 72 * <p>The IPv4 CIDR block for the VPC.</p> 73 */ WithCidrBlock(const Aws::String & value)74 inline VpcPeeringConnectionVpcInfo& WithCidrBlock(const Aws::String& value) { SetCidrBlock(value); return *this;} 75 76 /** 77 * <p>The IPv4 CIDR block for the VPC.</p> 78 */ WithCidrBlock(Aws::String && value)79 inline VpcPeeringConnectionVpcInfo& WithCidrBlock(Aws::String&& value) { SetCidrBlock(std::move(value)); return *this;} 80 81 /** 82 * <p>The IPv4 CIDR block for the VPC.</p> 83 */ WithCidrBlock(const char * value)84 inline VpcPeeringConnectionVpcInfo& WithCidrBlock(const char* value) { SetCidrBlock(value); return *this;} 85 86 87 /** 88 * <p>The IPv6 CIDR block for the VPC.</p> 89 */ GetIpv6CidrBlockSet()90 inline const Aws::Vector<Ipv6CidrBlock>& GetIpv6CidrBlockSet() const{ return m_ipv6CidrBlockSet; } 91 92 /** 93 * <p>The IPv6 CIDR block for the VPC.</p> 94 */ Ipv6CidrBlockSetHasBeenSet()95 inline bool Ipv6CidrBlockSetHasBeenSet() const { return m_ipv6CidrBlockSetHasBeenSet; } 96 97 /** 98 * <p>The IPv6 CIDR block for the VPC.</p> 99 */ SetIpv6CidrBlockSet(const Aws::Vector<Ipv6CidrBlock> & value)100 inline void SetIpv6CidrBlockSet(const Aws::Vector<Ipv6CidrBlock>& value) { m_ipv6CidrBlockSetHasBeenSet = true; m_ipv6CidrBlockSet = value; } 101 102 /** 103 * <p>The IPv6 CIDR block for the VPC.</p> 104 */ SetIpv6CidrBlockSet(Aws::Vector<Ipv6CidrBlock> && value)105 inline void SetIpv6CidrBlockSet(Aws::Vector<Ipv6CidrBlock>&& value) { m_ipv6CidrBlockSetHasBeenSet = true; m_ipv6CidrBlockSet = std::move(value); } 106 107 /** 108 * <p>The IPv6 CIDR block for the VPC.</p> 109 */ WithIpv6CidrBlockSet(const Aws::Vector<Ipv6CidrBlock> & value)110 inline VpcPeeringConnectionVpcInfo& WithIpv6CidrBlockSet(const Aws::Vector<Ipv6CidrBlock>& value) { SetIpv6CidrBlockSet(value); return *this;} 111 112 /** 113 * <p>The IPv6 CIDR block for the VPC.</p> 114 */ WithIpv6CidrBlockSet(Aws::Vector<Ipv6CidrBlock> && value)115 inline VpcPeeringConnectionVpcInfo& WithIpv6CidrBlockSet(Aws::Vector<Ipv6CidrBlock>&& value) { SetIpv6CidrBlockSet(std::move(value)); return *this;} 116 117 /** 118 * <p>The IPv6 CIDR block for the VPC.</p> 119 */ AddIpv6CidrBlockSet(const Ipv6CidrBlock & value)120 inline VpcPeeringConnectionVpcInfo& AddIpv6CidrBlockSet(const Ipv6CidrBlock& value) { m_ipv6CidrBlockSetHasBeenSet = true; m_ipv6CidrBlockSet.push_back(value); return *this; } 121 122 /** 123 * <p>The IPv6 CIDR block for the VPC.</p> 124 */ AddIpv6CidrBlockSet(Ipv6CidrBlock && value)125 inline VpcPeeringConnectionVpcInfo& AddIpv6CidrBlockSet(Ipv6CidrBlock&& value) { m_ipv6CidrBlockSetHasBeenSet = true; m_ipv6CidrBlockSet.push_back(std::move(value)); return *this; } 126 127 128 /** 129 * <p>Information about the IPv4 CIDR blocks for the VPC.</p> 130 */ GetCidrBlockSet()131 inline const Aws::Vector<CidrBlock>& GetCidrBlockSet() const{ return m_cidrBlockSet; } 132 133 /** 134 * <p>Information about the IPv4 CIDR blocks for the VPC.</p> 135 */ CidrBlockSetHasBeenSet()136 inline bool CidrBlockSetHasBeenSet() const { return m_cidrBlockSetHasBeenSet; } 137 138 /** 139 * <p>Information about the IPv4 CIDR blocks for the VPC.</p> 140 */ SetCidrBlockSet(const Aws::Vector<CidrBlock> & value)141 inline void SetCidrBlockSet(const Aws::Vector<CidrBlock>& value) { m_cidrBlockSetHasBeenSet = true; m_cidrBlockSet = value; } 142 143 /** 144 * <p>Information about the IPv4 CIDR blocks for the VPC.</p> 145 */ SetCidrBlockSet(Aws::Vector<CidrBlock> && value)146 inline void SetCidrBlockSet(Aws::Vector<CidrBlock>&& value) { m_cidrBlockSetHasBeenSet = true; m_cidrBlockSet = std::move(value); } 147 148 /** 149 * <p>Information about the IPv4 CIDR blocks for the VPC.</p> 150 */ WithCidrBlockSet(const Aws::Vector<CidrBlock> & value)151 inline VpcPeeringConnectionVpcInfo& WithCidrBlockSet(const Aws::Vector<CidrBlock>& value) { SetCidrBlockSet(value); return *this;} 152 153 /** 154 * <p>Information about the IPv4 CIDR blocks for the VPC.</p> 155 */ WithCidrBlockSet(Aws::Vector<CidrBlock> && value)156 inline VpcPeeringConnectionVpcInfo& WithCidrBlockSet(Aws::Vector<CidrBlock>&& value) { SetCidrBlockSet(std::move(value)); return *this;} 157 158 /** 159 * <p>Information about the IPv4 CIDR blocks for the VPC.</p> 160 */ AddCidrBlockSet(const CidrBlock & value)161 inline VpcPeeringConnectionVpcInfo& AddCidrBlockSet(const CidrBlock& value) { m_cidrBlockSetHasBeenSet = true; m_cidrBlockSet.push_back(value); return *this; } 162 163 /** 164 * <p>Information about the IPv4 CIDR blocks for the VPC.</p> 165 */ AddCidrBlockSet(CidrBlock && value)166 inline VpcPeeringConnectionVpcInfo& AddCidrBlockSet(CidrBlock&& value) { m_cidrBlockSetHasBeenSet = true; m_cidrBlockSet.push_back(std::move(value)); return *this; } 167 168 169 /** 170 * <p>The ID of the Amazon Web Services account that owns the VPC.</p> 171 */ GetOwnerId()172 inline const Aws::String& GetOwnerId() const{ return m_ownerId; } 173 174 /** 175 * <p>The ID of the Amazon Web Services account that owns the VPC.</p> 176 */ OwnerIdHasBeenSet()177 inline bool OwnerIdHasBeenSet() const { return m_ownerIdHasBeenSet; } 178 179 /** 180 * <p>The ID of the Amazon Web Services account that owns the VPC.</p> 181 */ SetOwnerId(const Aws::String & value)182 inline void SetOwnerId(const Aws::String& value) { m_ownerIdHasBeenSet = true; m_ownerId = value; } 183 184 /** 185 * <p>The ID of the Amazon Web Services account that owns the VPC.</p> 186 */ SetOwnerId(Aws::String && value)187 inline void SetOwnerId(Aws::String&& value) { m_ownerIdHasBeenSet = true; m_ownerId = std::move(value); } 188 189 /** 190 * <p>The ID of the Amazon Web Services account that owns the VPC.</p> 191 */ SetOwnerId(const char * value)192 inline void SetOwnerId(const char* value) { m_ownerIdHasBeenSet = true; m_ownerId.assign(value); } 193 194 /** 195 * <p>The ID of the Amazon Web Services account that owns the VPC.</p> 196 */ WithOwnerId(const Aws::String & value)197 inline VpcPeeringConnectionVpcInfo& WithOwnerId(const Aws::String& value) { SetOwnerId(value); return *this;} 198 199 /** 200 * <p>The ID of the Amazon Web Services account that owns the VPC.</p> 201 */ WithOwnerId(Aws::String && value)202 inline VpcPeeringConnectionVpcInfo& WithOwnerId(Aws::String&& value) { SetOwnerId(std::move(value)); return *this;} 203 204 /** 205 * <p>The ID of the Amazon Web Services account that owns the VPC.</p> 206 */ WithOwnerId(const char * value)207 inline VpcPeeringConnectionVpcInfo& WithOwnerId(const char* value) { SetOwnerId(value); return *this;} 208 209 210 /** 211 * <p>Information about the VPC peering connection options for the accepter or 212 * requester VPC.</p> 213 */ GetPeeringOptions()214 inline const VpcPeeringConnectionOptionsDescription& GetPeeringOptions() const{ return m_peeringOptions; } 215 216 /** 217 * <p>Information about the VPC peering connection options for the accepter or 218 * requester VPC.</p> 219 */ PeeringOptionsHasBeenSet()220 inline bool PeeringOptionsHasBeenSet() const { return m_peeringOptionsHasBeenSet; } 221 222 /** 223 * <p>Information about the VPC peering connection options for the accepter or 224 * requester VPC.</p> 225 */ SetPeeringOptions(const VpcPeeringConnectionOptionsDescription & value)226 inline void SetPeeringOptions(const VpcPeeringConnectionOptionsDescription& value) { m_peeringOptionsHasBeenSet = true; m_peeringOptions = value; } 227 228 /** 229 * <p>Information about the VPC peering connection options for the accepter or 230 * requester VPC.</p> 231 */ SetPeeringOptions(VpcPeeringConnectionOptionsDescription && value)232 inline void SetPeeringOptions(VpcPeeringConnectionOptionsDescription&& value) { m_peeringOptionsHasBeenSet = true; m_peeringOptions = std::move(value); } 233 234 /** 235 * <p>Information about the VPC peering connection options for the accepter or 236 * requester VPC.</p> 237 */ WithPeeringOptions(const VpcPeeringConnectionOptionsDescription & value)238 inline VpcPeeringConnectionVpcInfo& WithPeeringOptions(const VpcPeeringConnectionOptionsDescription& value) { SetPeeringOptions(value); return *this;} 239 240 /** 241 * <p>Information about the VPC peering connection options for the accepter or 242 * requester VPC.</p> 243 */ WithPeeringOptions(VpcPeeringConnectionOptionsDescription && value)244 inline VpcPeeringConnectionVpcInfo& WithPeeringOptions(VpcPeeringConnectionOptionsDescription&& value) { SetPeeringOptions(std::move(value)); return *this;} 245 246 247 /** 248 * <p>The ID of the VPC.</p> 249 */ GetVpcId()250 inline const Aws::String& GetVpcId() const{ return m_vpcId; } 251 252 /** 253 * <p>The ID of the VPC.</p> 254 */ VpcIdHasBeenSet()255 inline bool VpcIdHasBeenSet() const { return m_vpcIdHasBeenSet; } 256 257 /** 258 * <p>The ID of the VPC.</p> 259 */ SetVpcId(const Aws::String & value)260 inline void SetVpcId(const Aws::String& value) { m_vpcIdHasBeenSet = true; m_vpcId = value; } 261 262 /** 263 * <p>The ID of the VPC.</p> 264 */ SetVpcId(Aws::String && value)265 inline void SetVpcId(Aws::String&& value) { m_vpcIdHasBeenSet = true; m_vpcId = std::move(value); } 266 267 /** 268 * <p>The ID of the VPC.</p> 269 */ SetVpcId(const char * value)270 inline void SetVpcId(const char* value) { m_vpcIdHasBeenSet = true; m_vpcId.assign(value); } 271 272 /** 273 * <p>The ID of the VPC.</p> 274 */ WithVpcId(const Aws::String & value)275 inline VpcPeeringConnectionVpcInfo& WithVpcId(const Aws::String& value) { SetVpcId(value); return *this;} 276 277 /** 278 * <p>The ID of the VPC.</p> 279 */ WithVpcId(Aws::String && value)280 inline VpcPeeringConnectionVpcInfo& WithVpcId(Aws::String&& value) { SetVpcId(std::move(value)); return *this;} 281 282 /** 283 * <p>The ID of the VPC.</p> 284 */ WithVpcId(const char * value)285 inline VpcPeeringConnectionVpcInfo& WithVpcId(const char* value) { SetVpcId(value); return *this;} 286 287 288 /** 289 * <p>The Region in which the VPC is located.</p> 290 */ GetRegion()291 inline const Aws::String& GetRegion() const{ return m_region; } 292 293 /** 294 * <p>The Region in which the VPC is located.</p> 295 */ RegionHasBeenSet()296 inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; } 297 298 /** 299 * <p>The Region in which the VPC is located.</p> 300 */ SetRegion(const Aws::String & value)301 inline void SetRegion(const Aws::String& value) { m_regionHasBeenSet = true; m_region = value; } 302 303 /** 304 * <p>The Region in which the VPC is located.</p> 305 */ SetRegion(Aws::String && value)306 inline void SetRegion(Aws::String&& value) { m_regionHasBeenSet = true; m_region = std::move(value); } 307 308 /** 309 * <p>The Region in which the VPC is located.</p> 310 */ SetRegion(const char * value)311 inline void SetRegion(const char* value) { m_regionHasBeenSet = true; m_region.assign(value); } 312 313 /** 314 * <p>The Region in which the VPC is located.</p> 315 */ WithRegion(const Aws::String & value)316 inline VpcPeeringConnectionVpcInfo& WithRegion(const Aws::String& value) { SetRegion(value); return *this;} 317 318 /** 319 * <p>The Region in which the VPC is located.</p> 320 */ WithRegion(Aws::String && value)321 inline VpcPeeringConnectionVpcInfo& WithRegion(Aws::String&& value) { SetRegion(std::move(value)); return *this;} 322 323 /** 324 * <p>The Region in which the VPC is located.</p> 325 */ WithRegion(const char * value)326 inline VpcPeeringConnectionVpcInfo& WithRegion(const char* value) { SetRegion(value); return *this;} 327 328 private: 329 330 Aws::String m_cidrBlock; 331 bool m_cidrBlockHasBeenSet; 332 333 Aws::Vector<Ipv6CidrBlock> m_ipv6CidrBlockSet; 334 bool m_ipv6CidrBlockSetHasBeenSet; 335 336 Aws::Vector<CidrBlock> m_cidrBlockSet; 337 bool m_cidrBlockSetHasBeenSet; 338 339 Aws::String m_ownerId; 340 bool m_ownerIdHasBeenSet; 341 342 VpcPeeringConnectionOptionsDescription m_peeringOptions; 343 bool m_peeringOptionsHasBeenSet; 344 345 Aws::String m_vpcId; 346 bool m_vpcIdHasBeenSet; 347 348 Aws::String m_region; 349 bool m_regionHasBeenSet; 350 }; 351 352 } // namespace Model 353 } // namespace EC2 354 } // namespace Aws 355