@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getServerName() == null) ? 0 : getServerName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); return hashCode; }
/** * <p> * A user-defined description of the backup. * </p> * * @param description * A user-defined description of the backup. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBackupRequest withDescription(String description) { setDescription(description); return this; }
/** * <p> * The name of the server that you want to back up. * </p> * * @param serverName * The name of the server that you want to back up. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBackupRequest withServerName(String serverName) { setServerName(serverName); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateBackupRequest == false) return false; CreateBackupRequest other = (CreateBackupRequest) obj; if (other.getServerName() == null ^ this.getServerName() == null) return false; if (other.getServerName() != null && other.getServerName().equals(this.getServerName()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; return true; }
/** * 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 (getServerName() != null) sb.append("ServerName: ").append(getServerName()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(CreateBackupRequest createBackupRequest, ProtocolMarshaller protocolMarshaller) { if (createBackupRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createBackupRequest.getServerName(), SERVERNAME_BINDING); protocolMarshaller.marshall(createBackupRequest.getDescription(), DESCRIPTION_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }