* The new policy. *
*/ private ResourcePolicy resourcePolicy; /** ** The new policy. *
* * @param resourcePolicy * The new policy. */ public void setResourcePolicy(ResourcePolicy resourcePolicy) { this.resourcePolicy = resourcePolicy; } /** ** The new policy. *
* * @return The new policy. */ public ResourcePolicy getResourcePolicy() { return this.resourcePolicy; } /** ** The new policy. *
* * @param resourcePolicy * The new policy. * @return Returns a reference to this object so that method calls can be chained together. */ public PutResourcePolicyResult withResourcePolicy(ResourcePolicy resourcePolicy) { setResourcePolicy(resourcePolicy); 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 (getResourcePolicy() != null) sb.append("ResourcePolicy: ").append(getResourcePolicy()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PutResourcePolicyResult == false) return false; PutResourcePolicyResult other = (PutResourcePolicyResult) obj; if (other.getResourcePolicy() == null ^ this.getResourcePolicy() == null) return false; if (other.getResourcePolicy() != null && other.getResourcePolicy().equals(this.getResourcePolicy()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getResourcePolicy() == null) ? 0 : getResourcePolicy().hashCode()); return hashCode; } @Override public PutResourcePolicyResult clone() { try { return (PutResourcePolicyResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }