@Override public String toString() { return ToString.builder("ConfirmSignUpRequest").add("ClientId", clientId()).add("SecretHash", secretHash()) .add("Username", username()).add("ConfirmationCode", confirmationCode()) .add("ForceAliasCreation", forceAliasCreation()).build(); }
/** * 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. */ @Override public String toString() { return ToString.builder("ConfirmSignUpRequest") .add("ClientId", clientId() == null ? null : "*** Sensitive Data Redacted ***") .add("SecretHash", secretHash() == null ? null : "*** Sensitive Data Redacted ***") .add("Username", username() == null ? null : "*** Sensitive Data Redacted ***") .add("ConfirmationCode", confirmationCode()).add("ForceAliasCreation", forceAliasCreation()) .add("AnalyticsMetadata", analyticsMetadata()).add("UserContextData", userContextData()).build(); }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(clientId()); hashCode = 31 * hashCode + Objects.hashCode(secretHash()); hashCode = 31 * hashCode + Objects.hashCode(username()); hashCode = 31 * hashCode + Objects.hashCode(confirmationCode()); hashCode = 31 * hashCode + Objects.hashCode(forceAliasCreation()); return hashCode; }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "ClientId": return Optional.ofNullable(clazz.cast(clientId())); case "SecretHash": return Optional.ofNullable(clazz.cast(secretHash())); case "Username": return Optional.ofNullable(clazz.cast(username())); case "ConfirmationCode": return Optional.ofNullable(clazz.cast(confirmationCode())); case "ForceAliasCreation": return Optional.ofNullable(clazz.cast(forceAliasCreation())); default: return Optional.empty(); } }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "ClientId": return Optional.ofNullable(clazz.cast(clientId())); case "SecretHash": return Optional.ofNullable(clazz.cast(secretHash())); case "Username": return Optional.ofNullable(clazz.cast(username())); case "ConfirmationCode": return Optional.ofNullable(clazz.cast(confirmationCode())); case "ForceAliasCreation": return Optional.ofNullable(clazz.cast(forceAliasCreation())); case "AnalyticsMetadata": return Optional.ofNullable(clazz.cast(analyticsMetadata())); case "UserContextData": return Optional.ofNullable(clazz.cast(userContextData())); default: return Optional.empty(); } }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(clientId()); hashCode = 31 * hashCode + Objects.hashCode(secretHash()); hashCode = 31 * hashCode + Objects.hashCode(username()); hashCode = 31 * hashCode + Objects.hashCode(confirmationCode()); hashCode = 31 * hashCode + Objects.hashCode(forceAliasCreation()); hashCode = 31 * hashCode + Objects.hashCode(analyticsMetadata()); hashCode = 31 * hashCode + Objects.hashCode(userContextData()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof ConfirmSignUpRequest)) { return false; } ConfirmSignUpRequest other = (ConfirmSignUpRequest) obj; return Objects.equals(clientId(), other.clientId()) && Objects.equals(secretHash(), other.secretHash()) && Objects.equals(username(), other.username()) && Objects.equals(confirmationCode(), other.confirmationCode()) && Objects.equals(forceAliasCreation(), other.forceAliasCreation()); }
/** * Marshall the given parameter object */ public void marshall(ConfirmSignUpRequest confirmSignUpRequest, ProtocolMarshaller protocolMarshaller) { Validate.paramNotNull(confirmSignUpRequest, "confirmSignUpRequest"); Validate.paramNotNull(protocolMarshaller, "protocolMarshaller"); try { protocolMarshaller.marshall(confirmSignUpRequest.clientId(), CLIENTID_BINDING); protocolMarshaller.marshall(confirmSignUpRequest.secretHash(), SECRETHASH_BINDING); protocolMarshaller.marshall(confirmSignUpRequest.username(), USERNAME_BINDING); protocolMarshaller.marshall(confirmSignUpRequest.confirmationCode(), CONFIRMATIONCODE_BINDING); protocolMarshaller.marshall(confirmSignUpRequest.forceAliasCreation(), FORCEALIASCREATION_BINDING); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof ConfirmSignUpRequest)) { return false; } ConfirmSignUpRequest other = (ConfirmSignUpRequest) obj; return Objects.equals(clientId(), other.clientId()) && Objects.equals(secretHash(), other.secretHash()) && Objects.equals(username(), other.username()) && Objects.equals(confirmationCode(), other.confirmationCode()) && Objects.equals(forceAliasCreation(), other.forceAliasCreation()) && Objects.equals(analyticsMetadata(), other.analyticsMetadata()) && Objects.equals(userContextData(), other.userContextData()); }