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

package com.azure.resourcemanager.elasticsan.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.elasticsan.fluent.SkusClient;
import com.azure.resourcemanager.elasticsan.fluent.models.SkuInformationInner;
import com.azure.resourcemanager.elasticsan.models.SkuInformation;
import com.azure.resourcemanager.elasticsan.models.Skus;

public final class SkusImpl implements Skus {
    private static final ClientLogger LOGGER = new ClientLogger(SkusImpl.class);

    private final SkusClient innerClient;

    private final com.azure.resourcemanager.elasticsan.ElasticSanManager serviceManager;

    public SkusImpl(SkusClient innerClient, com.azure.resourcemanager.elasticsan.ElasticSanManager serviceManager) {
        this.innerClient = innerClient;
        this.serviceManager = serviceManager;
    }

    public PagedIterable<SkuInformation> list() {
        PagedIterable<SkuInformationInner> inner = this.serviceClient().list();
        return Utils.mapPage(inner, inner1 -> new SkuInformationImpl(inner1, this.manager()));
    }

    public PagedIterable<SkuInformation> list(String filter, Context context) {
        PagedIterable<SkuInformationInner> inner = this.serviceClient().list(filter, context);
        return Utils.mapPage(inner, inner1 -> new SkuInformationImpl(inner1, this.manager()));
    }

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

    private com.azure.resourcemanager.elasticsan.ElasticSanManager manager() {
        return this.serviceManager;
    }
}
