(whitelistRules);
}
/**
* Whitelist rules and their sync status
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setWhitelistRules(java.util.Collection)} or {@link #withWhitelistRules(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param whitelistRules
* Whitelist rules and their sync status
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeInputSecurityGroupResult withWhitelistRules(InputWhitelistRule... whitelistRules) {
if (this.whitelistRules == null) {
setWhitelistRules(new java.util.ArrayList(whitelistRules.length));
}
for (InputWhitelistRule ele : whitelistRules) {
this.whitelistRules.add(ele);
}
return this;
}
/**
* Whitelist rules and their sync status
*
* @param whitelistRules
* Whitelist rules and their sync status
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeInputSecurityGroupResult withWhitelistRules(java.util.Collection whitelistRules) {
setWhitelistRules(whitelistRules);
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 (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getId() != null)
sb.append("Id: ").append(getId()).append(",");
if (getInputs() != null)
sb.append("Inputs: ").append(getInputs()).append(",");
if (getState() != null)
sb.append("State: ").append(getState()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getWhitelistRules() != null)
sb.append("WhitelistRules: ").append(getWhitelistRules());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeInputSecurityGroupResult == false)
return false;
DescribeInputSecurityGroupResult other = (DescribeInputSecurityGroupResult) obj;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == false)
return false;
if (other.getId() == null ^ this.getId() == null)
return false;
if (other.getId() != null && other.getId().equals(this.getId()) == false)
return false;
if (other.getInputs() == null ^ this.getInputs() == null)
return false;
if (other.getInputs() != null && other.getInputs().equals(this.getInputs()) == false)
return false;
if (other.getState() == null ^ this.getState() == null)
return false;
if (other.getState() != null && other.getState().equals(this.getState()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getWhitelistRules() == null ^ this.getWhitelistRules() == null)
return false;
if (other.getWhitelistRules() != null && other.getWhitelistRules().equals(this.getWhitelistRules()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode());
hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
hashCode = prime * hashCode + ((getInputs() == null) ? 0 : getInputs().hashCode());
hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getWhitelistRules() == null) ? 0 : getWhitelistRules().hashCode());
return hashCode;
}
@Override
public DescribeInputSecurityGroupResult clone() {
try {
return (DescribeInputSecurityGroupResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}