com.amazonaws.services.securityhub.model.AwsNetworkFirewallFirewallPolicyDetails Maven / Gradle / Ivy
Show all versions of aws-java-sdk-securityhub Show documentation
/*
* 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;
/**
*
* Details about a firewall policy. A firewall policy defines the behavior of a network firewall.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AwsNetworkFirewallFirewallPolicyDetails implements Serializable, Cloneable, StructuredPojo {
/**
*
* The firewall policy configuration.
*
*/
private FirewallPolicyDetails firewallPolicy;
/**
*
* The ARN of the firewall policy.
*
*/
private String firewallPolicyArn;
/**
*
* The identifier of the firewall policy.
*
*/
private String firewallPolicyId;
/**
*
* The name of the firewall policy.
*
*/
private String firewallPolicyName;
/**
*
* A description of the firewall policy.
*
*/
private String description;
/**
*
* The firewall policy configuration.
*
*
* @param firewallPolicy
* The firewall policy configuration.
*/
public void setFirewallPolicy(FirewallPolicyDetails firewallPolicy) {
this.firewallPolicy = firewallPolicy;
}
/**
*
* The firewall policy configuration.
*
*
* @return The firewall policy configuration.
*/
public FirewallPolicyDetails getFirewallPolicy() {
return this.firewallPolicy;
}
/**
*
* The firewall policy configuration.
*
*
* @param firewallPolicy
* The firewall policy configuration.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsNetworkFirewallFirewallPolicyDetails withFirewallPolicy(FirewallPolicyDetails firewallPolicy) {
setFirewallPolicy(firewallPolicy);
return this;
}
/**
*
* The ARN of the firewall policy.
*
*
* @param firewallPolicyArn
* The ARN of the firewall policy.
*/
public void setFirewallPolicyArn(String firewallPolicyArn) {
this.firewallPolicyArn = firewallPolicyArn;
}
/**
*
* The ARN of the firewall policy.
*
*
* @return The ARN of the firewall policy.
*/
public String getFirewallPolicyArn() {
return this.firewallPolicyArn;
}
/**
*
* The ARN of the firewall policy.
*
*
* @param firewallPolicyArn
* The ARN of the firewall policy.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsNetworkFirewallFirewallPolicyDetails withFirewallPolicyArn(String firewallPolicyArn) {
setFirewallPolicyArn(firewallPolicyArn);
return this;
}
/**
*
* The identifier of the firewall policy.
*
*
* @param firewallPolicyId
* The identifier of the firewall policy.
*/
public void setFirewallPolicyId(String firewallPolicyId) {
this.firewallPolicyId = firewallPolicyId;
}
/**
*
* The identifier of the firewall policy.
*
*
* @return The identifier of the firewall policy.
*/
public String getFirewallPolicyId() {
return this.firewallPolicyId;
}
/**
*
* The identifier of the firewall policy.
*
*
* @param firewallPolicyId
* The identifier of the firewall policy.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsNetworkFirewallFirewallPolicyDetails withFirewallPolicyId(String firewallPolicyId) {
setFirewallPolicyId(firewallPolicyId);
return this;
}
/**
*
* The name of the firewall policy.
*
*
* @param firewallPolicyName
* The name of the firewall policy.
*/
public void setFirewallPolicyName(String firewallPolicyName) {
this.firewallPolicyName = firewallPolicyName;
}
/**
*
* The name of the firewall policy.
*
*
* @return The name of the firewall policy.
*/
public String getFirewallPolicyName() {
return this.firewallPolicyName;
}
/**
*
* The name of the firewall policy.
*
*
* @param firewallPolicyName
* The name of the firewall policy.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsNetworkFirewallFirewallPolicyDetails withFirewallPolicyName(String firewallPolicyName) {
setFirewallPolicyName(firewallPolicyName);
return this;
}
/**
*
* A description of the firewall policy.
*
*
* @param description
* A description of the firewall policy.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* A description of the firewall policy.
*
*
* @return A description of the firewall policy.
*/
public String getDescription() {
return this.description;
}
/**
*
* A description of the firewall policy.
*
*
* @param description
* A description of the firewall policy.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsNetworkFirewallFirewallPolicyDetails withDescription(String description) {
setDescription(description);
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 (getFirewallPolicy() != null)
sb.append("FirewallPolicy: ").append(getFirewallPolicy()).append(",");
if (getFirewallPolicyArn() != null)
sb.append("FirewallPolicyArn: ").append(getFirewallPolicyArn()).append(",");
if (getFirewallPolicyId() != null)
sb.append("FirewallPolicyId: ").append(getFirewallPolicyId()).append(",");
if (getFirewallPolicyName() != null)
sb.append("FirewallPolicyName: ").append(getFirewallPolicyName()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AwsNetworkFirewallFirewallPolicyDetails == false)
return false;
AwsNetworkFirewallFirewallPolicyDetails other = (AwsNetworkFirewallFirewallPolicyDetails) obj;
if (other.getFirewallPolicy() == null ^ this.getFirewallPolicy() == null)
return false;
if (other.getFirewallPolicy() != null && other.getFirewallPolicy().equals(this.getFirewallPolicy()) == false)
return false;
if (other.getFirewallPolicyArn() == null ^ this.getFirewallPolicyArn() == null)
return false;
if (other.getFirewallPolicyArn() != null && other.getFirewallPolicyArn().equals(this.getFirewallPolicyArn()) == false)
return false;
if (other.getFirewallPolicyId() == null ^ this.getFirewallPolicyId() == null)
return false;
if (other.getFirewallPolicyId() != null && other.getFirewallPolicyId().equals(this.getFirewallPolicyId()) == false)
return false;
if (other.getFirewallPolicyName() == null ^ this.getFirewallPolicyName() == null)
return false;
if (other.getFirewallPolicyName() != null && other.getFirewallPolicyName().equals(this.getFirewallPolicyName()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getFirewallPolicy() == null) ? 0 : getFirewallPolicy().hashCode());
hashCode = prime * hashCode + ((getFirewallPolicyArn() == null) ? 0 : getFirewallPolicyArn().hashCode());
hashCode = prime * hashCode + ((getFirewallPolicyId() == null) ? 0 : getFirewallPolicyId().hashCode());
hashCode = prime * hashCode + ((getFirewallPolicyName() == null) ? 0 : getFirewallPolicyName().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
return hashCode;
}
@Override
public AwsNetworkFirewallFirewallPolicyDetails clone() {
try {
return (AwsNetworkFirewallFirewallPolicyDetails) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.securityhub.model.transform.AwsNetworkFirewallFirewallPolicyDetailsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}