/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Route53RecoveryControlConfig { namespace Model { /** *

A safety rule. A safety rule can be an assertion rule or a gating * rule.

See Also:

AWS * API Reference

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

An assertion rule enforces that, when a routing control state is changed, the * criteria set by the rule configuration is met. Otherwise, the change to the * routing control state is not accepted. For example, the criteria might be that * at least one routing control state is On after the transaction so that traffic * continues to flow to at least one cell for the application. This ensures that * you avoid a fail-open scenario.

*/ inline const AssertionRule& GetASSERTION() const{ return m_aSSERTION; } /** *

An assertion rule enforces that, when a routing control state is changed, the * criteria set by the rule configuration is met. Otherwise, the change to the * routing control state is not accepted. For example, the criteria might be that * at least one routing control state is On after the transaction so that traffic * continues to flow to at least one cell for the application. This ensures that * you avoid a fail-open scenario.

*/ inline bool ASSERTIONHasBeenSet() const { return m_aSSERTIONHasBeenSet; } /** *

An assertion rule enforces that, when a routing control state is changed, the * criteria set by the rule configuration is met. Otherwise, the change to the * routing control state is not accepted. For example, the criteria might be that * at least one routing control state is On after the transaction so that traffic * continues to flow to at least one cell for the application. This ensures that * you avoid a fail-open scenario.

*/ inline void SetASSERTION(const AssertionRule& value) { m_aSSERTIONHasBeenSet = true; m_aSSERTION = value; } /** *

An assertion rule enforces that, when a routing control state is changed, the * criteria set by the rule configuration is met. Otherwise, the change to the * routing control state is not accepted. For example, the criteria might be that * at least one routing control state is On after the transaction so that traffic * continues to flow to at least one cell for the application. This ensures that * you avoid a fail-open scenario.

*/ inline void SetASSERTION(AssertionRule&& value) { m_aSSERTIONHasBeenSet = true; m_aSSERTION = std::move(value); } /** *

An assertion rule enforces that, when a routing control state is changed, the * criteria set by the rule configuration is met. Otherwise, the change to the * routing control state is not accepted. For example, the criteria might be that * at least one routing control state is On after the transaction so that traffic * continues to flow to at least one cell for the application. This ensures that * you avoid a fail-open scenario.

*/ inline Rule& WithASSERTION(const AssertionRule& value) { SetASSERTION(value); return *this;} /** *

An assertion rule enforces that, when a routing control state is changed, the * criteria set by the rule configuration is met. Otherwise, the change to the * routing control state is not accepted. For example, the criteria might be that * at least one routing control state is On after the transaction so that traffic * continues to flow to at least one cell for the application. This ensures that * you avoid a fail-open scenario.

*/ inline Rule& WithASSERTION(AssertionRule&& value) { SetASSERTION(std::move(value)); return *this;} /** *

A gating rule verifies that a gating routing control or set of gating routing * controls, evaluates as true, based on a rule configuration that you specify, * which allows a set of routing control state changes to complete.

For * example, if you specify one gating routing control and you set the Type in the * rule configuration to OR, that indicates that you must set the gating routing * control to On for the rule to evaluate as true; that is, for the gating control * "switch" to be "On". When you do that, then you can update the routing control * states for the target routing controls that you specify in the gating rule.

*/ inline const GatingRule& GetGATING() const{ return m_gATING; } /** *

A gating rule verifies that a gating routing control or set of gating routing * controls, evaluates as true, based on a rule configuration that you specify, * which allows a set of routing control state changes to complete.

For * example, if you specify one gating routing control and you set the Type in the * rule configuration to OR, that indicates that you must set the gating routing * control to On for the rule to evaluate as true; that is, for the gating control * "switch" to be "On". When you do that, then you can update the routing control * states for the target routing controls that you specify in the gating rule.

*/ inline bool GATINGHasBeenSet() const { return m_gATINGHasBeenSet; } /** *

A gating rule verifies that a gating routing control or set of gating routing * controls, evaluates as true, based on a rule configuration that you specify, * which allows a set of routing control state changes to complete.

For * example, if you specify one gating routing control and you set the Type in the * rule configuration to OR, that indicates that you must set the gating routing * control to On for the rule to evaluate as true; that is, for the gating control * "switch" to be "On". When you do that, then you can update the routing control * states for the target routing controls that you specify in the gating rule.

*/ inline void SetGATING(const GatingRule& value) { m_gATINGHasBeenSet = true; m_gATING = value; } /** *

A gating rule verifies that a gating routing control or set of gating routing * controls, evaluates as true, based on a rule configuration that you specify, * which allows a set of routing control state changes to complete.

For * example, if you specify one gating routing control and you set the Type in the * rule configuration to OR, that indicates that you must set the gating routing * control to On for the rule to evaluate as true; that is, for the gating control * "switch" to be "On". When you do that, then you can update the routing control * states for the target routing controls that you specify in the gating rule.

*/ inline void SetGATING(GatingRule&& value) { m_gATINGHasBeenSet = true; m_gATING = std::move(value); } /** *

A gating rule verifies that a gating routing control or set of gating routing * controls, evaluates as true, based on a rule configuration that you specify, * which allows a set of routing control state changes to complete.

For * example, if you specify one gating routing control and you set the Type in the * rule configuration to OR, that indicates that you must set the gating routing * control to On for the rule to evaluate as true; that is, for the gating control * "switch" to be "On". When you do that, then you can update the routing control * states for the target routing controls that you specify in the gating rule.

*/ inline Rule& WithGATING(const GatingRule& value) { SetGATING(value); return *this;} /** *

A gating rule verifies that a gating routing control or set of gating routing * controls, evaluates as true, based on a rule configuration that you specify, * which allows a set of routing control state changes to complete.

For * example, if you specify one gating routing control and you set the Type in the * rule configuration to OR, that indicates that you must set the gating routing * control to On for the rule to evaluate as true; that is, for the gating control * "switch" to be "On". When you do that, then you can update the routing control * states for the target routing controls that you specify in the gating rule.

*/ inline Rule& WithGATING(GatingRule&& value) { SetGATING(std::move(value)); return *this;} private: AssertionRule m_aSSERTION; bool m_aSSERTIONHasBeenSet = false; GatingRule m_gATING; bool m_gATINGHasBeenSet = false; }; } // namespace Model } // namespace Route53RecoveryControlConfig } // namespace Aws