// Path: core/src/main/java/io/appflate/restmock/logging/NOOpLogger.java
// public class NOOpLogger implements RESTMockLogger {
// 
//     @Override
//     public void log(String message) {
//         //intentionally empty
//     }
// 
//     @Override
//     public void error(String errorMessage) {
//         //intentionally empty
//     }
// 
//     @Override
//     public void error(String errorMessage, Throwable exception) {
//         //intentionally empty
//     }
// }
// 
// Path: core/src/main/java/io/appflate/restmock/logging/RESTMockLogger.java
// public interface RESTMockLogger {
// 
//     void log(String message);
// 
//     void error(String errorMessage);
// 
//     void error(String errorMessage, Throwable exception);
// }
// 
// Path: core/src/main/java/io/appflate/restmock/utils/RequestMatchers.java
// public static RequestMatcher isDELETE() {
//     return httpMethodIs("DELETE");
// }
// 
// Path: core/src/main/java/io/appflate/restmock/utils/RequestMatchers.java
// public static RequestMatcher isGET() {
//     return httpMethodIs("GET");
// }
// 
// Path: core/src/main/java/io/appflate/restmock/utils/RequestMatchers.java
// public static RequestMatcher isHEAD() {
//     return httpMethodIs("HEAD");
// }
// 
// Path: core/src/main/java/io/appflate/restmock/utils/RequestMatchers.java
// public static RequestMatcher isPATCH() {
//     return httpMethodIs("PATCH");
// }
// 
// Path: core/src/main/java/io/appflate/restmock/utils/RequestMatchers.java
// public static RequestMatcher isPOST() {
//     return httpMethodIs("POST");
// }
// 
// Path: core/src/main/java/io/appflate/restmock/utils/RequestMatchers.java
// public static RequestMatcher isPUT() {
//     return httpMethodIs("PUT");
// }


import static io.appflate.restmock.utils.RequestMatchers.isPUT;
import static org.hamcrest.core.AllOf.allOf;
import io.appflate.restmock.logging.NOOpLogger;
import io.appflate.restmock.logging.RESTMockLogger;
import java.io.IOException;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.X509TrustManager;
import okhttp3.mockwebserver.MockWebServer;
import okhttp3.mockwebserver.RecordedRequest;
import org.hamcrest.Matcher;
import static io.appflate.restmock.utils.RequestMatchers.isDELETE;
import static io.appflate.restmock.utils.RequestMatchers.isGET;
import static io.appflate.restmock.utils.RequestMatchers.isHEAD;
import static io.appflate.restmock.utils.RequestMatchers.isPATCH;
import static io.appflate.restmock.utils.RequestMatchers.isPOST;
        return socketFactory;
    }

    public static X509TrustManager getTrustManager() {
        return trustManager;
    }

    public static RESTMockLogger getLogger() {
        return logger;
    }

    public synchronized static void init(RESTMockFileParser restMockFileParser, RESTMockLogger logger) throws IOException {
        init(restMockFileParser, logger, new RESTMockOptions.Builder().build());
    }

    public synchronized static void init(RESTMockFileParser restMockFileParser, RESTMockLogger logger, RESTMockOptions restMockOptions)
        throws IOException {
        if (RESTMockServer.mockWebServer != null) {
            RESTMockServer.shutdown();
        }
        RESTMockServer.mockWebServer = new MockWebServer();
        if (logger != null) {
            RESTMockServer.logger = logger;
        }
        setUpHttps(restMockOptions);

        RESTMockServer.getLogger().log("## Starting RESTMock server...");
        RESTMockServer.dispatcher = new MatchableCallsRequestDispatcher();
        RESTMockServer.mockWebServer.setDispatcher(dispatcher);
        RESTMockServer.mockWebServer.start();
// Path: core/src/main/java/io/appflate/restmock/logging/NOOpLogger.java
// public class NOOpLogger implements RESTMockLogger {
// 
//     @Override
//     public void log(String message) {
//         //intentionally empty
//     }
// 
//     @Override
//     public void error(String errorMessage) {
//         //intentionally empty
//     }
// 
//     @Override
//     public void error(String errorMessage, Throwable exception) {
//         //intentionally empty
//     }
// }
// 
// Path: core/src/main/java/io/appflate/restmock/logging/RESTMockLogger.java
// public interface RESTMockLogger {
// 
//     void log(String message);
// 
//     void error(String errorMessage);
// 
//     void error(String errorMessage, Throwable exception);
// }
// 
// Path: core/src/main/java/io/appflate/restmock/utils/RequestMatchers.java
// public static RequestMatcher isDELETE() {
//     return httpMethodIs("DELETE");
// }
// 
// Path: core/src/main/java/io/appflate/restmock/utils/RequestMatchers.java
// public static RequestMatcher isGET() {
//     return httpMethodIs("GET");
// }
// 
// Path: core/src/main/java/io/appflate/restmock/utils/RequestMatchers.java
// public static RequestMatcher isHEAD() {
//     return httpMethodIs("HEAD");
// }
// 
// Path: core/src/main/java/io/appflate/restmock/utils/RequestMatchers.java
// public static RequestMatcher isPATCH() {
//     return httpMethodIs("PATCH");
// }
// 
// Path: core/src/main/java/io/appflate/restmock/utils/RequestMatchers.java
// public static RequestMatcher isPOST() {
//     return httpMethodIs("POST");
// }
// 
// Path: core/src/main/java/io/appflate/restmock/utils/RequestMatchers.java
// public static RequestMatcher isPUT() {
//     return httpMethodIs("PUT");
// }


// Path: core/src/main/java/io/appflate/restmock/RESTMockServer.java
import static io.appflate.restmock.utils.RequestMatchers.isPUT;
import static org.hamcrest.core.AllOf.allOf;
import io.appflate.restmock.logging.NOOpLogger;
import io.appflate.restmock.logging.RESTMockLogger;
import java.io.IOException;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.X509TrustManager;
import okhttp3.mockwebserver.MockWebServer;
import okhttp3.mockwebserver.RecordedRequest;
import org.hamcrest.Matcher;
import static io.appflate.restmock.utils.RequestMatchers.isDELETE;
import static io.appflate.restmock.utils.RequestMatchers.isGET;
import static io.appflate.restmock.utils.RequestMatchers.isHEAD;
import static io.appflate.restmock.utils.RequestMatchers.isPATCH;
import static io.appflate.restmock.utils.RequestMatchers.isPOST;

        return socketFactory;
    }

    public static X509TrustManager getTrustManager() {
        return trustManager;
    }

    public static RESTMockLogger getLogger() {
        return logger;
    }

    public synchronized static void init(RESTMockFileParser restMockFileParser, RESTMockLogger logger) throws IOException {
        init(restMockFileParser, logger, new RESTMockOptions.Builder().build());
    }

    public synchronized static void init(RESTMockFileParser restMockFileParser, RESTMockLogger logger, RESTMockOptions restMockOptions)
        throws IOException {
        if (RESTMockServer.mockWebServer != null) {
            RESTMockServer.shutdown();
        }
        RESTMockServer.mockWebServer = new MockWebServer();
        if (logger != null) {
            RESTMockServer.logger = logger;
        }
        setUpHttps(restMockOptions);

        RESTMockServer.getLogger().log("## Starting RESTMock server...");
        RESTMockServer.dispatcher = new MatchableCallsRequestDispatcher();
        RESTMockServer.mockWebServer.setDispatcher(dispatcher);
        RESTMockServer.mockWebServer.start();
        RESTMockServer.serverBaseUrl = mockWebServer.url("/").toString();