package com.boundary.metrics.vmware;

import com.boundary.metrics.vmware.client.client.meter.manager.MeterManagerClient;
import com.boundary.metrics.vmware.client.client.metrics.MetricsClient;
import com.boundary.metrics.vmware.poller.MonitoredEntity;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.sun.jersey.api.client.Client;
import io.dropwizard.Configuration;
import io.dropwizard.client.JerseyClientConfiguration;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.net.URI;
import java.util.List;

public class VMwarePerfAdapterConfiguration extends Configuration {

    static class MeterManagerConfiguration {
        @NotNull
        @JsonProperty
        private URI baseUri = URI.create("https://api.boundary.com");

        @NotEmpty
        @JsonProperty
        private String apiKey;

        public URI getBaseUri() { return baseUri; }

        public String getApiKey() {
            return apiKey;
        }

        public MeterManagerClient build(Client httpClient) {
            return new MeterManagerClient(httpClient, getBaseUri(), getApiKey());
        }
    }

    static class MetricClientConfiguration {
        @NotNull
        @JsonProperty
        private URI baseUri = URI.create("https://metrics-api.boundary.com");

        public URI getBaseUri() { return baseUri; }

        @JsonProperty
        @NotEmpty
        private String apiKey;

        public String getApiKey() {
            return apiKey;
        }

        public MetricsClient build(Client httpClient) {
            return new MetricsClient(httpClient, getBaseUri(), apiKey);
        }
    }

    @JsonProperty
    @Valid
    @NotNull
    private List<MonitoredEntity> monitoredEntities;

    public List<MonitoredEntity> getMonitoredEntities() {
        return monitoredEntities;
    }

    @Valid
    @NotNull
    @JsonProperty
    private JerseyClientConfiguration client = new JerseyClientConfiguration();

    public JerseyClientConfiguration getClient() { return client; }

    @JsonProperty
    @Valid
    @NotNull
    private MeterManagerConfiguration meterManagerClient = new MeterManagerConfiguration();

    public MeterManagerConfiguration getMeterManagerClient() {
        return meterManagerClient;
    }

    @JsonProperty
    @Valid
    @NotNull
    private MetricClientConfiguration metricsClient = new MetricClientConfiguration();

    public MetricClientConfiguration getMetricsClient() {
        return metricsClient;
    }

    @JsonProperty
    @NotEmpty
    private String orgId;

    public String getOrgId() {
        return orgId;
    }
}

@@ -336,24 +336,25 @@
 ent.Client;%0A
+%0A
 import io.dr
@@ -428,24 +428,25 @@
 figuration;%0A
+%0A
 import org.h
@@ -563,16 +563,17 @@
 otNull;%0A
+%0A
 import j
@@ -609,16 +609,85 @@
 .List;%0A%0A
+/**%0A * Handles configuration of the VMware Adapter Configuration%0A */%0A
 public c
@@ -1864,16 +1864,116 @@
 ities;%0A%0A
+    /**%0A     * Returns a list of monitoried entities%0A     * @return %7B@link MonitoredEntity%7D%0A     */%0A
     publ
@@ -2178,32 +2178,144 @@
 nfiguration();%0A%0A
+    /**%0A     * Returns the Jesery client configuration%0A     * @return %7B@link JerseyClientConfiguration%7D%0A     */%0A
     public Jerse
@@ -2494,32 +2494,152 @@
 nfiguration();%0A%0A
+    /**%0A     * Returns the meter manager configuration%0A     * %0A     * @return %7B@link MeterManagerConfiguration%7D%0A     */%0A
     public Meter
@@ -2852,25 +2852,191 @@
 guration();%0A
+    %0A    /**%0A     * Returns the %7B@link MetricClientConfiguration%7D instances associated from the configuration%0A     * @return %7B@link MetricClientConfiguration%7D%0A     */
 %0A
-
     public M
@@ -3177,16 +3177,125 @@
 orgId;%0A%0A
+    /**%0A     * Returns the Boundary organization id associated with the metric client%0A     * @return%0A     */%0A
     publ

Add JavaDoc to methods