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

com.amazonaws.services.securityhub.model.RuleGroupSourceStatelessRuleMatchAttributesTcpFlags 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

The newest version!
/*
 * 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.securityhub.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* A set of TCP flags and masks to inspect for. *

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

* Defines the flags from the Masks setting that must be set in order for the packet to match. Flags * that are listed must be set. Flags that are not listed must not be set. *

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

* The set of flags to consider in the inspection. If not specified, then all flags are inspected. *

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

* Defines the flags from the Masks setting that must be set in order for the packet to match. Flags * that are listed must be set. Flags that are not listed must not be set. *

* * @return Defines the flags from the Masks setting that must be set in order for the packet to match. * Flags that are listed must be set. Flags that are not listed must not be set. */ public java.util.List getFlags() { return flags; } /** *

* Defines the flags from the Masks setting that must be set in order for the packet to match. Flags * that are listed must be set. Flags that are not listed must not be set. *

* * @param flags * Defines the flags from the Masks setting that must be set in order for the packet to match. * Flags that are listed must be set. Flags that are not listed must not be set. */ public void setFlags(java.util.Collection flags) { if (flags == null) { this.flags = null; return; } this.flags = new java.util.ArrayList(flags); } /** *

* Defines the flags from the Masks setting that must be set in order for the packet to match. Flags * that are listed must be set. Flags that are not listed must not be set. *

*

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

* * @param flags * Defines the flags from the Masks setting that must be set in order for the packet to match. * Flags that are listed must be set. Flags that are not listed must not be set. * @return Returns a reference to this object so that method calls can be chained together. */ public RuleGroupSourceStatelessRuleMatchAttributesTcpFlags withFlags(String... flags) { if (this.flags == null) { setFlags(new java.util.ArrayList(flags.length)); } for (String ele : flags) { this.flags.add(ele); } return this; } /** *

* Defines the flags from the Masks setting that must be set in order for the packet to match. Flags * that are listed must be set. Flags that are not listed must not be set. *

* * @param flags * Defines the flags from the Masks setting that must be set in order for the packet to match. * Flags that are listed must be set. Flags that are not listed must not be set. * @return Returns a reference to this object so that method calls can be chained together. */ public RuleGroupSourceStatelessRuleMatchAttributesTcpFlags withFlags(java.util.Collection flags) { setFlags(flags); return this; } /** *

* The set of flags to consider in the inspection. If not specified, then all flags are inspected. *

* * @return The set of flags to consider in the inspection. If not specified, then all flags are inspected. */ public java.util.List getMasks() { return masks; } /** *

* The set of flags to consider in the inspection. If not specified, then all flags are inspected. *

* * @param masks * The set of flags to consider in the inspection. If not specified, then all flags are inspected. */ public void setMasks(java.util.Collection masks) { if (masks == null) { this.masks = null; return; } this.masks = new java.util.ArrayList(masks); } /** *

* The set of flags to consider in the inspection. If not specified, then all flags are inspected. *

*

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

* * @param masks * The set of flags to consider in the inspection. If not specified, then all flags are inspected. * @return Returns a reference to this object so that method calls can be chained together. */ public RuleGroupSourceStatelessRuleMatchAttributesTcpFlags withMasks(String... masks) { if (this.masks == null) { setMasks(new java.util.ArrayList(masks.length)); } for (String ele : masks) { this.masks.add(ele); } return this; } /** *

* The set of flags to consider in the inspection. If not specified, then all flags are inspected. *

* * @param masks * The set of flags to consider in the inspection. If not specified, then all flags are inspected. * @return Returns a reference to this object so that method calls can be chained together. */ public RuleGroupSourceStatelessRuleMatchAttributesTcpFlags withMasks(java.util.Collection masks) { setMasks(masks); 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 (getFlags() != null) sb.append("Flags: ").append(getFlags()).append(","); if (getMasks() != null) sb.append("Masks: ").append(getMasks()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RuleGroupSourceStatelessRuleMatchAttributesTcpFlags == false) return false; RuleGroupSourceStatelessRuleMatchAttributesTcpFlags other = (RuleGroupSourceStatelessRuleMatchAttributesTcpFlags) obj; if (other.getFlags() == null ^ this.getFlags() == null) return false; if (other.getFlags() != null && other.getFlags().equals(this.getFlags()) == false) return false; if (other.getMasks() == null ^ this.getMasks() == null) return false; if (other.getMasks() != null && other.getMasks().equals(this.getMasks()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFlags() == null) ? 0 : getFlags().hashCode()); hashCode = prime * hashCode + ((getMasks() == null) ? 0 : getMasks().hashCode()); return hashCode; } @Override public RuleGroupSourceStatelessRuleMatchAttributesTcpFlags clone() { try { return (RuleGroupSourceStatelessRuleMatchAttributesTcpFlags) 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.RuleGroupSourceStatelessRuleMatchAttributesTcpFlagsMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy