/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace EC2 { namespace Model { /** *

Describes an association between a route table and a subnet or * gateway.

See Also:

AWS * API Reference

*/ class RouteTableAssociation { public: AWS_EC2_API RouteTableAssociation(); AWS_EC2_API RouteTableAssociation(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API RouteTableAssociation& 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 this is the main route table.

*/ inline bool GetMain() const{ return m_main; } /** *

Indicates whether this is the main route table.

*/ inline bool MainHasBeenSet() const { return m_mainHasBeenSet; } /** *

Indicates whether this is the main route table.

*/ inline void SetMain(bool value) { m_mainHasBeenSet = true; m_main = value; } /** *

Indicates whether this is the main route table.

*/ inline RouteTableAssociation& WithMain(bool value) { SetMain(value); return *this;} /** *

The ID of the association.

*/ inline const Aws::String& GetRouteTableAssociationId() const{ return m_routeTableAssociationId; } /** *

The ID of the association.

*/ inline bool RouteTableAssociationIdHasBeenSet() const { return m_routeTableAssociationIdHasBeenSet; } /** *

The ID of the association.

*/ inline void SetRouteTableAssociationId(const Aws::String& value) { m_routeTableAssociationIdHasBeenSet = true; m_routeTableAssociationId = value; } /** *

The ID of the association.

*/ inline void SetRouteTableAssociationId(Aws::String&& value) { m_routeTableAssociationIdHasBeenSet = true; m_routeTableAssociationId = std::move(value); } /** *

The ID of the association.

*/ inline void SetRouteTableAssociationId(const char* value) { m_routeTableAssociationIdHasBeenSet = true; m_routeTableAssociationId.assign(value); } /** *

The ID of the association.

*/ inline RouteTableAssociation& WithRouteTableAssociationId(const Aws::String& value) { SetRouteTableAssociationId(value); return *this;} /** *

The ID of the association.

*/ inline RouteTableAssociation& WithRouteTableAssociationId(Aws::String&& value) { SetRouteTableAssociationId(std::move(value)); return *this;} /** *

The ID of the association.

*/ inline RouteTableAssociation& WithRouteTableAssociationId(const char* value) { SetRouteTableAssociationId(value); return *this;} /** *

The ID of the route table.

*/ inline const Aws::String& GetRouteTableId() const{ return m_routeTableId; } /** *

The ID of the route table.

*/ inline bool RouteTableIdHasBeenSet() const { return m_routeTableIdHasBeenSet; } /** *

The ID of the route table.

*/ inline void SetRouteTableId(const Aws::String& value) { m_routeTableIdHasBeenSet = true; m_routeTableId = value; } /** *

The ID of the route table.

*/ inline void SetRouteTableId(Aws::String&& value) { m_routeTableIdHasBeenSet = true; m_routeTableId = std::move(value); } /** *

The ID of the route table.

*/ inline void SetRouteTableId(const char* value) { m_routeTableIdHasBeenSet = true; m_routeTableId.assign(value); } /** *

The ID of the route table.

*/ inline RouteTableAssociation& WithRouteTableId(const Aws::String& value) { SetRouteTableId(value); return *this;} /** *

The ID of the route table.

*/ inline RouteTableAssociation& WithRouteTableId(Aws::String&& value) { SetRouteTableId(std::move(value)); return *this;} /** *

The ID of the route table.

*/ inline RouteTableAssociation& WithRouteTableId(const char* value) { SetRouteTableId(value); return *this;} /** *

The ID of the subnet. A subnet ID is not returned for an implicit * association.

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

The ID of the subnet. A subnet ID is not returned for an implicit * association.

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

The ID of the subnet. A subnet ID is not returned for an implicit * association.

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

The ID of the subnet. A subnet ID is not returned for an implicit * association.

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

The ID of the subnet. A subnet ID is not returned for an implicit * association.

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

The ID of the subnet. A subnet ID is not returned for an implicit * association.

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

The ID of the subnet. A subnet ID is not returned for an implicit * association.

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

The ID of the subnet. A subnet ID is not returned for an implicit * association.

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

The ID of the internet gateway or virtual private gateway.

*/ inline const Aws::String& GetGatewayId() const{ return m_gatewayId; } /** *

The ID of the internet gateway or virtual private gateway.

*/ inline bool GatewayIdHasBeenSet() const { return m_gatewayIdHasBeenSet; } /** *

The ID of the internet gateway or virtual private gateway.

*/ inline void SetGatewayId(const Aws::String& value) { m_gatewayIdHasBeenSet = true; m_gatewayId = value; } /** *

The ID of the internet gateway or virtual private gateway.

*/ inline void SetGatewayId(Aws::String&& value) { m_gatewayIdHasBeenSet = true; m_gatewayId = std::move(value); } /** *

The ID of the internet gateway or virtual private gateway.

*/ inline void SetGatewayId(const char* value) { m_gatewayIdHasBeenSet = true; m_gatewayId.assign(value); } /** *

The ID of the internet gateway or virtual private gateway.

*/ inline RouteTableAssociation& WithGatewayId(const Aws::String& value) { SetGatewayId(value); return *this;} /** *

The ID of the internet gateway or virtual private gateway.

*/ inline RouteTableAssociation& WithGatewayId(Aws::String&& value) { SetGatewayId(std::move(value)); return *this;} /** *

The ID of the internet gateway or virtual private gateway.

*/ inline RouteTableAssociation& WithGatewayId(const char* value) { SetGatewayId(value); return *this;} /** *

The state of the association.

*/ inline const RouteTableAssociationState& GetAssociationState() const{ return m_associationState; } /** *

The state of the association.

*/ inline bool AssociationStateHasBeenSet() const { return m_associationStateHasBeenSet; } /** *

The state of the association.

*/ inline void SetAssociationState(const RouteTableAssociationState& value) { m_associationStateHasBeenSet = true; m_associationState = value; } /** *

The state of the association.

*/ inline void SetAssociationState(RouteTableAssociationState&& value) { m_associationStateHasBeenSet = true; m_associationState = std::move(value); } /** *

The state of the association.

*/ inline RouteTableAssociation& WithAssociationState(const RouteTableAssociationState& value) { SetAssociationState(value); return *this;} /** *

The state of the association.

*/ inline RouteTableAssociation& WithAssociationState(RouteTableAssociationState&& value) { SetAssociationState(std::move(value)); return *this;} private: bool m_main; bool m_mainHasBeenSet = false; Aws::String m_routeTableAssociationId; bool m_routeTableAssociationIdHasBeenSet = false; Aws::String m_routeTableId; bool m_routeTableIdHasBeenSet = false; Aws::String m_subnetId; bool m_subnetIdHasBeenSet = false; Aws::String m_gatewayId; bool m_gatewayIdHasBeenSet = false; RouteTableAssociationState m_associationState; bool m_associationStateHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws