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

package com.azure.resourcemanager.storagepool.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.storagepool.fluent.ResourceSkusClient;
import com.azure.resourcemanager.storagepool.fluent.models.ResourceSkuInfoInner;
import com.azure.resourcemanager.storagepool.models.ResourceSkuInfo;
import com.azure.resourcemanager.storagepool.models.ResourceSkus;

public final class ResourceSkusImpl implements ResourceSkus {
    private static final ClientLogger LOGGER = new ClientLogger(ResourceSkusImpl.class);

    private final ResourceSkusClient innerClient;

    private final com.azure.resourcemanager.storagepool.StoragePoolManager serviceManager;

    public ResourceSkusImpl(
        ResourceSkusClient innerClient, com.azure.resourcemanager.storagepool.StoragePoolManager serviceManager) {
        this.innerClient = innerClient;
        this.serviceManager = serviceManager;
    }

    public PagedIterable<ResourceSkuInfo> list(String location) {
        PagedIterable<ResourceSkuInfoInner> inner = this.serviceClient().list(location);
        return Utils.mapPage(inner, inner1 -> new ResourceSkuInfoImpl(inner1, this.manager()));
    }

    public PagedIterable<ResourceSkuInfo> list(String location, Context context) {
        PagedIterable<ResourceSkuInfoInner> inner = this.serviceClient().list(location, context);
        return Utils.mapPage(inner, inner1 -> new ResourceSkuInfoImpl(inner1, this.manager()));
    }

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

    private com.azure.resourcemanager.storagepool.StoragePoolManager manager() {
        return this.serviceManager;
    }
}
