AWS SDK for C++

AWS SDK for C++ Version 1.11.933

Loading...
Searching...
No Matches
NatRule.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/networkmanager/NetworkManager_EXPORTS.h>
9#include <aws/networkmanager/model/NatRuleState.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace NetworkManager {
21namespace Model {
22
28class NatRule {
29 public:
30 AWS_NETWORKMANAGER_API NatRule() = default;
31 AWS_NETWORKMANAGER_API NatRule(Aws::Utils::Json::JsonView jsonValue);
32 AWS_NETWORKMANAGER_API NatRule& operator=(Aws::Utils::Json::JsonView jsonValue);
33 AWS_NETWORKMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const;
34
36
40 inline int GetRuleNumber() const { return m_ruleNumber; }
41 inline bool RuleNumberHasBeenSet() const { return m_ruleNumberHasBeenSet; }
42 inline void SetRuleNumber(int value) {
43 m_ruleNumberHasBeenSet = true;
44 m_ruleNumber = value;
45 }
46 inline NatRule& WithRuleNumber(int value) {
47 SetRuleNumber(value);
48 return *this;
49 }
51
53
57 inline const Aws::String& GetMatchSourceCidr() const { return m_matchSourceCidr; }
58 inline bool MatchSourceCidrHasBeenSet() const { return m_matchSourceCidrHasBeenSet; }
59 template <typename MatchSourceCidrT = Aws::String>
60 void SetMatchSourceCidr(MatchSourceCidrT&& value) {
61 m_matchSourceCidrHasBeenSet = true;
62 m_matchSourceCidr = std::forward<MatchSourceCidrT>(value);
63 }
64 template <typename MatchSourceCidrT = Aws::String>
65 NatRule& WithMatchSourceCidr(MatchSourceCidrT&& value) {
66 SetMatchSourceCidr(std::forward<MatchSourceCidrT>(value));
67 return *this;
68 }
70
72
75 inline const Aws::String& GetNatCidr() const { return m_natCidr; }
76 inline bool NatCidrHasBeenSet() const { return m_natCidrHasBeenSet; }
77 template <typename NatCidrT = Aws::String>
78 void SetNatCidr(NatCidrT&& value) {
79 m_natCidrHasBeenSet = true;
80 m_natCidr = std::forward<NatCidrT>(value);
81 }
82 template <typename NatCidrT = Aws::String>
83 NatRule& WithNatCidr(NatCidrT&& value) {
84 SetNatCidr(std::forward<NatCidrT>(value));
85 return *this;
86 }
88
90
106 inline NatRuleState GetState() const { return m_state; }
107 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
108 inline void SetState(NatRuleState value) {
109 m_stateHasBeenSet = true;
110 m_state = value;
111 }
113 SetState(value);
114 return *this;
115 }
117 private:
118 int m_ruleNumber{0};
119
120 Aws::String m_matchSourceCidr;
121
122 Aws::String m_natCidr;
123
125 bool m_ruleNumberHasBeenSet = false;
126 bool m_matchSourceCidrHasBeenSet = false;
127 bool m_natCidrHasBeenSet = false;
128 bool m_stateHasBeenSet = false;
129};
130
131} // namespace Model
132} // namespace NetworkManager
133} // namespace Aws
NatRule & WithMatchSourceCidr(MatchSourceCidrT &&value)
Definition NatRule.h:65
AWS_NETWORKMANAGER_API NatRule()=default
NatRule & WithRuleNumber(int value)
Definition NatRule.h:46
const Aws::String & GetNatCidr() const
Definition NatRule.h:75
AWS_NETWORKMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const
NatRule & WithNatCidr(NatCidrT &&value)
Definition NatRule.h:83
NatRuleState GetState() const
Definition NatRule.h:106
void SetState(NatRuleState value)
Definition NatRule.h:108
AWS_NETWORKMANAGER_API NatRule & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetMatchSourceCidr(MatchSourceCidrT &&value)
Definition NatRule.h:60
void SetNatCidr(NatCidrT &&value)
Definition NatRule.h:78
AWS_NETWORKMANAGER_API NatRule(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetMatchSourceCidr() const
Definition NatRule.h:57
NatRule & WithState(NatRuleState value)
Definition NatRule.h:112
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue