/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace EC2 { namespace Model { /** */ class CreateSubnetCidrReservationRequest : public EC2Request { public: AWS_EC2_API CreateSubnetCidrReservationRequest(); // 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 "CreateSubnetCidrReservation"; } AWS_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The ID of the subnet.

*/ inline const Aws::String& GetSubnetId() const{ return m_subnetId; } /** *

The ID of the subnet.

*/ inline bool SubnetIdHasBeenSet() const { return m_subnetIdHasBeenSet; } /** *

The ID of the subnet.

*/ inline void SetSubnetId(const Aws::String& value) { m_subnetIdHasBeenSet = true; m_subnetId = value; } /** *

The ID of the subnet.

*/ inline void SetSubnetId(Aws::String&& value) { m_subnetIdHasBeenSet = true; m_subnetId = std::move(value); } /** *

The ID of the subnet.

*/ inline void SetSubnetId(const char* value) { m_subnetIdHasBeenSet = true; m_subnetId.assign(value); } /** *

The ID of the subnet.

*/ inline CreateSubnetCidrReservationRequest& WithSubnetId(const Aws::String& value) { SetSubnetId(value); return *this;} /** *

The ID of the subnet.

*/ inline CreateSubnetCidrReservationRequest& WithSubnetId(Aws::String&& value) { SetSubnetId(std::move(value)); return *this;} /** *

The ID of the subnet.

*/ inline CreateSubnetCidrReservationRequest& WithSubnetId(const char* value) { SetSubnetId(value); return *this;} /** *

The IPv4 or IPV6 CIDR range to reserve.

*/ inline const Aws::String& GetCidr() const{ return m_cidr; } /** *

The IPv4 or IPV6 CIDR range to reserve.

*/ inline bool CidrHasBeenSet() const { return m_cidrHasBeenSet; } /** *

The IPv4 or IPV6 CIDR range to reserve.

*/ inline void SetCidr(const Aws::String& value) { m_cidrHasBeenSet = true; m_cidr = value; } /** *

The IPv4 or IPV6 CIDR range to reserve.

*/ inline void SetCidr(Aws::String&& value) { m_cidrHasBeenSet = true; m_cidr = std::move(value); } /** *

The IPv4 or IPV6 CIDR range to reserve.

*/ inline void SetCidr(const char* value) { m_cidrHasBeenSet = true; m_cidr.assign(value); } /** *

The IPv4 or IPV6 CIDR range to reserve.

*/ inline CreateSubnetCidrReservationRequest& WithCidr(const Aws::String& value) { SetCidr(value); return *this;} /** *

The IPv4 or IPV6 CIDR range to reserve.

*/ inline CreateSubnetCidrReservationRequest& WithCidr(Aws::String&& value) { SetCidr(std::move(value)); return *this;} /** *

The IPv4 or IPV6 CIDR range to reserve.

*/ inline CreateSubnetCidrReservationRequest& WithCidr(const char* value) { SetCidr(value); return *this;} /** *

The type of reservation.

The following are valid values:

  • *

    prefix: The Amazon EC2 Prefix Delegation feature assigns the IP * addresses to network interfaces that are associated with an instance. For * information about Prefix Delegation, see Prefix * Delegation for Amazon EC2 network interfaces in the Amazon Elastic * Compute Cloud User Guide.

  • explicit: You * manually assign the IP addresses to resources that reside in your subnet.

    *
*/ inline const SubnetCidrReservationType& GetReservationType() const{ return m_reservationType; } /** *

The type of reservation.

The following are valid values:

  • *

    prefix: The Amazon EC2 Prefix Delegation feature assigns the IP * addresses to network interfaces that are associated with an instance. For * information about Prefix Delegation, see Prefix * Delegation for Amazon EC2 network interfaces in the Amazon Elastic * Compute Cloud User Guide.

  • explicit: You * manually assign the IP addresses to resources that reside in your subnet.

    *
*/ inline bool ReservationTypeHasBeenSet() const { return m_reservationTypeHasBeenSet; } /** *

The type of reservation.

The following are valid values:

  • *

    prefix: The Amazon EC2 Prefix Delegation feature assigns the IP * addresses to network interfaces that are associated with an instance. For * information about Prefix Delegation, see Prefix * Delegation for Amazon EC2 network interfaces in the Amazon Elastic * Compute Cloud User Guide.

  • explicit: You * manually assign the IP addresses to resources that reside in your subnet.

    *
*/ inline void SetReservationType(const SubnetCidrReservationType& value) { m_reservationTypeHasBeenSet = true; m_reservationType = value; } /** *

The type of reservation.

The following are valid values:

  • *

    prefix: The Amazon EC2 Prefix Delegation feature assigns the IP * addresses to network interfaces that are associated with an instance. For * information about Prefix Delegation, see Prefix * Delegation for Amazon EC2 network interfaces in the Amazon Elastic * Compute Cloud User Guide.

  • explicit: You * manually assign the IP addresses to resources that reside in your subnet.

    *
*/ inline void SetReservationType(SubnetCidrReservationType&& value) { m_reservationTypeHasBeenSet = true; m_reservationType = std::move(value); } /** *

The type of reservation.

The following are valid values:

  • *

    prefix: The Amazon EC2 Prefix Delegation feature assigns the IP * addresses to network interfaces that are associated with an instance. For * information about Prefix Delegation, see Prefix * Delegation for Amazon EC2 network interfaces in the Amazon Elastic * Compute Cloud User Guide.

  • explicit: You * manually assign the IP addresses to resources that reside in your subnet.

    *
*/ inline CreateSubnetCidrReservationRequest& WithReservationType(const SubnetCidrReservationType& value) { SetReservationType(value); return *this;} /** *

The type of reservation.

The following are valid values:

  • *

    prefix: The Amazon EC2 Prefix Delegation feature assigns the IP * addresses to network interfaces that are associated with an instance. For * information about Prefix Delegation, see Prefix * Delegation for Amazon EC2 network interfaces in the Amazon Elastic * Compute Cloud User Guide.

  • explicit: You * manually assign the IP addresses to resources that reside in your subnet.

    *
*/ inline CreateSubnetCidrReservationRequest& WithReservationType(SubnetCidrReservationType&& value) { SetReservationType(std::move(value)); return *this;} /** *

The description to assign to the subnet CIDR reservation.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

The description to assign to the subnet CIDR reservation.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

The description to assign to the subnet CIDR reservation.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

The description to assign to the subnet CIDR reservation.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

The description to assign to the subnet CIDR reservation.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

The description to assign to the subnet CIDR reservation.

*/ inline CreateSubnetCidrReservationRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

The description to assign to the subnet CIDR reservation.

*/ inline CreateSubnetCidrReservationRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

The description to assign to the subnet CIDR reservation.

*/ inline CreateSubnetCidrReservationRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool GetDryRun() const{ return m_dryRun; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline CreateSubnetCidrReservationRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} /** *

The tags to assign to the subnet CIDR reservation.

*/ inline const Aws::Vector& GetTagSpecifications() const{ return m_tagSpecifications; } /** *

The tags to assign to the subnet CIDR reservation.

*/ inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; } /** *

The tags to assign to the subnet CIDR reservation.

*/ inline void SetTagSpecifications(const Aws::Vector& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; } /** *

The tags to assign to the subnet CIDR reservation.

*/ inline void SetTagSpecifications(Aws::Vector&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); } /** *

The tags to assign to the subnet CIDR reservation.

*/ inline CreateSubnetCidrReservationRequest& WithTagSpecifications(const Aws::Vector& value) { SetTagSpecifications(value); return *this;} /** *

The tags to assign to the subnet CIDR reservation.

*/ inline CreateSubnetCidrReservationRequest& WithTagSpecifications(Aws::Vector&& value) { SetTagSpecifications(std::move(value)); return *this;} /** *

The tags to assign to the subnet CIDR reservation.

*/ inline CreateSubnetCidrReservationRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; } /** *

The tags to assign to the subnet CIDR reservation.

*/ inline CreateSubnetCidrReservationRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; } private: Aws::String m_subnetId; bool m_subnetIdHasBeenSet = false; Aws::String m_cidr; bool m_cidrHasBeenSet = false; SubnetCidrReservationType m_reservationType; bool m_reservationTypeHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; Aws::Vector m_tagSpecifications; bool m_tagSpecificationsHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws