/* * Copyright 2010-2018 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; /** *
* Describes a network interface. *
*/ public class InstanceNetworkInterface implements Serializable { /** * The ID of the network interface. */ private String networkInterfaceId; /** * The ID of the subnet. */ private String subnetId; /** * The ID of the VPC. */ private String vpcId; /** * The description. */ private String description; /** * The ID of the AWS account that created the network interface. */ private String ownerId; /** * The status of the network interface. *
* Constraints:
* Returns a reference to this object so that method calls can be chained together.
*
* @param networkInterfaceId The ID of the network interface.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceNetworkInterface withNetworkInterfaceId(String networkInterfaceId) {
this.networkInterfaceId = networkInterfaceId;
return this;
}
/**
* The ID of the subnet.
*
* @return The ID of the subnet.
*/
public String getSubnetId() {
return subnetId;
}
/**
* 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.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param subnetId The ID of the subnet.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceNetworkInterface withSubnetId(String subnetId) {
this.subnetId = subnetId;
return this;
}
/**
* The ID of the VPC.
*
* @return The ID of the VPC.
*/
public String getVpcId() {
return vpcId;
}
/**
* 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.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param vpcId The ID of the VPC.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceNetworkInterface withVpcId(String vpcId) {
this.vpcId = vpcId;
return this;
}
/**
* The description.
*
* @return The description.
*/
public String getDescription() {
return description;
}
/**
* The description.
*
* @param description The description.
*/
public void setDescription(String description) {
this.description = description;
}
/**
* The description.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param description The description.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceNetworkInterface withDescription(String description) {
this.description = description;
return this;
}
/**
* The ID of the AWS account that created the network interface.
*
* @return The ID of the AWS account that created the network interface.
*/
public String getOwnerId() {
return ownerId;
}
/**
* The ID of the AWS account that created the network interface.
*
* @param ownerId The ID of the AWS account that created the network interface.
*/
public void setOwnerId(String ownerId) {
this.ownerId = ownerId;
}
/**
* The ID of the AWS account that created the network interface.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param ownerId The ID of the AWS account that created the network interface.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceNetworkInterface withOwnerId(String ownerId) {
this.ownerId = ownerId;
return this;
}
/**
* The status of the network interface.
*
* Constraints:
* Constraints:
* Returns a reference to this object so that method calls can be chained together.
*
* Constraints:
* Constraints:
* Returns a reference to this object so that method calls can be chained together.
*
* Constraints:
* Returns a reference to this object so that method calls can be chained together.
*
* @param macAddress The MAC address.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceNetworkInterface withMacAddress(String macAddress) {
this.macAddress = macAddress;
return this;
}
/**
* The IP address of the network interface within the subnet.
*
* @return The IP address of the network interface within the subnet.
*/
public String getPrivateIpAddress() {
return privateIpAddress;
}
/**
* The IP address of the network interface within the subnet.
*
* @param privateIpAddress The IP address of the network interface within the subnet.
*/
public void setPrivateIpAddress(String privateIpAddress) {
this.privateIpAddress = privateIpAddress;
}
/**
* The IP address of the network interface within the subnet.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param privateIpAddress The IP address of the network interface within the subnet.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceNetworkInterface withPrivateIpAddress(String privateIpAddress) {
this.privateIpAddress = privateIpAddress;
return this;
}
/**
* The private DNS name.
*
* @return The private DNS name.
*/
public String getPrivateDnsName() {
return privateDnsName;
}
/**
* The private DNS name.
*
* @param privateDnsName The private DNS name.
*/
public void setPrivateDnsName(String privateDnsName) {
this.privateDnsName = privateDnsName;
}
/**
* The private DNS name.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param privateDnsName The private DNS name.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceNetworkInterface withPrivateDnsName(String privateDnsName) {
this.privateDnsName = privateDnsName;
return this;
}
/**
* Indicates whether to validate network traffic to or from this network
* interface.
*
* @return Indicates whether to validate network traffic to or from this network
* interface.
*/
public Boolean isSourceDestCheck() {
return sourceDestCheck;
}
/**
* Indicates whether to validate network traffic to or from this network
* interface.
*
* @param sourceDestCheck Indicates whether to validate network traffic to or from this network
* interface.
*/
public void setSourceDestCheck(Boolean sourceDestCheck) {
this.sourceDestCheck = sourceDestCheck;
}
/**
* Indicates whether to validate network traffic to or from this network
* interface.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param sourceDestCheck Indicates whether to validate network traffic to or from this network
* interface.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceNetworkInterface withSourceDestCheck(Boolean sourceDestCheck) {
this.sourceDestCheck = sourceDestCheck;
return this;
}
/**
* Indicates whether to validate network traffic to or from this network
* interface.
*
* @return Indicates whether to validate network traffic to or from this network
* interface.
*/
public Boolean getSourceDestCheck() {
return sourceDestCheck;
}
/**
* One or more security groups.
*
* @return One or more security groups.
*/
public java.util.List
* Returns a reference to this object so that method calls can be chained together.
*
* @param groups One or more security groups.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceNetworkInterface withGroups(GroupIdentifier... groups) {
if (getGroups() == null) setGroups(new java.util.ArrayList
* Returns a reference to this object so that method calls can be chained together.
*
* @param groups One or more security groups.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceNetworkInterface withGroups(java.util.Collection
* Returns a reference to this object so that method calls can be chained together.
*
* @param attachment The network interface attachment.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceNetworkInterface withAttachment(InstanceNetworkInterfaceAttachment attachment) {
this.attachment = attachment;
return this;
}
/**
* The association information for an Elastic IP associated with the
* network interface.
*
* @return The association information for an Elastic IP associated with the
* network interface.
*/
public InstanceNetworkInterfaceAssociation getAssociation() {
return association;
}
/**
* The association information for an Elastic IP associated with the
* network interface.
*
* @param association The association information for an Elastic IP associated with the
* network interface.
*/
public void setAssociation(InstanceNetworkInterfaceAssociation association) {
this.association = association;
}
/**
* The association information for an Elastic IP associated with the
* network interface.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param association The association information for an Elastic IP associated with the
* network interface.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceNetworkInterface withAssociation(InstanceNetworkInterfaceAssociation association) {
this.association = association;
return this;
}
/**
* The private IP addresses associated with the network interface.
*
* @return The private IP addresses associated with the network interface.
*/
public java.util.List
* Returns a reference to this object so that method calls can be chained together.
*
* @param privateIpAddresses The private IP addresses associated with the network interface.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceNetworkInterface withPrivateIpAddresses(InstancePrivateIpAddress... privateIpAddresses) {
if (getPrivateIpAddresses() == null) setPrivateIpAddresses(new java.util.ArrayList
* Returns a reference to this object so that method calls can be chained together.
*
* @param privateIpAddresses The private IP addresses associated with the network interface.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceNetworkInterface withPrivateIpAddresses(java.util.Collection
* Allowed Values: available, attaching, in-use, detaching
*/
private String status;
/**
* The MAC address.
*/
private String macAddress;
/**
* The IP address of the network interface within the subnet.
*/
private String privateIpAddress;
/**
* The private DNS name.
*/
private String privateDnsName;
/**
* Indicates whether to validate network traffic to or from this network
* interface.
*/
private Boolean sourceDestCheck;
/**
* One or more security groups.
*/
private com.amazonaws.internal.ListWithAutoConstructFlag
* Allowed Values: available, attaching, in-use, detaching
*
* @return The status of the network interface.
*
* @see NetworkInterfaceStatus
*/
public String getStatus() {
return status;
}
/**
* The status of the network interface.
*
* Allowed Values: available, attaching, in-use, detaching
*
* @param status The status of the network interface.
*
* @see NetworkInterfaceStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
* The status of the network interface.
*
* Allowed Values: available, attaching, in-use, detaching
*
* @param status The status of the network interface.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*
* @see NetworkInterfaceStatus
*/
public InstanceNetworkInterface withStatus(String status) {
this.status = status;
return this;
}
/**
* The status of the network interface.
*
* Allowed Values: available, attaching, in-use, detaching
*
* @param status The status of the network interface.
*
* @see NetworkInterfaceStatus
*/
public void setStatus(NetworkInterfaceStatus status) {
this.status = status.toString();
}
/**
* The status of the network interface.
*
* Allowed Values: available, attaching, in-use, detaching
*
* @param status The status of the network interface.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*
* @see NetworkInterfaceStatus
*/
public InstanceNetworkInterface withStatus(NetworkInterfaceStatus status) {
this.status = status.toString();
return this;
}
/**
* The MAC address.
*
* @return The MAC address.
*/
public String getMacAddress() {
return macAddress;
}
/**
* The MAC address.
*
* @param macAddress The MAC address.
*/
public void setMacAddress(String macAddress) {
this.macAddress = macAddress;
}
/**
* The MAC address.
*