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

package com.azure.resourcemanager.devcenter.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.devcenter.fluent.SkusClient;
import com.azure.resourcemanager.devcenter.fluent.models.DevCenterSkuInner;
import com.azure.resourcemanager.devcenter.models.DevCenterSku;
import com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager serviceManager;

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

    public PagedIterable<DevCenterSku> list() {
        PagedIterable<DevCenterSkuInner> inner = this.serviceClient().list();
        return Utils.mapPage(inner, inner1 -> new DevCenterSkuImpl(inner1, this.manager()));
    }

    public PagedIterable<DevCenterSku> list(Integer top, Context context) {
        PagedIterable<DevCenterSkuInner> inner = this.serviceClient().list(top, context);
        return Utils.mapPage(inner, inner1 -> new DevCenterSkuImpl(inner1, this.manager()));
    }

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

    private com.azure.resourcemanager.devcenter.DevCenterManager manager() {
        return this.serviceManager;
    }
}
