// 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 java.net.URL;
import java.util.Map;
import io.keen.client.java.exceptions.KeenQueryClientException;
package io.keen.client.java;



/**
 * This will replace Query, delegating most functionality to the CollectionAnalysis base class,
 * and adding the additional fields useful for some of the single analysis types, like the target
 * property and percentile.
 *
 * @author masojus
 */
public class SingleAnalysis extends CollectionAnalysis {
    // required
    private final QueryType queryType;

    // sometimes optional
    private final String targetPropertyName;

    // required by the Percentile query
    private final Percentile percentile;


    protected SingleAnalysis(Builder builder) {
        super(builder);

        this.queryType = builder.queryType;
        this.targetPropertyName = builder.targetPropertyName;
        this.percentile = builder.percentile;
    }

    @Override
    URL getRequestURL(RequestUrlBuilder urlBuilder, String projectId)
// 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/SingleAnalysis.java
import java.net.URL;
import java.util.Map;
import io.keen.client.java.exceptions.KeenQueryClientException;

package io.keen.client.java;



/**
 * This will replace Query, delegating most functionality to the CollectionAnalysis base class,
 * and adding the additional fields useful for some of the single analysis types, like the target
 * property and percentile.
 *
 * @author masojus
 */
public class SingleAnalysis extends CollectionAnalysis {
    // required
    private final QueryType queryType;

    // sometimes optional
    private final String targetPropertyName;

    // required by the Percentile query
    private final Percentile percentile;


    protected SingleAnalysis(Builder builder) {
        super(builder);

        this.queryType = builder.queryType;
        this.targetPropertyName = builder.targetPropertyName;
        this.percentile = builder.percentile;
    }

    @Override
    URL getRequestURL(RequestUrlBuilder urlBuilder, String projectId)
            throws KeenQueryClientException {