/** * 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 attachment.

See Also:

AWS * API Reference

*/ class NetworkInterfaceAttachment { public: AWS_EC2_API NetworkInterfaceAttachment(); AWS_EC2_API NetworkInterfaceAttachment(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API NetworkInterfaceAttachment& 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; /** *

The timestamp indicating when the attachment initiated.

*/ inline const Aws::Utils::DateTime& GetAttachTime() const{ return m_attachTime; } /** *

The timestamp indicating when the attachment initiated.

*/ inline bool AttachTimeHasBeenSet() const { return m_attachTimeHasBeenSet; } /** *

The timestamp indicating when the attachment initiated.

*/ inline void SetAttachTime(const Aws::Utils::DateTime& value) { m_attachTimeHasBeenSet = true; m_attachTime = value; } /** *

The timestamp indicating when the attachment initiated.

*/ inline void SetAttachTime(Aws::Utils::DateTime&& value) { m_attachTimeHasBeenSet = true; m_attachTime = std::move(value); } /** *

The timestamp indicating when the attachment initiated.

*/ inline NetworkInterfaceAttachment& WithAttachTime(const Aws::Utils::DateTime& value) { SetAttachTime(value); return *this;} /** *

The timestamp indicating when the attachment initiated.

*/ inline NetworkInterfaceAttachment& WithAttachTime(Aws::Utils::DateTime&& value) { SetAttachTime(std::move(value)); return *this;} /** *

The ID of the network interface attachment.

*/ inline const Aws::String& GetAttachmentId() const{ return m_attachmentId; } /** *

The ID of the network interface attachment.

*/ inline bool AttachmentIdHasBeenSet() const { return m_attachmentIdHasBeenSet; } /** *

The ID of the network interface attachment.

*/ inline void SetAttachmentId(const Aws::String& value) { m_attachmentIdHasBeenSet = true; m_attachmentId = value; } /** *

The ID of the network interface attachment.

*/ inline void SetAttachmentId(Aws::String&& value) { m_attachmentIdHasBeenSet = true; m_attachmentId = std::move(value); } /** *

The ID of the network interface attachment.

*/ inline void SetAttachmentId(const char* value) { m_attachmentIdHasBeenSet = true; m_attachmentId.assign(value); } /** *

The ID of the network interface attachment.

*/ inline NetworkInterfaceAttachment& WithAttachmentId(const Aws::String& value) { SetAttachmentId(value); return *this;} /** *

The ID of the network interface attachment.

*/ inline NetworkInterfaceAttachment& WithAttachmentId(Aws::String&& value) { SetAttachmentId(std::move(value)); return *this;} /** *

The ID of the network interface attachment.

*/ inline NetworkInterfaceAttachment& WithAttachmentId(const char* value) { SetAttachmentId(value); return *this;} /** *

Indicates whether the network interface is deleted when the instance is * terminated.

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

Indicates whether the network interface is deleted when the instance is * terminated.

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

Indicates whether the network interface is deleted when the instance is * terminated.

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

Indicates whether the network interface is deleted when the instance is * terminated.

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

The device index of the network interface attachment on the instance.

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

The device index of the network interface attachment on the instance.

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

The device index of the network interface attachment on the instance.

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

The device index of the network interface attachment on the instance.

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

The index of the network card.

*/ inline int GetNetworkCardIndex() const{ return m_networkCardIndex; } /** *

The index of the network card.

*/ inline bool NetworkCardIndexHasBeenSet() const { return m_networkCardIndexHasBeenSet; } /** *

The index of the network card.

*/ inline void SetNetworkCardIndex(int value) { m_networkCardIndexHasBeenSet = true; m_networkCardIndex = value; } /** *

The index of the network card.

*/ inline NetworkInterfaceAttachment& WithNetworkCardIndex(int value) { SetNetworkCardIndex(value); return *this;} /** *

The ID of the instance.

*/ inline const Aws::String& GetInstanceId() const{ return m_instanceId; } /** *

The ID of the instance.

*/ inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; } /** *

The ID of the instance.

*/ inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; } /** *

The ID of the instance.

*/ inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); } /** *

The ID of the instance.

*/ inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); } /** *

The ID of the instance.

*/ inline NetworkInterfaceAttachment& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;} /** *

The ID of the instance.

*/ inline NetworkInterfaceAttachment& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;} /** *

The ID of the instance.

*/ inline NetworkInterfaceAttachment& WithInstanceId(const char* value) { SetInstanceId(value); return *this;} /** *

The Amazon Web Services account ID of the owner of the instance.

*/ inline const Aws::String& GetInstanceOwnerId() const{ return m_instanceOwnerId; } /** *

The Amazon Web Services account ID of the owner of the instance.

*/ inline bool InstanceOwnerIdHasBeenSet() const { return m_instanceOwnerIdHasBeenSet; } /** *

The Amazon Web Services account ID of the owner of the instance.

*/ inline void SetInstanceOwnerId(const Aws::String& value) { m_instanceOwnerIdHasBeenSet = true; m_instanceOwnerId = value; } /** *

The Amazon Web Services account ID of the owner of the instance.

*/ inline void SetInstanceOwnerId(Aws::String&& value) { m_instanceOwnerIdHasBeenSet = true; m_instanceOwnerId = std::move(value); } /** *

The Amazon Web Services account ID of the owner of the instance.

*/ inline void SetInstanceOwnerId(const char* value) { m_instanceOwnerIdHasBeenSet = true; m_instanceOwnerId.assign(value); } /** *

The Amazon Web Services account ID of the owner of the instance.

*/ inline NetworkInterfaceAttachment& WithInstanceOwnerId(const Aws::String& value) { SetInstanceOwnerId(value); return *this;} /** *

The Amazon Web Services account ID of the owner of the instance.

*/ inline NetworkInterfaceAttachment& WithInstanceOwnerId(Aws::String&& value) { SetInstanceOwnerId(std::move(value)); return *this;} /** *

The Amazon Web Services account ID of the owner of the instance.

*/ inline NetworkInterfaceAttachment& WithInstanceOwnerId(const char* value) { SetInstanceOwnerId(value); return *this;} /** *

The attachment state.

*/ inline const AttachmentStatus& GetStatus() const{ return m_status; } /** *

The attachment state.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The attachment state.

*/ inline void SetStatus(const AttachmentStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The attachment state.

*/ inline void SetStatus(AttachmentStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The attachment state.

*/ inline NetworkInterfaceAttachment& WithStatus(const AttachmentStatus& value) { SetStatus(value); return *this;} /** *

The attachment state.

*/ inline NetworkInterfaceAttachment& WithStatus(AttachmentStatus&& value) { SetStatus(std::move(value)); return *this;} /** *

Configures ENA Express for the network interface that this action attaches to * the instance.

*/ inline const AttachmentEnaSrdSpecification& GetEnaSrdSpecification() const{ return m_enaSrdSpecification; } /** *

Configures ENA Express for the network interface that this action attaches to * the instance.

*/ inline bool EnaSrdSpecificationHasBeenSet() const { return m_enaSrdSpecificationHasBeenSet; } /** *

Configures ENA Express for the network interface that this action attaches to * the instance.

*/ inline void SetEnaSrdSpecification(const AttachmentEnaSrdSpecification& value) { m_enaSrdSpecificationHasBeenSet = true; m_enaSrdSpecification = value; } /** *

Configures ENA Express for the network interface that this action attaches to * the instance.

*/ inline void SetEnaSrdSpecification(AttachmentEnaSrdSpecification&& value) { m_enaSrdSpecificationHasBeenSet = true; m_enaSrdSpecification = std::move(value); } /** *

Configures ENA Express for the network interface that this action attaches to * the instance.

*/ inline NetworkInterfaceAttachment& WithEnaSrdSpecification(const AttachmentEnaSrdSpecification& value) { SetEnaSrdSpecification(value); return *this;} /** *

Configures ENA Express for the network interface that this action attaches to * the instance.

*/ inline NetworkInterfaceAttachment& WithEnaSrdSpecification(AttachmentEnaSrdSpecification&& value) { SetEnaSrdSpecification(std::move(value)); return *this;} private: Aws::Utils::DateTime m_attachTime; bool m_attachTimeHasBeenSet = false; Aws::String m_attachmentId; bool m_attachmentIdHasBeenSet = false; bool m_deleteOnTermination; bool m_deleteOnTerminationHasBeenSet = false; int m_deviceIndex; bool m_deviceIndexHasBeenSet = false; int m_networkCardIndex; bool m_networkCardIndexHasBeenSet = false; Aws::String m_instanceId; bool m_instanceIdHasBeenSet = false; Aws::String m_instanceOwnerId; bool m_instanceOwnerIdHasBeenSet = false; AttachmentStatus m_status; bool m_statusHasBeenSet = false; AttachmentEnaSrdSpecification m_enaSrdSpecification; bool m_enaSrdSpecificationHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws