public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "AccessToken": return Optional.ofNullable(clazz.cast(accessToken())); case "AttributeName": return Optional.ofNullable(clazz.cast(attributeName())); case "Code": return Optional.ofNullable(clazz.cast(code())); default: return Optional.empty(); } }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "AccessToken": return Optional.ofNullable(clazz.cast(accessToken())); case "AttributeName": return Optional.ofNullable(clazz.cast(attributeName())); case "Code": return Optional.ofNullable(clazz.cast(code())); 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("VerifyUserAttributeRequest") .add("AccessToken", accessToken() == null ? null : "*** Sensitive Data Redacted ***") .add("AttributeName", attributeName()).add("Code", code()).build(); }
@Override public String toString() { return ToString.builder("VerifyUserAttributeRequest").add("AccessToken", accessToken()) .add("AttributeName", attributeName()).add("Code", code()).build(); }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(accessToken()); hashCode = 31 * hashCode + Objects.hashCode(attributeName()); hashCode = 31 * hashCode + Objects.hashCode(code()); return hashCode; }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(accessToken()); hashCode = 31 * hashCode + Objects.hashCode(attributeName()); hashCode = 31 * hashCode + Objects.hashCode(code()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof VerifyUserAttributeRequest)) { return false; } VerifyUserAttributeRequest other = (VerifyUserAttributeRequest) obj; return Objects.equals(accessToken(), other.accessToken()) && Objects.equals(attributeName(), other.attributeName()) && Objects.equals(code(), other.code()); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof VerifyUserAttributeRequest)) { return false; } VerifyUserAttributeRequest other = (VerifyUserAttributeRequest) obj; return Objects.equals(accessToken(), other.accessToken()) && Objects.equals(attributeName(), other.attributeName()) && Objects.equals(code(), other.code()); }
/** * Marshall the given parameter object */ public void marshall(VerifyUserAttributeRequest verifyUserAttributeRequest, ProtocolMarshaller protocolMarshaller) { Validate.paramNotNull(verifyUserAttributeRequest, "verifyUserAttributeRequest"); Validate.paramNotNull(protocolMarshaller, "protocolMarshaller"); try { protocolMarshaller.marshall(verifyUserAttributeRequest.accessToken(), ACCESSTOKEN_BINDING); protocolMarshaller.marshall(verifyUserAttributeRequest.attributeName(), ATTRIBUTENAME_BINDING); protocolMarshaller.marshall(verifyUserAttributeRequest.code(), CODE_BINDING); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }