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

com.amazonaws.services.ec2.model.UnassignIpv6AddressesResult 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 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.ec2.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceResult;

/**
 * 
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UnassignIpv6AddressesResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {

    /**
     * 

* The ID of the network interface. *

*/ private String networkInterfaceId; /** *

* The IPv6 addresses that have been unassigned from the network interface. *

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

* The IPv4 prefixes that have been unassigned from the network interface. *

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

* 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 UnassignIpv6AddressesResult withNetworkInterfaceId(String networkInterfaceId) { setNetworkInterfaceId(networkInterfaceId); return this; } /** *

* The IPv6 addresses that have been unassigned from the network interface. *

* * @return The IPv6 addresses that have been unassigned from the network interface. */ public java.util.List getUnassignedIpv6Addresses() { if (unassignedIpv6Addresses == null) { unassignedIpv6Addresses = new com.amazonaws.internal.SdkInternalList(); } return unassignedIpv6Addresses; } /** *

* The IPv6 addresses that have been unassigned from the network interface. *

* * @param unassignedIpv6Addresses * The IPv6 addresses that have been unassigned from the network interface. */ public void setUnassignedIpv6Addresses(java.util.Collection unassignedIpv6Addresses) { if (unassignedIpv6Addresses == null) { this.unassignedIpv6Addresses = null; return; } this.unassignedIpv6Addresses = new com.amazonaws.internal.SdkInternalList(unassignedIpv6Addresses); } /** *

* The IPv6 addresses that have been unassigned from the network interface. *

*

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

* * @param unassignedIpv6Addresses * The IPv6 addresses that have been unassigned from the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public UnassignIpv6AddressesResult withUnassignedIpv6Addresses(String... unassignedIpv6Addresses) { if (this.unassignedIpv6Addresses == null) { setUnassignedIpv6Addresses(new com.amazonaws.internal.SdkInternalList(unassignedIpv6Addresses.length)); } for (String ele : unassignedIpv6Addresses) { this.unassignedIpv6Addresses.add(ele); } return this; } /** *

* The IPv6 addresses that have been unassigned from the network interface. *

* * @param unassignedIpv6Addresses * The IPv6 addresses that have been unassigned from the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public UnassignIpv6AddressesResult withUnassignedIpv6Addresses(java.util.Collection unassignedIpv6Addresses) { setUnassignedIpv6Addresses(unassignedIpv6Addresses); return this; } /** *

* The IPv4 prefixes that have been unassigned from the network interface. *

* * @return The IPv4 prefixes that have been unassigned from the network interface. */ public java.util.List getUnassignedIpv6Prefixes() { if (unassignedIpv6Prefixes == null) { unassignedIpv6Prefixes = new com.amazonaws.internal.SdkInternalList(); } return unassignedIpv6Prefixes; } /** *

* The IPv4 prefixes that have been unassigned from the network interface. *

* * @param unassignedIpv6Prefixes * The IPv4 prefixes that have been unassigned from the network interface. */ public void setUnassignedIpv6Prefixes(java.util.Collection unassignedIpv6Prefixes) { if (unassignedIpv6Prefixes == null) { this.unassignedIpv6Prefixes = null; return; } this.unassignedIpv6Prefixes = new com.amazonaws.internal.SdkInternalList(unassignedIpv6Prefixes); } /** *

* The IPv4 prefixes that have been unassigned from the network interface. *

*

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

* * @param unassignedIpv6Prefixes * The IPv4 prefixes that have been unassigned from the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public UnassignIpv6AddressesResult withUnassignedIpv6Prefixes(String... unassignedIpv6Prefixes) { if (this.unassignedIpv6Prefixes == null) { setUnassignedIpv6Prefixes(new com.amazonaws.internal.SdkInternalList(unassignedIpv6Prefixes.length)); } for (String ele : unassignedIpv6Prefixes) { this.unassignedIpv6Prefixes.add(ele); } return this; } /** *

* The IPv4 prefixes that have been unassigned from the network interface. *

* * @param unassignedIpv6Prefixes * The IPv4 prefixes that have been unassigned from the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public UnassignIpv6AddressesResult withUnassignedIpv6Prefixes(java.util.Collection unassignedIpv6Prefixes) { setUnassignedIpv6Prefixes(unassignedIpv6Prefixes); 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 (getNetworkInterfaceId() != null) sb.append("NetworkInterfaceId: ").append(getNetworkInterfaceId()).append(","); if (getUnassignedIpv6Addresses() != null) sb.append("UnassignedIpv6Addresses: ").append(getUnassignedIpv6Addresses()).append(","); if (getUnassignedIpv6Prefixes() != null) sb.append("UnassignedIpv6Prefixes: ").append(getUnassignedIpv6Prefixes()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UnassignIpv6AddressesResult == false) return false; UnassignIpv6AddressesResult other = (UnassignIpv6AddressesResult) obj; if (other.getNetworkInterfaceId() == null ^ this.getNetworkInterfaceId() == null) return false; if (other.getNetworkInterfaceId() != null && other.getNetworkInterfaceId().equals(this.getNetworkInterfaceId()) == false) return false; if (other.getUnassignedIpv6Addresses() == null ^ this.getUnassignedIpv6Addresses() == null) return false; if (other.getUnassignedIpv6Addresses() != null && other.getUnassignedIpv6Addresses().equals(this.getUnassignedIpv6Addresses()) == false) return false; if (other.getUnassignedIpv6Prefixes() == null ^ this.getUnassignedIpv6Prefixes() == null) return false; if (other.getUnassignedIpv6Prefixes() != null && other.getUnassignedIpv6Prefixes().equals(this.getUnassignedIpv6Prefixes()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getNetworkInterfaceId() == null) ? 0 : getNetworkInterfaceId().hashCode()); hashCode = prime * hashCode + ((getUnassignedIpv6Addresses() == null) ? 0 : getUnassignedIpv6Addresses().hashCode()); hashCode = prime * hashCode + ((getUnassignedIpv6Prefixes() == null) ? 0 : getUnassignedIpv6Prefixes().hashCode()); return hashCode; } @Override public UnassignIpv6AddressesResult clone() { try { return (UnassignIpv6AddressesResult) 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