// Path: src/main/java/com/webfluxclient/LogLevel.java
// public enum LogLevel {
//     /** No logs. */
//     NONE,
// 
//     /**
//      * Logs request and response lines.
//      *
//      * <p>Example:
//      * <pre>{@code
//      * --> POST /hello
//      * Content-Type: application/json
//      *
//      * <-- 200 OK POST /hello (22ms)
//      * }</pre>
//      */
//     BASIC,
// 
//     /**
//      * Logs request and response lines and their respective headers.
//      *
//      * <p>Example:
//      * <pre>{@code
//      * --> POST /hello
//      * Content-Type: plain/text
//      * Headers:
//      * - Accept-Language: en
//      * - Accept-Charset: UTF-8
//      * --> END POST
//      *
//      * <-- 200 OK POST /hello (22ms)
//      * Headers:
//      * - Content-Type: plain/text
//      * <-- END HTTP
//      * }</pre>
//      */
//     HEADERS
// }
// 
// Path: src/main/java/com/webfluxclient/Logger.java
// public interface Logger {
//     void log(Supplier<String> messageSupplier);
//     void log(String message);
// }
// 
// Path: src/main/java/com/webfluxclient/RequestProcessor.java
// @FunctionalInterface
// public interface RequestProcessor {
// 
//     ClientRequest process(ClientRequest request);
// 
//     default RequestProcessor andThen(RequestProcessor after) {
//         Assert.notNull(after, "");
//         return request -> after.process(process(request));
//     }
// }
// 
// Path: src/main/java/com/webfluxclient/ResponseProcessor.java
// @FunctionalInterface
// public interface ResponseProcessor {
// 
//     ClientResponse process(ClientResponse clientResponse);
// 
//     default ResponseProcessor andThen(ResponseProcessor after) {
//         Assert.notNull(after, "");
//         return request -> after.process(process(request));
//     }
// }


import com.webfluxclient.LogLevel;
import com.webfluxclient.Logger;
import com.webfluxclient.RequestProcessor;
import com.webfluxclient.ResponseProcessor;
import org.springframework.http.HttpHeaders;
import org.springframework.util.Assert;
import org.springframework.web.reactive.function.client.ClientRequest;
import org.springframework.web.reactive.function.client.ClientResponse;
import org.springframework.web.reactive.function.client.ExchangeFilterFunction;
import org.springframework.web.reactive.function.client.ExchangeFunction;
import reactor.core.publisher.Mono;
import java.util.concurrent.TimeUnit;
import static org.springframework.web.reactive.function.client.ExchangeFilterFunction.ofRequestProcessor;
import static org.springframework.web.reactive.function.client.ExchangeFilterFunction.ofResponseProcessor;
package com.webfluxclient.client;




class ExchangeFilterFunctions {

    static ExchangeFilterFunction requestProcessorFilter(RequestProcessor requestProcessor) {
        return ofRequestProcessor(clientRequest -> Mono.just(requestProcessor.process(clientRequest)));
    }

// Path: src/main/java/com/webfluxclient/LogLevel.java
// public enum LogLevel {
//     /** No logs. */
//     NONE,
// 
//     /**
//      * Logs request and response lines.
//      *
//      * <p>Example:
//      * <pre>{@code
//      * --> POST /hello
//      * Content-Type: application/json
//      *
//      * <-- 200 OK POST /hello (22ms)
//      * }</pre>
//      */
//     BASIC,
// 
//     /**
//      * Logs request and response lines and their respective headers.
//      *
//      * <p>Example:
//      * <pre>{@code
//      * --> POST /hello
//      * Content-Type: plain/text
//      * Headers:
//      * - Accept-Language: en
//      * - Accept-Charset: UTF-8
//      * --> END POST
//      *
//      * <-- 200 OK POST /hello (22ms)
//      * Headers:
//      * - Content-Type: plain/text
//      * <-- END HTTP
//      * }</pre>
//      */
//     HEADERS
// }
// 
// Path: src/main/java/com/webfluxclient/Logger.java
// public interface Logger {
//     void log(Supplier<String> messageSupplier);
//     void log(String message);
// }
// 
// Path: src/main/java/com/webfluxclient/RequestProcessor.java
// @FunctionalInterface
// public interface RequestProcessor {
// 
//     ClientRequest process(ClientRequest request);
// 
//     default RequestProcessor andThen(RequestProcessor after) {
//         Assert.notNull(after, "");
//         return request -> after.process(process(request));
//     }
// }
// 
// Path: src/main/java/com/webfluxclient/ResponseProcessor.java
// @FunctionalInterface
// public interface ResponseProcessor {
// 
//     ClientResponse process(ClientResponse clientResponse);
// 
//     default ResponseProcessor andThen(ResponseProcessor after) {
//         Assert.notNull(after, "");
//         return request -> after.process(process(request));
//     }
// }


// Path: src/main/java/com/webfluxclient/client/ExchangeFilterFunctions.java
import com.webfluxclient.LogLevel;
import com.webfluxclient.Logger;
import com.webfluxclient.RequestProcessor;
import com.webfluxclient.ResponseProcessor;
import org.springframework.http.HttpHeaders;
import org.springframework.util.Assert;
import org.springframework.web.reactive.function.client.ClientRequest;
import org.springframework.web.reactive.function.client.ClientResponse;
import org.springframework.web.reactive.function.client.ExchangeFilterFunction;
import org.springframework.web.reactive.function.client.ExchangeFunction;
import reactor.core.publisher.Mono;
import java.util.concurrent.TimeUnit;
import static org.springframework.web.reactive.function.client.ExchangeFilterFunction.ofRequestProcessor;
import static org.springframework.web.reactive.function.client.ExchangeFilterFunction.ofResponseProcessor;

package com.webfluxclient.client;




class ExchangeFilterFunctions {

    static ExchangeFilterFunction requestProcessorFilter(RequestProcessor requestProcessor) {
        return ofRequestProcessor(clientRequest -> Mono.just(requestProcessor.process(clientRequest)));
    }

    static ExchangeFilterFunction responseInterceptorFilter(ResponseProcessor responseProcessor) {