All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.securityhub.model.RuleGroupSourceStatelessRuleMatchAttributes Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS SecurityHub module holds the client classes that are used for communicating with AWS SecurityHub Service

There is a newer version: 1.12.780
Show newest version
/*
 * 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;

/**
 * 

* Criteria for the stateless rule. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RuleGroupSourceStatelessRuleMatchAttributes implements Serializable, Cloneable, StructuredPojo { /** *

* A list of port ranges to specify the destination ports to inspect for. *

*/ private java.util.List destinationPorts; /** *

* The destination IP addresses and address ranges to inspect for, in CIDR notation. *

*/ private java.util.List destinations; /** *

* The protocols to inspect for. *

*/ private java.util.List protocols; /** *

* A list of port ranges to specify the source ports to inspect for. *

*/ private java.util.List sourcePorts; /** *

* The source IP addresses and address ranges to inspect for, in CIDR notation. *

*/ private java.util.List sources; /** *

* The TCP flags and masks to inspect for. *

*/ private java.util.List tcpFlags; /** *

* A list of port ranges to specify the destination ports to inspect for. *

* * @return A list of port ranges to specify the destination ports to inspect for. */ public java.util.List getDestinationPorts() { return destinationPorts; } /** *

* A list of port ranges to specify the destination ports to inspect for. *

* * @param destinationPorts * A list of port ranges to specify the destination ports to inspect for. */ public void setDestinationPorts(java.util.Collection destinationPorts) { if (destinationPorts == null) { this.destinationPorts = null; return; } this.destinationPorts = new java.util.ArrayList(destinationPorts); } /** *

* A list of port ranges to specify the destination ports to inspect for. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setDestinationPorts(java.util.Collection)} or {@link #withDestinationPorts(java.util.Collection)} if you * want to override the existing values. *

* * @param destinationPorts * A list of port ranges to specify the destination ports to inspect for. * @return Returns a reference to this object so that method calls can be chained together. */ public RuleGroupSourceStatelessRuleMatchAttributes withDestinationPorts(RuleGroupSourceStatelessRuleMatchAttributesDestinationPorts... destinationPorts) { if (this.destinationPorts == null) { setDestinationPorts(new java.util.ArrayList(destinationPorts.length)); } for (RuleGroupSourceStatelessRuleMatchAttributesDestinationPorts ele : destinationPorts) { this.destinationPorts.add(ele); } return this; } /** *

* A list of port ranges to specify the destination ports to inspect for. *

* * @param destinationPorts * A list of port ranges to specify the destination ports to inspect for. * @return Returns a reference to this object so that method calls can be chained together. */ public RuleGroupSourceStatelessRuleMatchAttributes withDestinationPorts( java.util.Collection destinationPorts) { setDestinationPorts(destinationPorts); return this; } /** *

* The destination IP addresses and address ranges to inspect for, in CIDR notation. *

* * @return The destination IP addresses and address ranges to inspect for, in CIDR notation. */ public java.util.List getDestinations() { return destinations; } /** *

* The destination IP addresses and address ranges to inspect for, in CIDR notation. *

* * @param destinations * The destination IP addresses and address ranges to inspect for, in CIDR notation. */ public void setDestinations(java.util.Collection destinations) { if (destinations == null) { this.destinations = null; return; } this.destinations = new java.util.ArrayList(destinations); } /** *

* The destination IP addresses and address ranges to inspect for, in CIDR notation. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setDestinations(java.util.Collection)} or {@link #withDestinations(java.util.Collection)} if you want to * override the existing values. *

* * @param destinations * The destination IP addresses and address ranges to inspect for, in CIDR notation. * @return Returns a reference to this object so that method calls can be chained together. */ public RuleGroupSourceStatelessRuleMatchAttributes withDestinations(RuleGroupSourceStatelessRuleMatchAttributesDestinations... destinations) { if (this.destinations == null) { setDestinations(new java.util.ArrayList(destinations.length)); } for (RuleGroupSourceStatelessRuleMatchAttributesDestinations ele : destinations) { this.destinations.add(ele); } return this; } /** *

* The destination IP addresses and address ranges to inspect for, in CIDR notation. *

* * @param destinations * The destination IP addresses and address ranges to inspect for, in CIDR notation. * @return Returns a reference to this object so that method calls can be chained together. */ public RuleGroupSourceStatelessRuleMatchAttributes withDestinations( java.util.Collection destinations) { setDestinations(destinations); return this; } /** *

* The protocols to inspect for. *

* * @return The protocols to inspect for. */ public java.util.List getProtocols() { return protocols; } /** *

* The protocols to inspect for. *

* * @param protocols * The protocols to inspect for. */ public void setProtocols(java.util.Collection protocols) { if (protocols == null) { this.protocols = null; return; } this.protocols = new java.util.ArrayList(protocols); } /** *

* The protocols to inspect for. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setProtocols(java.util.Collection)} or {@link #withProtocols(java.util.Collection)} if you want to * override the existing values. *

* * @param protocols * The protocols to inspect for. * @return Returns a reference to this object so that method calls can be chained together. */ public RuleGroupSourceStatelessRuleMatchAttributes withProtocols(Integer... protocols) { if (this.protocols == null) { setProtocols(new java.util.ArrayList(protocols.length)); } for (Integer ele : protocols) { this.protocols.add(ele); } return this; } /** *

* The protocols to inspect for. *

* * @param protocols * The protocols to inspect for. * @return Returns a reference to this object so that method calls can be chained together. */ public RuleGroupSourceStatelessRuleMatchAttributes withProtocols(java.util.Collection protocols) { setProtocols(protocols); return this; } /** *

* A list of port ranges to specify the source ports to inspect for. *

* * @return A list of port ranges to specify the source ports to inspect for. */ public java.util.List getSourcePorts() { return sourcePorts; } /** *

* A list of port ranges to specify the source ports to inspect for. *

* * @param sourcePorts * A list of port ranges to specify the source ports to inspect for. */ public void setSourcePorts(java.util.Collection sourcePorts) { if (sourcePorts == null) { this.sourcePorts = null; return; } this.sourcePorts = new java.util.ArrayList(sourcePorts); } /** *

* A list of port ranges to specify the source ports to inspect for. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setSourcePorts(java.util.Collection)} or {@link #withSourcePorts(java.util.Collection)} if you want to * override the existing values. *

* * @param sourcePorts * A list of port ranges to specify the source ports to inspect for. * @return Returns a reference to this object so that method calls can be chained together. */ public RuleGroupSourceStatelessRuleMatchAttributes withSourcePorts(RuleGroupSourceStatelessRuleMatchAttributesSourcePorts... sourcePorts) { if (this.sourcePorts == null) { setSourcePorts(new java.util.ArrayList(sourcePorts.length)); } for (RuleGroupSourceStatelessRuleMatchAttributesSourcePorts ele : sourcePorts) { this.sourcePorts.add(ele); } return this; } /** *

* A list of port ranges to specify the source ports to inspect for. *

* * @param sourcePorts * A list of port ranges to specify the source ports to inspect for. * @return Returns a reference to this object so that method calls can be chained together. */ public RuleGroupSourceStatelessRuleMatchAttributes withSourcePorts(java.util.Collection sourcePorts) { setSourcePorts(sourcePorts); return this; } /** *

* The source IP addresses and address ranges to inspect for, in CIDR notation. *

* * @return The source IP addresses and address ranges to inspect for, in CIDR notation. */ public java.util.List getSources() { return sources; } /** *

* The source IP addresses and address ranges to inspect for, in CIDR notation. *

* * @param sources * The source IP addresses and address ranges to inspect for, in CIDR notation. */ public void setSources(java.util.Collection sources) { if (sources == null) { this.sources = null; return; } this.sources = new java.util.ArrayList(sources); } /** *

* The source IP addresses and address ranges to inspect for, in CIDR notation. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setSources(java.util.Collection)} or {@link #withSources(java.util.Collection)} if you want to override * the existing values. *

* * @param sources * The source IP addresses and address ranges to inspect for, in CIDR notation. * @return Returns a reference to this object so that method calls can be chained together. */ public RuleGroupSourceStatelessRuleMatchAttributes withSources(RuleGroupSourceStatelessRuleMatchAttributesSources... sources) { if (this.sources == null) { setSources(new java.util.ArrayList(sources.length)); } for (RuleGroupSourceStatelessRuleMatchAttributesSources ele : sources) { this.sources.add(ele); } return this; } /** *

* The source IP addresses and address ranges to inspect for, in CIDR notation. *

* * @param sources * The source IP addresses and address ranges to inspect for, in CIDR notation. * @return Returns a reference to this object so that method calls can be chained together. */ public RuleGroupSourceStatelessRuleMatchAttributes withSources(java.util.Collection sources) { setSources(sources); return this; } /** *

* The TCP flags and masks to inspect for. *

* * @return The TCP flags and masks to inspect for. */ public java.util.List getTcpFlags() { return tcpFlags; } /** *

* The TCP flags and masks to inspect for. *

* * @param tcpFlags * The TCP flags and masks to inspect for. */ public void setTcpFlags(java.util.Collection tcpFlags) { if (tcpFlags == null) { this.tcpFlags = null; return; } this.tcpFlags = new java.util.ArrayList(tcpFlags); } /** *

* The TCP flags and masks to inspect for. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setTcpFlags(java.util.Collection)} or {@link #withTcpFlags(java.util.Collection)} if you want to override * the existing values. *

* * @param tcpFlags * The TCP flags and masks to inspect for. * @return Returns a reference to this object so that method calls can be chained together. */ public RuleGroupSourceStatelessRuleMatchAttributes withTcpFlags(RuleGroupSourceStatelessRuleMatchAttributesTcpFlags... tcpFlags) { if (this.tcpFlags == null) { setTcpFlags(new java.util.ArrayList(tcpFlags.length)); } for (RuleGroupSourceStatelessRuleMatchAttributesTcpFlags ele : tcpFlags) { this.tcpFlags.add(ele); } return this; } /** *

* The TCP flags and masks to inspect for. *

* * @param tcpFlags * The TCP flags and masks to inspect for. * @return Returns a reference to this object so that method calls can be chained together. */ public RuleGroupSourceStatelessRuleMatchAttributes withTcpFlags(java.util.Collection tcpFlags) { setTcpFlags(tcpFlags); 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 (getDestinationPorts() != null) sb.append("DestinationPorts: ").append(getDestinationPorts()).append(","); if (getDestinations() != null) sb.append("Destinations: ").append(getDestinations()).append(","); if (getProtocols() != null) sb.append("Protocols: ").append(getProtocols()).append(","); if (getSourcePorts() != null) sb.append("SourcePorts: ").append(getSourcePorts()).append(","); if (getSources() != null) sb.append("Sources: ").append(getSources()).append(","); if (getTcpFlags() != null) sb.append("TcpFlags: ").append(getTcpFlags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RuleGroupSourceStatelessRuleMatchAttributes == false) return false; RuleGroupSourceStatelessRuleMatchAttributes other = (RuleGroupSourceStatelessRuleMatchAttributes) obj; if (other.getDestinationPorts() == null ^ this.getDestinationPorts() == null) return false; if (other.getDestinationPorts() != null && other.getDestinationPorts().equals(this.getDestinationPorts()) == false) return false; if (other.getDestinations() == null ^ this.getDestinations() == null) return false; if (other.getDestinations() != null && other.getDestinations().equals(this.getDestinations()) == false) return false; if (other.getProtocols() == null ^ this.getProtocols() == null) return false; if (other.getProtocols() != null && other.getProtocols().equals(this.getProtocols()) == false) return false; if (other.getSourcePorts() == null ^ this.getSourcePorts() == null) return false; if (other.getSourcePorts() != null && other.getSourcePorts().equals(this.getSourcePorts()) == false) return false; if (other.getSources() == null ^ this.getSources() == null) return false; if (other.getSources() != null && other.getSources().equals(this.getSources()) == false) return false; if (other.getTcpFlags() == null ^ this.getTcpFlags() == null) return false; if (other.getTcpFlags() != null && other.getTcpFlags().equals(this.getTcpFlags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDestinationPorts() == null) ? 0 : getDestinationPorts().hashCode()); hashCode = prime * hashCode + ((getDestinations() == null) ? 0 : getDestinations().hashCode()); hashCode = prime * hashCode + ((getProtocols() == null) ? 0 : getProtocols().hashCode()); hashCode = prime * hashCode + ((getSourcePorts() == null) ? 0 : getSourcePorts().hashCode()); hashCode = prime * hashCode + ((getSources() == null) ? 0 : getSources().hashCode()); hashCode = prime * hashCode + ((getTcpFlags() == null) ? 0 : getTcpFlags().hashCode()); return hashCode; } @Override public RuleGroupSourceStatelessRuleMatchAttributes clone() { try { return (RuleGroupSourceStatelessRuleMatchAttributes) 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.RuleGroupSourceStatelessRuleMatchAttributesMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy