/** * 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("GroupType").add("GroupName", groupName()).add("UserPoolId", userPoolId()) .add("Description", description()).add("RoleArn", roleArn()).add("Precedence", precedence()) .add("LastModifiedDate", lastModifiedDate()).add("CreationDate", creationDate()).build(); }
@Override public String toString() { return ToString.builder("GroupType").add("GroupName", groupName()).add("UserPoolId", userPoolId()) .add("Description", description()).add("RoleArn", roleArn()).add("Precedence", precedence()) .add("LastModifiedDate", lastModifiedDate()).add("CreationDate", creationDate()).build(); }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(groupName()); hashCode = 31 * hashCode + Objects.hashCode(userPoolId()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(roleArn()); hashCode = 31 * hashCode + Objects.hashCode(precedence()); hashCode = 31 * hashCode + Objects.hashCode(lastModifiedDate()); hashCode = 31 * hashCode + Objects.hashCode(creationDate()); return hashCode; }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(groupName()); hashCode = 31 * hashCode + Objects.hashCode(userPoolId()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(roleArn()); hashCode = 31 * hashCode + Objects.hashCode(precedence()); 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 "GroupName": return Optional.ofNullable(clazz.cast(groupName())); case "UserPoolId": return Optional.ofNullable(clazz.cast(userPoolId())); case "Description": return Optional.ofNullable(clazz.cast(description())); case "RoleArn": return Optional.ofNullable(clazz.cast(roleArn())); case "Precedence": return Optional.ofNullable(clazz.cast(precedence())); case "LastModifiedDate": return Optional.ofNullable(clazz.cast(lastModifiedDate())); case "CreationDate": return Optional.ofNullable(clazz.cast(creationDate())); default: return Optional.empty(); } }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "GroupName": return Optional.ofNullable(clazz.cast(groupName())); case "UserPoolId": return Optional.ofNullable(clazz.cast(userPoolId())); case "Description": return Optional.ofNullable(clazz.cast(description())); case "RoleArn": return Optional.ofNullable(clazz.cast(roleArn())); case "Precedence": return Optional.ofNullable(clazz.cast(precedence())); 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 GroupType)) { return false; } GroupType other = (GroupType) obj; return Objects.equals(groupName(), other.groupName()) && Objects.equals(userPoolId(), other.userPoolId()) && Objects.equals(description(), other.description()) && Objects.equals(roleArn(), other.roleArn()) && Objects.equals(precedence(), other.precedence()) && 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 GroupType)) { return false; } GroupType other = (GroupType) obj; return Objects.equals(groupName(), other.groupName()) && Objects.equals(userPoolId(), other.userPoolId()) && Objects.equals(description(), other.description()) && Objects.equals(roleArn(), other.roleArn()) && Objects.equals(precedence(), other.precedence()) && Objects.equals(lastModifiedDate(), other.lastModifiedDate()) && Objects.equals(creationDate(), other.creationDate()); }
/** * Marshall the given parameter object */ public void marshall(GroupType groupType, ProtocolMarshaller protocolMarshaller) { Validate.paramNotNull(groupType, "groupType"); Validate.paramNotNull(protocolMarshaller, "protocolMarshaller"); try { protocolMarshaller.marshall(groupType.groupName(), GROUPNAME_BINDING); protocolMarshaller.marshall(groupType.userPoolId(), USERPOOLID_BINDING); protocolMarshaller.marshall(groupType.description(), DESCRIPTION_BINDING); protocolMarshaller.marshall(groupType.roleArn(), ROLEARN_BINDING); protocolMarshaller.marshall(groupType.precedence(), PRECEDENCE_BINDING); protocolMarshaller.marshall(groupType.lastModifiedDate(), LASTMODIFIEDDATE_BINDING); protocolMarshaller.marshall(groupType.creationDate(), CREATIONDATE_BINDING); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }