// Path: src/main/java/kafka/common/Config.java
// public abstract class Config {
//     public  static  void validateChars(String prop, String value) {
//         String legalChars = "[a-zA-Z0-9\\._\\-]";
//         Pattern rgx = Pattern.compile(legalChars + "*");
// 
//         Matcher matcher = rgx.matcher(value);
//         if (!matcher.find()) {
//             throw new InvalidConfigException(prop + " " + value + " is illegal, contains a character other than ASCII alphanumerics, '.', '_' and '-'");
//         }
// 
//         String t = matcher.group();
// 
//         if (!t.equals(value))
//             throw new InvalidConfigException(prop + " " + value + " is illegal, contains a character other than ASCII alphanumerics, '.', '_' and '-'");
//     }
// }
// 
// Path: src/main/java/kafka/message/NoCompressionCodec.java
// public class NoCompressionCodec implements CompressionCodec {
//     public static final CompressionCodec instance = new NoCompressionCodec();
// 
//     @Override
//     public int codec() {
//         return 0;
//     }
// 
//     @Override
//     public String name() {
//         return "none";
//     }
// }


import kafka.common.Config;
import kafka.common.InvalidConfigException;
import kafka.message.CompressionCodec;
import kafka.message.CompressionCodecs;
import kafka.message.NoCompressionCodec;
import kafka.producer.async.AsyncProducerConfig;
import kafka.utils.Utils;
import kafka.utils.VerifiableProperties;
import java.util.List;
import java.util.Properties;
package kafka.producer;



public class ProducerConfig extends AsyncProducerConfig {
    public static void validate(ProducerConfig config) {
        validateClientId(config.clientId);
        validateBatchSize(config.batchNumMessages, config.queueBufferingMaxMessages);
        validateProducerType(config.producerType);
    }

    public static void validateClientId(String clientId) {
// Path: src/main/java/kafka/common/Config.java
// public abstract class Config {
//     public  static  void validateChars(String prop, String value) {
//         String legalChars = "[a-zA-Z0-9\\._\\-]";
//         Pattern rgx = Pattern.compile(legalChars + "*");
// 
//         Matcher matcher = rgx.matcher(value);
//         if (!matcher.find()) {
//             throw new InvalidConfigException(prop + " " + value + " is illegal, contains a character other than ASCII alphanumerics, '.', '_' and '-'");
//         }
// 
//         String t = matcher.group();
// 
//         if (!t.equals(value))
//             throw new InvalidConfigException(prop + " " + value + " is illegal, contains a character other than ASCII alphanumerics, '.', '_' and '-'");
//     }
// }
// 
// Path: src/main/java/kafka/message/NoCompressionCodec.java
// public class NoCompressionCodec implements CompressionCodec {
//     public static final CompressionCodec instance = new NoCompressionCodec();
// 
//     @Override
//     public int codec() {
//         return 0;
//     }
// 
//     @Override
//     public String name() {
//         return "none";
//     }
// }


// Path: src/main/java/kafka/producer/ProducerConfig.java
import kafka.common.Config;
import kafka.common.InvalidConfigException;
import kafka.message.CompressionCodec;
import kafka.message.CompressionCodecs;
import kafka.message.NoCompressionCodec;
import kafka.producer.async.AsyncProducerConfig;
import kafka.utils.Utils;
import kafka.utils.VerifiableProperties;
import java.util.List;
import java.util.Properties;

package kafka.producer;



public class ProducerConfig extends AsyncProducerConfig {
    public static void validate(ProducerConfig config) {
        validateClientId(config.clientId);
        validateBatchSize(config.batchNumMessages, config.queueBufferingMaxMessages);
        validateProducerType(config.producerType);
    }

    public static void validateClientId(String clientId) {
        Config.validateChars("client.id", clientId);