(destinations);
}
/**
* A list of output destinations for this channel.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setDestinations(java.util.Collection)} or {@link #withDestinations(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param destinations
* A list of output destinations for this channel.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateChannelClassRequest withDestinations(OutputDestination... destinations) {
if (this.destinations == null) {
setDestinations(new java.util.ArrayList(destinations.length));
}
for (OutputDestination ele : destinations) {
this.destinations.add(ele);
}
return this;
}
/**
* A list of output destinations for this channel.
*
* @param destinations
* A list of output destinations for this channel.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateChannelClassRequest withDestinations(java.util.Collection destinations) {
setDestinations(destinations);
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 (getChannelClass() != null)
sb.append("ChannelClass: ").append(getChannelClass()).append(",");
if (getChannelId() != null)
sb.append("ChannelId: ").append(getChannelId()).append(",");
if (getDestinations() != null)
sb.append("Destinations: ").append(getDestinations());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateChannelClassRequest == false)
return false;
UpdateChannelClassRequest other = (UpdateChannelClassRequest) obj;
if (other.getChannelClass() == null ^ this.getChannelClass() == null)
return false;
if (other.getChannelClass() != null && other.getChannelClass().equals(this.getChannelClass()) == false)
return false;
if (other.getChannelId() == null ^ this.getChannelId() == null)
return false;
if (other.getChannelId() != null && other.getChannelId().equals(this.getChannelId()) == false)
return false;
if (other.getDestinations() == null ^ this.getDestinations() == null)
return false;
if (other.getDestinations() != null && other.getDestinations().equals(this.getDestinations()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getChannelClass() == null) ? 0 : getChannelClass().hashCode());
hashCode = prime * hashCode + ((getChannelId() == null) ? 0 : getChannelId().hashCode());
hashCode = prime * hashCode + ((getDestinations() == null) ? 0 : getDestinations().hashCode());
return hashCode;
}
@Override
public UpdateChannelClassRequest clone() {
return (UpdateChannelClassRequest) super.clone();
}
}