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

Describes an attachment between a resource and a transit * gateway.

See Also:

AWS * API Reference

*/ class TransitGatewayAttachment { public: AWS_EC2_API TransitGatewayAttachment(); AWS_EC2_API TransitGatewayAttachment(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API TransitGatewayAttachment& 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 ID of the attachment.

*/ inline const Aws::String& GetTransitGatewayAttachmentId() const{ return m_transitGatewayAttachmentId; } /** *

The ID of the attachment.

*/ inline bool TransitGatewayAttachmentIdHasBeenSet() const { return m_transitGatewayAttachmentIdHasBeenSet; } /** *

The ID of the attachment.

*/ inline void SetTransitGatewayAttachmentId(const Aws::String& value) { m_transitGatewayAttachmentIdHasBeenSet = true; m_transitGatewayAttachmentId = value; } /** *

The ID of the attachment.

*/ inline void SetTransitGatewayAttachmentId(Aws::String&& value) { m_transitGatewayAttachmentIdHasBeenSet = true; m_transitGatewayAttachmentId = std::move(value); } /** *

The ID of the attachment.

*/ inline void SetTransitGatewayAttachmentId(const char* value) { m_transitGatewayAttachmentIdHasBeenSet = true; m_transitGatewayAttachmentId.assign(value); } /** *

The ID of the attachment.

*/ inline TransitGatewayAttachment& WithTransitGatewayAttachmentId(const Aws::String& value) { SetTransitGatewayAttachmentId(value); return *this;} /** *

The ID of the attachment.

*/ inline TransitGatewayAttachment& WithTransitGatewayAttachmentId(Aws::String&& value) { SetTransitGatewayAttachmentId(std::move(value)); return *this;} /** *

The ID of the attachment.

*/ inline TransitGatewayAttachment& WithTransitGatewayAttachmentId(const char* value) { SetTransitGatewayAttachmentId(value); return *this;} /** *

The ID of the transit gateway.

*/ inline const Aws::String& GetTransitGatewayId() const{ return m_transitGatewayId; } /** *

The ID of the transit gateway.

*/ inline bool TransitGatewayIdHasBeenSet() const { return m_transitGatewayIdHasBeenSet; } /** *

The ID of the transit gateway.

*/ inline void SetTransitGatewayId(const Aws::String& value) { m_transitGatewayIdHasBeenSet = true; m_transitGatewayId = value; } /** *

The ID of the transit gateway.

*/ inline void SetTransitGatewayId(Aws::String&& value) { m_transitGatewayIdHasBeenSet = true; m_transitGatewayId = std::move(value); } /** *

The ID of the transit gateway.

*/ inline void SetTransitGatewayId(const char* value) { m_transitGatewayIdHasBeenSet = true; m_transitGatewayId.assign(value); } /** *

The ID of the transit gateway.

*/ inline TransitGatewayAttachment& WithTransitGatewayId(const Aws::String& value) { SetTransitGatewayId(value); return *this;} /** *

The ID of the transit gateway.

*/ inline TransitGatewayAttachment& WithTransitGatewayId(Aws::String&& value) { SetTransitGatewayId(std::move(value)); return *this;} /** *

The ID of the transit gateway.

*/ inline TransitGatewayAttachment& WithTransitGatewayId(const char* value) { SetTransitGatewayId(value); return *this;} /** *

The ID of the Amazon Web Services account that owns the transit gateway.

*/ inline const Aws::String& GetTransitGatewayOwnerId() const{ return m_transitGatewayOwnerId; } /** *

The ID of the Amazon Web Services account that owns the transit gateway.

*/ inline bool TransitGatewayOwnerIdHasBeenSet() const { return m_transitGatewayOwnerIdHasBeenSet; } /** *

The ID of the Amazon Web Services account that owns the transit gateway.

*/ inline void SetTransitGatewayOwnerId(const Aws::String& value) { m_transitGatewayOwnerIdHasBeenSet = true; m_transitGatewayOwnerId = value; } /** *

The ID of the Amazon Web Services account that owns the transit gateway.

*/ inline void SetTransitGatewayOwnerId(Aws::String&& value) { m_transitGatewayOwnerIdHasBeenSet = true; m_transitGatewayOwnerId = std::move(value); } /** *

The ID of the Amazon Web Services account that owns the transit gateway.

*/ inline void SetTransitGatewayOwnerId(const char* value) { m_transitGatewayOwnerIdHasBeenSet = true; m_transitGatewayOwnerId.assign(value); } /** *

The ID of the Amazon Web Services account that owns the transit gateway.

*/ inline TransitGatewayAttachment& WithTransitGatewayOwnerId(const Aws::String& value) { SetTransitGatewayOwnerId(value); return *this;} /** *

The ID of the Amazon Web Services account that owns the transit gateway.

*/ inline TransitGatewayAttachment& WithTransitGatewayOwnerId(Aws::String&& value) { SetTransitGatewayOwnerId(std::move(value)); return *this;} /** *

The ID of the Amazon Web Services account that owns the transit gateway.

*/ inline TransitGatewayAttachment& WithTransitGatewayOwnerId(const char* value) { SetTransitGatewayOwnerId(value); return *this;} /** *

The ID of the Amazon Web Services account that owns the resource.

*/ inline const Aws::String& GetResourceOwnerId() const{ return m_resourceOwnerId; } /** *

The ID of the Amazon Web Services account that owns the resource.

*/ inline bool ResourceOwnerIdHasBeenSet() const { return m_resourceOwnerIdHasBeenSet; } /** *

The ID of the Amazon Web Services account that owns the resource.

*/ inline void SetResourceOwnerId(const Aws::String& value) { m_resourceOwnerIdHasBeenSet = true; m_resourceOwnerId = value; } /** *

The ID of the Amazon Web Services account that owns the resource.

*/ inline void SetResourceOwnerId(Aws::String&& value) { m_resourceOwnerIdHasBeenSet = true; m_resourceOwnerId = std::move(value); } /** *

The ID of the Amazon Web Services account that owns the resource.

*/ inline void SetResourceOwnerId(const char* value) { m_resourceOwnerIdHasBeenSet = true; m_resourceOwnerId.assign(value); } /** *

The ID of the Amazon Web Services account that owns the resource.

*/ inline TransitGatewayAttachment& WithResourceOwnerId(const Aws::String& value) { SetResourceOwnerId(value); return *this;} /** *

The ID of the Amazon Web Services account that owns the resource.

*/ inline TransitGatewayAttachment& WithResourceOwnerId(Aws::String&& value) { SetResourceOwnerId(std::move(value)); return *this;} /** *

The ID of the Amazon Web Services account that owns the resource.

*/ inline TransitGatewayAttachment& WithResourceOwnerId(const char* value) { SetResourceOwnerId(value); return *this;} /** *

The resource type. Note that the tgw-peering resource type has * been deprecated.

*/ inline const TransitGatewayAttachmentResourceType& GetResourceType() const{ return m_resourceType; } /** *

The resource type. Note that the tgw-peering resource type has * been deprecated.

*/ inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; } /** *

The resource type. Note that the tgw-peering resource type has * been deprecated.

*/ inline void SetResourceType(const TransitGatewayAttachmentResourceType& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; } /** *

The resource type. Note that the tgw-peering resource type has * been deprecated.

*/ inline void SetResourceType(TransitGatewayAttachmentResourceType&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); } /** *

The resource type. Note that the tgw-peering resource type has * been deprecated.

*/ inline TransitGatewayAttachment& WithResourceType(const TransitGatewayAttachmentResourceType& value) { SetResourceType(value); return *this;} /** *

The resource type. Note that the tgw-peering resource type has * been deprecated.

*/ inline TransitGatewayAttachment& WithResourceType(TransitGatewayAttachmentResourceType&& value) { SetResourceType(std::move(value)); return *this;} /** *

The ID of the resource.

*/ inline const Aws::String& GetResourceId() const{ return m_resourceId; } /** *

The ID of the resource.

*/ inline bool ResourceIdHasBeenSet() const { return m_resourceIdHasBeenSet; } /** *

The ID of the resource.

*/ inline void SetResourceId(const Aws::String& value) { m_resourceIdHasBeenSet = true; m_resourceId = value; } /** *

The ID of the resource.

*/ inline void SetResourceId(Aws::String&& value) { m_resourceIdHasBeenSet = true; m_resourceId = std::move(value); } /** *

The ID of the resource.

*/ inline void SetResourceId(const char* value) { m_resourceIdHasBeenSet = true; m_resourceId.assign(value); } /** *

The ID of the resource.

*/ inline TransitGatewayAttachment& WithResourceId(const Aws::String& value) { SetResourceId(value); return *this;} /** *

The ID of the resource.

*/ inline TransitGatewayAttachment& WithResourceId(Aws::String&& value) { SetResourceId(std::move(value)); return *this;} /** *

The ID of the resource.

*/ inline TransitGatewayAttachment& WithResourceId(const char* value) { SetResourceId(value); return *this;} /** *

The attachment state. Note that the initiating state has been * deprecated.

*/ inline const TransitGatewayAttachmentState& GetState() const{ return m_state; } /** *

The attachment state. Note that the initiating state has been * deprecated.

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

The attachment state. Note that the initiating state has been * deprecated.

*/ inline void SetState(const TransitGatewayAttachmentState& value) { m_stateHasBeenSet = true; m_state = value; } /** *

The attachment state. Note that the initiating state has been * deprecated.

*/ inline void SetState(TransitGatewayAttachmentState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

The attachment state. Note that the initiating state has been * deprecated.

*/ inline TransitGatewayAttachment& WithState(const TransitGatewayAttachmentState& value) { SetState(value); return *this;} /** *

The attachment state. Note that the initiating state has been * deprecated.

*/ inline TransitGatewayAttachment& WithState(TransitGatewayAttachmentState&& value) { SetState(std::move(value)); return *this;} /** *

The association.

*/ inline const TransitGatewayAttachmentAssociation& GetAssociation() const{ return m_association; } /** *

The association.

*/ inline bool AssociationHasBeenSet() const { return m_associationHasBeenSet; } /** *

The association.

*/ inline void SetAssociation(const TransitGatewayAttachmentAssociation& value) { m_associationHasBeenSet = true; m_association = value; } /** *

The association.

*/ inline void SetAssociation(TransitGatewayAttachmentAssociation&& value) { m_associationHasBeenSet = true; m_association = std::move(value); } /** *

The association.

*/ inline TransitGatewayAttachment& WithAssociation(const TransitGatewayAttachmentAssociation& value) { SetAssociation(value); return *this;} /** *

The association.

*/ inline TransitGatewayAttachment& WithAssociation(TransitGatewayAttachmentAssociation&& value) { SetAssociation(std::move(value)); return *this;} /** *

The creation time.

*/ inline const Aws::Utils::DateTime& GetCreationTime() const{ return m_creationTime; } /** *

The creation time.

*/ inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; } /** *

The creation time.

*/ inline void SetCreationTime(const Aws::Utils::DateTime& value) { m_creationTimeHasBeenSet = true; m_creationTime = value; } /** *

The creation time.

*/ inline void SetCreationTime(Aws::Utils::DateTime&& value) { m_creationTimeHasBeenSet = true; m_creationTime = std::move(value); } /** *

The creation time.

*/ inline TransitGatewayAttachment& WithCreationTime(const Aws::Utils::DateTime& value) { SetCreationTime(value); return *this;} /** *

The creation time.

*/ inline TransitGatewayAttachment& WithCreationTime(Aws::Utils::DateTime&& value) { SetCreationTime(std::move(value)); return *this;} /** *

The tags for the attachment.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

The tags for the attachment.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

The tags for the attachment.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

The tags for the attachment.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

The tags for the attachment.

*/ inline TransitGatewayAttachment& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

The tags for the attachment.

*/ inline TransitGatewayAttachment& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

The tags for the attachment.

*/ inline TransitGatewayAttachment& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

The tags for the attachment.

*/ inline TransitGatewayAttachment& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_transitGatewayAttachmentId; bool m_transitGatewayAttachmentIdHasBeenSet = false; Aws::String m_transitGatewayId; bool m_transitGatewayIdHasBeenSet = false; Aws::String m_transitGatewayOwnerId; bool m_transitGatewayOwnerIdHasBeenSet = false; Aws::String m_resourceOwnerId; bool m_resourceOwnerIdHasBeenSet = false; TransitGatewayAttachmentResourceType m_resourceType; bool m_resourceTypeHasBeenSet = false; Aws::String m_resourceId; bool m_resourceIdHasBeenSet = false; TransitGatewayAttachmentState m_state; bool m_stateHasBeenSet = false; TransitGatewayAttachmentAssociation m_association; bool m_associationHasBeenSet = false; Aws::Utils::DateTime m_creationTime; bool m_creationTimeHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws