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/route53-recovery-control-config/model/RuleType.h>
9 #include <utility>
10 
11 namespace Aws
12 {
13 namespace Utils
14 {
15 namespace Json
16 {
17   class JsonValue;
18   class JsonView;
19 } // namespace Json
20 } // namespace Utils
21 namespace Route53RecoveryControlConfig
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>The rule configuration for an assertion rule. That is, the criteria that you
28    * set for specific assertion controls (routing controls) that specify how many
29    * controls must be enabled after a transaction completes.</p><p><h3>See Also:</h3>
30    * <a
31    * href="http://docs.aws.amazon.com/goto/WebAPI/route53-recovery-control-config-2020-11-02/RuleConfig">AWS
32    * API Reference</a></p>
33    */
34   class AWS_ROUTE53RECOVERYCONTROLCONFIG_API RuleConfig
35   {
36   public:
37     RuleConfig();
38     RuleConfig(Aws::Utils::Json::JsonView jsonValue);
39     RuleConfig& operator=(Aws::Utils::Json::JsonView jsonValue);
40     Aws::Utils::Json::JsonValue Jsonize() const;
41 
42 
43     /**
44      * <p>Logical negation of the rule. If the rule would usually evaluate true, it's
45      * evaluated as false, and vice versa.</p>
46      */
GetInverted()47     inline bool GetInverted() const{ return m_inverted; }
48 
49     /**
50      * <p>Logical negation of the rule. If the rule would usually evaluate true, it's
51      * evaluated as false, and vice versa.</p>
52      */
InvertedHasBeenSet()53     inline bool InvertedHasBeenSet() const { return m_invertedHasBeenSet; }
54 
55     /**
56      * <p>Logical negation of the rule. If the rule would usually evaluate true, it's
57      * evaluated as false, and vice versa.</p>
58      */
SetInverted(bool value)59     inline void SetInverted(bool value) { m_invertedHasBeenSet = true; m_inverted = value; }
60 
61     /**
62      * <p>Logical negation of the rule. If the rule would usually evaluate true, it's
63      * evaluated as false, and vice versa.</p>
64      */
WithInverted(bool value)65     inline RuleConfig& WithInverted(bool value) { SetInverted(value); return *this;}
66 
67 
68     /**
69      * <p>The value of N, when you specify an ATLEAST rule type. That is, Threshold is
70      * the number of controls that must be set when you specify an ATLEAST type.</p>
71      */
GetThreshold()72     inline int GetThreshold() const{ return m_threshold; }
73 
74     /**
75      * <p>The value of N, when you specify an ATLEAST rule type. That is, Threshold is
76      * the number of controls that must be set when you specify an ATLEAST type.</p>
77      */
ThresholdHasBeenSet()78     inline bool ThresholdHasBeenSet() const { return m_thresholdHasBeenSet; }
79 
80     /**
81      * <p>The value of N, when you specify an ATLEAST rule type. That is, Threshold is
82      * the number of controls that must be set when you specify an ATLEAST type.</p>
83      */
SetThreshold(int value)84     inline void SetThreshold(int value) { m_thresholdHasBeenSet = true; m_threshold = value; }
85 
86     /**
87      * <p>The value of N, when you specify an ATLEAST rule type. That is, Threshold is
88      * the number of controls that must be set when you specify an ATLEAST type.</p>
89      */
WithThreshold(int value)90     inline RuleConfig& WithThreshold(int value) { SetThreshold(value); return *this;}
91 
92 
93     /**
94      * <p>A rule can be one of the following: ATLEAST, AND, or OR.</p>
95      */
GetType()96     inline const RuleType& GetType() const{ return m_type; }
97 
98     /**
99      * <p>A rule can be one of the following: ATLEAST, AND, or OR.</p>
100      */
TypeHasBeenSet()101     inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
102 
103     /**
104      * <p>A rule can be one of the following: ATLEAST, AND, or OR.</p>
105      */
SetType(const RuleType & value)106     inline void SetType(const RuleType& value) { m_typeHasBeenSet = true; m_type = value; }
107 
108     /**
109      * <p>A rule can be one of the following: ATLEAST, AND, or OR.</p>
110      */
SetType(RuleType && value)111     inline void SetType(RuleType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); }
112 
113     /**
114      * <p>A rule can be one of the following: ATLEAST, AND, or OR.</p>
115      */
WithType(const RuleType & value)116     inline RuleConfig& WithType(const RuleType& value) { SetType(value); return *this;}
117 
118     /**
119      * <p>A rule can be one of the following: ATLEAST, AND, or OR.</p>
120      */
WithType(RuleType && value)121     inline RuleConfig& WithType(RuleType&& value) { SetType(std::move(value)); return *this;}
122 
123   private:
124 
125     bool m_inverted;
126     bool m_invertedHasBeenSet;
127 
128     int m_threshold;
129     bool m_thresholdHasBeenSet;
130 
131     RuleType m_type;
132     bool m_typeHasBeenSet;
133   };
134 
135 } // namespace Model
136 } // namespace Route53RecoveryControlConfig
137 } // namespace Aws
138