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

Describes a network interface attachment.

See Also:

AWS * API Reference

*/ class InstanceNetworkInterfaceAttachment { public: AWS_EC2_API InstanceNetworkInterfaceAttachment(); AWS_EC2_API InstanceNetworkInterfaceAttachment(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API InstanceNetworkInterfaceAttachment& 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 time stamp when the attachment initiated.

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

The time stamp when the attachment initiated.

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

The time stamp when the attachment initiated.

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

The time stamp when the attachment initiated.

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

The time stamp when the attachment initiated.

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

The time stamp when the attachment initiated.

*/ inline InstanceNetworkInterfaceAttachment& 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 InstanceNetworkInterfaceAttachment& WithAttachmentId(const Aws::String& value) { SetAttachmentId(value); return *this;} /** *

The ID of the network interface attachment.

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

The ID of the network interface attachment.

*/ inline InstanceNetworkInterfaceAttachment& 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 InstanceNetworkInterfaceAttachment& WithDeleteOnTermination(bool value) { SetDeleteOnTermination(value); return *this;} /** *

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

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

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

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

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

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

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

*/ inline InstanceNetworkInterfaceAttachment& WithDeviceIndex(int value) { SetDeviceIndex(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 InstanceNetworkInterfaceAttachment& WithStatus(const AttachmentStatus& value) { SetStatus(value); return *this;} /** *

The attachment state.

*/ inline InstanceNetworkInterfaceAttachment& WithStatus(AttachmentStatus&& value) { SetStatus(std::move(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 InstanceNetworkInterfaceAttachment& WithNetworkCardIndex(int value) { SetNetworkCardIndex(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; AttachmentStatus m_status; bool m_statusHasBeenSet = false; int m_networkCardIndex; bool m_networkCardIndexHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws