@Override public String toString() { return ToString.builder("AdminCreateUserRequest").add("UserPoolId", userPoolId()).add("Username", username()) .add("UserAttributes", userAttributes()).add("ValidationData", validationData()) .add("TemporaryPassword", temporaryPassword()).add("ForceAliasCreation", forceAliasCreation()) .add("MessageAction", messageActionAsString()).add("DesiredDeliveryMediums", desiredDeliveryMediumsAsStrings()) .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("AdminCreateUserRequest").add("UserPoolId", userPoolId()) .add("Username", username() == null ? null : "*** Sensitive Data Redacted ***") .add("UserAttributes", userAttributes()).add("ValidationData", validationData()) .add("TemporaryPassword", temporaryPassword() == null ? null : "*** Sensitive Data Redacted ***") .add("ForceAliasCreation", forceAliasCreation()).add("MessageAction", messageActionAsString()) .add("DesiredDeliveryMediums", desiredDeliveryMediumsAsStrings()).build(); }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(userPoolId()); hashCode = 31 * hashCode + Objects.hashCode(username()); hashCode = 31 * hashCode + Objects.hashCode(userAttributes()); hashCode = 31 * hashCode + Objects.hashCode(validationData()); hashCode = 31 * hashCode + Objects.hashCode(temporaryPassword()); hashCode = 31 * hashCode + Objects.hashCode(forceAliasCreation()); hashCode = 31 * hashCode + Objects.hashCode(messageActionAsString()); hashCode = 31 * hashCode + Objects.hashCode(desiredDeliveryMediumsAsStrings()); return hashCode; }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(userPoolId()); hashCode = 31 * hashCode + Objects.hashCode(username()); hashCode = 31 * hashCode + Objects.hashCode(userAttributes()); hashCode = 31 * hashCode + Objects.hashCode(validationData()); hashCode = 31 * hashCode + Objects.hashCode(temporaryPassword()); hashCode = 31 * hashCode + Objects.hashCode(forceAliasCreation()); hashCode = 31 * hashCode + Objects.hashCode(messageActionAsString()); hashCode = 31 * hashCode + Objects.hashCode(desiredDeliveryMediumsAsStrings()); return hashCode; }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "UserPoolId": return Optional.ofNullable(clazz.cast(userPoolId())); case "Username": return Optional.ofNullable(clazz.cast(username())); case "UserAttributes": return Optional.ofNullable(clazz.cast(userAttributes())); case "ValidationData": return Optional.ofNullable(clazz.cast(validationData())); case "TemporaryPassword": return Optional.ofNullable(clazz.cast(temporaryPassword())); case "ForceAliasCreation": return Optional.ofNullable(clazz.cast(forceAliasCreation())); case "MessageAction": return Optional.ofNullable(clazz.cast(messageActionAsString())); case "DesiredDeliveryMediums": return Optional.ofNullable(clazz.cast(desiredDeliveryMediumsAsStrings())); default: return Optional.empty(); } }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "UserPoolId": return Optional.ofNullable(clazz.cast(userPoolId())); case "Username": return Optional.ofNullable(clazz.cast(username())); case "UserAttributes": return Optional.ofNullable(clazz.cast(userAttributes())); case "ValidationData": return Optional.ofNullable(clazz.cast(validationData())); case "TemporaryPassword": return Optional.ofNullable(clazz.cast(temporaryPassword())); case "ForceAliasCreation": return Optional.ofNullable(clazz.cast(forceAliasCreation())); case "MessageAction": return Optional.ofNullable(clazz.cast(messageActionAsString())); case "DesiredDeliveryMediums": return Optional.ofNullable(clazz.cast(desiredDeliveryMediumsAsStrings())); default: return Optional.empty(); } }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof AdminCreateUserRequest)) { return false; } AdminCreateUserRequest other = (AdminCreateUserRequest) obj; return Objects.equals(userPoolId(), other.userPoolId()) && Objects.equals(username(), other.username()) && Objects.equals(userAttributes(), other.userAttributes()) && Objects.equals(validationData(), other.validationData()) && Objects.equals(temporaryPassword(), other.temporaryPassword()) && Objects.equals(forceAliasCreation(), other.forceAliasCreation()) && Objects.equals(messageActionAsString(), other.messageActionAsString()) && Objects.equals(desiredDeliveryMediumsAsStrings(), other.desiredDeliveryMediumsAsStrings()); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof AdminCreateUserRequest)) { return false; } AdminCreateUserRequest other = (AdminCreateUserRequest) obj; return Objects.equals(userPoolId(), other.userPoolId()) && Objects.equals(username(), other.username()) && Objects.equals(userAttributes(), other.userAttributes()) && Objects.equals(validationData(), other.validationData()) && Objects.equals(temporaryPassword(), other.temporaryPassword()) && Objects.equals(forceAliasCreation(), other.forceAliasCreation()) && Objects.equals(messageActionAsString(), other.messageActionAsString()) && Objects.equals(desiredDeliveryMediumsAsStrings(), other.desiredDeliveryMediumsAsStrings()); }
/** * Marshall the given parameter object */ public void marshall(AdminCreateUserRequest adminCreateUserRequest, ProtocolMarshaller protocolMarshaller) { Validate.paramNotNull(adminCreateUserRequest, "adminCreateUserRequest"); Validate.paramNotNull(protocolMarshaller, "protocolMarshaller"); try { protocolMarshaller.marshall(adminCreateUserRequest.userPoolId(), USERPOOLID_BINDING); protocolMarshaller.marshall(adminCreateUserRequest.username(), USERNAME_BINDING); protocolMarshaller.marshall(adminCreateUserRequest.userAttributes(), USERATTRIBUTES_BINDING); protocolMarshaller.marshall(adminCreateUserRequest.validationData(), VALIDATIONDATA_BINDING); protocolMarshaller.marshall(adminCreateUserRequest.temporaryPassword(), TEMPORARYPASSWORD_BINDING); protocolMarshaller.marshall(adminCreateUserRequest.forceAliasCreation(), FORCEALIASCREATION_BINDING); protocolMarshaller.marshall(adminCreateUserRequest.messageActionAsString(), MESSAGEACTION_BINDING); protocolMarshaller.marshall(adminCreateUserRequest.desiredDeliveryMediumsAsStrings(), DESIREDDELIVERYMEDIUMS_BINDING); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }