// Path: query/src/main/java/io/keen/client/java/exceptions/KeenQueryClientException.java
// public class KeenQueryClientException extends KeenException {
//     private static final long serialVersionUID = -8714276738565293346L;
// 
//     public KeenQueryClientException() {
//         super();
//     }
// 
//     public KeenQueryClientException(Throwable cause) {
//         super(cause);
//     }
// 
//     public KeenQueryClientException(String message) {
//         super(message);
//     }
// 
//     public KeenQueryClientException(String message, Throwable cause) {
//         super(message, cause);
//     }
// }


import io.keen.client.java.exceptions.KeenQueryClientException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
import java.util.Locale;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
package io.keen.client.java;



/**
 * Class which handles formatting of request URLs.
 *
 * @author baumatron
 */
class RequestUrlBuilder {
    // The API version string
    private final String apiVersion;

    // The base URL, including the scheme and domain
    private final String baseUrl;

    RequestUrlBuilder(String apiVersion, String baseUrl) {
        if (null == apiVersion || apiVersion.trim().isEmpty()) {
            throw new IllegalArgumentException("'apiVersion' is a required argument.");
        }

        if (null == baseUrl || baseUrl.trim().isEmpty()) {
            throw new IllegalArgumentException("'baseUrl' is a required argument.");
        }

        this.apiVersion = apiVersion;
        this.baseUrl = baseUrl;
    }

    /**
     * Get a formatted URL for an analysis request.
     *
     * @param projectId    The project id
     * @param analysisPath The analysis url sub-path
     * @return The complete URL.
     * @throws KeenQueryClientException
     */
// Path: query/src/main/java/io/keen/client/java/exceptions/KeenQueryClientException.java
// public class KeenQueryClientException extends KeenException {
//     private static final long serialVersionUID = -8714276738565293346L;
// 
//     public KeenQueryClientException() {
//         super();
//     }
// 
//     public KeenQueryClientException(Throwable cause) {
//         super(cause);
//     }
// 
//     public KeenQueryClientException(String message) {
//         super(message);
//     }
// 
//     public KeenQueryClientException(String message, Throwable cause) {
//         super(message, cause);
//     }
// }


// Path: query/src/main/java/io/keen/client/java/RequestUrlBuilder.java
import io.keen.client.java.exceptions.KeenQueryClientException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
import java.util.Locale;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;

package io.keen.client.java;



/**
 * Class which handles formatting of request URLs.
 *
 * @author baumatron
 */
class RequestUrlBuilder {
    // The API version string
    private final String apiVersion;

    // The base URL, including the scheme and domain
    private final String baseUrl;

    RequestUrlBuilder(String apiVersion, String baseUrl) {
        if (null == apiVersion || apiVersion.trim().isEmpty()) {
            throw new IllegalArgumentException("'apiVersion' is a required argument.");
        }

        if (null == baseUrl || baseUrl.trim().isEmpty()) {
            throw new IllegalArgumentException("'baseUrl' is a required argument.");
        }

        this.apiVersion = apiVersion;
        this.baseUrl = baseUrl;
    }

    /**
     * Get a formatted URL for an analysis request.
     *
     * @param projectId    The project id
     * @param analysisPath The analysis url sub-path
     * @return The complete URL.
     * @throws KeenQueryClientException
     */
    URL getAnalysisUrl(String projectId, String analysisPath) throws KeenQueryClientException {