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