// Path: src/main/java/com/github/levin81/daelic/druid/datasource/DataSource.java
// public interface DataSource {
//     String getType();
// }
// 
// Path: src/main/java/com/github/levin81/daelic/druid/datasource/TableDataSource.java
// @JsonInclude(JsonInclude.Include.NON_NULL)
// public class TableDataSource implements DataSource {
// 
//     private final String type = "table";
// 
//     private String name;
// 
//     TableDataSource(String name) {
//         Properties.assertRequired(name, "Name is a required property");
//         this.name = name;
//     }
// 
//     @Override
//     public String getType() {
//         return type;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public static TableDataSourceBuilder builder() {
//         return new TableDataSourceBuilder();
//     }
// 
//     public static class TableDataSourceBuilder {
//         private String name;
// 
//         TableDataSourceBuilder() {
// 
//         }
// 
//         public TableDataSourceBuilder withName(String name) {
//             this.name = name;
//             return this;
//         }
// 
//         public TableDataSource build() {
//             return new TableDataSource(name);
//         }
//     }
// }
// 
// Path: src/main/java/com/github/levin81/daelic/druid/dimension/DefaultDimension.java
// @JsonInclude(JsonInclude.Include.NON_NULL)
// public class DefaultDimension implements Dimension {
// 
//     private final String type = "default";
// 
//     private String dimension;
//     private String outputName;
// 
//     DefaultDimension(String dimension, String outputName) {
//         Properties.assertRequired(dimension, "Dimension is a required property");
// 
//         this.dimension = dimension;
//         this.outputName = outputName;
//     }
// 
//     @Override
//     public String getType() {
//         return type;
//     }
// 
//     public String getDimension() {
//         return dimension;
//     }
// 
//     public String getOutputName() {
//         return outputName;
//     }
// 
//     public static DefaultDimensionBuilder builder() {
//         return new DefaultDimensionBuilder();
//     }
// 
//     public static class DefaultDimensionBuilder {
// 
//         private String dimension;
//         private String outputName;
// 
//         DefaultDimensionBuilder() {
// 
//         }
// 
//         public DefaultDimensionBuilder withDimension(String dimension) {
//             this.dimension = dimension;
//             return this;
//         }
// 
//         public DefaultDimensionBuilder withOutputName(String outputName) {
//             this.outputName = outputName;
//             return this;
//         }
// 
//         public DefaultDimension build() {
//             return new DefaultDimension(dimension, outputName);
//         }
//     }
// }
// 
// Path: src/main/java/com/github/levin81/daelic/druid/dimension/Dimension.java
// public interface Dimension {
//     String getType();
// }
// 
// Path: src/main/java/com/github/levin81/daelic/druid/granularity/Granularity.java
// public interface Granularity {
//     String getType();
// }


import com.fasterxml.jackson.annotation.JsonInclude;
import com.github.levin81.daelic.druid.datasource.DataSource;
import com.github.levin81.daelic.druid.datasource.TableDataSource;
import com.github.levin81.daelic.druid.dimension.DefaultDimension;
import com.github.levin81.daelic.druid.dimension.Dimension;
import com.github.levin81.daelic.druid.granularity.Granularity;
import java.util.ArrayList;
import java.util.List;
package com.github.levin81.daelic.druid;



@JsonInclude(JsonInclude.Include.NON_NULL)
public class Select {

    private final String type = "select";

    private DataSource dataSource;
    private Boolean descending;
    private List<Dimension> dimensions;
    private List<String> metrics;
    private Granularity granularity;
    private List<Interval> intervals;
    private PagingSpec pagingSpec;

    Select(DataSource dataSource, Boolean descending, List<Dimension> dimensions, List<String> metrics,
// Path: src/main/java/com/github/levin81/daelic/druid/datasource/DataSource.java
// public interface DataSource {
//     String getType();
// }
// 
// Path: src/main/java/com/github/levin81/daelic/druid/datasource/TableDataSource.java
// @JsonInclude(JsonInclude.Include.NON_NULL)
// public class TableDataSource implements DataSource {
// 
//     private final String type = "table";
// 
//     private String name;
// 
//     TableDataSource(String name) {
//         Properties.assertRequired(name, "Name is a required property");
//         this.name = name;
//     }
// 
//     @Override
//     public String getType() {
//         return type;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public static TableDataSourceBuilder builder() {
//         return new TableDataSourceBuilder();
//     }
// 
//     public static class TableDataSourceBuilder {
//         private String name;
// 
//         TableDataSourceBuilder() {
// 
//         }
// 
//         public TableDataSourceBuilder withName(String name) {
//             this.name = name;
//             return this;
//         }
// 
//         public TableDataSource build() {
//             return new TableDataSource(name);
//         }
//     }
// }
// 
// Path: src/main/java/com/github/levin81/daelic/druid/dimension/DefaultDimension.java
// @JsonInclude(JsonInclude.Include.NON_NULL)
// public class DefaultDimension implements Dimension {
// 
//     private final String type = "default";
// 
//     private String dimension;
//     private String outputName;
// 
//     DefaultDimension(String dimension, String outputName) {
//         Properties.assertRequired(dimension, "Dimension is a required property");
// 
//         this.dimension = dimension;
//         this.outputName = outputName;
//     }
// 
//     @Override
//     public String getType() {
//         return type;
//     }
// 
//     public String getDimension() {
//         return dimension;
//     }
// 
//     public String getOutputName() {
//         return outputName;
//     }
// 
//     public static DefaultDimensionBuilder builder() {
//         return new DefaultDimensionBuilder();
//     }
// 
//     public static class DefaultDimensionBuilder {
// 
//         private String dimension;
//         private String outputName;
// 
//         DefaultDimensionBuilder() {
// 
//         }
// 
//         public DefaultDimensionBuilder withDimension(String dimension) {
//             this.dimension = dimension;
//             return this;
//         }
// 
//         public DefaultDimensionBuilder withOutputName(String outputName) {
//             this.outputName = outputName;
//             return this;
//         }
// 
//         public DefaultDimension build() {
//             return new DefaultDimension(dimension, outputName);
//         }
//     }
// }
// 
// Path: src/main/java/com/github/levin81/daelic/druid/dimension/Dimension.java
// public interface Dimension {
//     String getType();
// }
// 
// Path: src/main/java/com/github/levin81/daelic/druid/granularity/Granularity.java
// public interface Granularity {
//     String getType();
// }


// Path: src/main/java/com/github/levin81/daelic/druid/Select.java
import com.fasterxml.jackson.annotation.JsonInclude;
import com.github.levin81.daelic.druid.datasource.DataSource;
import com.github.levin81.daelic.druid.datasource.TableDataSource;
import com.github.levin81.daelic.druid.dimension.DefaultDimension;
import com.github.levin81.daelic.druid.dimension.Dimension;
import com.github.levin81.daelic.druid.granularity.Granularity;
import java.util.ArrayList;
import java.util.List;

package com.github.levin81.daelic.druid;



@JsonInclude(JsonInclude.Include.NON_NULL)
public class Select {

    private final String type = "select";

    private DataSource dataSource;
    private Boolean descending;
    private List<Dimension> dimensions;
    private List<String> metrics;
    private Granularity granularity;
    private List<Interval> intervals;
    private PagingSpec pagingSpec;

    Select(DataSource dataSource, Boolean descending, List<Dimension> dimensions, List<String> metrics,
           Granularity granularity, List<Interval> intervals, PagingSpec pagingSpec) {