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