/* * 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 header. Reflects any changes made by a component as traffic passes through. The fields of an inbound * header are null except for the first component of a path. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AnalysisPacketHeader implements Serializable, Cloneable { /** ** The destination addresses. *
*/ private com.amazonaws.internal.SdkInternalList* The destination port ranges. *
*/ private com.amazonaws.internal.SdkInternalList* The protocol. *
*/ private String protocol; /** ** The source addresses. *
*/ private com.amazonaws.internal.SdkInternalList* The source port ranges. *
*/ private com.amazonaws.internal.SdkInternalList* 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 AnalysisPacketHeader 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 AnalysisPacketHeader withDestinationAddresses(java.util.Collection* The destination port ranges. *
* * @return The destination port ranges. */ public java.util.List* The destination port ranges. *
* * @param destinationPortRanges * The destination port ranges. */ public void setDestinationPortRanges(java.util.Collection* The destination port ranges. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setDestinationPortRanges(java.util.Collection)} or * {@link #withDestinationPortRanges(java.util.Collection)} if you want to override the existing values. *
* * @param destinationPortRanges * The destination port ranges. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalysisPacketHeader withDestinationPortRanges(PortRange... destinationPortRanges) { if (this.destinationPortRanges == null) { setDestinationPortRanges(new com.amazonaws.internal.SdkInternalList* The destination port ranges. *
* * @param destinationPortRanges * The destination port ranges. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalysisPacketHeader withDestinationPortRanges(java.util.Collection* The protocol. *
* * @param protocol * The protocol. */ public void setProtocol(String protocol) { this.protocol = protocol; } /** ** The protocol. *
* * @return The protocol. */ public String getProtocol() { return this.protocol; } /** ** The protocol. *
* * @param protocol * The protocol. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalysisPacketHeader withProtocol(String protocol) { setProtocol(protocol); return this; } /** ** 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 AnalysisPacketHeader 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 AnalysisPacketHeader withSourceAddresses(java.util.Collection* The source port ranges. *
* * @return The source port ranges. */ public java.util.List* The source port ranges. *
* * @param sourcePortRanges * The source port ranges. */ public void setSourcePortRanges(java.util.Collection* The source port ranges. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSourcePortRanges(java.util.Collection)} or {@link #withSourcePortRanges(java.util.Collection)} if you * want to override the existing values. *
* * @param sourcePortRanges * The source port ranges. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalysisPacketHeader withSourcePortRanges(PortRange... sourcePortRanges) { if (this.sourcePortRanges == null) { setSourcePortRanges(new com.amazonaws.internal.SdkInternalList* The source port ranges. *
* * @param sourcePortRanges * The source port ranges. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalysisPacketHeader withSourcePortRanges(java.util.Collection