// Path: here-oauth-client/src/main/java/com/here/account/olp/OlpHttpMessage.java
// public interface OlpHttpMessage {
//     String X_CORRELATION_ID = "X-Correlation-ID";
// 
//     /**
//      * Get the correlationId (the unique value for tracking a request across services and within a service).
//      *
//      * @return the correlationId
//      */
//     String getCorrelationId();
// 
//     /**
//      * Set the correlationId (the unique value for tracking a request across services and within a service).
//      *
//      * @param correlationId     the correlationId
//      * @return                  the class implementing this method. Allows chaining methods,
//      *                          e.g. classInstance.setCorrelationId("abc123").setFoo().setBar()
//      */
//     OlpHttpMessage setCorrelationId(String correlationId);
// }
// 
// Path: here-oauth-client/src/main/java/com/here/account/util/JacksonSerializer.java
// public class JacksonSerializer implements Serializer {
// 
//     public JacksonSerializer() {
//     }
//     
//     /**
//      * {@inheritDoc}
//      */
//     public Map<String, Object> jsonToMap(InputStream jsonInputStream) {
//         try {
//             return JsonSerializer.toMap(jsonInputStream);
//         } catch (IOException e) {
//             throw new RuntimeException("trouble deserializing json: " + e, e);
//         }
//     }
// 
//     @Override
//     public <T> T jsonToPojo(InputStream jsonInputStream, Class<T> pojoClass) {
//         try {
//             return JsonSerializer.toPojo(jsonInputStream, pojoClass);
//         } catch (IOException e) {
//             throw new RuntimeException("trouble deserializing json: " + e, e);
//         }
//     }
// 
//     @Override
//     public String objectToJson(Object object) {
//         try {
//             return JsonSerializer.objectToJson(object);
//         } catch (JsonProcessingException e) {
//             throw new RuntimeException("trouble serializing json: " + e, e);
//         }
//     }
// 
//     @Override
//     public void writeObjectToJson(OutputStream outputStream, Object object) {
//         try {
//             JsonSerializer.writeObjectToJson(outputStream, object);
//         } catch (IOException e) {
//             throw new RuntimeException("trouble serializing json: " + e, e);
//         }
//     }
//     
// 
// }


import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.here.account.olp.OlpHttpMessage;
import com.here.account.util.JacksonSerializer;

    /**
     * Set the scope for the token request.  See also 
     * <a href="http://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims">
     * Requesting Claims using Scope Values</a>.
     * 
     * <p>
     * The example values are "openid
     * sdp:GROUP-6bb1bfd9-8bdc-46c2-85cd-754068aa9497,
     * GROUP-84ba52de-f80b-4047-a024-33d81e6153df".
     *  or
     * hrn:here:authorization::rlm0000:project/my-project-0000
     * A projectHRN for a Project-scoped token
     * 
     * @param scope the scope to set
     * @return  this
     */
    public AccessTokenRequest setScope(String scope) {
        this.scope = scope;
        return this;
    }

    /**
     * Get any additional headers that will be added to the token request.
     *
     * @return the additional headers
     */
    public Map<String, String> getAdditionalHeaders() { return additionalHeaders; }

    public AccessTokenRequest setAdditionalHeaders(Map<String, String> additionalHeaders) {
// Path: here-oauth-client/src/main/java/com/here/account/olp/OlpHttpMessage.java
// public interface OlpHttpMessage {
//     String X_CORRELATION_ID = "X-Correlation-ID";
// 
//     /**
//      * Get the correlationId (the unique value for tracking a request across services and within a service).
//      *
//      * @return the correlationId
//      */
//     String getCorrelationId();
// 
//     /**
//      * Set the correlationId (the unique value for tracking a request across services and within a service).
//      *
//      * @param correlationId     the correlationId
//      * @return                  the class implementing this method. Allows chaining methods,
//      *                          e.g. classInstance.setCorrelationId("abc123").setFoo().setBar()
//      */
//     OlpHttpMessage setCorrelationId(String correlationId);
// }
// 
// Path: here-oauth-client/src/main/java/com/here/account/util/JacksonSerializer.java
// public class JacksonSerializer implements Serializer {
// 
//     public JacksonSerializer() {
//     }
//     
//     /**
//      * {@inheritDoc}
//      */
//     public Map<String, Object> jsonToMap(InputStream jsonInputStream) {
//         try {
//             return JsonSerializer.toMap(jsonInputStream);
//         } catch (IOException e) {
//             throw new RuntimeException("trouble deserializing json: " + e, e);
//         }
//     }
// 
//     @Override
//     public <T> T jsonToPojo(InputStream jsonInputStream, Class<T> pojoClass) {
//         try {
//             return JsonSerializer.toPojo(jsonInputStream, pojoClass);
//         } catch (IOException e) {
//             throw new RuntimeException("trouble deserializing json: " + e, e);
//         }
//     }
// 
//     @Override
//     public String objectToJson(Object object) {
//         try {
//             return JsonSerializer.objectToJson(object);
//         } catch (JsonProcessingException e) {
//             throw new RuntimeException("trouble serializing json: " + e, e);
//         }
//     }
// 
//     @Override
//     public void writeObjectToJson(OutputStream outputStream, Object object) {
//         try {
//             JsonSerializer.writeObjectToJson(outputStream, object);
//         } catch (IOException e) {
//             throw new RuntimeException("trouble serializing json: " + e, e);
//         }
//     }
//     
// 
// }


// Path: here-oauth-client/src/main/java/com/here/account/oauth2/AccessTokenRequest.java
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.here.account.olp.OlpHttpMessage;
import com.here.account.util.JacksonSerializer;


    /**
     * Set the scope for the token request.  See also 
     * <a href="http://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims">
     * Requesting Claims using Scope Values</a>.
     * 
     * <p>
     * The example values are "openid
     * sdp:GROUP-6bb1bfd9-8bdc-46c2-85cd-754068aa9497,
     * GROUP-84ba52de-f80b-4047-a024-33d81e6153df".
     *  or
     * hrn:here:authorization::rlm0000:project/my-project-0000
     * A projectHRN for a Project-scoped token
     * 
     * @param scope the scope to set
     * @return  this
     */
    public AccessTokenRequest setScope(String scope) {
        this.scope = scope;
        return this;
    }

    /**
     * Get any additional headers that will be added to the token request.
     *
     * @return the additional headers
     */
    public Map<String, String> getAdditionalHeaders() { return additionalHeaders; }

    public AccessTokenRequest setAdditionalHeaders(Map<String, String> additionalHeaders) {
        this.additionalHeaders = additionalHeaders;