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

package com.azure.resourcemanager.resources.implementation;

import com.azure.core.annotation.ServiceClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.management.AzureEnvironment;
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.resourcemanager.resources.fluent.DataPolicyManifestsClient;
import com.azure.resourcemanager.resources.fluent.PolicyAssignmentsClient;
import com.azure.resourcemanager.resources.fluent.PolicyClient;
import com.azure.resourcemanager.resources.fluent.PolicyDefinitionsClient;
import com.azure.resourcemanager.resources.fluent.PolicyExemptionsClient;
import com.azure.resourcemanager.resources.fluent.PolicySetDefinitionsClient;
import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient;
import java.time.Duration;

/** Initializes a new instance of the PolicyClientImpl type. */
@ServiceClient(builder = PolicyClientBuilder.class)
public final class PolicyClientImpl extends AzureServiceClient implements PolicyClient {
    /** The ID of the target subscription. */
    private final String subscriptionId;

    /**
     * Gets The ID of the target subscription.
     *
     * @return the subscriptionId value.
     */
    public String getSubscriptionId() {
        return this.subscriptionId;
    }

    /** server parameter. */
    private final String endpoint;

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

    /** 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.
     */
    SerializerAdapter getSerializerAdapter() {
        return this.serializerAdapter;
    }

    /** The default poll interval for long-running operation. */
    private final Duration defaultPollInterval;

    /**
     * Gets The default poll interval for long-running operation.
     *
     * @return the defaultPollInterval value.
     */
    public Duration getDefaultPollInterval() {
        return this.defaultPollInterval;
    }

    /** The DataPolicyManifestsClient object to access its operations. */
    private final DataPolicyManifestsClient dataPolicyManifests;

    /**
     * Gets the DataPolicyManifestsClient object to access its operations.
     *
     * @return the DataPolicyManifestsClient object.
     */
    public DataPolicyManifestsClient getDataPolicyManifests() {
        return this.dataPolicyManifests;
    }

    /** The PolicyDefinitionsClient object to access its operations. */
    private final PolicyDefinitionsClient policyDefinitions;

    /**
     * Gets the PolicyDefinitionsClient object to access its operations.
     *
     * @return the PolicyDefinitionsClient object.
     */
    public PolicyDefinitionsClient getPolicyDefinitions() {
        return this.policyDefinitions;
    }

    /** The PolicySetDefinitionsClient object to access its operations. */
    private final PolicySetDefinitionsClient policySetDefinitions;

    /**
     * Gets the PolicySetDefinitionsClient object to access its operations.
     *
     * @return the PolicySetDefinitionsClient object.
     */
    public PolicySetDefinitionsClient getPolicySetDefinitions() {
        return this.policySetDefinitions;
    }

    /** The PolicyAssignmentsClient object to access its operations. */
    private final PolicyAssignmentsClient policyAssignments;

    /**
     * Gets the PolicyAssignmentsClient object to access its operations.
     *
     * @return the PolicyAssignmentsClient object.
     */
    public PolicyAssignmentsClient getPolicyAssignments() {
        return this.policyAssignments;
    }

    /** The PolicyExemptionsClient object to access its operations. */
    private final PolicyExemptionsClient policyExemptions;

    /**
     * Gets the PolicyExemptionsClient object to access its operations.
     *
     * @return the PolicyExemptionsClient object.
     */
    public PolicyExemptionsClient getPolicyExemptions() {
        return this.policyExemptions;
    }

    /**
     * Initializes an instance of PolicyClient client.
     *
     * @param httpPipeline The HTTP pipeline to send requests through.
     * @param serializerAdapter The serializer to serialize an object into a string.
     * @param defaultPollInterval The default poll interval for long-running operation.
     * @param environment The Azure environment.
     * @param subscriptionId The ID of the target subscription.
     * @param endpoint server parameter.
     */
    PolicyClientImpl(
        HttpPipeline httpPipeline,
        SerializerAdapter serializerAdapter,
        Duration defaultPollInterval,
        AzureEnvironment environment,
        String subscriptionId,
        String endpoint) {
        super(httpPipeline, serializerAdapter, environment);
        this.httpPipeline = httpPipeline;
        this.serializerAdapter = serializerAdapter;
        this.defaultPollInterval = defaultPollInterval;
        this.subscriptionId = subscriptionId;
        this.endpoint = endpoint;
        this.dataPolicyManifests = new DataPolicyManifestsClientImpl(this);
        this.policyDefinitions = new PolicyDefinitionsClientImpl(this);
        this.policySetDefinitions = new PolicySetDefinitionsClientImpl(this);
        this.policyAssignments = new PolicyAssignmentsClientImpl(this);
        this.policyExemptions = new PolicyExemptionsClientImpl(this);
    }
}
