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

package service.multipleservices.servicea.implementation;

import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.util.serializer.JacksonAdapter;
import com.azure.core.util.serializer.SerializerAdapter;
import service.multipleservices.servicea.ServiceBServiceVersion;

/**
 * Initializes a new instance of the ServiceBClient type.
 */
public final class ServiceBClientImpl {
    /**
     * Service host.
     */
    private final String endpoint;

    /**
     * Gets Service host.
     * 
     * @return the endpoint value.
     */
    public String getEndpoint() {
        return this.endpoint;
    }

    /**
     * Service version.
     */
    private final ServiceBServiceVersion serviceVersion;

    /**
     * Gets Service version.
     * 
     * @return the serviceVersion value.
     */
    public ServiceBServiceVersion getServiceVersion() {
        return this.serviceVersion;
    }

    /**
     * The HTTP pipeline to send requests through.
     */
    private final HttpPipeline httpPipeline;

    /**
     * Gets The HTTP pipeline to send requests through.
     * 
     * @return the httpPipeline value.
     */
    public HttpPipeline getHttpPipeline() {
        return this.httpPipeline;
    }

    /**
     * The serializer to serialize an object into a string.
     */
    private final SerializerAdapter serializerAdapter;

    /**
     * Gets The serializer to serialize an object into a string.
     * 
     * @return the serializerAdapter value.
     */
    public SerializerAdapter getSerializerAdapter() {
        return this.serializerAdapter;
    }

    /**
     * The BSubNamespacesImpl object to access its operations.
     */
    private final BSubNamespacesImpl bSubNamespaces;

    /**
     * Gets the BSubNamespacesImpl object to access its operations.
     * 
     * @return the BSubNamespacesImpl object.
     */
    public BSubNamespacesImpl getBSubNamespaces() {
        return this.bSubNamespaces;
    }

    /**
     * The BOperationsImpl object to access its operations.
     */
    private final BOperationsImpl bOperations;

    /**
     * Gets the BOperationsImpl object to access its operations.
     * 
     * @return the BOperationsImpl object.
     */
    public BOperationsImpl getBOperations() {
        return this.bOperations;
    }

    /**
     * Initializes an instance of ServiceBClient client.
     * 
     * @param endpoint Service host.
     * @param serviceVersion Service version.
     */
    public ServiceBClientImpl(String endpoint, ServiceBServiceVersion serviceVersion) {
        this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(),
            JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion);
    }

    /**
     * Initializes an instance of ServiceBClient client.
     * 
     * @param httpPipeline The HTTP pipeline to send requests through.
     * @param endpoint Service host.
     * @param serviceVersion Service version.
     */
    public ServiceBClientImpl(HttpPipeline httpPipeline, String endpoint, ServiceBServiceVersion serviceVersion) {
        this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion);
    }

    /**
     * Initializes an instance of ServiceBClient client.
     * 
     * @param httpPipeline The HTTP pipeline to send requests through.
     * @param serializerAdapter The serializer to serialize an object into a string.
     * @param endpoint Service host.
     * @param serviceVersion Service version.
     */
    public ServiceBClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint,
        ServiceBServiceVersion serviceVersion) {
        this.httpPipeline = httpPipeline;
        this.serializerAdapter = serializerAdapter;
        this.endpoint = endpoint;
        this.serviceVersion = serviceVersion;
        this.bSubNamespaces = new BSubNamespacesImpl(this);
        this.bOperations = new BOperationsImpl(this);
    }
}
