com.amazonaws.services.networkfirewall.model.DescribeRuleGroupRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-networkfirewall Show documentation
/*
* Copyright 2019-2024 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.networkfirewall.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DescribeRuleGroupRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The descriptive name of the rule group. You can't change the name of a rule group after you create it.
*
*
* You must specify the ARN or the name, and you can specify both.
*
*/
private String ruleGroupName;
/**
*
* The Amazon Resource Name (ARN) of the rule group.
*
*
* You must specify the ARN or the name, and you can specify both.
*
*/
private String ruleGroupArn;
/**
*
* Indicates whether the rule group is stateless or stateful. If the rule group is stateless, it contains stateless
* rules. If it is stateful, it contains stateful rules.
*
*
*
* This setting is required for requests that do not include the RuleGroupARN
.
*
*
*/
private String type;
/**
*
* Indicates whether you want Network Firewall to analyze the stateless rules in the rule group for rule behavior
* such as asymmetric routing. If set to TRUE
, Network Firewall runs the analysis.
*
*/
private Boolean analyzeRuleGroup;
/**
*
* The descriptive name of the rule group. You can't change the name of a rule group after you create it.
*
*
* You must specify the ARN or the name, and you can specify both.
*
*
* @param ruleGroupName
* The descriptive name of the rule group. You can't change the name of a rule group after you create it.
*
* You must specify the ARN or the name, and you can specify both.
*/
public void setRuleGroupName(String ruleGroupName) {
this.ruleGroupName = ruleGroupName;
}
/**
*
* The descriptive name of the rule group. You can't change the name of a rule group after you create it.
*
*
* You must specify the ARN or the name, and you can specify both.
*
*
* @return The descriptive name of the rule group. You can't change the name of a rule group after you create
* it.
*
* You must specify the ARN or the name, and you can specify both.
*/
public String getRuleGroupName() {
return this.ruleGroupName;
}
/**
*
* The descriptive name of the rule group. You can't change the name of a rule group after you create it.
*
*
* You must specify the ARN or the name, and you can specify both.
*
*
* @param ruleGroupName
* The descriptive name of the rule group. You can't change the name of a rule group after you create it.
*
* You must specify the ARN or the name, and you can specify both.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeRuleGroupRequest withRuleGroupName(String ruleGroupName) {
setRuleGroupName(ruleGroupName);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the rule group.
*
*
* You must specify the ARN or the name, and you can specify both.
*
*
* @param ruleGroupArn
* The Amazon Resource Name (ARN) of the rule group.
*
* You must specify the ARN or the name, and you can specify both.
*/
public void setRuleGroupArn(String ruleGroupArn) {
this.ruleGroupArn = ruleGroupArn;
}
/**
*
* The Amazon Resource Name (ARN) of the rule group.
*
*
* You must specify the ARN or the name, and you can specify both.
*
*
* @return The Amazon Resource Name (ARN) of the rule group.
*
* You must specify the ARN or the name, and you can specify both.
*/
public String getRuleGroupArn() {
return this.ruleGroupArn;
}
/**
*
* The Amazon Resource Name (ARN) of the rule group.
*
*
* You must specify the ARN or the name, and you can specify both.
*
*
* @param ruleGroupArn
* The Amazon Resource Name (ARN) of the rule group.
*
* You must specify the ARN or the name, and you can specify both.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeRuleGroupRequest withRuleGroupArn(String ruleGroupArn) {
setRuleGroupArn(ruleGroupArn);
return this;
}
/**
*
* Indicates whether the rule group is stateless or stateful. If the rule group is stateless, it contains stateless
* rules. If it is stateful, it contains stateful rules.
*
*
*
* This setting is required for requests that do not include the RuleGroupARN
.
*
*
*
* @param type
* Indicates whether the rule group is stateless or stateful. If the rule group is stateless, it contains
* stateless rules. If it is stateful, it contains stateful rules.
*
* This setting is required for requests that do not include the RuleGroupARN
.
*
* @see RuleGroupType
*/
public void setType(String type) {
this.type = type;
}
/**
*
* Indicates whether the rule group is stateless or stateful. If the rule group is stateless, it contains stateless
* rules. If it is stateful, it contains stateful rules.
*
*
*
* This setting is required for requests that do not include the RuleGroupARN
.
*
*
*
* @return Indicates whether the rule group is stateless or stateful. If the rule group is stateless, it contains
* stateless rules. If it is stateful, it contains stateful rules.
*
* This setting is required for requests that do not include the RuleGroupARN
.
*
* @see RuleGroupType
*/
public String getType() {
return this.type;
}
/**
*
* Indicates whether the rule group is stateless or stateful. If the rule group is stateless, it contains stateless
* rules. If it is stateful, it contains stateful rules.
*
*
*
* This setting is required for requests that do not include the RuleGroupARN
.
*
*
*
* @param type
* Indicates whether the rule group is stateless or stateful. If the rule group is stateless, it contains
* stateless rules. If it is stateful, it contains stateful rules.
*
* This setting is required for requests that do not include the RuleGroupARN
.
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see RuleGroupType
*/
public DescribeRuleGroupRequest withType(String type) {
setType(type);
return this;
}
/**
*
* Indicates whether the rule group is stateless or stateful. If the rule group is stateless, it contains stateless
* rules. If it is stateful, it contains stateful rules.
*
*
*
* This setting is required for requests that do not include the RuleGroupARN
.
*
*
*
* @param type
* Indicates whether the rule group is stateless or stateful. If the rule group is stateless, it contains
* stateless rules. If it is stateful, it contains stateful rules.
*
* This setting is required for requests that do not include the RuleGroupARN
.
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see RuleGroupType
*/
public DescribeRuleGroupRequest withType(RuleGroupType type) {
this.type = type.toString();
return this;
}
/**
*
* Indicates whether you want Network Firewall to analyze the stateless rules in the rule group for rule behavior
* such as asymmetric routing. If set to TRUE
, Network Firewall runs the analysis.
*
*
* @param analyzeRuleGroup
* Indicates whether you want Network Firewall to analyze the stateless rules in the rule group for rule
* behavior such as asymmetric routing. If set to TRUE
, Network Firewall runs the analysis.
*/
public void setAnalyzeRuleGroup(Boolean analyzeRuleGroup) {
this.analyzeRuleGroup = analyzeRuleGroup;
}
/**
*
* Indicates whether you want Network Firewall to analyze the stateless rules in the rule group for rule behavior
* such as asymmetric routing. If set to TRUE
, Network Firewall runs the analysis.
*
*
* @return Indicates whether you want Network Firewall to analyze the stateless rules in the rule group for rule
* behavior such as asymmetric routing. If set to TRUE
, Network Firewall runs the analysis.
*/
public Boolean getAnalyzeRuleGroup() {
return this.analyzeRuleGroup;
}
/**
*
* Indicates whether you want Network Firewall to analyze the stateless rules in the rule group for rule behavior
* such as asymmetric routing. If set to TRUE
, Network Firewall runs the analysis.
*
*
* @param analyzeRuleGroup
* Indicates whether you want Network Firewall to analyze the stateless rules in the rule group for rule
* behavior such as asymmetric routing. If set to TRUE
, Network Firewall runs the analysis.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeRuleGroupRequest withAnalyzeRuleGroup(Boolean analyzeRuleGroup) {
setAnalyzeRuleGroup(analyzeRuleGroup);
return this;
}
/**
*
* Indicates whether you want Network Firewall to analyze the stateless rules in the rule group for rule behavior
* such as asymmetric routing. If set to TRUE
, Network Firewall runs the analysis.
*
*
* @return Indicates whether you want Network Firewall to analyze the stateless rules in the rule group for rule
* behavior such as asymmetric routing. If set to TRUE
, Network Firewall runs the analysis.
*/
public Boolean isAnalyzeRuleGroup() {
return this.analyzeRuleGroup;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getRuleGroupName() != null)
sb.append("RuleGroupName: ").append(getRuleGroupName()).append(",");
if (getRuleGroupArn() != null)
sb.append("RuleGroupArn: ").append(getRuleGroupArn()).append(",");
if (getType() != null)
sb.append("Type: ").append(getType()).append(",");
if (getAnalyzeRuleGroup() != null)
sb.append("AnalyzeRuleGroup: ").append(getAnalyzeRuleGroup());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeRuleGroupRequest == false)
return false;
DescribeRuleGroupRequest other = (DescribeRuleGroupRequest) obj;
if (other.getRuleGroupName() == null ^ this.getRuleGroupName() == null)
return false;
if (other.getRuleGroupName() != null && other.getRuleGroupName().equals(this.getRuleGroupName()) == false)
return false;
if (other.getRuleGroupArn() == null ^ this.getRuleGroupArn() == null)
return false;
if (other.getRuleGroupArn() != null && other.getRuleGroupArn().equals(this.getRuleGroupArn()) == false)
return false;
if (other.getType() == null ^ this.getType() == null)
return false;
if (other.getType() != null && other.getType().equals(this.getType()) == false)
return false;
if (other.getAnalyzeRuleGroup() == null ^ this.getAnalyzeRuleGroup() == null)
return false;
if (other.getAnalyzeRuleGroup() != null && other.getAnalyzeRuleGroup().equals(this.getAnalyzeRuleGroup()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getRuleGroupName() == null) ? 0 : getRuleGroupName().hashCode());
hashCode = prime * hashCode + ((getRuleGroupArn() == null) ? 0 : getRuleGroupArn().hashCode());
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
hashCode = prime * hashCode + ((getAnalyzeRuleGroup() == null) ? 0 : getAnalyzeRuleGroup().hashCode());
return hashCode;
}
@Override
public DescribeRuleGroupRequest clone() {
return (DescribeRuleGroupRequest) super.clone();
}
}