/** * 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 Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Route53RecoveryControlConfig { namespace Model { /** *

A new gating rule for a control panel.

See Also:

AWS * API Reference

*/ class NewGatingRule { public: AWS_ROUTE53RECOVERYCONTROLCONFIG_API NewGatingRule(); AWS_ROUTE53RECOVERYCONTROLCONFIG_API NewGatingRule(Aws::Utils::Json::JsonView jsonValue); AWS_ROUTE53RECOVERYCONTROLCONFIG_API NewGatingRule& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_ROUTE53RECOVERYCONTROLCONFIG_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The Amazon Resource Name (ARN) of the control panel.

*/ inline const Aws::String& GetControlPanelArn() const{ return m_controlPanelArn; } /** *

The Amazon Resource Name (ARN) of the control panel.

*/ inline bool ControlPanelArnHasBeenSet() const { return m_controlPanelArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the control panel.

*/ inline void SetControlPanelArn(const Aws::String& value) { m_controlPanelArnHasBeenSet = true; m_controlPanelArn = value; } /** *

The Amazon Resource Name (ARN) of the control panel.

*/ inline void SetControlPanelArn(Aws::String&& value) { m_controlPanelArnHasBeenSet = true; m_controlPanelArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the control panel.

*/ inline void SetControlPanelArn(const char* value) { m_controlPanelArnHasBeenSet = true; m_controlPanelArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the control panel.

*/ inline NewGatingRule& WithControlPanelArn(const Aws::String& value) { SetControlPanelArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the control panel.

*/ inline NewGatingRule& WithControlPanelArn(Aws::String&& value) { SetControlPanelArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the control panel.

*/ inline NewGatingRule& WithControlPanelArn(const char* value) { SetControlPanelArn(value); return *this;} /** *

The gating controls for the new gating rule. That is, routing controls that * are evaluated by the rule configuration that you specify.

*/ inline const Aws::Vector& GetGatingControls() const{ return m_gatingControls; } /** *

The gating controls for the new gating rule. That is, routing controls that * are evaluated by the rule configuration that you specify.

*/ inline bool GatingControlsHasBeenSet() const { return m_gatingControlsHasBeenSet; } /** *

The gating controls for the new gating rule. That is, routing controls that * are evaluated by the rule configuration that you specify.

*/ inline void SetGatingControls(const Aws::Vector& value) { m_gatingControlsHasBeenSet = true; m_gatingControls = value; } /** *

The gating controls for the new gating rule. That is, routing controls that * are evaluated by the rule configuration that you specify.

*/ inline void SetGatingControls(Aws::Vector&& value) { m_gatingControlsHasBeenSet = true; m_gatingControls = std::move(value); } /** *

The gating controls for the new gating rule. That is, routing controls that * are evaluated by the rule configuration that you specify.

*/ inline NewGatingRule& WithGatingControls(const Aws::Vector& value) { SetGatingControls(value); return *this;} /** *

The gating controls for the new gating rule. That is, routing controls that * are evaluated by the rule configuration that you specify.

*/ inline NewGatingRule& WithGatingControls(Aws::Vector&& value) { SetGatingControls(std::move(value)); return *this;} /** *

The gating controls for the new gating rule. That is, routing controls that * are evaluated by the rule configuration that you specify.

*/ inline NewGatingRule& AddGatingControls(const Aws::String& value) { m_gatingControlsHasBeenSet = true; m_gatingControls.push_back(value); return *this; } /** *

The gating controls for the new gating rule. That is, routing controls that * are evaluated by the rule configuration that you specify.

*/ inline NewGatingRule& AddGatingControls(Aws::String&& value) { m_gatingControlsHasBeenSet = true; m_gatingControls.push_back(std::move(value)); return *this; } /** *

The gating controls for the new gating rule. That is, routing controls that * are evaluated by the rule configuration that you specify.

*/ inline NewGatingRule& AddGatingControls(const char* value) { m_gatingControlsHasBeenSet = true; m_gatingControls.push_back(value); return *this; } /** *

The name for the new gating rule.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name for the new gating rule.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name for the new gating rule.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name for the new gating rule.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name for the new gating rule.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name for the new gating rule.

*/ inline NewGatingRule& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name for the new gating rule.

*/ inline NewGatingRule& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name for the new gating rule.

*/ inline NewGatingRule& WithName(const char* value) { SetName(value); return *this;} /** *

The criteria that you set for specific gating controls (routing controls) * that designate how many control states must be ON to allow you to change (set or * unset) the target control states.

*/ inline const RuleConfig& GetRuleConfig() const{ return m_ruleConfig; } /** *

The criteria that you set for specific gating controls (routing controls) * that designate how many control states must be ON to allow you to change (set or * unset) the target control states.

*/ inline bool RuleConfigHasBeenSet() const { return m_ruleConfigHasBeenSet; } /** *

The criteria that you set for specific gating controls (routing controls) * that designate how many control states must be ON to allow you to change (set or * unset) the target control states.

*/ inline void SetRuleConfig(const RuleConfig& value) { m_ruleConfigHasBeenSet = true; m_ruleConfig = value; } /** *

The criteria that you set for specific gating controls (routing controls) * that designate how many control states must be ON to allow you to change (set or * unset) the target control states.

*/ inline void SetRuleConfig(RuleConfig&& value) { m_ruleConfigHasBeenSet = true; m_ruleConfig = std::move(value); } /** *

The criteria that you set for specific gating controls (routing controls) * that designate how many control states must be ON to allow you to change (set or * unset) the target control states.

*/ inline NewGatingRule& WithRuleConfig(const RuleConfig& value) { SetRuleConfig(value); return *this;} /** *

The criteria that you set for specific gating controls (routing controls) * that designate how many control states must be ON to allow you to change (set or * unset) the target control states.

*/ inline NewGatingRule& WithRuleConfig(RuleConfig&& value) { SetRuleConfig(std::move(value)); return *this;} /** *

Routing controls that can only be set or unset if the specified RuleConfig * evaluates to true for the specified GatingControls. For example, say you have * three gating controls, one for each of three Amazon Web Services Regions. Now * you specify ATLEAST 2 as your RuleConfig. With these settings, you can only * change (set or unset) the routing controls that you have specified as * TargetControls if that rule evaluates to true.

In other words, your * ability to change the routing controls that you have specified as TargetControls * is gated by the rule that you set for the routing controls in * GatingControls.

*/ inline const Aws::Vector& GetTargetControls() const{ return m_targetControls; } /** *

Routing controls that can only be set or unset if the specified RuleConfig * evaluates to true for the specified GatingControls. For example, say you have * three gating controls, one for each of three Amazon Web Services Regions. Now * you specify ATLEAST 2 as your RuleConfig. With these settings, you can only * change (set or unset) the routing controls that you have specified as * TargetControls if that rule evaluates to true.

In other words, your * ability to change the routing controls that you have specified as TargetControls * is gated by the rule that you set for the routing controls in * GatingControls.

*/ inline bool TargetControlsHasBeenSet() const { return m_targetControlsHasBeenSet; } /** *

Routing controls that can only be set or unset if the specified RuleConfig * evaluates to true for the specified GatingControls. For example, say you have * three gating controls, one for each of three Amazon Web Services Regions. Now * you specify ATLEAST 2 as your RuleConfig. With these settings, you can only * change (set or unset) the routing controls that you have specified as * TargetControls if that rule evaluates to true.

In other words, your * ability to change the routing controls that you have specified as TargetControls * is gated by the rule that you set for the routing controls in * GatingControls.

*/ inline void SetTargetControls(const Aws::Vector& value) { m_targetControlsHasBeenSet = true; m_targetControls = value; } /** *

Routing controls that can only be set or unset if the specified RuleConfig * evaluates to true for the specified GatingControls. For example, say you have * three gating controls, one for each of three Amazon Web Services Regions. Now * you specify ATLEAST 2 as your RuleConfig. With these settings, you can only * change (set or unset) the routing controls that you have specified as * TargetControls if that rule evaluates to true.

In other words, your * ability to change the routing controls that you have specified as TargetControls * is gated by the rule that you set for the routing controls in * GatingControls.

*/ inline void SetTargetControls(Aws::Vector&& value) { m_targetControlsHasBeenSet = true; m_targetControls = std::move(value); } /** *

Routing controls that can only be set or unset if the specified RuleConfig * evaluates to true for the specified GatingControls. For example, say you have * three gating controls, one for each of three Amazon Web Services Regions. Now * you specify ATLEAST 2 as your RuleConfig. With these settings, you can only * change (set or unset) the routing controls that you have specified as * TargetControls if that rule evaluates to true.

In other words, your * ability to change the routing controls that you have specified as TargetControls * is gated by the rule that you set for the routing controls in * GatingControls.

*/ inline NewGatingRule& WithTargetControls(const Aws::Vector& value) { SetTargetControls(value); return *this;} /** *

Routing controls that can only be set or unset if the specified RuleConfig * evaluates to true for the specified GatingControls. For example, say you have * three gating controls, one for each of three Amazon Web Services Regions. Now * you specify ATLEAST 2 as your RuleConfig. With these settings, you can only * change (set or unset) the routing controls that you have specified as * TargetControls if that rule evaluates to true.

In other words, your * ability to change the routing controls that you have specified as TargetControls * is gated by the rule that you set for the routing controls in * GatingControls.

*/ inline NewGatingRule& WithTargetControls(Aws::Vector&& value) { SetTargetControls(std::move(value)); return *this;} /** *

Routing controls that can only be set or unset if the specified RuleConfig * evaluates to true for the specified GatingControls. For example, say you have * three gating controls, one for each of three Amazon Web Services Regions. Now * you specify ATLEAST 2 as your RuleConfig. With these settings, you can only * change (set or unset) the routing controls that you have specified as * TargetControls if that rule evaluates to true.

In other words, your * ability to change the routing controls that you have specified as TargetControls * is gated by the rule that you set for the routing controls in * GatingControls.

*/ inline NewGatingRule& AddTargetControls(const Aws::String& value) { m_targetControlsHasBeenSet = true; m_targetControls.push_back(value); return *this; } /** *

Routing controls that can only be set or unset if the specified RuleConfig * evaluates to true for the specified GatingControls. For example, say you have * three gating controls, one for each of three Amazon Web Services Regions. Now * you specify ATLEAST 2 as your RuleConfig. With these settings, you can only * change (set or unset) the routing controls that you have specified as * TargetControls if that rule evaluates to true.

In other words, your * ability to change the routing controls that you have specified as TargetControls * is gated by the rule that you set for the routing controls in * GatingControls.

*/ inline NewGatingRule& AddTargetControls(Aws::String&& value) { m_targetControlsHasBeenSet = true; m_targetControls.push_back(std::move(value)); return *this; } /** *

Routing controls that can only be set or unset if the specified RuleConfig * evaluates to true for the specified GatingControls. For example, say you have * three gating controls, one for each of three Amazon Web Services Regions. Now * you specify ATLEAST 2 as your RuleConfig. With these settings, you can only * change (set or unset) the routing controls that you have specified as * TargetControls if that rule evaluates to true.

In other words, your * ability to change the routing controls that you have specified as TargetControls * is gated by the rule that you set for the routing controls in * GatingControls.

*/ inline NewGatingRule& AddTargetControls(const char* value) { m_targetControlsHasBeenSet = true; m_targetControls.push_back(value); return *this; } /** *

An evaluation period, in milliseconds (ms), during which any request against * the target routing controls will fail. This helps prevent "flapping" of state. * The wait period is 5000 ms by default, but you can choose a custom value.

*/ inline int GetWaitPeriodMs() const{ return m_waitPeriodMs; } /** *

An evaluation period, in milliseconds (ms), during which any request against * the target routing controls will fail. This helps prevent "flapping" of state. * The wait period is 5000 ms by default, but you can choose a custom value.

*/ inline bool WaitPeriodMsHasBeenSet() const { return m_waitPeriodMsHasBeenSet; } /** *

An evaluation period, in milliseconds (ms), during which any request against * the target routing controls will fail. This helps prevent "flapping" of state. * The wait period is 5000 ms by default, but you can choose a custom value.

*/ inline void SetWaitPeriodMs(int value) { m_waitPeriodMsHasBeenSet = true; m_waitPeriodMs = value; } /** *

An evaluation period, in milliseconds (ms), during which any request against * the target routing controls will fail. This helps prevent "flapping" of state. * The wait period is 5000 ms by default, but you can choose a custom value.

*/ inline NewGatingRule& WithWaitPeriodMs(int value) { SetWaitPeriodMs(value); return *this;} private: Aws::String m_controlPanelArn; bool m_controlPanelArnHasBeenSet = false; Aws::Vector m_gatingControls; bool m_gatingControlsHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; RuleConfig m_ruleConfig; bool m_ruleConfigHasBeenSet = false; Aws::Vector m_targetControls; bool m_targetControlsHasBeenSet = false; int m_waitPeriodMs; bool m_waitPeriodMsHasBeenSet = false; }; } // namespace Model } // namespace Route53RecoveryControlConfig } // namespace Aws