/* * 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 Traffic Mirror session. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class TrafficMirrorSession implements Serializable, Cloneable { /** ** The ID for the Traffic Mirror session. *
*/ private String trafficMirrorSessionId; /** ** The ID of the Traffic Mirror target. *
*/ private String trafficMirrorTargetId; /** ** The ID of the Traffic Mirror filter. *
*/ private String trafficMirrorFilterId; /** ** The ID of the Traffic Mirror session's network interface. *
*/ private String networkInterfaceId; /** ** The ID of the account that owns the Traffic Mirror session. *
*/ private String ownerId; /** ** The number of bytes in each packet to mirror. These are the bytes after the VXLAN header. To mirror a subset, set * this to the length (in bytes) to mirror. For example, if you set this value to 100, then the first 100 bytes that * meet the filter criteria are copied to the target. Do not specify this parameter when you want to mirror the * entire packet *
*/ private Integer packetLength; /** ** The session number determines the order in which sessions are evaluated when an interface is used by multiple * sessions. The first session with a matching filter is the one that mirrors the packets. *
** Valid values are 1-32766. *
*/ private Integer sessionNumber; /** ** The virtual network ID associated with the Traffic Mirror session. *
*/ private Integer virtualNetworkId; /** ** The description of the Traffic Mirror session. *
*/ private String description; /** ** The tags assigned to the Traffic Mirror session. *
*/ private com.amazonaws.internal.SdkInternalList* The ID for the Traffic Mirror session. *
* * @param trafficMirrorSessionId * The ID for the Traffic Mirror session. */ public void setTrafficMirrorSessionId(String trafficMirrorSessionId) { this.trafficMirrorSessionId = trafficMirrorSessionId; } /** ** The ID for the Traffic Mirror session. *
* * @return The ID for the Traffic Mirror session. */ public String getTrafficMirrorSessionId() { return this.trafficMirrorSessionId; } /** ** The ID for the Traffic Mirror session. *
* * @param trafficMirrorSessionId * The ID for the Traffic Mirror session. * @return Returns a reference to this object so that method calls can be chained together. */ public TrafficMirrorSession withTrafficMirrorSessionId(String trafficMirrorSessionId) { setTrafficMirrorSessionId(trafficMirrorSessionId); return this; } /** ** The ID of the Traffic Mirror target. *
* * @param trafficMirrorTargetId * The ID of the Traffic Mirror target. */ public void setTrafficMirrorTargetId(String trafficMirrorTargetId) { this.trafficMirrorTargetId = trafficMirrorTargetId; } /** ** The ID of the Traffic Mirror target. *
* * @return The ID of the Traffic Mirror target. */ public String getTrafficMirrorTargetId() { return this.trafficMirrorTargetId; } /** ** The ID of the Traffic Mirror target. *
* * @param trafficMirrorTargetId * The ID of the Traffic Mirror target. * @return Returns a reference to this object so that method calls can be chained together. */ public TrafficMirrorSession withTrafficMirrorTargetId(String trafficMirrorTargetId) { setTrafficMirrorTargetId(trafficMirrorTargetId); return this; } /** ** The ID of the Traffic Mirror filter. *
* * @param trafficMirrorFilterId * The ID of the Traffic Mirror filter. */ public void setTrafficMirrorFilterId(String trafficMirrorFilterId) { this.trafficMirrorFilterId = trafficMirrorFilterId; } /** ** The ID of the Traffic Mirror filter. *
* * @return The ID of the Traffic Mirror filter. */ public String getTrafficMirrorFilterId() { return this.trafficMirrorFilterId; } /** ** The ID of the Traffic Mirror filter. *
* * @param trafficMirrorFilterId * The ID of the Traffic Mirror filter. * @return Returns a reference to this object so that method calls can be chained together. */ public TrafficMirrorSession withTrafficMirrorFilterId(String trafficMirrorFilterId) { setTrafficMirrorFilterId(trafficMirrorFilterId); return this; } /** ** The ID of the Traffic Mirror session's network interface. *
* * @param networkInterfaceId * The ID of the Traffic Mirror session's network interface. */ public void setNetworkInterfaceId(String networkInterfaceId) { this.networkInterfaceId = networkInterfaceId; } /** ** The ID of the Traffic Mirror session's network interface. *
* * @return The ID of the Traffic Mirror session's network interface. */ public String getNetworkInterfaceId() { return this.networkInterfaceId; } /** ** The ID of the Traffic Mirror session's network interface. *
* * @param networkInterfaceId * The ID of the Traffic Mirror session's network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public TrafficMirrorSession withNetworkInterfaceId(String networkInterfaceId) { setNetworkInterfaceId(networkInterfaceId); return this; } /** ** The ID of the account that owns the Traffic Mirror session. *
* * @param ownerId * The ID of the account that owns the Traffic Mirror session. */ public void setOwnerId(String ownerId) { this.ownerId = ownerId; } /** ** The ID of the account that owns the Traffic Mirror session. *
* * @return The ID of the account that owns the Traffic Mirror session. */ public String getOwnerId() { return this.ownerId; } /** ** The ID of the account that owns the Traffic Mirror session. *
* * @param ownerId * The ID of the account that owns the Traffic Mirror session. * @return Returns a reference to this object so that method calls can be chained together. */ public TrafficMirrorSession withOwnerId(String ownerId) { setOwnerId(ownerId); return this; } /** ** The number of bytes in each packet to mirror. These are the bytes after the VXLAN header. To mirror a subset, set * this to the length (in bytes) to mirror. For example, if you set this value to 100, then the first 100 bytes that * meet the filter criteria are copied to the target. Do not specify this parameter when you want to mirror the * entire packet *
* * @param packetLength * The number of bytes in each packet to mirror. These are the bytes after the VXLAN header. To mirror a * subset, set this to the length (in bytes) to mirror. For example, if you set this value to 100, then the * first 100 bytes that meet the filter criteria are copied to the target. Do not specify this parameter when * you want to mirror the entire packet */ public void setPacketLength(Integer packetLength) { this.packetLength = packetLength; } /** ** The number of bytes in each packet to mirror. These are the bytes after the VXLAN header. To mirror a subset, set * this to the length (in bytes) to mirror. For example, if you set this value to 100, then the first 100 bytes that * meet the filter criteria are copied to the target. Do not specify this parameter when you want to mirror the * entire packet *
* * @return The number of bytes in each packet to mirror. These are the bytes after the VXLAN header. To mirror a * subset, set this to the length (in bytes) to mirror. For example, if you set this value to 100, then the * first 100 bytes that meet the filter criteria are copied to the target. Do not specify this parameter * when you want to mirror the entire packet */ public Integer getPacketLength() { return this.packetLength; } /** ** The number of bytes in each packet to mirror. These are the bytes after the VXLAN header. To mirror a subset, set * this to the length (in bytes) to mirror. For example, if you set this value to 100, then the first 100 bytes that * meet the filter criteria are copied to the target. Do not specify this parameter when you want to mirror the * entire packet *
* * @param packetLength * The number of bytes in each packet to mirror. These are the bytes after the VXLAN header. To mirror a * subset, set this to the length (in bytes) to mirror. For example, if you set this value to 100, then the * first 100 bytes that meet the filter criteria are copied to the target. Do not specify this parameter when * you want to mirror the entire packet * @return Returns a reference to this object so that method calls can be chained together. */ public TrafficMirrorSession withPacketLength(Integer packetLength) { setPacketLength(packetLength); return this; } /** ** The session number determines the order in which sessions are evaluated when an interface is used by multiple * sessions. The first session with a matching filter is the one that mirrors the packets. *
** Valid values are 1-32766. *
* * @param sessionNumber * The session number determines the order in which sessions are evaluated when an interface is used by * multiple sessions. The first session with a matching filter is the one that mirrors the packets. ** Valid values are 1-32766. */ public void setSessionNumber(Integer sessionNumber) { this.sessionNumber = sessionNumber; } /** *
* The session number determines the order in which sessions are evaluated when an interface is used by multiple * sessions. The first session with a matching filter is the one that mirrors the packets. *
** Valid values are 1-32766. *
* * @return The session number determines the order in which sessions are evaluated when an interface is used by * multiple sessions. The first session with a matching filter is the one that mirrors the packets. ** Valid values are 1-32766. */ public Integer getSessionNumber() { return this.sessionNumber; } /** *
* The session number determines the order in which sessions are evaluated when an interface is used by multiple * sessions. The first session with a matching filter is the one that mirrors the packets. *
** Valid values are 1-32766. *
* * @param sessionNumber * The session number determines the order in which sessions are evaluated when an interface is used by * multiple sessions. The first session with a matching filter is the one that mirrors the packets. ** Valid values are 1-32766. * @return Returns a reference to this object so that method calls can be chained together. */ public TrafficMirrorSession withSessionNumber(Integer sessionNumber) { setSessionNumber(sessionNumber); return this; } /** *
* The virtual network ID associated with the Traffic Mirror session. *
* * @param virtualNetworkId * The virtual network ID associated with the Traffic Mirror session. */ public void setVirtualNetworkId(Integer virtualNetworkId) { this.virtualNetworkId = virtualNetworkId; } /** ** The virtual network ID associated with the Traffic Mirror session. *
* * @return The virtual network ID associated with the Traffic Mirror session. */ public Integer getVirtualNetworkId() { return this.virtualNetworkId; } /** ** The virtual network ID associated with the Traffic Mirror session. *
* * @param virtualNetworkId * The virtual network ID associated with the Traffic Mirror session. * @return Returns a reference to this object so that method calls can be chained together. */ public TrafficMirrorSession withVirtualNetworkId(Integer virtualNetworkId) { setVirtualNetworkId(virtualNetworkId); return this; } /** ** The description of the Traffic Mirror session. *
* * @param description * The description of the Traffic Mirror session. */ public void setDescription(String description) { this.description = description; } /** ** The description of the Traffic Mirror session. *
* * @return The description of the Traffic Mirror session. */ public String getDescription() { return this.description; } /** ** The description of the Traffic Mirror session. *
* * @param description * The description of the Traffic Mirror session. * @return Returns a reference to this object so that method calls can be chained together. */ public TrafficMirrorSession withDescription(String description) { setDescription(description); return this; } /** ** The tags assigned to the Traffic Mirror session. *
* * @return The tags assigned to the Traffic Mirror session. */ public java.util.List* The tags assigned to the Traffic Mirror session. *
* * @param tags * The tags assigned to the Traffic Mirror session. */ public void setTags(java.util.Collection* The tags assigned to the Traffic Mirror session. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * The tags assigned to the Traffic Mirror session. * @return Returns a reference to this object so that method calls can be chained together. */ public TrafficMirrorSession withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList* The tags assigned to the Traffic Mirror session. *
* * @param tags * The tags assigned to the Traffic Mirror session. * @return Returns a reference to this object so that method calls can be chained together. */ public TrafficMirrorSession withTags(java.util.Collection