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

com.amazonaws.services.ec2.model.NetworkInterface 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.778
Show newest version
/*
 * Copyright 2019-2024 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 network interface. *

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

* The association information for an Elastic IP address (IPv4) associated with the network interface. *

*/ private NetworkInterfaceAssociation association; /** *

* The network interface attachment. *

*/ private NetworkInterfaceAttachment attachment; /** *

* The Availability Zone. *

*/ private String availabilityZone; /** *

* A security group connection tracking configuration that enables you to set the timeout for connection tracking on * an Elastic network interface. For more information, see Connection tracking timeouts in the Amazon EC2 User Guide. *

*/ private ConnectionTrackingConfiguration connectionTrackingConfiguration; /** *

* A description. *

*/ private String description; /** *

* Any security groups for the network interface. *

*/ private com.amazonaws.internal.SdkInternalList groups; /** *

* The type of network interface. *

*/ private String interfaceType; /** *

* The IPv6 addresses associated with the network interface. *

*/ private com.amazonaws.internal.SdkInternalList ipv6Addresses; /** *

* The MAC address. *

*/ private String macAddress; /** *

* The ID of the network interface. *

*/ private String networkInterfaceId; /** *

* The Amazon Resource Name (ARN) of the Outpost. *

*/ private String outpostArn; /** *

* The Amazon Web Services account ID of the owner of the network interface. *

*/ private String ownerId; /** *

* The private DNS name. *

*/ private String privateDnsName; /** *

* The IPv4 address of the network interface within the subnet. *

*/ private String privateIpAddress; /** *

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

*/ private com.amazonaws.internal.SdkInternalList privateIpAddresses; /** *

* The IPv4 prefixes that are assigned to the network interface. *

*/ private com.amazonaws.internal.SdkInternalList ipv4Prefixes; /** *

* The IPv6 prefixes that are assigned to the network interface. *

*/ private com.amazonaws.internal.SdkInternalList ipv6Prefixes; /** *

* The alias or Amazon Web Services account ID of the principal or service that created the network interface. *

*/ private String requesterId; /** *

* Indicates whether the network interface is being managed by Amazon Web Services. *

*/ private Boolean requesterManaged; /** *

* Indicates whether source/destination checking is enabled. *

*/ private Boolean sourceDestCheck; /** *

* The status of the network interface. *

*/ private String status; /** *

* The ID of the subnet. *

*/ private String subnetId; /** *

* Any tags assigned to the network interface. *

*/ private com.amazonaws.internal.SdkInternalList tagSet; /** *

* The ID of the VPC. *

*/ private String vpcId; /** *

* Indicates whether a network interface with an IPv6 address is unreachable from the public internet. If the value * is true, inbound traffic from the internet is dropped and you cannot assign an elastic IP address to * the network interface. The network interface is reachable from peered VPCs and resources connected through a * transit gateway, including on-premises networks. *

*/ private Boolean denyAllIgwTraffic; /** *

* Indicates whether this is an IPv6 only network interface. *

*/ private Boolean ipv6Native; /** *

* The IPv6 globally unique address associated with the network interface. *

*/ private String ipv6Address; /** *

* The association information for an Elastic IP address (IPv4) associated with the network interface. *

* * @param association * The association information for an Elastic IP address (IPv4) associated with the network interface. */ public void setAssociation(NetworkInterfaceAssociation association) { this.association = association; } /** *

* The association information for an Elastic IP address (IPv4) associated with the network interface. *

* * @return The association information for an Elastic IP address (IPv4) associated with the network interface. */ public NetworkInterfaceAssociation getAssociation() { return this.association; } /** *

* The association information for an Elastic IP address (IPv4) associated with the network interface. *

* * @param association * The association information for an Elastic IP address (IPv4) associated with the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withAssociation(NetworkInterfaceAssociation association) { setAssociation(association); return this; } /** *

* The network interface attachment. *

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

* The network interface attachment. *

* * @return The network interface attachment. */ public NetworkInterfaceAttachment 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 NetworkInterface withAttachment(NetworkInterfaceAttachment attachment) { setAttachment(attachment); return this; } /** *

* The Availability Zone. *

* * @param availabilityZone * The Availability Zone. */ public void setAvailabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; } /** *

* The Availability Zone. *

* * @return The Availability Zone. */ public String getAvailabilityZone() { return this.availabilityZone; } /** *

* The Availability Zone. *

* * @param availabilityZone * The Availability Zone. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withAvailabilityZone(String availabilityZone) { setAvailabilityZone(availabilityZone); return this; } /** *

* A security group connection tracking configuration that enables you to set the timeout for connection tracking on * an Elastic network interface. For more information, see Connection tracking timeouts in the Amazon EC2 User Guide. *

* * @param connectionTrackingConfiguration * A security group connection tracking configuration that enables you to set the timeout for connection * tracking on an Elastic network interface. For more information, see Connection tracking timeouts in the Amazon EC2 User Guide. */ public void setConnectionTrackingConfiguration(ConnectionTrackingConfiguration connectionTrackingConfiguration) { this.connectionTrackingConfiguration = connectionTrackingConfiguration; } /** *

* A security group connection tracking configuration that enables you to set the timeout for connection tracking on * an Elastic network interface. For more information, see Connection tracking timeouts in the Amazon EC2 User Guide. *

* * @return A security group connection tracking configuration that enables you to set the timeout for connection * tracking on an Elastic network interface. For more information, see Connection tracking timeouts in the Amazon EC2 User Guide. */ public ConnectionTrackingConfiguration getConnectionTrackingConfiguration() { return this.connectionTrackingConfiguration; } /** *

* A security group connection tracking configuration that enables you to set the timeout for connection tracking on * an Elastic network interface. For more information, see Connection tracking timeouts in the Amazon EC2 User Guide. *

* * @param connectionTrackingConfiguration * A security group connection tracking configuration that enables you to set the timeout for connection * tracking on an Elastic network interface. For more information, see Connection tracking timeouts in the Amazon EC2 User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withConnectionTrackingConfiguration(ConnectionTrackingConfiguration connectionTrackingConfiguration) { setConnectionTrackingConfiguration(connectionTrackingConfiguration); return this; } /** *

* A description. *

* * @param description * A description. */ public void setDescription(String description) { this.description = description; } /** *

* A description. *

* * @return A description. */ public String getDescription() { return this.description; } /** *

* A description. *

* * @param description * A description. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withDescription(String description) { setDescription(description); return this; } /** *

* Any security groups for the network interface. *

* * @return Any security groups for the network interface. */ public java.util.List getGroups() { if (groups == null) { groups = new com.amazonaws.internal.SdkInternalList(); } return groups; } /** *

* Any security groups for the network interface. *

* * @param groups * Any security groups for the network interface. */ public void setGroups(java.util.Collection groups) { if (groups == null) { this.groups = null; return; } this.groups = new com.amazonaws.internal.SdkInternalList(groups); } /** *

* Any security groups for the network interface. *

*

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

* * @param groups * Any security groups for the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withGroups(GroupIdentifier... groups) { if (this.groups == null) { setGroups(new com.amazonaws.internal.SdkInternalList(groups.length)); } for (GroupIdentifier ele : groups) { this.groups.add(ele); } return this; } /** *

* Any security groups for the network interface. *

* * @param groups * Any security groups for the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withGroups(java.util.Collection groups) { setGroups(groups); return this; } /** *

* The type of network interface. *

* * @param interfaceType * The type of network interface. * @see NetworkInterfaceType */ public void setInterfaceType(String interfaceType) { this.interfaceType = interfaceType; } /** *

* The type of network interface. *

* * @return The type of network interface. * @see NetworkInterfaceType */ public String getInterfaceType() { return this.interfaceType; } /** *

* The type of network interface. *

* * @param interfaceType * The type of network interface. * @return Returns a reference to this object so that method calls can be chained together. * @see NetworkInterfaceType */ public NetworkInterface withInterfaceType(String interfaceType) { setInterfaceType(interfaceType); return this; } /** *

* The type of network interface. *

* * @param interfaceType * The type of network interface. * @see NetworkInterfaceType */ public void setInterfaceType(NetworkInterfaceType interfaceType) { withInterfaceType(interfaceType); } /** *

* The type of network interface. *

* * @param interfaceType * The type of network interface. * @return Returns a reference to this object so that method calls can be chained together. * @see NetworkInterfaceType */ public NetworkInterface withInterfaceType(NetworkInterfaceType interfaceType) { this.interfaceType = interfaceType.toString(); return this; } /** *

* The IPv6 addresses associated with the network interface. *

* * @return The IPv6 addresses associated with the network interface. */ public java.util.List getIpv6Addresses() { if (ipv6Addresses == null) { ipv6Addresses = new com.amazonaws.internal.SdkInternalList(); } 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 com.amazonaws.internal.SdkInternalList(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 NetworkInterface withIpv6Addresses(NetworkInterfaceIpv6Address... ipv6Addresses) { if (this.ipv6Addresses == null) { setIpv6Addresses(new com.amazonaws.internal.SdkInternalList(ipv6Addresses.length)); } for (NetworkInterfaceIpv6Address 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 NetworkInterface withIpv6Addresses(java.util.Collection ipv6Addresses) { setIpv6Addresses(ipv6Addresses); return this; } /** *

* The MAC address. *

* * @param macAddress * The MAC address. */ public void setMacAddress(String macAddress) { this.macAddress = macAddress; } /** *

* The MAC address. *

* * @return The MAC address. */ public String getMacAddress() { return this.macAddress; } /** *

* The MAC address. *

* * @param macAddress * The MAC address. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withMacAddress(String macAddress) { setMacAddress(macAddress); 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 NetworkInterface withNetworkInterfaceId(String networkInterfaceId) { setNetworkInterfaceId(networkInterfaceId); return this; } /** *

* The Amazon Resource Name (ARN) of the Outpost. *

* * @param outpostArn * The Amazon Resource Name (ARN) of the Outpost. */ public void setOutpostArn(String outpostArn) { this.outpostArn = outpostArn; } /** *

* The Amazon Resource Name (ARN) of the Outpost. *

* * @return The Amazon Resource Name (ARN) of the Outpost. */ public String getOutpostArn() { return this.outpostArn; } /** *

* The Amazon Resource Name (ARN) of the Outpost. *

* * @param outpostArn * The Amazon Resource Name (ARN) of the Outpost. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withOutpostArn(String outpostArn) { setOutpostArn(outpostArn); return this; } /** *

* The Amazon Web Services account ID of the owner of the network interface. *

* * @param ownerId * The Amazon Web Services account ID of the owner of the network interface. */ public void setOwnerId(String ownerId) { this.ownerId = ownerId; } /** *

* The Amazon Web Services account ID of the owner of the network interface. *

* * @return The Amazon Web Services account ID of the owner of the network interface. */ public String getOwnerId() { return this.ownerId; } /** *

* The Amazon Web Services account ID of the owner of the network interface. *

* * @param ownerId * The Amazon Web Services account ID of the owner of the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withOwnerId(String ownerId) { setOwnerId(ownerId); return this; } /** *

* The private DNS name. *

* * @param privateDnsName * The private DNS name. */ public void setPrivateDnsName(String privateDnsName) { this.privateDnsName = privateDnsName; } /** *

* The private DNS name. *

* * @return The private DNS name. */ public String getPrivateDnsName() { return this.privateDnsName; } /** *

* The private DNS name. *

* * @param privateDnsName * The private DNS name. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withPrivateDnsName(String privateDnsName) { setPrivateDnsName(privateDnsName); return this; } /** *

* The IPv4 address of the network interface within the subnet. *

* * @param privateIpAddress * The IPv4 address of the network interface within the subnet. */ public void setPrivateIpAddress(String privateIpAddress) { this.privateIpAddress = privateIpAddress; } /** *

* The IPv4 address of the network interface within the subnet. *

* * @return The IPv4 address of the network interface within the subnet. */ public String getPrivateIpAddress() { return this.privateIpAddress; } /** *

* The IPv4 address of the network interface within the subnet. *

* * @param privateIpAddress * The IPv4 address of the network interface within the subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withPrivateIpAddress(String privateIpAddress) { setPrivateIpAddress(privateIpAddress); 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() { if (privateIpAddresses == null) { privateIpAddresses = new com.amazonaws.internal.SdkInternalList(); } 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 com.amazonaws.internal.SdkInternalList(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 NetworkInterface withPrivateIpAddresses(NetworkInterfacePrivateIpAddress... privateIpAddresses) { if (this.privateIpAddresses == null) { setPrivateIpAddresses(new com.amazonaws.internal.SdkInternalList(privateIpAddresses.length)); } for (NetworkInterfacePrivateIpAddress 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 NetworkInterface withPrivateIpAddresses(java.util.Collection privateIpAddresses) { setPrivateIpAddresses(privateIpAddresses); return this; } /** *

* The IPv4 prefixes that are assigned to the network interface. *

* * @return The IPv4 prefixes that are assigned to the network interface. */ public java.util.List getIpv4Prefixes() { if (ipv4Prefixes == null) { ipv4Prefixes = new com.amazonaws.internal.SdkInternalList(); } return ipv4Prefixes; } /** *

* The IPv4 prefixes that are assigned to the network interface. *

* * @param ipv4Prefixes * The IPv4 prefixes that are assigned to the network interface. */ public void setIpv4Prefixes(java.util.Collection ipv4Prefixes) { if (ipv4Prefixes == null) { this.ipv4Prefixes = null; return; } this.ipv4Prefixes = new com.amazonaws.internal.SdkInternalList(ipv4Prefixes); } /** *

* The IPv4 prefixes that are assigned to the network interface. *

*

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

* * @param ipv4Prefixes * The IPv4 prefixes that are assigned to the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withIpv4Prefixes(Ipv4PrefixSpecification... ipv4Prefixes) { if (this.ipv4Prefixes == null) { setIpv4Prefixes(new com.amazonaws.internal.SdkInternalList(ipv4Prefixes.length)); } for (Ipv4PrefixSpecification ele : ipv4Prefixes) { this.ipv4Prefixes.add(ele); } return this; } /** *

* The IPv4 prefixes that are assigned to the network interface. *

* * @param ipv4Prefixes * The IPv4 prefixes that are assigned to the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withIpv4Prefixes(java.util.Collection ipv4Prefixes) { setIpv4Prefixes(ipv4Prefixes); return this; } /** *

* The IPv6 prefixes that are assigned to the network interface. *

* * @return The IPv6 prefixes that are assigned to the network interface. */ public java.util.List getIpv6Prefixes() { if (ipv6Prefixes == null) { ipv6Prefixes = new com.amazonaws.internal.SdkInternalList(); } return ipv6Prefixes; } /** *

* The IPv6 prefixes that are assigned to the network interface. *

* * @param ipv6Prefixes * The IPv6 prefixes that are assigned to the network interface. */ public void setIpv6Prefixes(java.util.Collection ipv6Prefixes) { if (ipv6Prefixes == null) { this.ipv6Prefixes = null; return; } this.ipv6Prefixes = new com.amazonaws.internal.SdkInternalList(ipv6Prefixes); } /** *

* The IPv6 prefixes that are assigned to the network interface. *

*

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

* * @param ipv6Prefixes * The IPv6 prefixes that are assigned to the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withIpv6Prefixes(Ipv6PrefixSpecification... ipv6Prefixes) { if (this.ipv6Prefixes == null) { setIpv6Prefixes(new com.amazonaws.internal.SdkInternalList(ipv6Prefixes.length)); } for (Ipv6PrefixSpecification ele : ipv6Prefixes) { this.ipv6Prefixes.add(ele); } return this; } /** *

* The IPv6 prefixes that are assigned to the network interface. *

* * @param ipv6Prefixes * The IPv6 prefixes that are assigned to the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withIpv6Prefixes(java.util.Collection ipv6Prefixes) { setIpv6Prefixes(ipv6Prefixes); return this; } /** *

* The alias or Amazon Web Services account ID of the principal or service that created the network interface. *

* * @param requesterId * The alias or Amazon Web Services account ID of the principal or service that created the network * interface. */ public void setRequesterId(String requesterId) { this.requesterId = requesterId; } /** *

* The alias or Amazon Web Services account ID of the principal or service that created the network interface. *

* * @return The alias or Amazon Web Services account ID of the principal or service that created the network * interface. */ public String getRequesterId() { return this.requesterId; } /** *

* The alias or Amazon Web Services account ID of the principal or service that created the network interface. *

* * @param requesterId * The alias or Amazon Web Services account ID of the principal or service that created the network * interface. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withRequesterId(String requesterId) { setRequesterId(requesterId); return this; } /** *

* Indicates whether the network interface is being managed by Amazon Web Services. *

* * @param requesterManaged * Indicates whether the network interface is being managed by Amazon Web Services. */ public void setRequesterManaged(Boolean requesterManaged) { this.requesterManaged = requesterManaged; } /** *

* Indicates whether the network interface is being managed by Amazon Web Services. *

* * @return Indicates whether the network interface is being managed by Amazon Web Services. */ public Boolean getRequesterManaged() { return this.requesterManaged; } /** *

* Indicates whether the network interface is being managed by Amazon Web Services. *

* * @param requesterManaged * Indicates whether the network interface is being managed by Amazon Web Services. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withRequesterManaged(Boolean requesterManaged) { setRequesterManaged(requesterManaged); return this; } /** *

* Indicates whether the network interface is being managed by Amazon Web Services. *

* * @return Indicates whether the network interface is being managed by Amazon Web Services. */ public Boolean isRequesterManaged() { return this.requesterManaged; } /** *

* Indicates whether source/destination checking is enabled. *

* * @param sourceDestCheck * Indicates whether source/destination checking is enabled. */ public void setSourceDestCheck(Boolean sourceDestCheck) { this.sourceDestCheck = sourceDestCheck; } /** *

* Indicates whether source/destination checking is enabled. *

* * @return Indicates whether source/destination checking is enabled. */ public Boolean getSourceDestCheck() { return this.sourceDestCheck; } /** *

* Indicates whether source/destination checking is enabled. *

* * @param sourceDestCheck * Indicates whether source/destination checking is enabled. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withSourceDestCheck(Boolean sourceDestCheck) { setSourceDestCheck(sourceDestCheck); return this; } /** *

* Indicates whether source/destination checking is enabled. *

* * @return Indicates whether source/destination checking is enabled. */ public Boolean isSourceDestCheck() { return this.sourceDestCheck; } /** *

* The status of the network interface. *

* * @param status * The status of the network interface. * @see NetworkInterfaceStatus */ public void setStatus(String status) { this.status = status; } /** *

* The status of the network interface. *

* * @return The status of the network interface. * @see NetworkInterfaceStatus */ public String getStatus() { return this.status; } /** *

* The status of the network interface. *

* * @param status * The status of the network interface. * @return Returns a reference to this object so that method calls can be chained together. * @see NetworkInterfaceStatus */ public NetworkInterface withStatus(String status) { setStatus(status); return this; } /** *

* The status of the network interface. *

* * @param status * The status of the network interface. * @see NetworkInterfaceStatus */ public void setStatus(NetworkInterfaceStatus status) { withStatus(status); } /** *

* The status of the network interface. *

* * @param status * The status of the network interface. * @return Returns a reference to this object so that method calls can be chained together. * @see NetworkInterfaceStatus */ public NetworkInterface withStatus(NetworkInterfaceStatus status) { this.status = status.toString(); return this; } /** *

* The ID of the subnet. *

* * @param subnetId * The ID of the subnet. */ public void setSubnetId(String subnetId) { this.subnetId = subnetId; } /** *

* The ID of the subnet. *

* * @return The ID of the subnet. */ public String getSubnetId() { return this.subnetId; } /** *

* The ID of the subnet. *

* * @param subnetId * The ID of the subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withSubnetId(String subnetId) { setSubnetId(subnetId); return this; } /** *

* Any tags assigned to the network interface. *

* * @return Any tags assigned to the network interface. */ public java.util.List getTagSet() { if (tagSet == null) { tagSet = new com.amazonaws.internal.SdkInternalList(); } return tagSet; } /** *

* Any tags assigned to the network interface. *

* * @param tagSet * Any tags assigned to the network interface. */ public void setTagSet(java.util.Collection tagSet) { if (tagSet == null) { this.tagSet = null; return; } this.tagSet = new com.amazonaws.internal.SdkInternalList(tagSet); } /** *

* Any tags assigned to the network interface. *

*

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

* * @param tagSet * Any tags assigned to the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withTagSet(Tag... tagSet) { if (this.tagSet == null) { setTagSet(new com.amazonaws.internal.SdkInternalList(tagSet.length)); } for (Tag ele : tagSet) { this.tagSet.add(ele); } return this; } /** *

* Any tags assigned to the network interface. *

* * @param tagSet * Any tags assigned to the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withTagSet(java.util.Collection tagSet) { setTagSet(tagSet); return this; } /** *

* The ID of the VPC. *

* * @param vpcId * The ID of the VPC. */ public void setVpcId(String vpcId) { this.vpcId = vpcId; } /** *

* The ID of the VPC. *

* * @return The ID of the VPC. */ public String getVpcId() { return this.vpcId; } /** *

* The ID of the VPC. *

* * @param vpcId * The ID of the VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withVpcId(String vpcId) { setVpcId(vpcId); return this; } /** *

* Indicates whether a network interface with an IPv6 address is unreachable from the public internet. If the value * is true, inbound traffic from the internet is dropped and you cannot assign an elastic IP address to * the network interface. The network interface is reachable from peered VPCs and resources connected through a * transit gateway, including on-premises networks. *

* * @param denyAllIgwTraffic * Indicates whether a network interface with an IPv6 address is unreachable from the public internet. If the * value is true, inbound traffic from the internet is dropped and you cannot assign an elastic * IP address to the network interface. The network interface is reachable from peered VPCs and resources * connected through a transit gateway, including on-premises networks. */ public void setDenyAllIgwTraffic(Boolean denyAllIgwTraffic) { this.denyAllIgwTraffic = denyAllIgwTraffic; } /** *

* Indicates whether a network interface with an IPv6 address is unreachable from the public internet. If the value * is true, inbound traffic from the internet is dropped and you cannot assign an elastic IP address to * the network interface. The network interface is reachable from peered VPCs and resources connected through a * transit gateway, including on-premises networks. *

* * @return Indicates whether a network interface with an IPv6 address is unreachable from the public internet. If * the value is true, inbound traffic from the internet is dropped and you cannot assign an * elastic IP address to the network interface. The network interface is reachable from peered VPCs and * resources connected through a transit gateway, including on-premises networks. */ public Boolean getDenyAllIgwTraffic() { return this.denyAllIgwTraffic; } /** *

* Indicates whether a network interface with an IPv6 address is unreachable from the public internet. If the value * is true, inbound traffic from the internet is dropped and you cannot assign an elastic IP address to * the network interface. The network interface is reachable from peered VPCs and resources connected through a * transit gateway, including on-premises networks. *

* * @param denyAllIgwTraffic * Indicates whether a network interface with an IPv6 address is unreachable from the public internet. If the * value is true, inbound traffic from the internet is dropped and you cannot assign an elastic * IP address to the network interface. The network interface is reachable from peered VPCs and resources * connected through a transit gateway, including on-premises networks. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withDenyAllIgwTraffic(Boolean denyAllIgwTraffic) { setDenyAllIgwTraffic(denyAllIgwTraffic); return this; } /** *

* Indicates whether a network interface with an IPv6 address is unreachable from the public internet. If the value * is true, inbound traffic from the internet is dropped and you cannot assign an elastic IP address to * the network interface. The network interface is reachable from peered VPCs and resources connected through a * transit gateway, including on-premises networks. *

* * @return Indicates whether a network interface with an IPv6 address is unreachable from the public internet. If * the value is true, inbound traffic from the internet is dropped and you cannot assign an * elastic IP address to the network interface. The network interface is reachable from peered VPCs and * resources connected through a transit gateway, including on-premises networks. */ public Boolean isDenyAllIgwTraffic() { return this.denyAllIgwTraffic; } /** *

* Indicates whether this is an IPv6 only network interface. *

* * @param ipv6Native * Indicates whether this is an IPv6 only network interface. */ public void setIpv6Native(Boolean ipv6Native) { this.ipv6Native = ipv6Native; } /** *

* Indicates whether this is an IPv6 only network interface. *

* * @return Indicates whether this is an IPv6 only network interface. */ public Boolean getIpv6Native() { return this.ipv6Native; } /** *

* Indicates whether this is an IPv6 only network interface. *

* * @param ipv6Native * Indicates whether this is an IPv6 only network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withIpv6Native(Boolean ipv6Native) { setIpv6Native(ipv6Native); return this; } /** *

* Indicates whether this is an IPv6 only network interface. *

* * @return Indicates whether this is an IPv6 only network interface. */ public Boolean isIpv6Native() { return this.ipv6Native; } /** *

* The IPv6 globally unique address associated with the network interface. *

* * @param ipv6Address * The IPv6 globally unique address associated with the network interface. */ public void setIpv6Address(String ipv6Address) { this.ipv6Address = ipv6Address; } /** *

* The IPv6 globally unique address associated with the network interface. *

* * @return The IPv6 globally unique address associated with the network interface. */ public String getIpv6Address() { return this.ipv6Address; } /** *

* The IPv6 globally unique address associated with the network interface. *

* * @param ipv6Address * The IPv6 globally unique address associated with the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public NetworkInterface withIpv6Address(String ipv6Address) { setIpv6Address(ipv6Address); 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 (getAssociation() != null) sb.append("Association: ").append(getAssociation()).append(","); if (getAttachment() != null) sb.append("Attachment: ").append(getAttachment()).append(","); if (getAvailabilityZone() != null) sb.append("AvailabilityZone: ").append(getAvailabilityZone()).append(","); if (getConnectionTrackingConfiguration() != null) sb.append("ConnectionTrackingConfiguration: ").append(getConnectionTrackingConfiguration()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getGroups() != null) sb.append("Groups: ").append(getGroups()).append(","); if (getInterfaceType() != null) sb.append("InterfaceType: ").append(getInterfaceType()).append(","); if (getIpv6Addresses() != null) sb.append("Ipv6Addresses: ").append(getIpv6Addresses()).append(","); if (getMacAddress() != null) sb.append("MacAddress: ").append(getMacAddress()).append(","); if (getNetworkInterfaceId() != null) sb.append("NetworkInterfaceId: ").append(getNetworkInterfaceId()).append(","); if (getOutpostArn() != null) sb.append("OutpostArn: ").append(getOutpostArn()).append(","); if (getOwnerId() != null) sb.append("OwnerId: ").append(getOwnerId()).append(","); if (getPrivateDnsName() != null) sb.append("PrivateDnsName: ").append(getPrivateDnsName()).append(","); if (getPrivateIpAddress() != null) sb.append("PrivateIpAddress: ").append(getPrivateIpAddress()).append(","); if (getPrivateIpAddresses() != null) sb.append("PrivateIpAddresses: ").append(getPrivateIpAddresses()).append(","); if (getIpv4Prefixes() != null) sb.append("Ipv4Prefixes: ").append(getIpv4Prefixes()).append(","); if (getIpv6Prefixes() != null) sb.append("Ipv6Prefixes: ").append(getIpv6Prefixes()).append(","); if (getRequesterId() != null) sb.append("RequesterId: ").append(getRequesterId()).append(","); if (getRequesterManaged() != null) sb.append("RequesterManaged: ").append(getRequesterManaged()).append(","); if (getSourceDestCheck() != null) sb.append("SourceDestCheck: ").append(getSourceDestCheck()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getSubnetId() != null) sb.append("SubnetId: ").append(getSubnetId()).append(","); if (getTagSet() != null) sb.append("TagSet: ").append(getTagSet()).append(","); if (getVpcId() != null) sb.append("VpcId: ").append(getVpcId()).append(","); if (getDenyAllIgwTraffic() != null) sb.append("DenyAllIgwTraffic: ").append(getDenyAllIgwTraffic()).append(","); if (getIpv6Native() != null) sb.append("Ipv6Native: ").append(getIpv6Native()).append(","); if (getIpv6Address() != null) sb.append("Ipv6Address: ").append(getIpv6Address()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof NetworkInterface == false) return false; NetworkInterface other = (NetworkInterface) obj; if (other.getAssociation() == null ^ this.getAssociation() == null) return false; if (other.getAssociation() != null && other.getAssociation().equals(this.getAssociation()) == false) return false; if (other.getAttachment() == null ^ this.getAttachment() == null) return false; if (other.getAttachment() != null && other.getAttachment().equals(this.getAttachment()) == false) return false; if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == null) return false; if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == false) return false; if (other.getConnectionTrackingConfiguration() == null ^ this.getConnectionTrackingConfiguration() == null) return false; if (other.getConnectionTrackingConfiguration() != null && other.getConnectionTrackingConfiguration().equals(this.getConnectionTrackingConfiguration()) == 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.getGroups() == null ^ this.getGroups() == null) return false; if (other.getGroups() != null && other.getGroups().equals(this.getGroups()) == false) return false; if (other.getInterfaceType() == null ^ this.getInterfaceType() == null) return false; if (other.getInterfaceType() != null && other.getInterfaceType().equals(this.getInterfaceType()) == 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.getMacAddress() == null ^ this.getMacAddress() == null) return false; if (other.getMacAddress() != null && other.getMacAddress().equals(this.getMacAddress()) == 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.getOutpostArn() == null ^ this.getOutpostArn() == null) return false; if (other.getOutpostArn() != null && other.getOutpostArn().equals(this.getOutpostArn()) == 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.getPrivateDnsName() == null ^ this.getPrivateDnsName() == null) return false; if (other.getPrivateDnsName() != null && other.getPrivateDnsName().equals(this.getPrivateDnsName()) == false) return false; if (other.getPrivateIpAddress() == null ^ this.getPrivateIpAddress() == null) return false; if (other.getPrivateIpAddress() != null && other.getPrivateIpAddress().equals(this.getPrivateIpAddress()) == 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.getIpv4Prefixes() == null ^ this.getIpv4Prefixes() == null) return false; if (other.getIpv4Prefixes() != null && other.getIpv4Prefixes().equals(this.getIpv4Prefixes()) == false) return false; if (other.getIpv6Prefixes() == null ^ this.getIpv6Prefixes() == null) return false; if (other.getIpv6Prefixes() != null && other.getIpv6Prefixes().equals(this.getIpv6Prefixes()) == false) return false; if (other.getRequesterId() == null ^ this.getRequesterId() == null) return false; if (other.getRequesterId() != null && other.getRequesterId().equals(this.getRequesterId()) == false) return false; if (other.getRequesterManaged() == null ^ this.getRequesterManaged() == null) return false; if (other.getRequesterManaged() != null && other.getRequesterManaged().equals(this.getRequesterManaged()) == 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.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getSubnetId() == null ^ this.getSubnetId() == null) return false; if (other.getSubnetId() != null && other.getSubnetId().equals(this.getSubnetId()) == false) return false; if (other.getTagSet() == null ^ this.getTagSet() == null) return false; if (other.getTagSet() != null && other.getTagSet().equals(this.getTagSet()) == false) return false; if (other.getVpcId() == null ^ this.getVpcId() == null) return false; if (other.getVpcId() != null && other.getVpcId().equals(this.getVpcId()) == false) return false; if (other.getDenyAllIgwTraffic() == null ^ this.getDenyAllIgwTraffic() == null) return false; if (other.getDenyAllIgwTraffic() != null && other.getDenyAllIgwTraffic().equals(this.getDenyAllIgwTraffic()) == false) return false; if (other.getIpv6Native() == null ^ this.getIpv6Native() == null) return false; if (other.getIpv6Native() != null && other.getIpv6Native().equals(this.getIpv6Native()) == false) return false; if (other.getIpv6Address() == null ^ this.getIpv6Address() == null) return false; if (other.getIpv6Address() != null && other.getIpv6Address().equals(this.getIpv6Address()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAssociation() == null) ? 0 : getAssociation().hashCode()); hashCode = prime * hashCode + ((getAttachment() == null) ? 0 : getAttachment().hashCode()); hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode()); hashCode = prime * hashCode + ((getConnectionTrackingConfiguration() == null) ? 0 : getConnectionTrackingConfiguration().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getGroups() == null) ? 0 : getGroups().hashCode()); hashCode = prime * hashCode + ((getInterfaceType() == null) ? 0 : getInterfaceType().hashCode()); hashCode = prime * hashCode + ((getIpv6Addresses() == null) ? 0 : getIpv6Addresses().hashCode()); hashCode = prime * hashCode + ((getMacAddress() == null) ? 0 : getMacAddress().hashCode()); hashCode = prime * hashCode + ((getNetworkInterfaceId() == null) ? 0 : getNetworkInterfaceId().hashCode()); hashCode = prime * hashCode + ((getOutpostArn() == null) ? 0 : getOutpostArn().hashCode()); hashCode = prime * hashCode + ((getOwnerId() == null) ? 0 : getOwnerId().hashCode()); hashCode = prime * hashCode + ((getPrivateDnsName() == null) ? 0 : getPrivateDnsName().hashCode()); hashCode = prime * hashCode + ((getPrivateIpAddress() == null) ? 0 : getPrivateIpAddress().hashCode()); hashCode = prime * hashCode + ((getPrivateIpAddresses() == null) ? 0 : getPrivateIpAddresses().hashCode()); hashCode = prime * hashCode + ((getIpv4Prefixes() == null) ? 0 : getIpv4Prefixes().hashCode()); hashCode = prime * hashCode + ((getIpv6Prefixes() == null) ? 0 : getIpv6Prefixes().hashCode()); hashCode = prime * hashCode + ((getRequesterId() == null) ? 0 : getRequesterId().hashCode()); hashCode = prime * hashCode + ((getRequesterManaged() == null) ? 0 : getRequesterManaged().hashCode()); hashCode = prime * hashCode + ((getSourceDestCheck() == null) ? 0 : getSourceDestCheck().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getSubnetId() == null) ? 0 : getSubnetId().hashCode()); hashCode = prime * hashCode + ((getTagSet() == null) ? 0 : getTagSet().hashCode()); hashCode = prime * hashCode + ((getVpcId() == null) ? 0 : getVpcId().hashCode()); hashCode = prime * hashCode + ((getDenyAllIgwTraffic() == null) ? 0 : getDenyAllIgwTraffic().hashCode()); hashCode = prime * hashCode + ((getIpv6Native() == null) ? 0 : getIpv6Native().hashCode()); hashCode = prime * hashCode + ((getIpv6Address() == null) ? 0 : getIpv6Address().hashCode()); return hashCode; } @Override public NetworkInterface clone() { try { return (NetworkInterface) 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