@Override public String toString() { return ToString.builder("AdminRespondToAuthChallengeRequest").add("UserPoolId", userPoolId()).add("ClientId", clientId()) .add("ChallengeName", challengeNameAsString()).add("ChallengeResponses", challengeResponses()) .add("Session", session()).build(); }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(userPoolId()); hashCode = 31 * hashCode + Objects.hashCode(clientId()); hashCode = 31 * hashCode + Objects.hashCode(challengeNameAsString()); hashCode = 31 * hashCode + Objects.hashCode(challengeResponses()); hashCode = 31 * hashCode + Objects.hashCode(session()); hashCode = 31 * hashCode + Objects.hashCode(analyticsMetadata()); hashCode = 31 * hashCode + Objects.hashCode(contextData()); return hashCode; }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "UserPoolId": return Optional.ofNullable(clazz.cast(userPoolId())); case "ClientId": return Optional.ofNullable(clazz.cast(clientId())); case "ChallengeName": return Optional.ofNullable(clazz.cast(challengeNameAsString())); case "ChallengeResponses": return Optional.ofNullable(clazz.cast(challengeResponses())); case "Session": return Optional.ofNullable(clazz.cast(session())); default: return Optional.empty(); } }
/** * 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("AdminRespondToAuthChallengeRequest").add("UserPoolId", userPoolId()) .add("ClientId", clientId() == null ? null : "*** Sensitive Data Redacted ***") .add("ChallengeName", challengeNameAsString()).add("ChallengeResponses", challengeResponses()) .add("Session", session()).add("AnalyticsMetadata", analyticsMetadata()).add("ContextData", contextData()) .build(); }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(userPoolId()); hashCode = 31 * hashCode + Objects.hashCode(clientId()); hashCode = 31 * hashCode + Objects.hashCode(challengeNameAsString()); hashCode = 31 * hashCode + Objects.hashCode(challengeResponses()); hashCode = 31 * hashCode + Objects.hashCode(session()); return hashCode; }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "UserPoolId": return Optional.ofNullable(clazz.cast(userPoolId())); case "ClientId": return Optional.ofNullable(clazz.cast(clientId())); case "ChallengeName": return Optional.ofNullable(clazz.cast(challengeNameAsString())); case "ChallengeResponses": return Optional.ofNullable(clazz.cast(challengeResponses())); case "Session": return Optional.ofNullable(clazz.cast(session())); case "AnalyticsMetadata": return Optional.ofNullable(clazz.cast(analyticsMetadata())); case "ContextData": return Optional.ofNullable(clazz.cast(contextData())); default: return Optional.empty(); } }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof AdminRespondToAuthChallengeRequest)) { return false; } AdminRespondToAuthChallengeRequest other = (AdminRespondToAuthChallengeRequest) obj; return Objects.equals(userPoolId(), other.userPoolId()) && Objects.equals(clientId(), other.clientId()) && Objects.equals(challengeNameAsString(), other.challengeNameAsString()) && Objects.equals(challengeResponses(), other.challengeResponses()) && Objects.equals(session(), other.session()); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof AdminRespondToAuthChallengeRequest)) { return false; } AdminRespondToAuthChallengeRequest other = (AdminRespondToAuthChallengeRequest) obj; return Objects.equals(userPoolId(), other.userPoolId()) && Objects.equals(clientId(), other.clientId()) && Objects.equals(challengeNameAsString(), other.challengeNameAsString()) && Objects.equals(challengeResponses(), other.challengeResponses()) && Objects.equals(session(), other.session()) && Objects.equals(analyticsMetadata(), other.analyticsMetadata()) && Objects.equals(contextData(), other.contextData()); }
/** * Marshall the given parameter object */ public void marshall(AdminRespondToAuthChallengeRequest adminRespondToAuthChallengeRequest, ProtocolMarshaller protocolMarshaller) { Validate.paramNotNull(adminRespondToAuthChallengeRequest, "adminRespondToAuthChallengeRequest"); Validate.paramNotNull(protocolMarshaller, "protocolMarshaller"); try { protocolMarshaller.marshall(adminRespondToAuthChallengeRequest.userPoolId(), USERPOOLID_BINDING); protocolMarshaller.marshall(adminRespondToAuthChallengeRequest.clientId(), CLIENTID_BINDING); protocolMarshaller.marshall(adminRespondToAuthChallengeRequest.challengeNameAsString(), CHALLENGENAME_BINDING); protocolMarshaller.marshall(adminRespondToAuthChallengeRequest.challengeResponses(), CHALLENGERESPONSES_BINDING); protocolMarshaller.marshall(adminRespondToAuthChallengeRequest.session(), SESSION_BINDING); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }