// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package _specs_.azure.clientgenerator.core.clientinitialization.defaultclient.generated;

// The Java test files under 'generated' package are generated for your reference.
// If you wish to modify these files, please copy them out of the 'generated' package, and modify there.
// See https://aka.ms/azsdk/dpg/java/tests for guide on adding a test.

import _specs_.azure.clientgenerator.core.clientinitialization.defaultclient.HeaderParamClient;
import _specs_.azure.clientgenerator.core.clientinitialization.defaultclient.HeaderParamClientBuilder;
import _specs_.azure.clientgenerator.core.clientinitialization.defaultclient.MixedParamsClient;
import _specs_.azure.clientgenerator.core.clientinitialization.defaultclient.MixedParamsClientBuilder;
import _specs_.azure.clientgenerator.core.clientinitialization.defaultclient.MultipleParamsClient;
import _specs_.azure.clientgenerator.core.clientinitialization.defaultclient.MultipleParamsClientBuilder;
import _specs_.azure.clientgenerator.core.clientinitialization.defaultclient.ParamAliasClient;
import _specs_.azure.clientgenerator.core.clientinitialization.defaultclient.ParamAliasClientBuilder;
import _specs_.azure.clientgenerator.core.clientinitialization.defaultclient.PathParamClient;
import _specs_.azure.clientgenerator.core.clientinitialization.defaultclient.PathParamClientBuilder;
import _specs_.azure.clientgenerator.core.clientinitialization.defaultclient.QueryParamClient;
import _specs_.azure.clientgenerator.core.clientinitialization.defaultclient.QueryParamClientBuilder;
import com.azure.core.http.policy.HttpLogDetailLevel;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.test.TestMode;
import com.azure.core.test.TestProxyTestBase;
import com.azure.core.util.Configuration;

class HeaderParamClientTestBase extends TestProxyTestBase {
    protected HeaderParamClient headerParamClient;

    protected MultipleParamsClient multipleParamsClient;

    protected MixedParamsClient mixedParamsClient;

    protected PathParamClient pathParamClient;

    protected ParamAliasClient paramAliasClient;

    protected QueryParamClient queryParamClient;

    @Override
    protected void beforeTest() {
        HeaderParamClientBuilder headerParamClientbuilder = new HeaderParamClientBuilder()
            .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000"))
            .name(Configuration.getGlobalConfiguration().get("NAME", "name"))
            .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null)))
            .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC));
        if (getTestMode() == TestMode.RECORD) {
            headerParamClientbuilder.addPolicy(interceptorManager.getRecordPolicy());
        }
        headerParamClient = headerParamClientbuilder.buildClient();

        MultipleParamsClientBuilder multipleParamsClientbuilder = new MultipleParamsClientBuilder()
            .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000"))
            .name(Configuration.getGlobalConfiguration().get("NAME", "name"))
            .region(Configuration.getGlobalConfiguration().get("REGION", "region"))
            .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null)))
            .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC));
        if (getTestMode() == TestMode.RECORD) {
            multipleParamsClientbuilder.addPolicy(interceptorManager.getRecordPolicy());
        }
        multipleParamsClient = multipleParamsClientbuilder.buildClient();

        MixedParamsClientBuilder mixedParamsClientbuilder = new MixedParamsClientBuilder()
            .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000"))
            .name(Configuration.getGlobalConfiguration().get("NAME", "name"))
            .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null)))
            .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC));
        if (getTestMode() == TestMode.RECORD) {
            mixedParamsClientbuilder.addPolicy(interceptorManager.getRecordPolicy());
        }
        mixedParamsClient = mixedParamsClientbuilder.buildClient();

        PathParamClientBuilder pathParamClientbuilder = new PathParamClientBuilder()
            .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000"))
            .blobName(Configuration.getGlobalConfiguration().get("BLOBNAME", "blobname"))
            .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null)))
            .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC));
        if (getTestMode() == TestMode.RECORD) {
            pathParamClientbuilder.addPolicy(interceptorManager.getRecordPolicy());
        }
        pathParamClient = pathParamClientbuilder.buildClient();

        ParamAliasClientBuilder paramAliasClientbuilder = new ParamAliasClientBuilder()
            .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000"))
            .blobName(Configuration.getGlobalConfiguration().get("BLOBNAME", "blobname"))
            .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null)))
            .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC));
        if (getTestMode() == TestMode.RECORD) {
            paramAliasClientbuilder.addPolicy(interceptorManager.getRecordPolicy());
        }
        paramAliasClient = paramAliasClientbuilder.buildClient();

        QueryParamClientBuilder queryParamClientbuilder = new QueryParamClientBuilder()
            .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000"))
            .blobName(Configuration.getGlobalConfiguration().get("BLOBNAME", "blobname"))
            .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null)))
            .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC));
        if (getTestMode() == TestMode.RECORD) {
            queryParamClientbuilder.addPolicy(interceptorManager.getRecordPolicy());
        }
        queryParamClient = queryParamClientbuilder.buildClient();

    }
}
