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