(loggers);
}
/**
* A list of loggers.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setLoggers(java.util.Collection)} or {@link #withLoggers(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param loggers
* A list of loggers.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLoggerDefinitionVersionRequest withLoggers(Logger... loggers) {
if (this.loggers == null) {
setLoggers(new java.util.ArrayList(loggers.length));
}
for (Logger ele : loggers) {
this.loggers.add(ele);
}
return this;
}
/**
* A list of loggers.
*
* @param loggers
* A list of loggers.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLoggerDefinitionVersionRequest withLoggers(java.util.Collection loggers) {
setLoggers(loggers);
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 (getAmznClientToken() != null)
sb.append("AmznClientToken: ").append(getAmznClientToken()).append(",");
if (getLoggerDefinitionId() != null)
sb.append("LoggerDefinitionId: ").append(getLoggerDefinitionId()).append(",");
if (getLoggers() != null)
sb.append("Loggers: ").append(getLoggers());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateLoggerDefinitionVersionRequest == false)
return false;
CreateLoggerDefinitionVersionRequest other = (CreateLoggerDefinitionVersionRequest) obj;
if (other.getAmznClientToken() == null ^ this.getAmznClientToken() == null)
return false;
if (other.getAmznClientToken() != null && other.getAmznClientToken().equals(this.getAmznClientToken()) == false)
return false;
if (other.getLoggerDefinitionId() == null ^ this.getLoggerDefinitionId() == null)
return false;
if (other.getLoggerDefinitionId() != null && other.getLoggerDefinitionId().equals(this.getLoggerDefinitionId()) == false)
return false;
if (other.getLoggers() == null ^ this.getLoggers() == null)
return false;
if (other.getLoggers() != null && other.getLoggers().equals(this.getLoggers()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAmznClientToken() == null) ? 0 : getAmznClientToken().hashCode());
hashCode = prime * hashCode + ((getLoggerDefinitionId() == null) ? 0 : getLoggerDefinitionId().hashCode());
hashCode = prime * hashCode + ((getLoggers() == null) ? 0 : getLoggers().hashCode());
return hashCode;
}
@Override
public CreateLoggerDefinitionVersionRequest clone() {
return (CreateLoggerDefinitionVersionRequest) super.clone();
}
}