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

com.amazonaws.services.ec2.model.TrafficMirrorSession Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2017-2022 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 tags; /** *

* 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 getTags() { if (tags == null) { tags = new com.amazonaws.internal.SdkInternalList(); } return tags; } /** *

* The tags assigned to the Traffic Mirror session. *

* * @param tags * The tags assigned to the Traffic Mirror session. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new com.amazonaws.internal.SdkInternalList(tags); } /** *

* 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(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* 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 tags) { setTags(tags); 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 (getTrafficMirrorSessionId() != null) sb.append("TrafficMirrorSessionId: ").append(getTrafficMirrorSessionId()).append(","); if (getTrafficMirrorTargetId() != null) sb.append("TrafficMirrorTargetId: ").append(getTrafficMirrorTargetId()).append(","); if (getTrafficMirrorFilterId() != null) sb.append("TrafficMirrorFilterId: ").append(getTrafficMirrorFilterId()).append(","); if (getNetworkInterfaceId() != null) sb.append("NetworkInterfaceId: ").append(getNetworkInterfaceId()).append(","); if (getOwnerId() != null) sb.append("OwnerId: ").append(getOwnerId()).append(","); if (getPacketLength() != null) sb.append("PacketLength: ").append(getPacketLength()).append(","); if (getSessionNumber() != null) sb.append("SessionNumber: ").append(getSessionNumber()).append(","); if (getVirtualNetworkId() != null) sb.append("VirtualNetworkId: ").append(getVirtualNetworkId()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TrafficMirrorSession == false) return false; TrafficMirrorSession other = (TrafficMirrorSession) obj; if (other.getTrafficMirrorSessionId() == null ^ this.getTrafficMirrorSessionId() == null) return false; if (other.getTrafficMirrorSessionId() != null && other.getTrafficMirrorSessionId().equals(this.getTrafficMirrorSessionId()) == false) return false; if (other.getTrafficMirrorTargetId() == null ^ this.getTrafficMirrorTargetId() == null) return false; if (other.getTrafficMirrorTargetId() != null && other.getTrafficMirrorTargetId().equals(this.getTrafficMirrorTargetId()) == false) return false; if (other.getTrafficMirrorFilterId() == null ^ this.getTrafficMirrorFilterId() == null) return false; if (other.getTrafficMirrorFilterId() != null && other.getTrafficMirrorFilterId().equals(this.getTrafficMirrorFilterId()) == false) return false; if (other.getNetworkInterfaceId() == null ^ this.getNetworkInterfaceId() == null) return false; if (other.getNetworkInterfaceId() != null && other.getNetworkInterfaceId().equals(this.getNetworkInterfaceId()) == false) return false; if (other.getOwnerId() == null ^ this.getOwnerId() == null) return false; if (other.getOwnerId() != null && other.getOwnerId().equals(this.getOwnerId()) == false) return false; if (other.getPacketLength() == null ^ this.getPacketLength() == null) return false; if (other.getPacketLength() != null && other.getPacketLength().equals(this.getPacketLength()) == false) return false; if (other.getSessionNumber() == null ^ this.getSessionNumber() == null) return false; if (other.getSessionNumber() != null && other.getSessionNumber().equals(this.getSessionNumber()) == false) return false; if (other.getVirtualNetworkId() == null ^ this.getVirtualNetworkId() == null) return false; if (other.getVirtualNetworkId() != null && other.getVirtualNetworkId().equals(this.getVirtualNetworkId()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTrafficMirrorSessionId() == null) ? 0 : getTrafficMirrorSessionId().hashCode()); hashCode = prime * hashCode + ((getTrafficMirrorTargetId() == null) ? 0 : getTrafficMirrorTargetId().hashCode()); hashCode = prime * hashCode + ((getTrafficMirrorFilterId() == null) ? 0 : getTrafficMirrorFilterId().hashCode()); hashCode = prime * hashCode + ((getNetworkInterfaceId() == null) ? 0 : getNetworkInterfaceId().hashCode()); hashCode = prime * hashCode + ((getOwnerId() == null) ? 0 : getOwnerId().hashCode()); hashCode = prime * hashCode + ((getPacketLength() == null) ? 0 : getPacketLength().hashCode()); hashCode = prime * hashCode + ((getSessionNumber() == null) ? 0 : getSessionNumber().hashCode()); hashCode = prime * hashCode + ((getVirtualNetworkId() == null) ? 0 : getVirtualNetworkId().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public TrafficMirrorSession clone() { try { return (TrafficMirrorSession) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy