// Path: commons/src/main/java/com/vlkan/hrrs/commons/jcommander/JCommanderConfig.java
// public interface JCommanderConfig {
// 
//     boolean isHelp();
// 
// }
// 
// Path: commons/src/main/java/com/vlkan/hrrs/commons/jcommander/JCommanderConfigs.java
// public enum JCommanderConfigs {;
// 
//     public static <C extends JCommanderConfig> C create(String[] args, C config) {
//         JCommander jCommander = null;
//         try {
//             jCommander = new JCommander(config);
//             jCommander.parse(args);
//         } catch (ParameterException error) {
//             System.err.println(error.getMessage());
//             System.err.println("Run with --help, -h for the list of available parameters.");
//             System.exit(1);
//         }
//         if (config.isHelp()) {
//             jCommander.usage();
//             System.exit(0);
//         }
//         return config;
//     }
// 
// }
// 
// Path: replayer/src/main/java/com/vlkan/hrrs/replayer/http/ApacheHttpClientRedirectStrategy.java
// public enum ApacheHttpClientRedirectStrategy {
// 
//     NONE(null),
// 
//     DEFAULT(new DefaultRedirectStrategy()),
// 
//     LAX(new LaxRedirectStrategy());
// 
//     private final RedirectStrategy implementation;
// 
//     ApacheHttpClientRedirectStrategy(RedirectStrategy implementation) {
//         this.implementation = implementation;
//     }
// 
//     public RedirectStrategy getImplementation() {
//         return implementation;
//     }
// 
// }


import com.beust.jcommander.Parameter;
import com.vlkan.hrrs.commons.jcommander.JCommanderConfig;
import com.vlkan.hrrs.commons.jcommander.JCommanderConfigs;
import com.vlkan.hrrs.commons.jcommander.validator.*;
import com.vlkan.hrrs.replayer.http.ApacheHttpClientRedirectStrategy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.net.URI;
            description = "output file to dump Dropwizard metrics")
    private String metricsOutputFile;

    public String getMetricsOutputFile() {
        return metricsOutputFile;
    }

    @Parameter(
            names = {"--metricsOutputPeriodSeconds", "-mp"},
            validateWith = NonZeroPositiveIntegerValidator.class,
            description = "Dropwizard metrics report frequency in seconds")
    private int metricsOutputPeriodSeconds = 10;

    public int getMetricsOutputPeriodSeconds() {
        return metricsOutputPeriodSeconds;
    }

    @Parameter(
            names = {"--loggerLevelSpecs", "-L"},
            validateWith = LoggerLevelSpecsValidator.class,
            description = "comma-separated list of loggerName=loggerLevel pairs")
    private String loggerLevelSpecs = "*=warn,com.vlkan.hrrs=info";

    public String getLoggerLevelSpecs() {
        return loggerLevelSpecs;
    }

    @Parameter(
            names = {"--redirectStrategy", "-rs"},
            description = "redirect strategy")
// Path: commons/src/main/java/com/vlkan/hrrs/commons/jcommander/JCommanderConfig.java
// public interface JCommanderConfig {
// 
//     boolean isHelp();
// 
// }
// 
// Path: commons/src/main/java/com/vlkan/hrrs/commons/jcommander/JCommanderConfigs.java
// public enum JCommanderConfigs {;
// 
//     public static <C extends JCommanderConfig> C create(String[] args, C config) {
//         JCommander jCommander = null;
//         try {
//             jCommander = new JCommander(config);
//             jCommander.parse(args);
//         } catch (ParameterException error) {
//             System.err.println(error.getMessage());
//             System.err.println("Run with --help, -h for the list of available parameters.");
//             System.exit(1);
//         }
//         if (config.isHelp()) {
//             jCommander.usage();
//             System.exit(0);
//         }
//         return config;
//     }
// 
// }
// 
// Path: replayer/src/main/java/com/vlkan/hrrs/replayer/http/ApacheHttpClientRedirectStrategy.java
// public enum ApacheHttpClientRedirectStrategy {
// 
//     NONE(null),
// 
//     DEFAULT(new DefaultRedirectStrategy()),
// 
//     LAX(new LaxRedirectStrategy());
// 
//     private final RedirectStrategy implementation;
// 
//     ApacheHttpClientRedirectStrategy(RedirectStrategy implementation) {
//         this.implementation = implementation;
//     }
// 
//     public RedirectStrategy getImplementation() {
//         return implementation;
//     }
// 
// }


// Path: replayer/src/main/java/com/vlkan/hrrs/replayer/cli/Config.java
import com.beust.jcommander.Parameter;
import com.vlkan.hrrs.commons.jcommander.JCommanderConfig;
import com.vlkan.hrrs.commons.jcommander.JCommanderConfigs;
import com.vlkan.hrrs.commons.jcommander.validator.*;
import com.vlkan.hrrs.replayer.http.ApacheHttpClientRedirectStrategy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.net.URI;

            description = "output file to dump Dropwizard metrics")
    private String metricsOutputFile;

    public String getMetricsOutputFile() {
        return metricsOutputFile;
    }

    @Parameter(
            names = {"--metricsOutputPeriodSeconds", "-mp"},
            validateWith = NonZeroPositiveIntegerValidator.class,
            description = "Dropwizard metrics report frequency in seconds")
    private int metricsOutputPeriodSeconds = 10;

    public int getMetricsOutputPeriodSeconds() {
        return metricsOutputPeriodSeconds;
    }

    @Parameter(
            names = {"--loggerLevelSpecs", "-L"},
            validateWith = LoggerLevelSpecsValidator.class,
            description = "comma-separated list of loggerName=loggerLevel pairs")
    private String loggerLevelSpecs = "*=warn,com.vlkan.hrrs=info";

    public String getLoggerLevelSpecs() {
        return loggerLevelSpecs;
    }

    @Parameter(
            names = {"--redirectStrategy", "-rs"},
            description = "redirect strategy")
    private ApacheHttpClientRedirectStrategy redirectStrategy = ApacheHttpClientRedirectStrategy.DEFAULT;