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

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

There is a newer version: 1.12.780
Show newest version
/*
 * 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.securityhub.model;

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

/**
 * 

* Details about the network interface *

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

* The network interface attachment. *

*/ private AwsEc2NetworkInterfaceAttachment attachment; /** *

* The ID of the network interface. *

*/ private String networkInterfaceId; /** *

* Security groups for the network interface. *

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

* Indicates whether traffic to or from the instance is validated. *

*/ private Boolean sourceDestCheck; /** *

* The IPv6 addresses associated with the network interface. *

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

* The private IPv4 addresses associated with the network interface. *

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

* The public DNS name of the network interface. *

*/ private String publicDnsName; /** *

* The address of the Elastic IP address bound to the network interface. *

*/ private String publicIp; /** *

* The network interface attachment. *

* * @param attachment * The network interface attachment. */ public void setAttachment(AwsEc2NetworkInterfaceAttachment attachment) { this.attachment = attachment; } /** *

* The network interface attachment. *

* * @return The network interface attachment. */ public AwsEc2NetworkInterfaceAttachment getAttachment() { return this.attachment; } /** *

* The network interface attachment. *

* * @param attachment * The network interface attachment. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2NetworkInterfaceDetails withAttachment(AwsEc2NetworkInterfaceAttachment attachment) { setAttachment(attachment); return this; } /** *

* The ID of the network interface. *

* * @param networkInterfaceId * The ID of the network interface. */ public void setNetworkInterfaceId(String networkInterfaceId) { this.networkInterfaceId = networkInterfaceId; } /** *

* The ID of the network interface. *

* * @return The ID of the network interface. */ public String getNetworkInterfaceId() { return this.networkInterfaceId; } /** *

* The ID of the network interface. *

* * @param networkInterfaceId * The ID of the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2NetworkInterfaceDetails withNetworkInterfaceId(String networkInterfaceId) { setNetworkInterfaceId(networkInterfaceId); return this; } /** *

* Security groups for the network interface. *

* * @return Security groups for the network interface. */ public java.util.List getSecurityGroups() { return securityGroups; } /** *

* Security groups for the network interface. *

* * @param securityGroups * Security groups for the network interface. */ public void setSecurityGroups(java.util.Collection securityGroups) { if (securityGroups == null) { this.securityGroups = null; return; } this.securityGroups = new java.util.ArrayList(securityGroups); } /** *

* Security groups for the network interface. *

*

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

* * @param securityGroups * Security groups for the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2NetworkInterfaceDetails withSecurityGroups(AwsEc2NetworkInterfaceSecurityGroup... securityGroups) { if (this.securityGroups == null) { setSecurityGroups(new java.util.ArrayList(securityGroups.length)); } for (AwsEc2NetworkInterfaceSecurityGroup ele : securityGroups) { this.securityGroups.add(ele); } return this; } /** *

* Security groups for the network interface. *

* * @param securityGroups * Security groups for the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2NetworkInterfaceDetails withSecurityGroups(java.util.Collection securityGroups) { setSecurityGroups(securityGroups); return this; } /** *

* Indicates whether traffic to or from the instance is validated. *

* * @param sourceDestCheck * Indicates whether traffic to or from the instance is validated. */ public void setSourceDestCheck(Boolean sourceDestCheck) { this.sourceDestCheck = sourceDestCheck; } /** *

* Indicates whether traffic to or from the instance is validated. *

* * @return Indicates whether traffic to or from the instance is validated. */ public Boolean getSourceDestCheck() { return this.sourceDestCheck; } /** *

* Indicates whether traffic to or from the instance is validated. *

* * @param sourceDestCheck * Indicates whether traffic to or from the instance is validated. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2NetworkInterfaceDetails withSourceDestCheck(Boolean sourceDestCheck) { setSourceDestCheck(sourceDestCheck); return this; } /** *

* Indicates whether traffic to or from the instance is validated. *

* * @return Indicates whether traffic to or from the instance is validated. */ public Boolean isSourceDestCheck() { return this.sourceDestCheck; } /** *

* The IPv6 addresses associated with the network interface. *

* * @return The IPv6 addresses associated with the network interface. */ public java.util.List getIpV6Addresses() { return ipV6Addresses; } /** *

* The IPv6 addresses associated with the network interface. *

* * @param ipV6Addresses * The IPv6 addresses associated with the network interface. */ public void setIpV6Addresses(java.util.Collection ipV6Addresses) { if (ipV6Addresses == null) { this.ipV6Addresses = null; return; } this.ipV6Addresses = new java.util.ArrayList(ipV6Addresses); } /** *

* The IPv6 addresses associated with the network interface. *

*

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

* * @param ipV6Addresses * The IPv6 addresses associated with the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2NetworkInterfaceDetails withIpV6Addresses(AwsEc2NetworkInterfaceIpV6AddressDetail... ipV6Addresses) { if (this.ipV6Addresses == null) { setIpV6Addresses(new java.util.ArrayList(ipV6Addresses.length)); } for (AwsEc2NetworkInterfaceIpV6AddressDetail ele : ipV6Addresses) { this.ipV6Addresses.add(ele); } return this; } /** *

* The IPv6 addresses associated with the network interface. *

* * @param ipV6Addresses * The IPv6 addresses associated with the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2NetworkInterfaceDetails withIpV6Addresses(java.util.Collection ipV6Addresses) { setIpV6Addresses(ipV6Addresses); return this; } /** *

* The private IPv4 addresses associated with the network interface. *

* * @return The private IPv4 addresses associated with the network interface. */ public java.util.List getPrivateIpAddresses() { return privateIpAddresses; } /** *

* The private IPv4 addresses associated with the network interface. *

* * @param privateIpAddresses * The private IPv4 addresses associated with the network interface. */ public void setPrivateIpAddresses(java.util.Collection privateIpAddresses) { if (privateIpAddresses == null) { this.privateIpAddresses = null; return; } this.privateIpAddresses = new java.util.ArrayList(privateIpAddresses); } /** *

* The private IPv4 addresses associated with the network interface. *

*

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

* * @param privateIpAddresses * The private IPv4 addresses associated with the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2NetworkInterfaceDetails withPrivateIpAddresses(AwsEc2NetworkInterfacePrivateIpAddressDetail... privateIpAddresses) { if (this.privateIpAddresses == null) { setPrivateIpAddresses(new java.util.ArrayList(privateIpAddresses.length)); } for (AwsEc2NetworkInterfacePrivateIpAddressDetail ele : privateIpAddresses) { this.privateIpAddresses.add(ele); } return this; } /** *

* The private IPv4 addresses associated with the network interface. *

* * @param privateIpAddresses * The private IPv4 addresses associated with the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2NetworkInterfaceDetails withPrivateIpAddresses(java.util.Collection privateIpAddresses) { setPrivateIpAddresses(privateIpAddresses); return this; } /** *

* The public DNS name of the network interface. *

* * @param publicDnsName * The public DNS name of the network interface. */ public void setPublicDnsName(String publicDnsName) { this.publicDnsName = publicDnsName; } /** *

* The public DNS name of the network interface. *

* * @return The public DNS name of the network interface. */ public String getPublicDnsName() { return this.publicDnsName; } /** *

* The public DNS name of the network interface. *

* * @param publicDnsName * The public DNS name of the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2NetworkInterfaceDetails withPublicDnsName(String publicDnsName) { setPublicDnsName(publicDnsName); return this; } /** *

* The address of the Elastic IP address bound to the network interface. *

* * @param publicIp * The address of the Elastic IP address bound to the network interface. */ public void setPublicIp(String publicIp) { this.publicIp = publicIp; } /** *

* The address of the Elastic IP address bound to the network interface. *

* * @return The address of the Elastic IP address bound to the network interface. */ public String getPublicIp() { return this.publicIp; } /** *

* The address of the Elastic IP address bound to the network interface. *

* * @param publicIp * The address of the Elastic IP address bound to the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2NetworkInterfaceDetails withPublicIp(String publicIp) { setPublicIp(publicIp); 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 (getAttachment() != null) sb.append("Attachment: ").append(getAttachment()).append(","); if (getNetworkInterfaceId() != null) sb.append("NetworkInterfaceId: ").append(getNetworkInterfaceId()).append(","); if (getSecurityGroups() != null) sb.append("SecurityGroups: ").append(getSecurityGroups()).append(","); if (getSourceDestCheck() != null) sb.append("SourceDestCheck: ").append(getSourceDestCheck()).append(","); if (getIpV6Addresses() != null) sb.append("IpV6Addresses: ").append(getIpV6Addresses()).append(","); if (getPrivateIpAddresses() != null) sb.append("PrivateIpAddresses: ").append(getPrivateIpAddresses()).append(","); if (getPublicDnsName() != null) sb.append("PublicDnsName: ").append(getPublicDnsName()).append(","); if (getPublicIp() != null) sb.append("PublicIp: ").append(getPublicIp()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AwsEc2NetworkInterfaceDetails == false) return false; AwsEc2NetworkInterfaceDetails other = (AwsEc2NetworkInterfaceDetails) obj; if (other.getAttachment() == null ^ this.getAttachment() == null) return false; if (other.getAttachment() != null && other.getAttachment().equals(this.getAttachment()) == 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.getSecurityGroups() == null ^ this.getSecurityGroups() == null) return false; if (other.getSecurityGroups() != null && other.getSecurityGroups().equals(this.getSecurityGroups()) == false) return false; if (other.getSourceDestCheck() == null ^ this.getSourceDestCheck() == null) return false; if (other.getSourceDestCheck() != null && other.getSourceDestCheck().equals(this.getSourceDestCheck()) == false) return false; if (other.getIpV6Addresses() == null ^ this.getIpV6Addresses() == null) return false; if (other.getIpV6Addresses() != null && other.getIpV6Addresses().equals(this.getIpV6Addresses()) == false) return false; if (other.getPrivateIpAddresses() == null ^ this.getPrivateIpAddresses() == null) return false; if (other.getPrivateIpAddresses() != null && other.getPrivateIpAddresses().equals(this.getPrivateIpAddresses()) == false) return false; if (other.getPublicDnsName() == null ^ this.getPublicDnsName() == null) return false; if (other.getPublicDnsName() != null && other.getPublicDnsName().equals(this.getPublicDnsName()) == false) return false; if (other.getPublicIp() == null ^ this.getPublicIp() == null) return false; if (other.getPublicIp() != null && other.getPublicIp().equals(this.getPublicIp()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAttachment() == null) ? 0 : getAttachment().hashCode()); hashCode = prime * hashCode + ((getNetworkInterfaceId() == null) ? 0 : getNetworkInterfaceId().hashCode()); hashCode = prime * hashCode + ((getSecurityGroups() == null) ? 0 : getSecurityGroups().hashCode()); hashCode = prime * hashCode + ((getSourceDestCheck() == null) ? 0 : getSourceDestCheck().hashCode()); hashCode = prime * hashCode + ((getIpV6Addresses() == null) ? 0 : getIpV6Addresses().hashCode()); hashCode = prime * hashCode + ((getPrivateIpAddresses() == null) ? 0 : getPrivateIpAddresses().hashCode()); hashCode = prime * hashCode + ((getPublicDnsName() == null) ? 0 : getPublicDnsName().hashCode()); hashCode = prime * hashCode + ((getPublicIp() == null) ? 0 : getPublicIp().hashCode()); return hashCode; } @Override public AwsEc2NetworkInterfaceDetails clone() { try { return (AwsEc2NetworkInterfaceDetails) 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.AwsEc2NetworkInterfaceDetailsMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy