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

Describes a route for a transit gateway route table.

See Also:

* AWS * API Reference

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

The CIDR block used for destination matches.

*/ inline const Aws::String& GetDestinationCidrBlock() const{ return m_destinationCidrBlock; } /** *

The CIDR block used for destination matches.

*/ inline bool DestinationCidrBlockHasBeenSet() const { return m_destinationCidrBlockHasBeenSet; } /** *

The CIDR block used for destination matches.

*/ inline void SetDestinationCidrBlock(const Aws::String& value) { m_destinationCidrBlockHasBeenSet = true; m_destinationCidrBlock = value; } /** *

The CIDR block used for destination matches.

*/ inline void SetDestinationCidrBlock(Aws::String&& value) { m_destinationCidrBlockHasBeenSet = true; m_destinationCidrBlock = std::move(value); } /** *

The CIDR block used for destination matches.

*/ inline void SetDestinationCidrBlock(const char* value) { m_destinationCidrBlockHasBeenSet = true; m_destinationCidrBlock.assign(value); } /** *

The CIDR block used for destination matches.

*/ inline TransitGatewayRoute& WithDestinationCidrBlock(const Aws::String& value) { SetDestinationCidrBlock(value); return *this;} /** *

The CIDR block used for destination matches.

*/ inline TransitGatewayRoute& WithDestinationCidrBlock(Aws::String&& value) { SetDestinationCidrBlock(std::move(value)); return *this;} /** *

The CIDR block used for destination matches.

*/ inline TransitGatewayRoute& WithDestinationCidrBlock(const char* value) { SetDestinationCidrBlock(value); return *this;} /** *

The ID of the prefix list used for destination matches.

*/ inline const Aws::String& GetPrefixListId() const{ return m_prefixListId; } /** *

The ID of the prefix list used for destination matches.

*/ inline bool PrefixListIdHasBeenSet() const { return m_prefixListIdHasBeenSet; } /** *

The ID of the prefix list used for destination matches.

*/ inline void SetPrefixListId(const Aws::String& value) { m_prefixListIdHasBeenSet = true; m_prefixListId = value; } /** *

The ID of the prefix list used for destination matches.

*/ inline void SetPrefixListId(Aws::String&& value) { m_prefixListIdHasBeenSet = true; m_prefixListId = std::move(value); } /** *

The ID of the prefix list used for destination matches.

*/ inline void SetPrefixListId(const char* value) { m_prefixListIdHasBeenSet = true; m_prefixListId.assign(value); } /** *

The ID of the prefix list used for destination matches.

*/ inline TransitGatewayRoute& WithPrefixListId(const Aws::String& value) { SetPrefixListId(value); return *this;} /** *

The ID of the prefix list used for destination matches.

*/ inline TransitGatewayRoute& WithPrefixListId(Aws::String&& value) { SetPrefixListId(std::move(value)); return *this;} /** *

The ID of the prefix list used for destination matches.

*/ inline TransitGatewayRoute& WithPrefixListId(const char* value) { SetPrefixListId(value); return *this;} /** *

The attachments.

*/ inline const Aws::Vector& GetTransitGatewayAttachments() const{ return m_transitGatewayAttachments; } /** *

The attachments.

*/ inline bool TransitGatewayAttachmentsHasBeenSet() const { return m_transitGatewayAttachmentsHasBeenSet; } /** *

The attachments.

*/ inline void SetTransitGatewayAttachments(const Aws::Vector& value) { m_transitGatewayAttachmentsHasBeenSet = true; m_transitGatewayAttachments = value; } /** *

The attachments.

*/ inline void SetTransitGatewayAttachments(Aws::Vector&& value) { m_transitGatewayAttachmentsHasBeenSet = true; m_transitGatewayAttachments = std::move(value); } /** *

The attachments.

*/ inline TransitGatewayRoute& WithTransitGatewayAttachments(const Aws::Vector& value) { SetTransitGatewayAttachments(value); return *this;} /** *

The attachments.

*/ inline TransitGatewayRoute& WithTransitGatewayAttachments(Aws::Vector&& value) { SetTransitGatewayAttachments(std::move(value)); return *this;} /** *

The attachments.

*/ inline TransitGatewayRoute& AddTransitGatewayAttachments(const TransitGatewayRouteAttachment& value) { m_transitGatewayAttachmentsHasBeenSet = true; m_transitGatewayAttachments.push_back(value); return *this; } /** *

The attachments.

*/ inline TransitGatewayRoute& AddTransitGatewayAttachments(TransitGatewayRouteAttachment&& value) { m_transitGatewayAttachmentsHasBeenSet = true; m_transitGatewayAttachments.push_back(std::move(value)); return *this; } /** *

The route type.

*/ inline const TransitGatewayRouteType& GetType() const{ return m_type; } /** *

The route type.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The route type.

*/ inline void SetType(const TransitGatewayRouteType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The route type.

*/ inline void SetType(TransitGatewayRouteType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The route type.

*/ inline TransitGatewayRoute& WithType(const TransitGatewayRouteType& value) { SetType(value); return *this;} /** *

The route type.

*/ inline TransitGatewayRoute& WithType(TransitGatewayRouteType&& value) { SetType(std::move(value)); return *this;} /** *

The state of the route.

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

The state of the route.

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

The state of the route.

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

The state of the route.

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

The state of the route.

*/ inline TransitGatewayRoute& WithState(const TransitGatewayRouteState& value) { SetState(value); return *this;} /** *

The state of the route.

*/ inline TransitGatewayRoute& WithState(TransitGatewayRouteState&& value) { SetState(std::move(value)); return *this;} private: Aws::String m_destinationCidrBlock; bool m_destinationCidrBlockHasBeenSet; Aws::String m_prefixListId; bool m_prefixListIdHasBeenSet; Aws::Vector m_transitGatewayAttachments; bool m_transitGatewayAttachmentsHasBeenSet; TransitGatewayRouteType m_type; bool m_typeHasBeenSet; TransitGatewayRouteState m_state; bool m_stateHasBeenSet; }; } // namespace Model } // namespace EC2 } // namespace Aws