public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "UserPoolId": return Optional.ofNullable(clazz.cast(userPoolId())); case "DestinationUser": return Optional.ofNullable(clazz.cast(destinationUser())); case "SourceUser": return Optional.ofNullable(clazz.cast(sourceUser())); 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 "DestinationUser": return Optional.ofNullable(clazz.cast(destinationUser())); case "SourceUser": return Optional.ofNullable(clazz.cast(sourceUser())); 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("AdminLinkProviderForUserRequest").add("UserPoolId", userPoolId()) .add("DestinationUser", destinationUser()).add("SourceUser", sourceUser()).build(); }
@Override public String toString() { return ToString.builder("AdminLinkProviderForUserRequest").add("UserPoolId", userPoolId()) .add("DestinationUser", destinationUser()).add("SourceUser", sourceUser()).build(); }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(userPoolId()); hashCode = 31 * hashCode + Objects.hashCode(destinationUser()); hashCode = 31 * hashCode + Objects.hashCode(sourceUser()); return hashCode; }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(userPoolId()); hashCode = 31 * hashCode + Objects.hashCode(destinationUser()); hashCode = 31 * hashCode + Objects.hashCode(sourceUser()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof AdminLinkProviderForUserRequest)) { return false; } AdminLinkProviderForUserRequest other = (AdminLinkProviderForUserRequest) obj; return Objects.equals(userPoolId(), other.userPoolId()) && Objects.equals(destinationUser(), other.destinationUser()) && Objects.equals(sourceUser(), other.sourceUser()); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof AdminLinkProviderForUserRequest)) { return false; } AdminLinkProviderForUserRequest other = (AdminLinkProviderForUserRequest) obj; return Objects.equals(userPoolId(), other.userPoolId()) && Objects.equals(destinationUser(), other.destinationUser()) && Objects.equals(sourceUser(), other.sourceUser()); }
/** * Marshall the given parameter object */ public void marshall(AdminLinkProviderForUserRequest adminLinkProviderForUserRequest, ProtocolMarshaller protocolMarshaller) { Validate.paramNotNull(adminLinkProviderForUserRequest, "adminLinkProviderForUserRequest"); Validate.paramNotNull(protocolMarshaller, "protocolMarshaller"); try { protocolMarshaller.marshall(adminLinkProviderForUserRequest.userPoolId(), USERPOOLID_BINDING); protocolMarshaller.marshall(adminLinkProviderForUserRequest.destinationUser(), DESTINATIONUSER_BINDING); protocolMarshaller.marshall(adminLinkProviderForUserRequest.sourceUser(), SOURCEUSER_BINDING); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }