com.amazonaws.services.networkfirewall.model.DescribeRuleGroupMetadataRequest 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 DescribeRuleGroupMetadataRequest 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 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 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;
/**
*
* 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 DescribeRuleGroupMetadataRequest withRuleGroupName(String ruleGroupName) {
setRuleGroupName(ruleGroupName);
return this;
}
/**
*
* 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 ruleGroupArn
* 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 setRuleGroupArn(String ruleGroupArn) {
this.ruleGroupArn = ruleGroupArn;
}
/**
*
* 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 getRuleGroupArn() {
return this.ruleGroupArn;
}
/**
*
* 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 ruleGroupArn
* 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 DescribeRuleGroupMetadataRequest 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 DescribeRuleGroupMetadataRequest 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 DescribeRuleGroupMetadataRequest withType(RuleGroupType type) {
this.type = type.toString();
return this;
}
/**
* 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());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeRuleGroupMetadataRequest == false)
return false;
DescribeRuleGroupMetadataRequest other = (DescribeRuleGroupMetadataRequest) 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;
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());
return hashCode;
}
@Override
public DescribeRuleGroupMetadataRequest clone() {
return (DescribeRuleGroupMetadataRequest) super.clone();
}
}