/** * 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("LambdaConfigType").add("PreSignUp", preSignUp()).add("CustomMessage", customMessage()) .add("PostConfirmation", postConfirmation()).add("PreAuthentication", preAuthentication()) .add("PostAuthentication", postAuthentication()).add("DefineAuthChallenge", defineAuthChallenge()) .add("CreateAuthChallenge", createAuthChallenge()) .add("VerifyAuthChallengeResponse", verifyAuthChallengeResponse()) .add("PreTokenGeneration", preTokenGeneration()).add("UserMigration", userMigration()).build(); }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(preSignUp()); hashCode = 31 * hashCode + Objects.hashCode(customMessage()); hashCode = 31 * hashCode + Objects.hashCode(postConfirmation()); hashCode = 31 * hashCode + Objects.hashCode(preAuthentication()); hashCode = 31 * hashCode + Objects.hashCode(postAuthentication()); hashCode = 31 * hashCode + Objects.hashCode(defineAuthChallenge()); hashCode = 31 * hashCode + Objects.hashCode(createAuthChallenge()); hashCode = 31 * hashCode + Objects.hashCode(verifyAuthChallengeResponse()); hashCode = 31 * hashCode + Objects.hashCode(preTokenGeneration()); hashCode = 31 * hashCode + Objects.hashCode(userMigration()); return hashCode; }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "PreSignUp": return Optional.ofNullable(clazz.cast(preSignUp())); case "CustomMessage": return Optional.ofNullable(clazz.cast(customMessage())); case "PostConfirmation": return Optional.ofNullable(clazz.cast(postConfirmation())); case "PreAuthentication": return Optional.ofNullable(clazz.cast(preAuthentication())); case "PostAuthentication": return Optional.ofNullable(clazz.cast(postAuthentication())); case "DefineAuthChallenge": return Optional.ofNullable(clazz.cast(defineAuthChallenge())); case "CreateAuthChallenge": return Optional.ofNullable(clazz.cast(createAuthChallenge())); case "VerifyAuthChallengeResponse": return Optional.ofNullable(clazz.cast(verifyAuthChallengeResponse())); case "PreTokenGeneration": return Optional.ofNullable(clazz.cast(preTokenGeneration())); case "UserMigration": return Optional.ofNullable(clazz.cast(userMigration())); default: return Optional.empty(); } }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof LambdaConfigType)) { return false; } LambdaConfigType other = (LambdaConfigType) obj; return Objects.equals(preSignUp(), other.preSignUp()) && Objects.equals(customMessage(), other.customMessage()) && Objects.equals(postConfirmation(), other.postConfirmation()) && Objects.equals(preAuthentication(), other.preAuthentication()) && Objects.equals(postAuthentication(), other.postAuthentication()) && Objects.equals(defineAuthChallenge(), other.defineAuthChallenge()) && Objects.equals(createAuthChallenge(), other.createAuthChallenge()) && Objects.equals(verifyAuthChallengeResponse(), other.verifyAuthChallengeResponse()) && Objects.equals(preTokenGeneration(), other.preTokenGeneration()) && Objects.equals(userMigration(), other.userMigration()); }