/** * 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("UserPoolDescriptionType").add("Id", id()).add("Name", name()) .add("LambdaConfig", lambdaConfig()).add("Status", statusAsString()).add("LastModifiedDate", lastModifiedDate()) .add("CreationDate", creationDate()).build(); }
@Override public String toString() { return ToString.builder("UserPoolDescriptionType").add("Id", id()).add("Name", name()) .add("LambdaConfig", lambdaConfig()).add("Status", statusAsString()).add("LastModifiedDate", lastModifiedDate()) .add("CreationDate", creationDate()).build(); }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(id()); hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(lambdaConfig()); hashCode = 31 * hashCode + Objects.hashCode(statusAsString()); hashCode = 31 * hashCode + Objects.hashCode(lastModifiedDate()); hashCode = 31 * hashCode + Objects.hashCode(creationDate()); return hashCode; }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "Id": return Optional.ofNullable(clazz.cast(id())); case "Name": return Optional.ofNullable(clazz.cast(name())); case "LambdaConfig": return Optional.ofNullable(clazz.cast(lambdaConfig())); case "Status": return Optional.ofNullable(clazz.cast(statusAsString())); case "LastModifiedDate": return Optional.ofNullable(clazz.cast(lastModifiedDate())); case "CreationDate": return Optional.ofNullable(clazz.cast(creationDate())); default: return Optional.empty(); } }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(id()); hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(lambdaConfig()); hashCode = 31 * hashCode + Objects.hashCode(statusAsString()); hashCode = 31 * hashCode + Objects.hashCode(lastModifiedDate()); hashCode = 31 * hashCode + Objects.hashCode(creationDate()); return hashCode; }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "Id": return Optional.ofNullable(clazz.cast(id())); case "Name": return Optional.ofNullable(clazz.cast(name())); case "LambdaConfig": return Optional.ofNullable(clazz.cast(lambdaConfig())); case "Status": return Optional.ofNullable(clazz.cast(statusAsString())); case "LastModifiedDate": return Optional.ofNullable(clazz.cast(lastModifiedDate())); case "CreationDate": return Optional.ofNullable(clazz.cast(creationDate())); default: return Optional.empty(); } }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof UserPoolDescriptionType)) { return false; } UserPoolDescriptionType other = (UserPoolDescriptionType) obj; return Objects.equals(id(), other.id()) && Objects.equals(name(), other.name()) && Objects.equals(lambdaConfig(), other.lambdaConfig()) && Objects.equals(statusAsString(), other.statusAsString()) && Objects.equals(lastModifiedDate(), other.lastModifiedDate()) && Objects.equals(creationDate(), other.creationDate()); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof UserPoolDescriptionType)) { return false; } UserPoolDescriptionType other = (UserPoolDescriptionType) obj; return Objects.equals(id(), other.id()) && Objects.equals(name(), other.name()) && Objects.equals(lambdaConfig(), other.lambdaConfig()) && Objects.equals(statusAsString(), other.statusAsString()) && Objects.equals(lastModifiedDate(), other.lastModifiedDate()) && Objects.equals(creationDate(), other.creationDate()); }
/** * Marshall the given parameter object */ public void marshall(UserPoolDescriptionType userPoolDescriptionType, ProtocolMarshaller protocolMarshaller) { Validate.paramNotNull(userPoolDescriptionType, "userPoolDescriptionType"); Validate.paramNotNull(protocolMarshaller, "protocolMarshaller"); try { protocolMarshaller.marshall(userPoolDescriptionType.id(), ID_BINDING); protocolMarshaller.marshall(userPoolDescriptionType.name(), NAME_BINDING); protocolMarshaller.marshall(userPoolDescriptionType.lambdaConfig(), LAMBDACONFIG_BINDING); protocolMarshaller.marshall(userPoolDescriptionType.statusAsString(), STATUS_BINDING); protocolMarshaller.marshall(userPoolDescriptionType.lastModifiedDate(), LASTMODIFIEDDATE_BINDING); protocolMarshaller.marshall(userPoolDescriptionType.creationDate(), CREATIONDATE_BINDING); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }