(virtualInterfaces);
}
/**
*
* The virtual interfaces
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setVirtualInterfaces(java.util.Collection)} or {@link #withVirtualInterfaces(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param virtualInterfaces
* The virtual interfaces
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeVirtualInterfacesResult withVirtualInterfaces(VirtualInterface... virtualInterfaces) {
if (this.virtualInterfaces == null) {
setVirtualInterfaces(new com.amazonaws.internal.SdkInternalList(virtualInterfaces.length));
}
for (VirtualInterface ele : virtualInterfaces) {
this.virtualInterfaces.add(ele);
}
return this;
}
/**
*
* The virtual interfaces
*
*
* @param virtualInterfaces
* The virtual interfaces
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeVirtualInterfacesResult withVirtualInterfaces(java.util.Collection virtualInterfaces) {
setVirtualInterfaces(virtualInterfaces);
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 (getVirtualInterfaces() != null)
sb.append("VirtualInterfaces: ").append(getVirtualInterfaces());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeVirtualInterfacesResult == false)
return false;
DescribeVirtualInterfacesResult other = (DescribeVirtualInterfacesResult) obj;
if (other.getVirtualInterfaces() == null ^ this.getVirtualInterfaces() == null)
return false;
if (other.getVirtualInterfaces() != null && other.getVirtualInterfaces().equals(this.getVirtualInterfaces()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getVirtualInterfaces() == null) ? 0 : getVirtualInterfaces().hashCode());
return hashCode;
}
@Override
public DescribeVirtualInterfacesResult clone() {
try {
return (DescribeVirtualInterfacesResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}