@Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof RoleInfo == false)
            return false;

        RoleInfo other = (RoleInfo) obj;
        if (other.getRoleArn() == null ^ this.getRoleArn() == null)
            return false;
        if (other.getRoleArn() != null
            && other.getRoleArn().equals(this.getRoleArn()) == false)
            return false;
        if (other.getRoleSessionName() == null
            ^ this.getRoleSessionName() == null)
            return false;
        if (other.getRoleSessionName() != null
            && other.getRoleSessionName().equals(this.getRoleSessionName()) == false)
            return false;
        if (other.getExternalId() == null ^ this.getExternalId() == null)
            return false;
        if (other.getExternalId() != null
            && other.getExternalId().equals(this.getExternalId()) == false)
            return false;
        if (other.getLongLivedCredentialsProvider() != this.getLongLivedCredentialsProvider())
            return false;
        return true;
    }
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