/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.route53recoverycontrolconfig.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* A new gating rule for a control panel. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class NewGatingRule implements Serializable, Cloneable, StructuredPojo { /** ** The Amazon Resource Name (ARN) of the control panel. *
*/ private String controlPanelArn; /** ** The gating controls for the new gating rule. That is, routing controls that are evaluated by the rule * configuration that you specify. *
*/ private java.util.List* The name for the new gating rule. *
*/ private String name; /** ** 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. *
*/ private RuleConfig ruleConfig; /** ** 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. *
*/ private java.util.List* 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. *
*/ private Integer waitPeriodMs; /** ** The Amazon Resource Name (ARN) of the control panel. *
* * @param controlPanelArn * The Amazon Resource Name (ARN) of the control panel. */ public void setControlPanelArn(String controlPanelArn) { this.controlPanelArn = controlPanelArn; } /** ** The Amazon Resource Name (ARN) of the control panel. *
* * @return The Amazon Resource Name (ARN) of the control panel. */ public String getControlPanelArn() { return this.controlPanelArn; } /** ** The Amazon Resource Name (ARN) of the control panel. *
* * @param controlPanelArn * The Amazon Resource Name (ARN) of the control panel. * @return Returns a reference to this object so that method calls can be chained together. */ public NewGatingRule withControlPanelArn(String controlPanelArn) { setControlPanelArn(controlPanelArn); return this; } /** ** The gating controls for the new gating rule. That is, routing controls that are evaluated by the rule * configuration that you specify. *
* * @return The gating controls for the new gating rule. That is, routing controls that are evaluated by the rule * configuration that you specify. */ public java.util.List* The gating controls for the new gating rule. That is, routing controls that are evaluated by the rule * configuration that you specify. *
* * @param gatingControls * The gating controls for the new gating rule. That is, routing controls that are evaluated by the rule * configuration that you specify. */ public void setGatingControls(java.util.Collection* The gating controls for the new gating rule. That is, routing controls that are evaluated by the rule * configuration that you specify. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setGatingControls(java.util.Collection)} or {@link #withGatingControls(java.util.Collection)} if you want * to override the existing values. *
* * @param gatingControls * The gating controls for the new gating rule. That is, routing controls that are evaluated by the rule * configuration that you specify. * @return Returns a reference to this object so that method calls can be chained together. */ public NewGatingRule withGatingControls(String... gatingControls) { if (this.gatingControls == null) { setGatingControls(new java.util.ArrayList* The gating controls for the new gating rule. That is, routing controls that are evaluated by the rule * configuration that you specify. *
* * @param gatingControls * The gating controls for the new gating rule. That is, routing controls that are evaluated by the rule * configuration that you specify. * @return Returns a reference to this object so that method calls can be chained together. */ public NewGatingRule withGatingControls(java.util.Collection* The name for the new gating rule. *
* * @param name * The name for the new gating rule. */ public void setName(String name) { this.name = name; } /** ** The name for the new gating rule. *
* * @return The name for the new gating rule. */ public String getName() { return this.name; } /** ** The name for the new gating rule. *
* * @param name * The name for the new gating rule. * @return Returns a reference to this object so that method calls can be chained together. */ public NewGatingRule withName(String name) { setName(name); 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. *
* * @param 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. */ public void setRuleConfig(RuleConfig ruleConfig) { this.ruleConfig = 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. *
* * @return 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. */ public RuleConfig getRuleConfig() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public NewGatingRule withRuleConfig(RuleConfig ruleConfig) { setRuleConfig(ruleConfig); 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. *
* * @return 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.
*/
public java.util.List
* 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.
*
* 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.
*/
public void setTargetControls(java.util.Collection
* 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.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTargetControls(java.util.Collection)} or {@link #withTargetControls(java.util.Collection)} if you want
* to override the existing values.
*
* 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NewGatingRule withTargetControls(String... targetControls) {
if (this.targetControls == null) {
setTargetControls(new java.util.ArrayList
* 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.
*
* 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NewGatingRule withTargetControls(java.util.Collection
* 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.
*
* 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.
*
* 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.
*