@Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode
                   + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode());
        hashCode = prime
                   * hashCode
                   + ((getRoleSessionName() == null) ? 0 : getRoleSessionName()
                .hashCode());
        hashCode = prime * hashCode
                   + ((getExternalId() == null) ? 0 : getExternalId().hashCode());
        hashCode = prime * hashCode
                   + ((getLongLivedCredentialsProvider() == null) ? 0 : getLongLivedCredentialsProvider().hashCode());
        return hashCode;
    }
Returns a string representation of this object; useful for testing and
debugging.

@return A string representation of this object.
@see java.lang.Object#toString()
aws-java-sdk-core/src/main/java/com/amazonaws/auth/profile/internal/securitytoken/RoleInfo.java