1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/route53-recovery-control-config/Route53RecoveryControlConfig_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSVector.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/route53-recovery-control-config/model/RuleConfig.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Json
18 {
19   class JsonValue;
20   class JsonView;
21 } // namespace Json
22 } // namespace Utils
23 namespace Route53RecoveryControlConfig
24 {
25 namespace Model
26 {
27 
28   /**
29    * <p>A new assertion rule for a control panel.</p><p><h3>See Also:</h3>   <a
30    * href="http://docs.aws.amazon.com/goto/WebAPI/route53-recovery-control-config-2020-11-02/NewAssertionRule">AWS
31    * API Reference</a></p>
32    */
33   class AWS_ROUTE53RECOVERYCONTROLCONFIG_API NewAssertionRule
34   {
35   public:
36     NewAssertionRule();
37     NewAssertionRule(Aws::Utils::Json::JsonView jsonValue);
38     NewAssertionRule& operator=(Aws::Utils::Json::JsonView jsonValue);
39     Aws::Utils::Json::JsonValue Jsonize() const;
40 
41 
42     /**
43      * <p>The routing controls that are part of transactions that are evaluated to
44      * determine if a request to change a routing control state is allowed. For
45      * example, you might include three routing controls, one for each of three Amazon
46      * Web Services Regions.</p>
47      */
GetAssertedControls()48     inline const Aws::Vector<Aws::String>& GetAssertedControls() const{ return m_assertedControls; }
49 
50     /**
51      * <p>The routing controls that are part of transactions that are evaluated to
52      * determine if a request to change a routing control state is allowed. For
53      * example, you might include three routing controls, one for each of three Amazon
54      * Web Services Regions.</p>
55      */
AssertedControlsHasBeenSet()56     inline bool AssertedControlsHasBeenSet() const { return m_assertedControlsHasBeenSet; }
57 
58     /**
59      * <p>The routing controls that are part of transactions that are evaluated to
60      * determine if a request to change a routing control state is allowed. For
61      * example, you might include three routing controls, one for each of three Amazon
62      * Web Services Regions.</p>
63      */
SetAssertedControls(const Aws::Vector<Aws::String> & value)64     inline void SetAssertedControls(const Aws::Vector<Aws::String>& value) { m_assertedControlsHasBeenSet = true; m_assertedControls = value; }
65 
66     /**
67      * <p>The routing controls that are part of transactions that are evaluated to
68      * determine if a request to change a routing control state is allowed. For
69      * example, you might include three routing controls, one for each of three Amazon
70      * Web Services Regions.</p>
71      */
SetAssertedControls(Aws::Vector<Aws::String> && value)72     inline void SetAssertedControls(Aws::Vector<Aws::String>&& value) { m_assertedControlsHasBeenSet = true; m_assertedControls = std::move(value); }
73 
74     /**
75      * <p>The routing controls that are part of transactions that are evaluated to
76      * determine if a request to change a routing control state is allowed. For
77      * example, you might include three routing controls, one for each of three Amazon
78      * Web Services Regions.</p>
79      */
WithAssertedControls(const Aws::Vector<Aws::String> & value)80     inline NewAssertionRule& WithAssertedControls(const Aws::Vector<Aws::String>& value) { SetAssertedControls(value); return *this;}
81 
82     /**
83      * <p>The routing controls that are part of transactions that are evaluated to
84      * determine if a request to change a routing control state is allowed. For
85      * example, you might include three routing controls, one for each of three Amazon
86      * Web Services Regions.</p>
87      */
WithAssertedControls(Aws::Vector<Aws::String> && value)88     inline NewAssertionRule& WithAssertedControls(Aws::Vector<Aws::String>&& value) { SetAssertedControls(std::move(value)); return *this;}
89 
90     /**
91      * <p>The routing controls that are part of transactions that are evaluated to
92      * determine if a request to change a routing control state is allowed. For
93      * example, you might include three routing controls, one for each of three Amazon
94      * Web Services Regions.</p>
95      */
AddAssertedControls(const Aws::String & value)96     inline NewAssertionRule& AddAssertedControls(const Aws::String& value) { m_assertedControlsHasBeenSet = true; m_assertedControls.push_back(value); return *this; }
97 
98     /**
99      * <p>The routing controls that are part of transactions that are evaluated to
100      * determine if a request to change a routing control state is allowed. For
101      * example, you might include three routing controls, one for each of three Amazon
102      * Web Services Regions.</p>
103      */
AddAssertedControls(Aws::String && value)104     inline NewAssertionRule& AddAssertedControls(Aws::String&& value) { m_assertedControlsHasBeenSet = true; m_assertedControls.push_back(std::move(value)); return *this; }
105 
106     /**
107      * <p>The routing controls that are part of transactions that are evaluated to
108      * determine if a request to change a routing control state is allowed. For
109      * example, you might include three routing controls, one for each of three Amazon
110      * Web Services Regions.</p>
111      */
AddAssertedControls(const char * value)112     inline NewAssertionRule& AddAssertedControls(const char* value) { m_assertedControlsHasBeenSet = true; m_assertedControls.push_back(value); return *this; }
113 
114 
115     /**
116      * <p>The Amazon Resource Name (ARN) for the control panel.</p>
117      */
GetControlPanelArn()118     inline const Aws::String& GetControlPanelArn() const{ return m_controlPanelArn; }
119 
120     /**
121      * <p>The Amazon Resource Name (ARN) for the control panel.</p>
122      */
ControlPanelArnHasBeenSet()123     inline bool ControlPanelArnHasBeenSet() const { return m_controlPanelArnHasBeenSet; }
124 
125     /**
126      * <p>The Amazon Resource Name (ARN) for the control panel.</p>
127      */
SetControlPanelArn(const Aws::String & value)128     inline void SetControlPanelArn(const Aws::String& value) { m_controlPanelArnHasBeenSet = true; m_controlPanelArn = value; }
129 
130     /**
131      * <p>The Amazon Resource Name (ARN) for the control panel.</p>
132      */
SetControlPanelArn(Aws::String && value)133     inline void SetControlPanelArn(Aws::String&& value) { m_controlPanelArnHasBeenSet = true; m_controlPanelArn = std::move(value); }
134 
135     /**
136      * <p>The Amazon Resource Name (ARN) for the control panel.</p>
137      */
SetControlPanelArn(const char * value)138     inline void SetControlPanelArn(const char* value) { m_controlPanelArnHasBeenSet = true; m_controlPanelArn.assign(value); }
139 
140     /**
141      * <p>The Amazon Resource Name (ARN) for the control panel.</p>
142      */
WithControlPanelArn(const Aws::String & value)143     inline NewAssertionRule& WithControlPanelArn(const Aws::String& value) { SetControlPanelArn(value); return *this;}
144 
145     /**
146      * <p>The Amazon Resource Name (ARN) for the control panel.</p>
147      */
WithControlPanelArn(Aws::String && value)148     inline NewAssertionRule& WithControlPanelArn(Aws::String&& value) { SetControlPanelArn(std::move(value)); return *this;}
149 
150     /**
151      * <p>The Amazon Resource Name (ARN) for the control panel.</p>
152      */
WithControlPanelArn(const char * value)153     inline NewAssertionRule& WithControlPanelArn(const char* value) { SetControlPanelArn(value); return *this;}
154 
155 
156     /**
157      * <p>The name of the assertion rule. You can use any non-white space character in
158      * the name.</p>
159      */
GetName()160     inline const Aws::String& GetName() const{ return m_name; }
161 
162     /**
163      * <p>The name of the assertion rule. You can use any non-white space character in
164      * the name.</p>
165      */
NameHasBeenSet()166     inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
167 
168     /**
169      * <p>The name of the assertion rule. You can use any non-white space character in
170      * the name.</p>
171      */
SetName(const Aws::String & value)172     inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
173 
174     /**
175      * <p>The name of the assertion rule. You can use any non-white space character in
176      * the name.</p>
177      */
SetName(Aws::String && value)178     inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
179 
180     /**
181      * <p>The name of the assertion rule. You can use any non-white space character in
182      * the name.</p>
183      */
SetName(const char * value)184     inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
185 
186     /**
187      * <p>The name of the assertion rule. You can use any non-white space character in
188      * the name.</p>
189      */
WithName(const Aws::String & value)190     inline NewAssertionRule& WithName(const Aws::String& value) { SetName(value); return *this;}
191 
192     /**
193      * <p>The name of the assertion rule. You can use any non-white space character in
194      * the name.</p>
195      */
WithName(Aws::String && value)196     inline NewAssertionRule& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
197 
198     /**
199      * <p>The name of the assertion rule. You can use any non-white space character in
200      * the name.</p>
201      */
WithName(const char * value)202     inline NewAssertionRule& WithName(const char* value) { SetName(value); return *this;}
203 
204 
205     /**
206      * <p>The criteria that you set for specific assertion controls (routing controls)
207      * that designate how many controls must be enabled as the result of a transaction.
208      * For example, if you have three assertion controls, you might specify atleast 2
209      * for your rule configuration. This means that at least two assertion controls
210      * must be enabled, so that at least two Amazon Web Services Regions are
211      * enabled.</p>
212      */
GetRuleConfig()213     inline const RuleConfig& GetRuleConfig() const{ return m_ruleConfig; }
214 
215     /**
216      * <p>The criteria that you set for specific assertion controls (routing controls)
217      * that designate how many controls must be enabled as the result of a transaction.
218      * For example, if you have three assertion controls, you might specify atleast 2
219      * for your rule configuration. This means that at least two assertion controls
220      * must be enabled, so that at least two Amazon Web Services Regions are
221      * enabled.</p>
222      */
RuleConfigHasBeenSet()223     inline bool RuleConfigHasBeenSet() const { return m_ruleConfigHasBeenSet; }
224 
225     /**
226      * <p>The criteria that you set for specific assertion controls (routing controls)
227      * that designate how many controls must be enabled as the result of a transaction.
228      * For example, if you have three assertion controls, you might specify atleast 2
229      * for your rule configuration. This means that at least two assertion controls
230      * must be enabled, so that at least two Amazon Web Services Regions are
231      * enabled.</p>
232      */
SetRuleConfig(const RuleConfig & value)233     inline void SetRuleConfig(const RuleConfig& value) { m_ruleConfigHasBeenSet = true; m_ruleConfig = value; }
234 
235     /**
236      * <p>The criteria that you set for specific assertion controls (routing controls)
237      * that designate how many controls must be enabled as the result of a transaction.
238      * For example, if you have three assertion controls, you might specify atleast 2
239      * for your rule configuration. This means that at least two assertion controls
240      * must be enabled, so that at least two Amazon Web Services Regions are
241      * enabled.</p>
242      */
SetRuleConfig(RuleConfig && value)243     inline void SetRuleConfig(RuleConfig&& value) { m_ruleConfigHasBeenSet = true; m_ruleConfig = std::move(value); }
244 
245     /**
246      * <p>The criteria that you set for specific assertion controls (routing controls)
247      * that designate how many controls must be enabled as the result of a transaction.
248      * For example, if you have three assertion controls, you might specify atleast 2
249      * for your rule configuration. This means that at least two assertion controls
250      * must be enabled, so that at least two Amazon Web Services Regions are
251      * enabled.</p>
252      */
WithRuleConfig(const RuleConfig & value)253     inline NewAssertionRule& WithRuleConfig(const RuleConfig& value) { SetRuleConfig(value); return *this;}
254 
255     /**
256      * <p>The criteria that you set for specific assertion controls (routing controls)
257      * that designate how many controls must be enabled as the result of a transaction.
258      * For example, if you have three assertion controls, you might specify atleast 2
259      * for your rule configuration. This means that at least two assertion controls
260      * must be enabled, so that at least two Amazon Web Services Regions are
261      * enabled.</p>
262      */
WithRuleConfig(RuleConfig && value)263     inline NewAssertionRule& WithRuleConfig(RuleConfig&& value) { SetRuleConfig(std::move(value)); return *this;}
264 
265 
266     /**
267      * <p>An evaluation period, in milliseconds (ms), during which any request against
268      * the target routing controls will fail. This helps prevent "flapping" of state.
269      * The wait period is 5000 ms by default, but you can choose a custom value.</p>
270      */
GetWaitPeriodMs()271     inline int GetWaitPeriodMs() const{ return m_waitPeriodMs; }
272 
273     /**
274      * <p>An evaluation period, in milliseconds (ms), during which any request against
275      * the target routing controls will fail. This helps prevent "flapping" of state.
276      * The wait period is 5000 ms by default, but you can choose a custom value.</p>
277      */
WaitPeriodMsHasBeenSet()278     inline bool WaitPeriodMsHasBeenSet() const { return m_waitPeriodMsHasBeenSet; }
279 
280     /**
281      * <p>An evaluation period, in milliseconds (ms), during which any request against
282      * the target routing controls will fail. This helps prevent "flapping" of state.
283      * The wait period is 5000 ms by default, but you can choose a custom value.</p>
284      */
SetWaitPeriodMs(int value)285     inline void SetWaitPeriodMs(int value) { m_waitPeriodMsHasBeenSet = true; m_waitPeriodMs = value; }
286 
287     /**
288      * <p>An evaluation period, in milliseconds (ms), during which any request against
289      * the target routing controls will fail. This helps prevent "flapping" of state.
290      * The wait period is 5000 ms by default, but you can choose a custom value.</p>
291      */
WithWaitPeriodMs(int value)292     inline NewAssertionRule& WithWaitPeriodMs(int value) { SetWaitPeriodMs(value); return *this;}
293 
294   private:
295 
296     Aws::Vector<Aws::String> m_assertedControls;
297     bool m_assertedControlsHasBeenSet;
298 
299     Aws::String m_controlPanelArn;
300     bool m_controlPanelArnHasBeenSet;
301 
302     Aws::String m_name;
303     bool m_nameHasBeenSet;
304 
305     RuleConfig m_ruleConfig;
306     bool m_ruleConfigHasBeenSet;
307 
308     int m_waitPeriodMs;
309     bool m_waitPeriodMsHasBeenSet;
310   };
311 
312 } // namespace Model
313 } // namespace Route53RecoveryControlConfig
314 } // namespace Aws
315