/** * 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 Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace EC2 { namespace Model { /** *

Describes a network interface for a Scheduled Instance.

See * Also:

AWS * API Reference

*/ class ScheduledInstancesNetworkInterface { public: AWS_EC2_API ScheduledInstancesNetworkInterface(); AWS_EC2_API ScheduledInstancesNetworkInterface(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API ScheduledInstancesNetworkInterface& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

Indicates whether to assign a public IPv4 address to instances launched in a * VPC. The public IPv4 address can only be assigned to a network interface for * eth0, and can only be assigned to a new network interface, not an existing one. * You cannot specify more than one network interface in the request. If launching * into a default subnet, the default value is true.

*/ inline bool GetAssociatePublicIpAddress() const{ return m_associatePublicIpAddress; } /** *

Indicates whether to assign a public IPv4 address to instances launched in a * VPC. The public IPv4 address can only be assigned to a network interface for * eth0, and can only be assigned to a new network interface, not an existing one. * You cannot specify more than one network interface in the request. If launching * into a default subnet, the default value is true.

*/ inline bool AssociatePublicIpAddressHasBeenSet() const { return m_associatePublicIpAddressHasBeenSet; } /** *

Indicates whether to assign a public IPv4 address to instances launched in a * VPC. The public IPv4 address can only be assigned to a network interface for * eth0, and can only be assigned to a new network interface, not an existing one. * You cannot specify more than one network interface in the request. If launching * into a default subnet, the default value is true.

*/ inline void SetAssociatePublicIpAddress(bool value) { m_associatePublicIpAddressHasBeenSet = true; m_associatePublicIpAddress = value; } /** *

Indicates whether to assign a public IPv4 address to instances launched in a * VPC. The public IPv4 address can only be assigned to a network interface for * eth0, and can only be assigned to a new network interface, not an existing one. * You cannot specify more than one network interface in the request. If launching * into a default subnet, the default value is true.

*/ inline ScheduledInstancesNetworkInterface& WithAssociatePublicIpAddress(bool value) { SetAssociatePublicIpAddress(value); return *this;} /** *

Indicates whether to delete the interface when the instance is * terminated.

*/ inline bool GetDeleteOnTermination() const{ return m_deleteOnTermination; } /** *

Indicates whether to delete the interface when the instance is * terminated.

*/ inline bool DeleteOnTerminationHasBeenSet() const { return m_deleteOnTerminationHasBeenSet; } /** *

Indicates whether to delete the interface when the instance is * terminated.

*/ inline void SetDeleteOnTermination(bool value) { m_deleteOnTerminationHasBeenSet = true; m_deleteOnTermination = value; } /** *

Indicates whether to delete the interface when the instance is * terminated.

*/ inline ScheduledInstancesNetworkInterface& WithDeleteOnTermination(bool value) { SetDeleteOnTermination(value); return *this;} /** *

The description.

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

The description.

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

The description.

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

The description.

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

The description.

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

The description.

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

The description.

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

The description.

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

The index of the device for the network interface attachment.

*/ inline int GetDeviceIndex() const{ return m_deviceIndex; } /** *

The index of the device for the network interface attachment.

*/ inline bool DeviceIndexHasBeenSet() const { return m_deviceIndexHasBeenSet; } /** *

The index of the device for the network interface attachment.

*/ inline void SetDeviceIndex(int value) { m_deviceIndexHasBeenSet = true; m_deviceIndex = value; } /** *

The index of the device for the network interface attachment.

*/ inline ScheduledInstancesNetworkInterface& WithDeviceIndex(int value) { SetDeviceIndex(value); return *this;} /** *

The IDs of the security groups.

*/ inline const Aws::Vector& GetGroups() const{ return m_groups; } /** *

The IDs of the security groups.

*/ inline bool GroupsHasBeenSet() const { return m_groupsHasBeenSet; } /** *

The IDs of the security groups.

*/ inline void SetGroups(const Aws::Vector& value) { m_groupsHasBeenSet = true; m_groups = value; } /** *

The IDs of the security groups.

*/ inline void SetGroups(Aws::Vector&& value) { m_groupsHasBeenSet = true; m_groups = std::move(value); } /** *

The IDs of the security groups.

*/ inline ScheduledInstancesNetworkInterface& WithGroups(const Aws::Vector& value) { SetGroups(value); return *this;} /** *

The IDs of the security groups.

*/ inline ScheduledInstancesNetworkInterface& WithGroups(Aws::Vector&& value) { SetGroups(std::move(value)); return *this;} /** *

The IDs of the security groups.

*/ inline ScheduledInstancesNetworkInterface& AddGroups(const Aws::String& value) { m_groupsHasBeenSet = true; m_groups.push_back(value); return *this; } /** *

The IDs of the security groups.

*/ inline ScheduledInstancesNetworkInterface& AddGroups(Aws::String&& value) { m_groupsHasBeenSet = true; m_groups.push_back(std::move(value)); return *this; } /** *

The IDs of the security groups.

*/ inline ScheduledInstancesNetworkInterface& AddGroups(const char* value) { m_groupsHasBeenSet = true; m_groups.push_back(value); return *this; } /** *

The number of IPv6 addresses to assign to the network interface. The IPv6 * addresses are automatically selected from the subnet range.

*/ inline int GetIpv6AddressCount() const{ return m_ipv6AddressCount; } /** *

The number of IPv6 addresses to assign to the network interface. The IPv6 * addresses are automatically selected from the subnet range.

*/ inline bool Ipv6AddressCountHasBeenSet() const { return m_ipv6AddressCountHasBeenSet; } /** *

The number of IPv6 addresses to assign to the network interface. The IPv6 * addresses are automatically selected from the subnet range.

*/ inline void SetIpv6AddressCount(int value) { m_ipv6AddressCountHasBeenSet = true; m_ipv6AddressCount = value; } /** *

The number of IPv6 addresses to assign to the network interface. The IPv6 * addresses are automatically selected from the subnet range.

*/ inline ScheduledInstancesNetworkInterface& WithIpv6AddressCount(int value) { SetIpv6AddressCount(value); return *this;} /** *

The specific IPv6 addresses from the subnet range.

*/ inline const Aws::Vector& GetIpv6Addresses() const{ return m_ipv6Addresses; } /** *

The specific IPv6 addresses from the subnet range.

*/ inline bool Ipv6AddressesHasBeenSet() const { return m_ipv6AddressesHasBeenSet; } /** *

The specific IPv6 addresses from the subnet range.

*/ inline void SetIpv6Addresses(const Aws::Vector& value) { m_ipv6AddressesHasBeenSet = true; m_ipv6Addresses = value; } /** *

The specific IPv6 addresses from the subnet range.

*/ inline void SetIpv6Addresses(Aws::Vector&& value) { m_ipv6AddressesHasBeenSet = true; m_ipv6Addresses = std::move(value); } /** *

The specific IPv6 addresses from the subnet range.

*/ inline ScheduledInstancesNetworkInterface& WithIpv6Addresses(const Aws::Vector& value) { SetIpv6Addresses(value); return *this;} /** *

The specific IPv6 addresses from the subnet range.

*/ inline ScheduledInstancesNetworkInterface& WithIpv6Addresses(Aws::Vector&& value) { SetIpv6Addresses(std::move(value)); return *this;} /** *

The specific IPv6 addresses from the subnet range.

*/ inline ScheduledInstancesNetworkInterface& AddIpv6Addresses(const ScheduledInstancesIpv6Address& value) { m_ipv6AddressesHasBeenSet = true; m_ipv6Addresses.push_back(value); return *this; } /** *

The specific IPv6 addresses from the subnet range.

*/ inline ScheduledInstancesNetworkInterface& AddIpv6Addresses(ScheduledInstancesIpv6Address&& value) { m_ipv6AddressesHasBeenSet = true; m_ipv6Addresses.push_back(std::move(value)); return *this; } /** *

The ID of the network interface.

*/ inline const Aws::String& GetNetworkInterfaceId() const{ return m_networkInterfaceId; } /** *

The ID of the network interface.

*/ inline bool NetworkInterfaceIdHasBeenSet() const { return m_networkInterfaceIdHasBeenSet; } /** *

The ID of the network interface.

*/ inline void SetNetworkInterfaceId(const Aws::String& value) { m_networkInterfaceIdHasBeenSet = true; m_networkInterfaceId = value; } /** *

The ID of the network interface.

*/ inline void SetNetworkInterfaceId(Aws::String&& value) { m_networkInterfaceIdHasBeenSet = true; m_networkInterfaceId = std::move(value); } /** *

The ID of the network interface.

*/ inline void SetNetworkInterfaceId(const char* value) { m_networkInterfaceIdHasBeenSet = true; m_networkInterfaceId.assign(value); } /** *

The ID of the network interface.

*/ inline ScheduledInstancesNetworkInterface& WithNetworkInterfaceId(const Aws::String& value) { SetNetworkInterfaceId(value); return *this;} /** *

The ID of the network interface.

*/ inline ScheduledInstancesNetworkInterface& WithNetworkInterfaceId(Aws::String&& value) { SetNetworkInterfaceId(std::move(value)); return *this;} /** *

The ID of the network interface.

*/ inline ScheduledInstancesNetworkInterface& WithNetworkInterfaceId(const char* value) { SetNetworkInterfaceId(value); return *this;} /** *

The IPv4 address of the network interface within the subnet.

*/ inline const Aws::String& GetPrivateIpAddress() const{ return m_privateIpAddress; } /** *

The IPv4 address of the network interface within the subnet.

*/ inline bool PrivateIpAddressHasBeenSet() const { return m_privateIpAddressHasBeenSet; } /** *

The IPv4 address of the network interface within the subnet.

*/ inline void SetPrivateIpAddress(const Aws::String& value) { m_privateIpAddressHasBeenSet = true; m_privateIpAddress = value; } /** *

The IPv4 address of the network interface within the subnet.

*/ inline void SetPrivateIpAddress(Aws::String&& value) { m_privateIpAddressHasBeenSet = true; m_privateIpAddress = std::move(value); } /** *

The IPv4 address of the network interface within the subnet.

*/ inline void SetPrivateIpAddress(const char* value) { m_privateIpAddressHasBeenSet = true; m_privateIpAddress.assign(value); } /** *

The IPv4 address of the network interface within the subnet.

*/ inline ScheduledInstancesNetworkInterface& WithPrivateIpAddress(const Aws::String& value) { SetPrivateIpAddress(value); return *this;} /** *

The IPv4 address of the network interface within the subnet.

*/ inline ScheduledInstancesNetworkInterface& WithPrivateIpAddress(Aws::String&& value) { SetPrivateIpAddress(std::move(value)); return *this;} /** *

The IPv4 address of the network interface within the subnet.

*/ inline ScheduledInstancesNetworkInterface& WithPrivateIpAddress(const char* value) { SetPrivateIpAddress(value); return *this;} /** *

The private IPv4 addresses.

*/ inline const Aws::Vector& GetPrivateIpAddressConfigs() const{ return m_privateIpAddressConfigs; } /** *

The private IPv4 addresses.

*/ inline bool PrivateIpAddressConfigsHasBeenSet() const { return m_privateIpAddressConfigsHasBeenSet; } /** *

The private IPv4 addresses.

*/ inline void SetPrivateIpAddressConfigs(const Aws::Vector& value) { m_privateIpAddressConfigsHasBeenSet = true; m_privateIpAddressConfigs = value; } /** *

The private IPv4 addresses.

*/ inline void SetPrivateIpAddressConfigs(Aws::Vector&& value) { m_privateIpAddressConfigsHasBeenSet = true; m_privateIpAddressConfigs = std::move(value); } /** *

The private IPv4 addresses.

*/ inline ScheduledInstancesNetworkInterface& WithPrivateIpAddressConfigs(const Aws::Vector& value) { SetPrivateIpAddressConfigs(value); return *this;} /** *

The private IPv4 addresses.

*/ inline ScheduledInstancesNetworkInterface& WithPrivateIpAddressConfigs(Aws::Vector&& value) { SetPrivateIpAddressConfigs(std::move(value)); return *this;} /** *

The private IPv4 addresses.

*/ inline ScheduledInstancesNetworkInterface& AddPrivateIpAddressConfigs(const ScheduledInstancesPrivateIpAddressConfig& value) { m_privateIpAddressConfigsHasBeenSet = true; m_privateIpAddressConfigs.push_back(value); return *this; } /** *

The private IPv4 addresses.

*/ inline ScheduledInstancesNetworkInterface& AddPrivateIpAddressConfigs(ScheduledInstancesPrivateIpAddressConfig&& value) { m_privateIpAddressConfigsHasBeenSet = true; m_privateIpAddressConfigs.push_back(std::move(value)); return *this; } /** *

The number of secondary private IPv4 addresses.

*/ inline int GetSecondaryPrivateIpAddressCount() const{ return m_secondaryPrivateIpAddressCount; } /** *

The number of secondary private IPv4 addresses.

*/ inline bool SecondaryPrivateIpAddressCountHasBeenSet() const { return m_secondaryPrivateIpAddressCountHasBeenSet; } /** *

The number of secondary private IPv4 addresses.

*/ inline void SetSecondaryPrivateIpAddressCount(int value) { m_secondaryPrivateIpAddressCountHasBeenSet = true; m_secondaryPrivateIpAddressCount = value; } /** *

The number of secondary private IPv4 addresses.

*/ inline ScheduledInstancesNetworkInterface& WithSecondaryPrivateIpAddressCount(int value) { SetSecondaryPrivateIpAddressCount(value); return *this;} /** *

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 ScheduledInstancesNetworkInterface& WithSubnetId(const Aws::String& value) { SetSubnetId(value); return *this;} /** *

The ID of the subnet.

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

The ID of the subnet.

*/ inline ScheduledInstancesNetworkInterface& WithSubnetId(const char* value) { SetSubnetId(value); return *this;} private: bool m_associatePublicIpAddress; bool m_associatePublicIpAddressHasBeenSet = false; bool m_deleteOnTermination; bool m_deleteOnTerminationHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; int m_deviceIndex; bool m_deviceIndexHasBeenSet = false; Aws::Vector m_groups; bool m_groupsHasBeenSet = false; int m_ipv6AddressCount; bool m_ipv6AddressCountHasBeenSet = false; Aws::Vector m_ipv6Addresses; bool m_ipv6AddressesHasBeenSet = false; Aws::String m_networkInterfaceId; bool m_networkInterfaceIdHasBeenSet = false; Aws::String m_privateIpAddress; bool m_privateIpAddressHasBeenSet = false; Aws::Vector m_privateIpAddressConfigs; bool m_privateIpAddressConfigsHasBeenSet = false; int m_secondaryPrivateIpAddressCount; bool m_secondaryPrivateIpAddressCountHasBeenSet = false; Aws::String m_subnetId; bool m_subnetIdHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws