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