// 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;
    @Parameter(
            names = {"--help", "-h"},
            help = true,
            description = "display this help and exit")
    private boolean help;

    @Override
    public boolean isHelp() {
        return help;
    }

    public void dump() {
        LOGGER.debug("localAddress={}", localAddress);
        LOGGER.debug("targetHost={}", targetHost);
        LOGGER.debug("targetPort={}", targetPort);
        LOGGER.debug("maxRequestCountPerSecond={}", maxRequestCountPerSecond);
        LOGGER.debug("threadCount={}", threadCount);
        LOGGER.debug("requestTimeoutSeconds={}", requestTimeoutSeconds);
        LOGGER.debug("rampUpDurationSeconds={}", rampUpDurationSeconds);
        LOGGER.debug("totalDurationSeconds={}", totalDurationSeconds);
        LOGGER.debug("replayOnce={}", replayOnce);
        LOGGER.debug("inputUri={}", inputUri);
        LOGGER.debug("jtlOutputFile={}", jtlOutputFile);
        LOGGER.debug("metricsOutputFile={}", metricsOutputFile);
        LOGGER.debug("metricsOutputPeriodSeconds={}", metricsOutputPeriodSeconds);
        LOGGER.debug("loggerLevelSpecs={}", loggerLevelSpecs);
        LOGGER.debug("redirectStrategy={}", redirectStrategy);
    }

    public static Config of(String[] args) {
// 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;

    @Parameter(
            names = {"--help", "-h"},
            help = true,
            description = "display this help and exit")
    private boolean help;

    @Override
    public boolean isHelp() {
        return help;
    }

    public void dump() {
        LOGGER.debug("localAddress={}", localAddress);
        LOGGER.debug("targetHost={}", targetHost);
        LOGGER.debug("targetPort={}", targetPort);
        LOGGER.debug("maxRequestCountPerSecond={}", maxRequestCountPerSecond);
        LOGGER.debug("threadCount={}", threadCount);
        LOGGER.debug("requestTimeoutSeconds={}", requestTimeoutSeconds);
        LOGGER.debug("rampUpDurationSeconds={}", rampUpDurationSeconds);
        LOGGER.debug("totalDurationSeconds={}", totalDurationSeconds);
        LOGGER.debug("replayOnce={}", replayOnce);
        LOGGER.debug("inputUri={}", inputUri);
        LOGGER.debug("jtlOutputFile={}", jtlOutputFile);
        LOGGER.debug("metricsOutputFile={}", metricsOutputFile);
        LOGGER.debug("metricsOutputPeriodSeconds={}", metricsOutputPeriodSeconds);
        LOGGER.debug("loggerLevelSpecs={}", loggerLevelSpecs);
        LOGGER.debug("redirectStrategy={}", redirectStrategy);
    }

    public static Config of(String[] args) {
        return JCommanderConfigs.create(args, new Config());