/** * 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 a rule associated with a transit gateway policy.

See * Also:

AWS * API Reference

*/ class TransitGatewayPolicyRule { public: AWS_EC2_API TransitGatewayPolicyRule(); AWS_EC2_API TransitGatewayPolicyRule(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API TransitGatewayPolicyRule& 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 source CIDR block for the transit gateway policy rule.

*/ inline const Aws::String& GetSourceCidrBlock() const{ return m_sourceCidrBlock; } /** *

The source CIDR block for the transit gateway policy rule.

*/ inline bool SourceCidrBlockHasBeenSet() const { return m_sourceCidrBlockHasBeenSet; } /** *

The source CIDR block for the transit gateway policy rule.

*/ inline void SetSourceCidrBlock(const Aws::String& value) { m_sourceCidrBlockHasBeenSet = true; m_sourceCidrBlock = value; } /** *

The source CIDR block for the transit gateway policy rule.

*/ inline void SetSourceCidrBlock(Aws::String&& value) { m_sourceCidrBlockHasBeenSet = true; m_sourceCidrBlock = std::move(value); } /** *

The source CIDR block for the transit gateway policy rule.

*/ inline void SetSourceCidrBlock(const char* value) { m_sourceCidrBlockHasBeenSet = true; m_sourceCidrBlock.assign(value); } /** *

The source CIDR block for the transit gateway policy rule.

*/ inline TransitGatewayPolicyRule& WithSourceCidrBlock(const Aws::String& value) { SetSourceCidrBlock(value); return *this;} /** *

The source CIDR block for the transit gateway policy rule.

*/ inline TransitGatewayPolicyRule& WithSourceCidrBlock(Aws::String&& value) { SetSourceCidrBlock(std::move(value)); return *this;} /** *

The source CIDR block for the transit gateway policy rule.

*/ inline TransitGatewayPolicyRule& WithSourceCidrBlock(const char* value) { SetSourceCidrBlock(value); return *this;} /** *

The port range for the transit gateway policy rule. Currently this is set to * * (all).

*/ inline const Aws::String& GetSourcePortRange() const{ return m_sourcePortRange; } /** *

The port range for the transit gateway policy rule. Currently this is set to * * (all).

*/ inline bool SourcePortRangeHasBeenSet() const { return m_sourcePortRangeHasBeenSet; } /** *

The port range for the transit gateway policy rule. Currently this is set to * * (all).

*/ inline void SetSourcePortRange(const Aws::String& value) { m_sourcePortRangeHasBeenSet = true; m_sourcePortRange = value; } /** *

The port range for the transit gateway policy rule. Currently this is set to * * (all).

*/ inline void SetSourcePortRange(Aws::String&& value) { m_sourcePortRangeHasBeenSet = true; m_sourcePortRange = std::move(value); } /** *

The port range for the transit gateway policy rule. Currently this is set to * * (all).

*/ inline void SetSourcePortRange(const char* value) { m_sourcePortRangeHasBeenSet = true; m_sourcePortRange.assign(value); } /** *

The port range for the transit gateway policy rule. Currently this is set to * * (all).

*/ inline TransitGatewayPolicyRule& WithSourcePortRange(const Aws::String& value) { SetSourcePortRange(value); return *this;} /** *

The port range for the transit gateway policy rule. Currently this is set to * * (all).

*/ inline TransitGatewayPolicyRule& WithSourcePortRange(Aws::String&& value) { SetSourcePortRange(std::move(value)); return *this;} /** *

The port range for the transit gateway policy rule. Currently this is set to * * (all).

*/ inline TransitGatewayPolicyRule& WithSourcePortRange(const char* value) { SetSourcePortRange(value); return *this;} /** *

The destination CIDR block for the transit gateway policy rule.

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

The destination CIDR block for the transit gateway policy rule.

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

The destination CIDR block for the transit gateway policy rule.

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

The destination CIDR block for the transit gateway policy rule.

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

The destination CIDR block for the transit gateway policy rule.

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

The destination CIDR block for the transit gateway policy rule.

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

The destination CIDR block for the transit gateway policy rule.

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

The destination CIDR block for the transit gateway policy rule.

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

The port range for the transit gateway policy rule. Currently this is set to * * (all).

*/ inline const Aws::String& GetDestinationPortRange() const{ return m_destinationPortRange; } /** *

The port range for the transit gateway policy rule. Currently this is set to * * (all).

*/ inline bool DestinationPortRangeHasBeenSet() const { return m_destinationPortRangeHasBeenSet; } /** *

The port range for the transit gateway policy rule. Currently this is set to * * (all).

*/ inline void SetDestinationPortRange(const Aws::String& value) { m_destinationPortRangeHasBeenSet = true; m_destinationPortRange = value; } /** *

The port range for the transit gateway policy rule. Currently this is set to * * (all).

*/ inline void SetDestinationPortRange(Aws::String&& value) { m_destinationPortRangeHasBeenSet = true; m_destinationPortRange = std::move(value); } /** *

The port range for the transit gateway policy rule. Currently this is set to * * (all).

*/ inline void SetDestinationPortRange(const char* value) { m_destinationPortRangeHasBeenSet = true; m_destinationPortRange.assign(value); } /** *

The port range for the transit gateway policy rule. Currently this is set to * * (all).

*/ inline TransitGatewayPolicyRule& WithDestinationPortRange(const Aws::String& value) { SetDestinationPortRange(value); return *this;} /** *

The port range for the transit gateway policy rule. Currently this is set to * * (all).

*/ inline TransitGatewayPolicyRule& WithDestinationPortRange(Aws::String&& value) { SetDestinationPortRange(std::move(value)); return *this;} /** *

The port range for the transit gateway policy rule. Currently this is set to * * (all).

*/ inline TransitGatewayPolicyRule& WithDestinationPortRange(const char* value) { SetDestinationPortRange(value); return *this;} /** *

The protocol used by the transit gateway policy rule.

*/ inline const Aws::String& GetProtocol() const{ return m_protocol; } /** *

The protocol used by the transit gateway policy rule.

*/ inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; } /** *

The protocol used by the transit gateway policy rule.

*/ inline void SetProtocol(const Aws::String& value) { m_protocolHasBeenSet = true; m_protocol = value; } /** *

The protocol used by the transit gateway policy rule.

*/ inline void SetProtocol(Aws::String&& value) { m_protocolHasBeenSet = true; m_protocol = std::move(value); } /** *

The protocol used by the transit gateway policy rule.

*/ inline void SetProtocol(const char* value) { m_protocolHasBeenSet = true; m_protocol.assign(value); } /** *

The protocol used by the transit gateway policy rule.

*/ inline TransitGatewayPolicyRule& WithProtocol(const Aws::String& value) { SetProtocol(value); return *this;} /** *

The protocol used by the transit gateway policy rule.

*/ inline TransitGatewayPolicyRule& WithProtocol(Aws::String&& value) { SetProtocol(std::move(value)); return *this;} /** *

The protocol used by the transit gateway policy rule.

*/ inline TransitGatewayPolicyRule& WithProtocol(const char* value) { SetProtocol(value); return *this;} /** *

The meta data tags used for the transit gateway policy rule.

*/ inline const TransitGatewayPolicyRuleMetaData& GetMetaData() const{ return m_metaData; } /** *

The meta data tags used for the transit gateway policy rule.

*/ inline bool MetaDataHasBeenSet() const { return m_metaDataHasBeenSet; } /** *

The meta data tags used for the transit gateway policy rule.

*/ inline void SetMetaData(const TransitGatewayPolicyRuleMetaData& value) { m_metaDataHasBeenSet = true; m_metaData = value; } /** *

The meta data tags used for the transit gateway policy rule.

*/ inline void SetMetaData(TransitGatewayPolicyRuleMetaData&& value) { m_metaDataHasBeenSet = true; m_metaData = std::move(value); } /** *

The meta data tags used for the transit gateway policy rule.

*/ inline TransitGatewayPolicyRule& WithMetaData(const TransitGatewayPolicyRuleMetaData& value) { SetMetaData(value); return *this;} /** *

The meta data tags used for the transit gateway policy rule.

*/ inline TransitGatewayPolicyRule& WithMetaData(TransitGatewayPolicyRuleMetaData&& value) { SetMetaData(std::move(value)); return *this;} private: Aws::String m_sourceCidrBlock; bool m_sourceCidrBlockHasBeenSet = false; Aws::String m_sourcePortRange; bool m_sourcePortRangeHasBeenSet = false; Aws::String m_destinationCidrBlock; bool m_destinationCidrBlockHasBeenSet = false; Aws::String m_destinationPortRange; bool m_destinationPortRangeHasBeenSet = false; Aws::String m_protocol; bool m_protocolHasBeenSet = false; TransitGatewayPolicyRuleMetaData m_metaData; bool m_metaDataHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws