package com.airbnb.airpal;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.airlift.units.DataSize;
import io.dropwizard.Configuration;
import io.dropwizard.db.DataSourceFactory;
import io.dropwizard.util.Duration;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.secnod.dropwizard.shiro.ShiroConfiguration;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

import java.net.URI;
import java.util.List;

public class AirpalConfiguration extends Configuration
{
    @Getter
    @Setter
    @JsonProperty
    private URI prestoCoordinator = null;

    @Getter
    @Setter
    @JsonProperty
    @NotNull
    private String prestoUser = "andykram";

    @Getter
    @Setter
    @JsonProperty
    @NotNull
    private String prestoSource = "airpal";

    @Getter
    @Setter
    @JsonProperty
    @NotNull
    private String prestoCatalog = "hive";

    @Getter
    @Setter
    @JsonProperty
    @NotNull
    private String prestoSchema = "default";

    @Getter
    @Setter
    @JsonProperty
    @NotNull
    private boolean prestoDebug = false;

    @Getter
    @Setter
    @JsonProperty
    @NotNull
    private Duration usageWindow = Duration.hours(6);

    @Getter
    @Setter
    @JsonProperty
    @NotNull
    private String s3SecretKey;

    @Getter
    @Setter
    @JsonProperty
    @NotNull
    private String s3AccessKey;

    @Getter
    @Setter
    @JsonProperty
    @NotNull
    private String s3Bucket;

    @Getter
    @Setter
    @JsonProperty
    @NotNull
    private HiveMetastoreConfiguration metaStoreConfiguration;

    @Getter
    @Setter
    @JsonProperty
    @NotNull
    private List<URI> airpalHosts;

    @Getter
    @Setter
    private DataSize bufferSize = DataSize.valueOf("512kB");

    @Getter
    @Setter
    @Valid
    @JsonProperty
    @NotNull
    private DataSourceFactory dataSourceFactory = new DataSourceFactory();

    @Getter
    @Setter
    @Valid
    @JsonProperty
    @NotNull
    private ShiroConfiguration shiro;

    public static class ElasticSearchConfiguration
    {
        @Getter
        @JsonProperty
        @NotNull
        private final List<String> hosts;

        @Getter
        @JsonProperty
        @NotNull
        private final String clusterName;

        @Getter
        @JsonProperty
        @NotNull
        private final Boolean multicastEnabled;

        @JsonCreator
        public ElasticSearchConfiguration(@JsonProperty("hosts") List<String> hosts,
                                          @JsonProperty("clusterName") String clusterName,
                                          @JsonProperty("multicastEnabled") Boolean multicastEnabled)
        {
            this.hosts = hosts;
            this.clusterName = clusterName;
            this.multicastEnabled = multicastEnabled;
        }
    }

    @AllArgsConstructor
    @NoArgsConstructor
    public static class HiveMetastoreConfiguration
    {
        @Getter
        @Setter
        @JsonProperty
        @NotNull
        private String driverName;

        @Getter
        @Setter
        @JsonProperty
        @NotNull
        private String connectionUrl;

        @Getter
        @Setter
        @JsonProperty
        @NotNull
        private String userName;

        @Getter
        @Setter
        @JsonProperty
        @NotNull
        private String password;
    }
}

@@ -25,61 +25,8 @@
 l;%0A%0A
-import com.fasterxml.jackson.annotation.JsonCreator;%0A
 impo
@@ -2070,821 +2070,8 @@
 o;%0A%0A
-    public static class ElasticSearchConfiguration%0A    %7B%0A        @Getter%0A        @JsonProperty%0A        @NotNull%0A        private final List%3CString%3E hosts;%0A%0A        @Getter%0A        @JsonProperty%0A        @NotNull%0A        private final String clusterName;%0A%0A        @Getter%0A        @JsonProperty%0A        @NotNull%0A        private final Boolean multicastEnabled;%0A%0A        @JsonCreator%0A        public ElasticSearchConfiguration(@JsonProperty(%22hosts%22) List%3CString%3E hosts,%0A                                          @JsonProperty(%22clusterName%22) String clusterName,%0A                                          @JsonProperty(%22multicastEnabled%22) Boolean multicastEnabled)%0A        %7B%0A            this.hosts = hosts;%0A            this.clusterName = clusterName;%0A            this.multicastEnabled = multicastEnabled;%0A        %7D%0A    %7D%0A%0A
     

Remove unused class