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