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

package com.azure.resourcemanager.synapse.implementation;

import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.synapse.fluent.KustoPoolPrivateLinkResourcesOperationsClient;
import com.azure.resourcemanager.synapse.fluent.models.KustoPoolPrivateLinkResourcesInner;
import com.azure.resourcemanager.synapse.models.KustoPoolPrivateLinkResources;
import com.azure.resourcemanager.synapse.models.KustoPoolPrivateLinkResourcesOperations;

public final class KustoPoolPrivateLinkResourcesOperationsImpl implements KustoPoolPrivateLinkResourcesOperations {
    private static final ClientLogger LOGGER = new ClientLogger(KustoPoolPrivateLinkResourcesOperationsImpl.class);

    private final KustoPoolPrivateLinkResourcesOperationsClient innerClient;

    private final com.azure.resourcemanager.synapse.SynapseManager serviceManager;

    public KustoPoolPrivateLinkResourcesOperationsImpl(
        KustoPoolPrivateLinkResourcesOperationsClient innerClient,
        com.azure.resourcemanager.synapse.SynapseManager serviceManager) {
        this.innerClient = innerClient;
        this.serviceManager = serviceManager;
    }

    public PagedIterable<KustoPoolPrivateLinkResources> list(
        String resourceGroupName, String workspaceName, String kustoPoolName) {
        PagedIterable<KustoPoolPrivateLinkResourcesInner> inner =
            this.serviceClient().list(resourceGroupName, workspaceName, kustoPoolName);
        return Utils.mapPage(inner, inner1 -> new KustoPoolPrivateLinkResourcesImpl(inner1, this.manager()));
    }

    public PagedIterable<KustoPoolPrivateLinkResources> list(
        String resourceGroupName, String workspaceName, String kustoPoolName, Context context) {
        PagedIterable<KustoPoolPrivateLinkResourcesInner> inner =
            this.serviceClient().list(resourceGroupName, workspaceName, kustoPoolName, context);
        return Utils.mapPage(inner, inner1 -> new KustoPoolPrivateLinkResourcesImpl(inner1, this.manager()));
    }

    private KustoPoolPrivateLinkResourcesOperationsClient serviceClient() {
        return this.innerClient;
    }

    private com.azure.resourcemanager.synapse.SynapseManager manager() {
        return this.serviceManager;
    }
}
