/* * 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.securityhub.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Specifies the parameters to update in an existing automation rule. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UpdateAutomationRulesRequestItem implements Serializable, Cloneable, StructuredPojo { /** ** The Amazon Resource Name (ARN) for the rule. *
*/ private String ruleArn; /** *
* Whether the rule is active after it is created. If this parameter is equal to ENABLED
, Security Hub
* starts applying the rule to findings and finding updates after the rule is created. To change the value of this
* parameter after creating a rule, use
* BatchUpdateAutomationRules
.
*
* An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings. * Security Hub applies rules with lower values for this parameter first. *
*/ private Integer ruleOrder; /** ** A description of the rule. *
*/ private String description; /** ** The name of the rule. *
*/ private String ruleName; /** ** Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria. This * is useful when a finding matches the criteria for multiple rules, and each rule has different actions. If a rule * is terminal, Security Hub applies the rule action to a finding that matches the rule criteria and doesn't * evaluate other rules for the finding. By default, a rule isn't terminal. *
*/ private Boolean isTerminal; /** ** A set of ASFF finding field attributes and corresponding expected values that Security Hub uses to filter * findings. If a rule is enabled and a finding matches the conditions specified in this parameter, Security Hub * applies the rule action to the finding. *
*/ private AutomationRulesFindingFilters criteria; /** *
* One or more actions to update finding fields if a finding matches the conditions specified in
* Criteria
.
*
* The Amazon Resource Name (ARN) for the rule. *
* * @param ruleArn * The Amazon Resource Name (ARN) for the rule. */ public void setRuleArn(String ruleArn) { this.ruleArn = ruleArn; } /** ** The Amazon Resource Name (ARN) for the rule. *
* * @return The Amazon Resource Name (ARN) for the rule. */ public String getRuleArn() { return this.ruleArn; } /** ** The Amazon Resource Name (ARN) for the rule. *
* * @param ruleArn * The Amazon Resource Name (ARN) for the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAutomationRulesRequestItem withRuleArn(String ruleArn) { setRuleArn(ruleArn); return this; } /** *
* Whether the rule is active after it is created. If this parameter is equal to ENABLED
, Security Hub
* starts applying the rule to findings and finding updates after the rule is created. To change the value of this
* parameter after creating a rule, use
* BatchUpdateAutomationRules
.
*
ENABLED
,
* Security Hub starts applying the rule to findings and finding updates after the rule is created. To change
* the value of this parameter after creating a rule, use
* BatchUpdateAutomationRules
.
* @see RuleStatus
*/
public void setRuleStatus(String ruleStatus) {
this.ruleStatus = ruleStatus;
}
/**
*
* Whether the rule is active after it is created. If this parameter is equal to ENABLED
, Security Hub
* starts applying the rule to findings and finding updates after the rule is created. To change the value of this
* parameter after creating a rule, use
* BatchUpdateAutomationRules
.
*
ENABLED
,
* Security Hub starts applying the rule to findings and finding updates after the rule is created. To
* change the value of this parameter after creating a rule, use
* BatchUpdateAutomationRules
.
* @see RuleStatus
*/
public String getRuleStatus() {
return this.ruleStatus;
}
/**
*
* Whether the rule is active after it is created. If this parameter is equal to ENABLED
, Security Hub
* starts applying the rule to findings and finding updates after the rule is created. To change the value of this
* parameter after creating a rule, use
* BatchUpdateAutomationRules
.
*
ENABLED
,
* Security Hub starts applying the rule to findings and finding updates after the rule is created. To change
* the value of this parameter after creating a rule, use
* BatchUpdateAutomationRules
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RuleStatus
*/
public UpdateAutomationRulesRequestItem withRuleStatus(String ruleStatus) {
setRuleStatus(ruleStatus);
return this;
}
/**
*
* Whether the rule is active after it is created. If this parameter is equal to ENABLED
, Security Hub
* starts applying the rule to findings and finding updates after the rule is created. To change the value of this
* parameter after creating a rule, use
* BatchUpdateAutomationRules
.
*
ENABLED
,
* Security Hub starts applying the rule to findings and finding updates after the rule is created. To change
* the value of this parameter after creating a rule, use
* BatchUpdateAutomationRules
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RuleStatus
*/
public UpdateAutomationRulesRequestItem withRuleStatus(RuleStatus ruleStatus) {
this.ruleStatus = ruleStatus.toString();
return this;
}
/**
* * An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings. * Security Hub applies rules with lower values for this parameter first. *
* * @param ruleOrder * An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to * findings. Security Hub applies rules with lower values for this parameter first. */ public void setRuleOrder(Integer ruleOrder) { this.ruleOrder = ruleOrder; } /** ** An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings. * Security Hub applies rules with lower values for this parameter first. *
* * @return An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to * findings. Security Hub applies rules with lower values for this parameter first. */ public Integer getRuleOrder() { return this.ruleOrder; } /** ** An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings. * Security Hub applies rules with lower values for this parameter first. *
* * @param ruleOrder * An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to * findings. Security Hub applies rules with lower values for this parameter first. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAutomationRulesRequestItem withRuleOrder(Integer ruleOrder) { setRuleOrder(ruleOrder); return this; } /** ** A description of the rule. *
* * @param description * A description of the rule. */ public void setDescription(String description) { this.description = description; } /** ** A description of the rule. *
* * @return A description of the rule. */ public String getDescription() { return this.description; } /** ** A description of the rule. *
* * @param description * A description of the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAutomationRulesRequestItem withDescription(String description) { setDescription(description); return this; } /** ** The name of the rule. *
* * @param ruleName * The name of the rule. */ public void setRuleName(String ruleName) { this.ruleName = ruleName; } /** ** The name of the rule. *
* * @return The name of the rule. */ public String getRuleName() { return this.ruleName; } /** ** The name of the rule. *
* * @param ruleName * The name of the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAutomationRulesRequestItem withRuleName(String ruleName) { setRuleName(ruleName); return this; } /** ** Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria. This * is useful when a finding matches the criteria for multiple rules, and each rule has different actions. If a rule * is terminal, Security Hub applies the rule action to a finding that matches the rule criteria and doesn't * evaluate other rules for the finding. By default, a rule isn't terminal. *
* * @param isTerminal * Specifies whether a rule is the last to be applied with respect to a finding that matches the rule * criteria. This is useful when a finding matches the criteria for multiple rules, and each rule has * different actions. If a rule is terminal, Security Hub applies the rule action to a finding that matches * the rule criteria and doesn't evaluate other rules for the finding. By default, a rule isn't terminal. */ public void setIsTerminal(Boolean isTerminal) { this.isTerminal = isTerminal; } /** ** Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria. This * is useful when a finding matches the criteria for multiple rules, and each rule has different actions. If a rule * is terminal, Security Hub applies the rule action to a finding that matches the rule criteria and doesn't * evaluate other rules for the finding. By default, a rule isn't terminal. *
* * @return Specifies whether a rule is the last to be applied with respect to a finding that matches the rule * criteria. This is useful when a finding matches the criteria for multiple rules, and each rule has * different actions. If a rule is terminal, Security Hub applies the rule action to a finding that matches * the rule criteria and doesn't evaluate other rules for the finding. By default, a rule isn't terminal. */ public Boolean getIsTerminal() { return this.isTerminal; } /** ** Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria. This * is useful when a finding matches the criteria for multiple rules, and each rule has different actions. If a rule * is terminal, Security Hub applies the rule action to a finding that matches the rule criteria and doesn't * evaluate other rules for the finding. By default, a rule isn't terminal. *
* * @param isTerminal * Specifies whether a rule is the last to be applied with respect to a finding that matches the rule * criteria. This is useful when a finding matches the criteria for multiple rules, and each rule has * different actions. If a rule is terminal, Security Hub applies the rule action to a finding that matches * the rule criteria and doesn't evaluate other rules for the finding. By default, a rule isn't terminal. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAutomationRulesRequestItem withIsTerminal(Boolean isTerminal) { setIsTerminal(isTerminal); return this; } /** ** Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria. This * is useful when a finding matches the criteria for multiple rules, and each rule has different actions. If a rule * is terminal, Security Hub applies the rule action to a finding that matches the rule criteria and doesn't * evaluate other rules for the finding. By default, a rule isn't terminal. *
* * @return Specifies whether a rule is the last to be applied with respect to a finding that matches the rule * criteria. This is useful when a finding matches the criteria for multiple rules, and each rule has * different actions. If a rule is terminal, Security Hub applies the rule action to a finding that matches * the rule criteria and doesn't evaluate other rules for the finding. By default, a rule isn't terminal. */ public Boolean isTerminal() { return this.isTerminal; } /** ** A set of ASFF finding field attributes and corresponding expected values that Security Hub uses to filter * findings. If a rule is enabled and a finding matches the conditions specified in this parameter, Security Hub * applies the rule action to the finding. *
* * @param criteria * A set of ASFF finding field attributes and corresponding expected values that Security Hub uses to filter * findings. If a rule is enabled and a finding matches the conditions specified in this parameter, Security * Hub applies the rule action to the finding. */ public void setCriteria(AutomationRulesFindingFilters criteria) { this.criteria = criteria; } /** ** A set of ASFF finding field attributes and corresponding expected values that Security Hub uses to filter * findings. If a rule is enabled and a finding matches the conditions specified in this parameter, Security Hub * applies the rule action to the finding. *
* * @return A set of ASFF finding field attributes and corresponding expected values that Security Hub uses to filter * findings. If a rule is enabled and a finding matches the conditions specified in this parameter, Security * Hub applies the rule action to the finding. */ public AutomationRulesFindingFilters getCriteria() { return this.criteria; } /** ** A set of ASFF finding field attributes and corresponding expected values that Security Hub uses to filter * findings. If a rule is enabled and a finding matches the conditions specified in this parameter, Security Hub * applies the rule action to the finding. *
* * @param criteria * A set of ASFF finding field attributes and corresponding expected values that Security Hub uses to filter * findings. If a rule is enabled and a finding matches the conditions specified in this parameter, Security * Hub applies the rule action to the finding. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAutomationRulesRequestItem withCriteria(AutomationRulesFindingFilters criteria) { setCriteria(criteria); return this; } /** *
* One or more actions to update finding fields if a finding matches the conditions specified in
* Criteria
.
*
Criteria
.
*/
public java.util.List
* One or more actions to update finding fields if a finding matches the conditions specified in
* Criteria
.
*
Criteria
.
*/
public void setActions(java.util.Collection
* One or more actions to update finding fields if a finding matches the conditions specified in
* Criteria
.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setActions(java.util.Collection)} or {@link #withActions(java.util.Collection)} if you want to override * the existing values. *
* * @param actions * One or more actions to update finding fields if a finding matches the conditions specified in *Criteria
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAutomationRulesRequestItem withActions(AutomationRulesAction... actions) {
if (this.actions == null) {
setActions(new java.util.ArrayList
* One or more actions to update finding fields if a finding matches the conditions specified in
* Criteria
.
*
Criteria
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAutomationRulesRequestItem withActions(java.util.Collection