@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getUsername() == null) ? 0 : getUsername().hashCode()); hashCode = prime * hashCode + ((getPassword() == null) ? 0 : getPassword().hashCode()); hashCode = prime * hashCode + ((getValidForInMinutes() == null) ? 0 : getValidForInMinutes().hashCode()); hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode()); return hashCode; }
/** * 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 (getUsername() != null) sb.append("Username: ").append(getUsername()).append(","); if (getPassword() != null) sb.append("Password: ").append(getPassword()).append(","); if (getValidForInMinutes() != null) sb.append("ValidForInMinutes: ").append(getValidForInMinutes()).append(","); if (getInstanceId() != null) sb.append("InstanceId: ").append(getInstanceId()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TemporaryCredential == false) return false; TemporaryCredential other = (TemporaryCredential) obj; if (other.getUsername() == null ^ this.getUsername() == null) return false; if (other.getUsername() != null && other.getUsername().equals(this.getUsername()) == false) return false; if (other.getPassword() == null ^ this.getPassword() == null) return false; if (other.getPassword() != null && other.getPassword().equals(this.getPassword()) == false) return false; if (other.getValidForInMinutes() == null ^ this.getValidForInMinutes() == null) return false; if (other.getValidForInMinutes() != null && other.getValidForInMinutes().equals(this.getValidForInMinutes()) == false) return false; if (other.getInstanceId() == null ^ this.getInstanceId() == null) return false; if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(TemporaryCredential temporaryCredential, ProtocolMarshaller protocolMarshaller) { if (temporaryCredential == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(temporaryCredential.getUsername(), USERNAME_BINDING); protocolMarshaller.marshall(temporaryCredential.getPassword(), PASSWORD_BINDING); protocolMarshaller.marshall(temporaryCredential.getValidForInMinutes(), VALIDFORINMINUTES_BINDING); protocolMarshaller.marshall(temporaryCredential.getInstanceId(), INSTANCEID_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getUsername() == null) ? 0 : getUsername().hashCode()); hashCode = prime * hashCode + ((getPassword() == null) ? 0 : getPassword().hashCode()); hashCode = prime * hashCode + ((getValidForInMinutes() == null) ? 0 : getValidForInMinutes().hashCode()); hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode()); return hashCode; }
/** * 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 (getUsername() != null) sb.append("Username: ").append(getUsername()).append(","); if (getPassword() != null) sb.append("Password: ").append(getPassword()).append(","); if (getValidForInMinutes() != null) sb.append("ValidForInMinutes: ").append(getValidForInMinutes()).append(","); if (getInstanceId() != null) sb.append("InstanceId: ").append(getInstanceId()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TemporaryCredential == false) return false; TemporaryCredential other = (TemporaryCredential) obj; if (other.getUsername() == null ^ this.getUsername() == null) return false; if (other.getUsername() != null && other.getUsername().equals(this.getUsername()) == false) return false; if (other.getPassword() == null ^ this.getPassword() == null) return false; if (other.getPassword() != null && other.getPassword().equals(this.getPassword()) == false) return false; if (other.getValidForInMinutes() == null ^ this.getValidForInMinutes() == null) return false; if (other.getValidForInMinutes() != null && other.getValidForInMinutes().equals(this.getValidForInMinutes()) == false) return false; if (other.getInstanceId() == null ^ this.getInstanceId() == null) return false; if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(TemporaryCredential temporaryCredential, ProtocolMarshaller protocolMarshaller) { if (temporaryCredential == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(temporaryCredential.getUsername(), USERNAME_BINDING); protocolMarshaller.marshall(temporaryCredential.getPassword(), PASSWORD_BINDING); protocolMarshaller.marshall(temporaryCredential.getValidForInMinutes(), VALIDFORINMINUTES_BINDING); protocolMarshaller.marshall(temporaryCredential.getInstanceId(), INSTANCEID_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }