/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace ElasticLoadBalancingv2 { namespace Model { /** */ class AWS_ELASTICLOADBALANCINGV2_API SetSubnetsRequest : public ElasticLoadBalancingv2Request { public: SetSubnetsRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "SetSubnets"; } Aws::String SerializePayload() const override; protected: void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The Amazon Resource Name (ARN) of the load balancer.

*/ inline const Aws::String& GetLoadBalancerArn() const{ return m_loadBalancerArn; } /** *

The Amazon Resource Name (ARN) of the load balancer.

*/ inline bool LoadBalancerArnHasBeenSet() const { return m_loadBalancerArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the load balancer.

*/ inline void SetLoadBalancerArn(const Aws::String& value) { m_loadBalancerArnHasBeenSet = true; m_loadBalancerArn = value; } /** *

The Amazon Resource Name (ARN) of the load balancer.

*/ inline void SetLoadBalancerArn(Aws::String&& value) { m_loadBalancerArnHasBeenSet = true; m_loadBalancerArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the load balancer.

*/ inline void SetLoadBalancerArn(const char* value) { m_loadBalancerArnHasBeenSet = true; m_loadBalancerArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the load balancer.

*/ inline SetSubnetsRequest& WithLoadBalancerArn(const Aws::String& value) { SetLoadBalancerArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the load balancer.

*/ inline SetSubnetsRequest& WithLoadBalancerArn(Aws::String&& value) { SetLoadBalancerArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the load balancer.

*/ inline SetSubnetsRequest& WithLoadBalancerArn(const char* value) { SetLoadBalancerArn(value); return *this;} /** *

The IDs of the public subnets. You must specify subnets from at least two * Availability Zones. You can specify only one subnet per Availability Zone. You * must specify either subnets or subnet mappings.

*/ inline const Aws::Vector& GetSubnets() const{ return m_subnets; } /** *

The IDs of the public subnets. You must specify subnets from at least two * Availability Zones. You can specify only one subnet per Availability Zone. You * must specify either subnets or subnet mappings.

*/ inline bool SubnetsHasBeenSet() const { return m_subnetsHasBeenSet; } /** *

The IDs of the public subnets. You must specify subnets from at least two * Availability Zones. You can specify only one subnet per Availability Zone. You * must specify either subnets or subnet mappings.

*/ inline void SetSubnets(const Aws::Vector& value) { m_subnetsHasBeenSet = true; m_subnets = value; } /** *

The IDs of the public subnets. You must specify subnets from at least two * Availability Zones. You can specify only one subnet per Availability Zone. You * must specify either subnets or subnet mappings.

*/ inline void SetSubnets(Aws::Vector&& value) { m_subnetsHasBeenSet = true; m_subnets = std::move(value); } /** *

The IDs of the public subnets. You must specify subnets from at least two * Availability Zones. You can specify only one subnet per Availability Zone. You * must specify either subnets or subnet mappings.

*/ inline SetSubnetsRequest& WithSubnets(const Aws::Vector& value) { SetSubnets(value); return *this;} /** *

The IDs of the public subnets. You must specify subnets from at least two * Availability Zones. You can specify only one subnet per Availability Zone. You * must specify either subnets or subnet mappings.

*/ inline SetSubnetsRequest& WithSubnets(Aws::Vector&& value) { SetSubnets(std::move(value)); return *this;} /** *

The IDs of the public subnets. You must specify subnets from at least two * Availability Zones. You can specify only one subnet per Availability Zone. You * must specify either subnets or subnet mappings.

*/ inline SetSubnetsRequest& AddSubnets(const Aws::String& value) { m_subnetsHasBeenSet = true; m_subnets.push_back(value); return *this; } /** *

The IDs of the public subnets. You must specify subnets from at least two * Availability Zones. You can specify only one subnet per Availability Zone. You * must specify either subnets or subnet mappings.

*/ inline SetSubnetsRequest& AddSubnets(Aws::String&& value) { m_subnetsHasBeenSet = true; m_subnets.push_back(std::move(value)); return *this; } /** *

The IDs of the public subnets. You must specify subnets from at least two * Availability Zones. You can specify only one subnet per Availability Zone. You * must specify either subnets or subnet mappings.

*/ inline SetSubnetsRequest& AddSubnets(const char* value) { m_subnetsHasBeenSet = true; m_subnets.push_back(value); return *this; } /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones. You cannot specify Elastic IP addresses for your * subnets.

[Network Load Balancers] You can specify subnets from one or * more Availability Zones. If you need static IP addresses for your * internet-facing load balancer, you can specify one Elastic IP address per * subnet. For internal load balancers, you can specify one private IP address per * subnet from the IPv4 range of the subnet.

*/ inline const Aws::Vector& GetSubnetMappings() const{ return m_subnetMappings; } /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones. You cannot specify Elastic IP addresses for your * subnets.

[Network Load Balancers] You can specify subnets from one or * more Availability Zones. If you need static IP addresses for your * internet-facing load balancer, you can specify one Elastic IP address per * subnet. For internal load balancers, you can specify one private IP address per * subnet from the IPv4 range of the subnet.

*/ inline bool SubnetMappingsHasBeenSet() const { return m_subnetMappingsHasBeenSet; } /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones. You cannot specify Elastic IP addresses for your * subnets.

[Network Load Balancers] You can specify subnets from one or * more Availability Zones. If you need static IP addresses for your * internet-facing load balancer, you can specify one Elastic IP address per * subnet. For internal load balancers, you can specify one private IP address per * subnet from the IPv4 range of the subnet.

*/ inline void SetSubnetMappings(const Aws::Vector& value) { m_subnetMappingsHasBeenSet = true; m_subnetMappings = value; } /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones. You cannot specify Elastic IP addresses for your * subnets.

[Network Load Balancers] You can specify subnets from one or * more Availability Zones. If you need static IP addresses for your * internet-facing load balancer, you can specify one Elastic IP address per * subnet. For internal load balancers, you can specify one private IP address per * subnet from the IPv4 range of the subnet.

*/ inline void SetSubnetMappings(Aws::Vector&& value) { m_subnetMappingsHasBeenSet = true; m_subnetMappings = std::move(value); } /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones. You cannot specify Elastic IP addresses for your * subnets.

[Network Load Balancers] You can specify subnets from one or * more Availability Zones. If you need static IP addresses for your * internet-facing load balancer, you can specify one Elastic IP address per * subnet. For internal load balancers, you can specify one private IP address per * subnet from the IPv4 range of the subnet.

*/ inline SetSubnetsRequest& WithSubnetMappings(const Aws::Vector& value) { SetSubnetMappings(value); return *this;} /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones. You cannot specify Elastic IP addresses for your * subnets.

[Network Load Balancers] You can specify subnets from one or * more Availability Zones. If you need static IP addresses for your * internet-facing load balancer, you can specify one Elastic IP address per * subnet. For internal load balancers, you can specify one private IP address per * subnet from the IPv4 range of the subnet.

*/ inline SetSubnetsRequest& WithSubnetMappings(Aws::Vector&& value) { SetSubnetMappings(std::move(value)); return *this;} /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones. You cannot specify Elastic IP addresses for your * subnets.

[Network Load Balancers] You can specify subnets from one or * more Availability Zones. If you need static IP addresses for your * internet-facing load balancer, you can specify one Elastic IP address per * subnet. For internal load balancers, you can specify one private IP address per * subnet from the IPv4 range of the subnet.

*/ inline SetSubnetsRequest& AddSubnetMappings(const SubnetMapping& value) { m_subnetMappingsHasBeenSet = true; m_subnetMappings.push_back(value); return *this; } /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones. You cannot specify Elastic IP addresses for your * subnets.

[Network Load Balancers] You can specify subnets from one or * more Availability Zones. If you need static IP addresses for your * internet-facing load balancer, you can specify one Elastic IP address per * subnet. For internal load balancers, you can specify one private IP address per * subnet from the IPv4 range of the subnet.

*/ inline SetSubnetsRequest& AddSubnetMappings(SubnetMapping&& value) { m_subnetMappingsHasBeenSet = true; m_subnetMappings.push_back(std::move(value)); return *this; } private: Aws::String m_loadBalancerArn; bool m_loadBalancerArnHasBeenSet; Aws::Vector m_subnets; bool m_subnetsHasBeenSet; Aws::Vector m_subnetMappings; bool m_subnetMappingsHasBeenSet; }; } // namespace Model } // namespace ElasticLoadBalancingv2 } // namespace Aws