class TLSConfig {

        private SSLProvider providerType;
        private KeyStoreType keyStoreType;
        private String keyStorePassword;
        private String keyManagerPassword;
        private String jksPath;
        private int sslPort;

        private TLSConfig() {}

        public void port(int port) {
            this.sslPort = port;
            validatePort(port);
        }

        public void sslProvider(SSLProvider providerType) {
            this.providerType = providerType;
        }

        public void jksPath(String jksPath) {
            this.jksPath = jksPath;
        }

        public void jksPath(Path jksPath) {
            jksPath(jksPath.toAbsolutePath().toString());
        }

        public void keyStoreType(KeyStoreType keyStoreType) {
            this.keyStoreType = keyStoreType;
        }

        /**
         * @param keyStorePassword the password to access the KeyStore
         * */
        public void keyStorePassword(String keyStorePassword) {
            this.keyStorePassword = keyStorePassword;
        }

        /**
         * @param keyManagerPassword the password to access the key manager.
         * */
        public void keyManagerPassword(String keyManagerPassword) {
            this.keyManagerPassword = keyManagerPassword;
        }

        private String getSslProvider() {
            return providerType.name().toLowerCase(Locale.ROOT);
        }

        private String getJksPath() {
            return jksPath;
        }

        private String getKeyStoreType() {
            return keyStoreType.name().toLowerCase(Locale.ROOT);
        }
    }

    public FluentConfig withTLS(Consumer<TLSConfig> tlsBlock) {
        tlsConfig = new TLSConfig();
        tlsBlock.accept(tlsConfig);
        configAccumulator.put(SSL_PORT_PROPERTY_NAME, Integer.toString(tlsConfig.sslPort));
        configAccumulator.put(SSL_PROVIDER, tlsConfig.getSslProvider());
        configAccumulator.put(JKS_PATH_PROPERTY_NAME, tlsConfig.getJksPath());
        configAccumulator.put(KEY_STORE_TYPE, tlsConfig.getKeyStoreType());
        configAccumulator.put(KEY_STORE_PASSWORD_PROPERTY_NAME, tlsConfig.keyStorePassword);
        configAccumulator.put(KEY_MANAGER_PASSWORD_PROPERTY_NAME, tlsConfig.keyManagerPassword);

        return this;
    }

    public IConfig build() {<FILL_FUNCTION_BODY>

        if (creationKind != CreationKind.API) {
            throw new IllegalStateException("Can't build a configuration started directly by the server, use startServer method instead");
        }
        return new MemoryConfig(configAccumulator);
    
<no_super_class>