/** * 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 (getHostedZone() != null) sb.append("HostedZone: ").append(getHostedZone()).append(","); if (getDelegationSet() != null) sb.append("DelegationSet: ").append(getDelegationSet()).append(","); if (getVPCs() != null) sb.append("VPCs: ").append(getVPCs()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getHostedZone() == null) ? 0 : getHostedZone().hashCode()); hashCode = prime * hashCode + ((getDelegationSet() == null) ? 0 : getDelegationSet().hashCode()); hashCode = prime * hashCode + ((getVPCs() == null) ? 0 : getVPCs().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetHostedZoneResult == false) return false; GetHostedZoneResult other = (GetHostedZoneResult) obj; if (other.getHostedZone() == null ^ this.getHostedZone() == null) return false; if (other.getHostedZone() != null && other.getHostedZone().equals(this.getHostedZone()) == false) return false; if (other.getDelegationSet() == null ^ this.getDelegationSet() == null) return false; if (other.getDelegationSet() != null && other.getDelegationSet().equals(this.getDelegationSet()) == false) return false; if (other.getVPCs() == null ^ this.getVPCs() == null) return false; if (other.getVPCs() != null && other.getVPCs().equals(this.getVPCs()) == false) return false; return true; }