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