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