presto-spi/src/main/java/io/prestosql/spi/security/SelectedRole.java/SelectedRole/SelectedRole
class SelectedRole:    @JsonCreator
    public SelectedRole(@JsonProperty("type") Type type, @JsonProperty("role") Optional<String> role)
    {
        this.type = requireNonNull(type, "type is null");
        this.role = requireNonNull(role, "role is null");
        if (type == Type.ROLE && !role.isPresent()) {
            throw new IllegalArgumentException("Role must be present for the selected role type: " + type);
        }
    }