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

package type.scalar.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 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;
import type.scalar.BooleanOperationClient;
import type.scalar.Decimal128TypeClient;
import type.scalar.Decimal128VerifyClient;
import type.scalar.DecimalTypeClient;
import type.scalar.DecimalVerifyClient;
import type.scalar.ScalarClientBuilder;
import type.scalar.StringOperationClient;
import type.scalar.UnknownClient;

class ScalarClientTestBase extends TestProxyTestBase {
    protected StringOperationClient stringOperationClient;

    protected BooleanOperationClient booleanOperationClient;

    protected UnknownClient unknownClient;

    protected DecimalTypeClient decimalTypeClient;

    protected Decimal128TypeClient decimal128TypeClient;

    protected DecimalVerifyClient decimalVerifyClient;

    protected Decimal128VerifyClient decimal128VerifyClient;

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

        ScalarClientBuilder booleanOperationClientbuilder = new ScalarClientBuilder()
            .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000"))
            .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null)))
            .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC));
        if (getTestMode() == TestMode.RECORD) {
            booleanOperationClientbuilder.addPolicy(interceptorManager.getRecordPolicy());
        }
        booleanOperationClient = booleanOperationClientbuilder.buildBooleanOperationClient();

        ScalarClientBuilder unknownClientbuilder = new ScalarClientBuilder()
            .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000"))
            .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null)))
            .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC));
        if (getTestMode() == TestMode.RECORD) {
            unknownClientbuilder.addPolicy(interceptorManager.getRecordPolicy());
        }
        unknownClient = unknownClientbuilder.buildUnknownClient();

        ScalarClientBuilder decimalTypeClientbuilder = new ScalarClientBuilder()
            .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000"))
            .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null)))
            .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC));
        if (getTestMode() == TestMode.RECORD) {
            decimalTypeClientbuilder.addPolicy(interceptorManager.getRecordPolicy());
        }
        decimalTypeClient = decimalTypeClientbuilder.buildDecimalTypeClient();

        ScalarClientBuilder decimal128TypeClientbuilder = new ScalarClientBuilder()
            .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000"))
            .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null)))
            .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC));
        if (getTestMode() == TestMode.RECORD) {
            decimal128TypeClientbuilder.addPolicy(interceptorManager.getRecordPolicy());
        }
        decimal128TypeClient = decimal128TypeClientbuilder.buildDecimal128TypeClient();

        ScalarClientBuilder decimalVerifyClientbuilder = new ScalarClientBuilder()
            .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000"))
            .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null)))
            .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC));
        if (getTestMode() == TestMode.RECORD) {
            decimalVerifyClientbuilder.addPolicy(interceptorManager.getRecordPolicy());
        }
        decimalVerifyClient = decimalVerifyClientbuilder.buildDecimalVerifyClient();

        ScalarClientBuilder decimal128VerifyClientbuilder = new ScalarClientBuilder()
            .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000"))
            .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null)))
            .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC));
        if (getTestMode() == TestMode.RECORD) {
            decimal128VerifyClientbuilder.addPolicy(interceptorManager.getRecordPolicy());
        }
        decimal128VerifyClient = decimal128VerifyClientbuilder.buildDecimal128VerifyClient();

    }
}
