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

package com.azure.analytics.synapse.artifacts;

import com.azure.analytics.synapse.artifacts.implementation.ArtifactsClientImpl;
import com.azure.core.annotation.Generated;
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.client.traits.ConfigurationTrait;
import com.azure.core.client.traits.EndpointTrait;
import com.azure.core.client.traits.HttpTrait;
import com.azure.core.client.traits.TokenCredentialTrait;
import com.azure.core.credential.TokenCredential;
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpHeaders;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.AddHeadersPolicy;
import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.util.ClientOptions;
import com.azure.core.util.Configuration;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.builder.ClientBuilderUtil;
import com.azure.core.util.serializer.JacksonAdapter;
import com.azure.core.util.serializer.SerializerAdapter;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;

/** A builder for creating a new instance of the ArtifactsClient type. */
@ServiceClientBuilder(
        serviceClients = {
            LinkConnectionClient.class,
            KqlScriptsClient.class,
            KqlScriptClient.class,
            MetastoreClient.class,
            SparkConfigurationClient.class,
            BigDataPoolsClient.class,
            DataFlowClient.class,
            DataFlowDebugSessionClient.class,
            DatasetClient.class,
            WorkspaceGitRepoManagementClient.class,
            IntegrationRuntimesClient.class,
            LibraryClient.class,
            LinkedServiceClient.class,
            NotebookClient.class,
            NotebookOperationResultClient.class,
            PipelineClient.class,
            PipelineRunClient.class,
            SparkJobDefinitionClient.class,
            SqlPoolsClient.class,
            SqlScriptClient.class,
            TriggerClient.class,
            TriggerRunClient.class,
            WorkspaceClient.class,
            LinkConnectionAsyncClient.class,
            KqlScriptsAsyncClient.class,
            KqlScriptAsyncClient.class,
            MetastoreAsyncClient.class,
            SparkConfigurationAsyncClient.class,
            BigDataPoolsAsyncClient.class,
            DataFlowAsyncClient.class,
            DataFlowDebugSessionAsyncClient.class,
            DatasetAsyncClient.class,
            WorkspaceGitRepoManagementAsyncClient.class,
            IntegrationRuntimesAsyncClient.class,
            LibraryAsyncClient.class,
            LinkedServiceAsyncClient.class,
            NotebookAsyncClient.class,
            NotebookOperationResultAsyncClient.class,
            PipelineAsyncClient.class,
            PipelineRunAsyncClient.class,
            SparkJobDefinitionAsyncClient.class,
            SqlPoolsAsyncClient.class,
            SqlScriptAsyncClient.class,
            TriggerAsyncClient.class,
            TriggerRunAsyncClient.class,
            WorkspaceAsyncClient.class
        })
public final class ArtifactsClientBuilder
        implements HttpTrait<ArtifactsClientBuilder>,
                ConfigurationTrait<ArtifactsClientBuilder>,
                TokenCredentialTrait<ArtifactsClientBuilder>,
                EndpointTrait<ArtifactsClientBuilder> {
    @Generated private static final String SDK_NAME = "name";

    @Generated private static final String SDK_VERSION = "version";

    @Generated private static final String[] DEFAULT_SCOPES = new String[] {"https://dev.azuresynapse.net/.default"};

    @Generated
    private static final Map<String, String> PROPERTIES =
            CoreUtils.getProperties("azure-analytics-synapse-artifacts.properties");

    @Generated private final List<HttpPipelinePolicy> pipelinePolicies;

    /** Create an instance of the ArtifactsClientBuilder. */
    @Generated
    public ArtifactsClientBuilder() {
        this.pipelinePolicies = new ArrayList<>();
    }

    /*
     * The HTTP pipeline to send requests through.
     */
    @Generated private HttpPipeline pipeline;

    /** {@inheritDoc}. */
    @Generated
    @Override
    public ArtifactsClientBuilder pipeline(HttpPipeline pipeline) {
        this.pipeline = pipeline;
        return this;
    }

    /*
     * The HTTP client used to send the request.
     */
    @Generated private HttpClient httpClient;

    /** {@inheritDoc}. */
    @Generated
    @Override
    public ArtifactsClientBuilder httpClient(HttpClient httpClient) {
        this.httpClient = httpClient;
        return this;
    }

    /*
     * The logging configuration for HTTP requests and responses.
     */
    @Generated private HttpLogOptions httpLogOptions;

    /** {@inheritDoc}. */
    @Generated
    @Override
    public ArtifactsClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) {
        this.httpLogOptions = httpLogOptions;
        return this;
    }

    /*
     * The client options such as application ID and custom headers to set on a request.
     */
    @Generated private ClientOptions clientOptions;

    /** {@inheritDoc}. */
    @Generated
    @Override
    public ArtifactsClientBuilder clientOptions(ClientOptions clientOptions) {
        this.clientOptions = clientOptions;
        return this;
    }

    /*
     * The retry options to configure retry policy for failed requests.
     */
    @Generated private RetryOptions retryOptions;

    /** {@inheritDoc}. */
    @Generated
    @Override
    public ArtifactsClientBuilder retryOptions(RetryOptions retryOptions) {
        this.retryOptions = retryOptions;
        return this;
    }

    /** {@inheritDoc}. */
    @Generated
    @Override
    public ArtifactsClientBuilder addPolicy(HttpPipelinePolicy customPolicy) {
        Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null.");
        pipelinePolicies.add(customPolicy);
        return this;
    }

    /*
     * The configuration store that is used during construction of the service client.
     */
    @Generated private Configuration configuration;

    /** {@inheritDoc}. */
    @Generated
    @Override
    public ArtifactsClientBuilder configuration(Configuration configuration) {
        this.configuration = configuration;
        return this;
    }

    /*
     * The TokenCredential used for authentication.
     */
    @Generated private TokenCredential tokenCredential;

    /** {@inheritDoc}. */
    @Generated
    @Override
    public ArtifactsClientBuilder credential(TokenCredential tokenCredential) {
        this.tokenCredential = tokenCredential;
        return this;
    }

    /*
     * The service endpoint
     */
    @Generated private String endpoint;

    /** {@inheritDoc}. */
    @Generated
    @Override
    public ArtifactsClientBuilder endpoint(String endpoint) {
        this.endpoint = endpoint;
        return this;
    }

    /*
     * The serializer to serialize an object into a string
     */
    @Generated private SerializerAdapter serializerAdapter;

    /**
     * Sets The serializer to serialize an object into a string.
     *
     * @param serializerAdapter the serializerAdapter value.
     * @return the ArtifactsClientBuilder.
     */
    @Generated
    public ArtifactsClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
        this.serializerAdapter = serializerAdapter;
        return this;
    }

    /*
     * The retry policy that will attempt to retry failed requests, if applicable.
     */
    @Generated private RetryPolicy retryPolicy;

    /**
     * Sets The retry policy that will attempt to retry failed requests, if applicable.
     *
     * @param retryPolicy the retryPolicy value.
     * @return the ArtifactsClientBuilder.
     */
    @Generated
    public ArtifactsClientBuilder retryPolicy(RetryPolicy retryPolicy) {
        this.retryPolicy = retryPolicy;
        return this;
    }

    /**
     * Builds an instance of ArtifactsClientImpl with the provided parameters.
     *
     * @return an instance of ArtifactsClientImpl.
     */
    @Generated
    private ArtifactsClientImpl buildInnerClient() {
        HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
        SerializerAdapter localSerializerAdapter =
                (serializerAdapter != null) ? serializerAdapter : JacksonAdapter.createDefaultSerializerAdapter();
        ArtifactsClientImpl client = new ArtifactsClientImpl(localPipeline, localSerializerAdapter, endpoint);
        return client;
    }

    @Generated
    private HttpPipeline createHttpPipeline() {
        Configuration buildConfiguration =
                (configuration == null) ? Configuration.getGlobalConfiguration() : configuration;
        HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions;
        ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions;
        List<HttpPipelinePolicy> policies = new ArrayList<>();
        String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName");
        String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
        String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions);
        policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration));
        policies.add(new RequestIdPolicy());
        policies.add(new AddHeadersFromContextPolicy());
        HttpHeaders headers = new HttpHeaders();
        localClientOptions.getHeaders().forEach(header -> headers.set(header.getName(), header.getValue()));
        if (headers.getSize() > 0) {
            policies.add(new AddHeadersPolicy(headers));
        }
        policies.addAll(
                this.pipelinePolicies.stream()
                        .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
                        .collect(Collectors.toList()));
        HttpPolicyProviders.addBeforeRetryPolicies(policies);
        policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy()));
        policies.add(new AddDatePolicy());
        policies.add(new CookiePolicy());
        if (tokenCredential != null) {
            policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES));
        }
        policies.addAll(
                this.pipelinePolicies.stream()
                        .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
                        .collect(Collectors.toList()));
        HttpPolicyProviders.addAfterRetryPolicies(policies);
        policies.add(new HttpLoggingPolicy(httpLogOptions));
        HttpPipeline httpPipeline =
                new HttpPipelineBuilder()
                        .policies(policies.toArray(new HttpPipelinePolicy[0]))
                        .httpClient(httpClient)
                        .clientOptions(localClientOptions)
                        .build();
        return httpPipeline;
    }

    /**
     * Builds an instance of LinkConnectionAsyncClient class.
     *
     * @return an instance of LinkConnectionAsyncClient.
     */
    @Generated
    public LinkConnectionAsyncClient buildLinkConnectionAsyncClient() {
        return new LinkConnectionAsyncClient(buildInnerClient().getLinkConnections());
    }

    /**
     * Builds an instance of KqlScriptsAsyncClient class.
     *
     * @return an instance of KqlScriptsAsyncClient.
     */
    @Generated
    public KqlScriptsAsyncClient buildKqlScriptsAsyncClient() {
        return new KqlScriptsAsyncClient(buildInnerClient().getKqlScripts());
    }

    /**
     * Builds an instance of KqlScriptAsyncClient class.
     *
     * @return an instance of KqlScriptAsyncClient.
     */
    @Generated
    public KqlScriptAsyncClient buildKqlScriptAsyncClient() {
        return new KqlScriptAsyncClient(buildInnerClient().getKqlScriptsOperations());
    }

    /**
     * Builds an instance of MetastoreAsyncClient class.
     *
     * @return an instance of MetastoreAsyncClient.
     */
    @Generated
    public MetastoreAsyncClient buildMetastoreAsyncClient() {
        return new MetastoreAsyncClient(buildInnerClient().getMetastores());
    }

    /**
     * Builds an instance of SparkConfigurationAsyncClient class.
     *
     * @return an instance of SparkConfigurationAsyncClient.
     */
    @Generated
    public SparkConfigurationAsyncClient buildSparkConfigurationAsyncClient() {
        return new SparkConfigurationAsyncClient(buildInnerClient().getSparkConfigurations());
    }

    /**
     * Builds an instance of BigDataPoolsAsyncClient class.
     *
     * @return an instance of BigDataPoolsAsyncClient.
     */
    @Generated
    public BigDataPoolsAsyncClient buildBigDataPoolsAsyncClient() {
        return new BigDataPoolsAsyncClient(buildInnerClient().getBigDataPools());
    }

    /**
     * Builds an instance of DataFlowAsyncClient class.
     *
     * @return an instance of DataFlowAsyncClient.
     */
    @Generated
    public DataFlowAsyncClient buildDataFlowAsyncClient() {
        return new DataFlowAsyncClient(buildInnerClient().getDataFlows());
    }

    /**
     * Builds an instance of DataFlowDebugSessionAsyncClient class.
     *
     * @return an instance of DataFlowDebugSessionAsyncClient.
     */
    @Generated
    public DataFlowDebugSessionAsyncClient buildDataFlowDebugSessionAsyncClient() {
        return new DataFlowDebugSessionAsyncClient(buildInnerClient().getDataFlowDebugSessions());
    }

    /**
     * Builds an instance of DatasetAsyncClient class.
     *
     * @return an instance of DatasetAsyncClient.
     */
    @Generated
    public DatasetAsyncClient buildDatasetAsyncClient() {
        return new DatasetAsyncClient(buildInnerClient().getDatasets());
    }

    /**
     * Builds an instance of WorkspaceGitRepoManagementAsyncClient class.
     *
     * @return an instance of WorkspaceGitRepoManagementAsyncClient.
     */
    @Generated
    public WorkspaceGitRepoManagementAsyncClient buildWorkspaceGitRepoManagementAsyncClient() {
        return new WorkspaceGitRepoManagementAsyncClient(buildInnerClient().getWorkspaceGitRepoManagements());
    }

    /**
     * Builds an instance of IntegrationRuntimesAsyncClient class.
     *
     * @return an instance of IntegrationRuntimesAsyncClient.
     */
    @Generated
    public IntegrationRuntimesAsyncClient buildIntegrationRuntimesAsyncClient() {
        return new IntegrationRuntimesAsyncClient(buildInnerClient().getIntegrationRuntimes());
    }

    /**
     * Builds an instance of LibraryAsyncClient class.
     *
     * @return an instance of LibraryAsyncClient.
     */
    @Generated
    public LibraryAsyncClient buildLibraryAsyncClient() {
        return new LibraryAsyncClient(buildInnerClient().getLibraries());
    }

    /**
     * Builds an instance of LinkedServiceAsyncClient class.
     *
     * @return an instance of LinkedServiceAsyncClient.
     */
    @Generated
    public LinkedServiceAsyncClient buildLinkedServiceAsyncClient() {
        return new LinkedServiceAsyncClient(buildInnerClient().getLinkedServices());
    }

    /**
     * Builds an instance of NotebookAsyncClient class.
     *
     * @return an instance of NotebookAsyncClient.
     */
    @Generated
    public NotebookAsyncClient buildNotebookAsyncClient() {
        return new NotebookAsyncClient(buildInnerClient().getNotebooks());
    }

    /**
     * Builds an instance of NotebookOperationResultAsyncClient class.
     *
     * @return an instance of NotebookOperationResultAsyncClient.
     */
    @Generated
    public NotebookOperationResultAsyncClient buildNotebookOperationResultAsyncClient() {
        return new NotebookOperationResultAsyncClient(buildInnerClient().getNotebookOperationResults());
    }

    /**
     * Builds an instance of PipelineAsyncClient class.
     *
     * @return an instance of PipelineAsyncClient.
     */
    @Generated
    public PipelineAsyncClient buildPipelineAsyncClient() {
        return new PipelineAsyncClient(buildInnerClient().getPipelines());
    }

    /**
     * Builds an instance of PipelineRunAsyncClient class.
     *
     * @return an instance of PipelineRunAsyncClient.
     */
    @Generated
    public PipelineRunAsyncClient buildPipelineRunAsyncClient() {
        return new PipelineRunAsyncClient(buildInnerClient().getPipelineRuns());
    }

    /**
     * Builds an instance of SparkJobDefinitionAsyncClient class.
     *
     * @return an instance of SparkJobDefinitionAsyncClient.
     */
    @Generated
    public SparkJobDefinitionAsyncClient buildSparkJobDefinitionAsyncClient() {
        return new SparkJobDefinitionAsyncClient(buildInnerClient().getSparkJobDefinitions());
    }

    /**
     * Builds an instance of SqlPoolsAsyncClient class.
     *
     * @return an instance of SqlPoolsAsyncClient.
     */
    @Generated
    public SqlPoolsAsyncClient buildSqlPoolsAsyncClient() {
        return new SqlPoolsAsyncClient(buildInnerClient().getSqlPools());
    }

    /**
     * Builds an instance of SqlScriptAsyncClient class.
     *
     * @return an instance of SqlScriptAsyncClient.
     */
    @Generated
    public SqlScriptAsyncClient buildSqlScriptAsyncClient() {
        return new SqlScriptAsyncClient(buildInnerClient().getSqlScripts());
    }

    /**
     * Builds an instance of TriggerAsyncClient class.
     *
     * @return an instance of TriggerAsyncClient.
     */
    @Generated
    public TriggerAsyncClient buildTriggerAsyncClient() {
        return new TriggerAsyncClient(buildInnerClient().getTriggers());
    }

    /**
     * Builds an instance of TriggerRunAsyncClient class.
     *
     * @return an instance of TriggerRunAsyncClient.
     */
    @Generated
    public TriggerRunAsyncClient buildTriggerRunAsyncClient() {
        return new TriggerRunAsyncClient(buildInnerClient().getTriggerRuns());
    }

    /**
     * Builds an instance of WorkspaceAsyncClient class.
     *
     * @return an instance of WorkspaceAsyncClient.
     */
    @Generated
    public WorkspaceAsyncClient buildWorkspaceAsyncClient() {
        return new WorkspaceAsyncClient(buildInnerClient().getWorkspaces());
    }

    /**
     * Builds an instance of LinkConnectionClient class.
     *
     * @return an instance of LinkConnectionClient.
     */
    @Generated
    public LinkConnectionClient buildLinkConnectionClient() {
        return new LinkConnectionClient(buildInnerClient().getLinkConnections());
    }

    /**
     * Builds an instance of KqlScriptsClient class.
     *
     * @return an instance of KqlScriptsClient.
     */
    @Generated
    public KqlScriptsClient buildKqlScriptsClient() {
        return new KqlScriptsClient(buildInnerClient().getKqlScripts());
    }

    /**
     * Builds an instance of KqlScriptClient class.
     *
     * @return an instance of KqlScriptClient.
     */
    @Generated
    public KqlScriptClient buildKqlScriptClient() {
        return new KqlScriptClient(buildInnerClient().getKqlScriptsOperations());
    }

    /**
     * Builds an instance of MetastoreClient class.
     *
     * @return an instance of MetastoreClient.
     */
    @Generated
    public MetastoreClient buildMetastoreClient() {
        return new MetastoreClient(buildInnerClient().getMetastores());
    }

    /**
     * Builds an instance of SparkConfigurationClient class.
     *
     * @return an instance of SparkConfigurationClient.
     */
    @Generated
    public SparkConfigurationClient buildSparkConfigurationClient() {
        return new SparkConfigurationClient(buildInnerClient().getSparkConfigurations());
    }

    /**
     * Builds an instance of BigDataPoolsClient class.
     *
     * @return an instance of BigDataPoolsClient.
     */
    @Generated
    public BigDataPoolsClient buildBigDataPoolsClient() {
        return new BigDataPoolsClient(buildInnerClient().getBigDataPools());
    }

    /**
     * Builds an instance of DataFlowClient class.
     *
     * @return an instance of DataFlowClient.
     */
    @Generated
    public DataFlowClient buildDataFlowClient() {
        return new DataFlowClient(buildInnerClient().getDataFlows());
    }

    /**
     * Builds an instance of DataFlowDebugSessionClient class.
     *
     * @return an instance of DataFlowDebugSessionClient.
     */
    @Generated
    public DataFlowDebugSessionClient buildDataFlowDebugSessionClient() {
        return new DataFlowDebugSessionClient(buildInnerClient().getDataFlowDebugSessions());
    }

    /**
     * Builds an instance of DatasetClient class.
     *
     * @return an instance of DatasetClient.
     */
    @Generated
    public DatasetClient buildDatasetClient() {
        return new DatasetClient(buildInnerClient().getDatasets());
    }

    /**
     * Builds an instance of WorkspaceGitRepoManagementClient class.
     *
     * @return an instance of WorkspaceGitRepoManagementClient.
     */
    @Generated
    public WorkspaceGitRepoManagementClient buildWorkspaceGitRepoManagementClient() {
        return new WorkspaceGitRepoManagementClient(buildInnerClient().getWorkspaceGitRepoManagements());
    }

    /**
     * Builds an instance of IntegrationRuntimesClient class.
     *
     * @return an instance of IntegrationRuntimesClient.
     */
    @Generated
    public IntegrationRuntimesClient buildIntegrationRuntimesClient() {
        return new IntegrationRuntimesClient(buildInnerClient().getIntegrationRuntimes());
    }

    /**
     * Builds an instance of LibraryClient class.
     *
     * @return an instance of LibraryClient.
     */
    @Generated
    public LibraryClient buildLibraryClient() {
        return new LibraryClient(buildInnerClient().getLibraries());
    }

    /**
     * Builds an instance of LinkedServiceClient class.
     *
     * @return an instance of LinkedServiceClient.
     */
    @Generated
    public LinkedServiceClient buildLinkedServiceClient() {
        return new LinkedServiceClient(buildInnerClient().getLinkedServices());
    }

    /**
     * Builds an instance of NotebookClient class.
     *
     * @return an instance of NotebookClient.
     */
    @Generated
    public NotebookClient buildNotebookClient() {
        return new NotebookClient(buildInnerClient().getNotebooks());
    }

    /**
     * Builds an instance of NotebookOperationResultClient class.
     *
     * @return an instance of NotebookOperationResultClient.
     */
    @Generated
    public NotebookOperationResultClient buildNotebookOperationResultClient() {
        return new NotebookOperationResultClient(buildInnerClient().getNotebookOperationResults());
    }

    /**
     * Builds an instance of PipelineClient class.
     *
     * @return an instance of PipelineClient.
     */
    @Generated
    public PipelineClient buildPipelineClient() {
        return new PipelineClient(buildInnerClient().getPipelines());
    }

    /**
     * Builds an instance of PipelineRunClient class.
     *
     * @return an instance of PipelineRunClient.
     */
    @Generated
    public PipelineRunClient buildPipelineRunClient() {
        return new PipelineRunClient(buildInnerClient().getPipelineRuns());
    }

    /**
     * Builds an instance of SparkJobDefinitionClient class.
     *
     * @return an instance of SparkJobDefinitionClient.
     */
    @Generated
    public SparkJobDefinitionClient buildSparkJobDefinitionClient() {
        return new SparkJobDefinitionClient(buildInnerClient().getSparkJobDefinitions());
    }

    /**
     * Builds an instance of SqlPoolsClient class.
     *
     * @return an instance of SqlPoolsClient.
     */
    @Generated
    public SqlPoolsClient buildSqlPoolsClient() {
        return new SqlPoolsClient(buildInnerClient().getSqlPools());
    }

    /**
     * Builds an instance of SqlScriptClient class.
     *
     * @return an instance of SqlScriptClient.
     */
    @Generated
    public SqlScriptClient buildSqlScriptClient() {
        return new SqlScriptClient(buildInnerClient().getSqlScripts());
    }

    /**
     * Builds an instance of TriggerClient class.
     *
     * @return an instance of TriggerClient.
     */
    @Generated
    public TriggerClient buildTriggerClient() {
        return new TriggerClient(buildInnerClient().getTriggers());
    }

    /**
     * Builds an instance of TriggerRunClient class.
     *
     * @return an instance of TriggerRunClient.
     */
    @Generated
    public TriggerRunClient buildTriggerRunClient() {
        return new TriggerRunClient(buildInnerClient().getTriggerRuns());
    }

    /**
     * Builds an instance of WorkspaceClient class.
     *
     * @return an instance of WorkspaceClient.
     */
    @Generated
    public WorkspaceClient buildWorkspaceClient() {
        return new WorkspaceClient(buildInnerClient().getWorkspaces());
    }
}
