AWS SDK for C++

AWS SDK for C++ Version 1.11.925

Loading...
Searching...
No Matches
TransitGatewayNatRule.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/ec2/EC2_EXPORTS.h>
10#include <aws/ec2/model/TransitGatewayNatRuleState.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Xml {
17class XmlNode;
18} // namespace Xml
19} // namespace Utils
20namespace EC2 {
21namespace Model {
22
31 public:
32 AWS_EC2_API TransitGatewayNatRule() = default;
35
36 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
37 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
38
40
43 inline int GetRuleNumber() const { return m_ruleNumber; }
44 inline bool RuleNumberHasBeenSet() const { return m_ruleNumberHasBeenSet; }
45 inline void SetRuleNumber(int value) {
46 m_ruleNumberHasBeenSet = true;
47 m_ruleNumber = value;
48 }
50 SetRuleNumber(value);
51 return *this;
52 }
54
56
59 inline const Aws::String& GetMatchSourceCidr() const { return m_matchSourceCidr; }
60 inline bool MatchSourceCidrHasBeenSet() const { return m_matchSourceCidrHasBeenSet; }
61 template <typename MatchSourceCidrT = Aws::String>
62 void SetMatchSourceCidr(MatchSourceCidrT&& value) {
63 m_matchSourceCidrHasBeenSet = true;
64 m_matchSourceCidr = std::forward<MatchSourceCidrT>(value);
65 }
66 template <typename MatchSourceCidrT = Aws::String>
67 TransitGatewayNatRule& WithMatchSourceCidr(MatchSourceCidrT&& value) {
68 SetMatchSourceCidr(std::forward<MatchSourceCidrT>(value));
69 return *this;
70 }
72
74
78 inline const Aws::String& GetNatCidr() const { return m_natCidr; }
79 inline bool NatCidrHasBeenSet() const { return m_natCidrHasBeenSet; }
80 template <typename NatCidrT = Aws::String>
81 void SetNatCidr(NatCidrT&& value) {
82 m_natCidrHasBeenSet = true;
83 m_natCidr = std::forward<NatCidrT>(value);
84 }
85 template <typename NatCidrT = Aws::String>
87 SetNatCidr(std::forward<NatCidrT>(value));
88 return *this;
89 }
91
93
101 inline TransitGatewayNatRuleState GetState() const { return m_state; }
102 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
104 m_stateHasBeenSet = true;
105 m_state = value;
106 }
108 SetState(value);
109 return *this;
110 }
112 private:
113 int m_ruleNumber{0};
114
115 Aws::String m_matchSourceCidr;
116
117 Aws::String m_natCidr;
118
120 bool m_ruleNumberHasBeenSet = false;
121 bool m_matchSourceCidrHasBeenSet = false;
122 bool m_natCidrHasBeenSet = false;
123 bool m_stateHasBeenSet = false;
124};
125
126} // namespace Model
127} // namespace EC2
128} // namespace Aws
void SetState(TransitGatewayNatRuleState value)
TransitGatewayNatRuleState GetState() const
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
TransitGatewayNatRule & WithState(TransitGatewayNatRuleState value)
TransitGatewayNatRule & WithMatchSourceCidr(MatchSourceCidrT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
TransitGatewayNatRule & WithRuleNumber(int value)
AWS_EC2_API TransitGatewayNatRule & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetMatchSourceCidr() const
AWS_EC2_API TransitGatewayNatRule()=default
TransitGatewayNatRule & WithNatCidr(NatCidrT &&value)
void SetMatchSourceCidr(MatchSourceCidrT &&value)
AWS_EC2_API TransitGatewayNatRule(const Aws::Utils::Xml::XmlNode &xmlNode)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::basic_ostream< char, std::char_traits< char > > OStream