/* * 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.ec2.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* Describes a packet header statement. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PacketHeaderStatement implements Serializable, Cloneable { /** ** The source addresses. *
*/ private com.amazonaws.internal.SdkInternalList* The destination addresses. *
*/ private com.amazonaws.internal.SdkInternalList* The source ports. *
*/ private com.amazonaws.internal.SdkInternalList* The destination ports. *
*/ private com.amazonaws.internal.SdkInternalList* The source prefix lists. *
*/ private com.amazonaws.internal.SdkInternalList* The destination prefix lists. *
*/ private com.amazonaws.internal.SdkInternalList* The protocols. *
*/ private com.amazonaws.internal.SdkInternalList* The source addresses. *
* * @return The source addresses. */ public java.util.List* The source addresses. *
* * @param sourceAddresses * The source addresses. */ public void setSourceAddresses(java.util.Collection* The source addresses. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSourceAddresses(java.util.Collection)} or {@link #withSourceAddresses(java.util.Collection)} if you * want to override the existing values. *
* * @param sourceAddresses * The source addresses. * @return Returns a reference to this object so that method calls can be chained together. */ public PacketHeaderStatement withSourceAddresses(String... sourceAddresses) { if (this.sourceAddresses == null) { setSourceAddresses(new com.amazonaws.internal.SdkInternalList* The source addresses. *
* * @param sourceAddresses * The source addresses. * @return Returns a reference to this object so that method calls can be chained together. */ public PacketHeaderStatement withSourceAddresses(java.util.Collection* The destination addresses. *
* * @return The destination addresses. */ public java.util.List* The destination addresses. *
* * @param destinationAddresses * The destination addresses. */ public void setDestinationAddresses(java.util.Collection* The destination addresses. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setDestinationAddresses(java.util.Collection)} or {@link #withDestinationAddresses(java.util.Collection)} * if you want to override the existing values. *
* * @param destinationAddresses * The destination addresses. * @return Returns a reference to this object so that method calls can be chained together. */ public PacketHeaderStatement withDestinationAddresses(String... destinationAddresses) { if (this.destinationAddresses == null) { setDestinationAddresses(new com.amazonaws.internal.SdkInternalList* The destination addresses. *
* * @param destinationAddresses * The destination addresses. * @return Returns a reference to this object so that method calls can be chained together. */ public PacketHeaderStatement withDestinationAddresses(java.util.Collection* The source ports. *
* * @return The source ports. */ public java.util.List* The source ports. *
* * @param sourcePorts * The source ports. */ public void setSourcePorts(java.util.Collection* The source ports. *
** 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 * The source ports. * @return Returns a reference to this object so that method calls can be chained together. */ public PacketHeaderStatement withSourcePorts(String... sourcePorts) { if (this.sourcePorts == null) { setSourcePorts(new com.amazonaws.internal.SdkInternalList* The source ports. *
* * @param sourcePorts * The source ports. * @return Returns a reference to this object so that method calls can be chained together. */ public PacketHeaderStatement withSourcePorts(java.util.Collection* The destination ports. *
* * @return The destination ports. */ public java.util.List* The destination ports. *
* * @param destinationPorts * The destination ports. */ public void setDestinationPorts(java.util.Collection* The destination ports. *
** 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 * The destination ports. * @return Returns a reference to this object so that method calls can be chained together. */ public PacketHeaderStatement withDestinationPorts(String... destinationPorts) { if (this.destinationPorts == null) { setDestinationPorts(new com.amazonaws.internal.SdkInternalList* The destination ports. *
* * @param destinationPorts * The destination ports. * @return Returns a reference to this object so that method calls can be chained together. */ public PacketHeaderStatement withDestinationPorts(java.util.Collection* The source prefix lists. *
* * @return The source prefix lists. */ public java.util.List* The source prefix lists. *
* * @param sourcePrefixLists * The source prefix lists. */ public void setSourcePrefixLists(java.util.Collection* The source prefix lists. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSourcePrefixLists(java.util.Collection)} or {@link #withSourcePrefixLists(java.util.Collection)} if * you want to override the existing values. *
* * @param sourcePrefixLists * The source prefix lists. * @return Returns a reference to this object so that method calls can be chained together. */ public PacketHeaderStatement withSourcePrefixLists(String... sourcePrefixLists) { if (this.sourcePrefixLists == null) { setSourcePrefixLists(new com.amazonaws.internal.SdkInternalList* The source prefix lists. *
* * @param sourcePrefixLists * The source prefix lists. * @return Returns a reference to this object so that method calls can be chained together. */ public PacketHeaderStatement withSourcePrefixLists(java.util.Collection* The destination prefix lists. *
* * @return The destination prefix lists. */ public java.util.List* The destination prefix lists. *
* * @param destinationPrefixLists * The destination prefix lists. */ public void setDestinationPrefixLists(java.util.Collection* The destination prefix lists. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setDestinationPrefixLists(java.util.Collection)} or * {@link #withDestinationPrefixLists(java.util.Collection)} if you want to override the existing values. *
* * @param destinationPrefixLists * The destination prefix lists. * @return Returns a reference to this object so that method calls can be chained together. */ public PacketHeaderStatement withDestinationPrefixLists(String... destinationPrefixLists) { if (this.destinationPrefixLists == null) { setDestinationPrefixLists(new com.amazonaws.internal.SdkInternalList* The destination prefix lists. *
* * @param destinationPrefixLists * The destination prefix lists. * @return Returns a reference to this object so that method calls can be chained together. */ public PacketHeaderStatement withDestinationPrefixLists(java.util.Collection* The protocols. *
* * @return The protocols. * @see Protocol */ public java.util.List* The protocols. *
* * @param protocols * The protocols. * @see Protocol */ public void setProtocols(java.util.Collection* The protocols. *
** 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. * @return Returns a reference to this object so that method calls can be chained together. * @see Protocol */ public PacketHeaderStatement withProtocols(String... protocols) { if (this.protocols == null) { setProtocols(new com.amazonaws.internal.SdkInternalList* The protocols. *
* * @param protocols * The protocols. * @return Returns a reference to this object so that method calls can be chained together. * @see Protocol */ public PacketHeaderStatement withProtocols(java.util.Collection* The protocols. *
* * @param protocols * The protocols. * @return Returns a reference to this object so that method calls can be chained together. * @see Protocol */ public PacketHeaderStatement withProtocols(Protocol... protocols) { com.amazonaws.internal.SdkInternalList