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

package com.azure.resourcemanager.maps.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.maps.fluent.MapsClient;
import com.azure.resourcemanager.maps.fluent.models.OperationDetailInner;
import com.azure.resourcemanager.maps.models.Maps;
import com.azure.resourcemanager.maps.models.OperationDetail;

public final class MapsImpl implements Maps {
    private static final ClientLogger LOGGER = new ClientLogger(MapsImpl.class);

    private final MapsClient innerClient;

    private final com.azure.resourcemanager.maps.AzureMapsManager serviceManager;

    public MapsImpl(MapsClient innerClient, com.azure.resourcemanager.maps.AzureMapsManager serviceManager) {
        this.innerClient = innerClient;
        this.serviceManager = serviceManager;
    }

    public PagedIterable<OperationDetail> listOperations() {
        PagedIterable<OperationDetailInner> inner = this.serviceClient().listOperations();
        return Utils.mapPage(inner, inner1 -> new OperationDetailImpl(inner1, this.manager()));
    }

    public PagedIterable<OperationDetail> listOperations(Context context) {
        PagedIterable<OperationDetailInner> inner = this.serviceClient().listOperations(context);
        return Utils.mapPage(inner, inner1 -> new OperationDetailImpl(inner1, this.manager()));
    }

    public PagedIterable<OperationDetail> list() {
        PagedIterable<OperationDetailInner> inner = this.serviceClient().list();
        return Utils.mapPage(inner, inner1 -> new OperationDetailImpl(inner1, this.manager()));
    }

    public PagedIterable<OperationDetail> list(Context context) {
        PagedIterable<OperationDetailInner> inner = this.serviceClient().list(context);
        return Utils.mapPage(inner, inner1 -> new OperationDetailImpl(inner1, this.manager()));
    }

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

    private com.azure.resourcemanager.maps.AzureMapsManager manager() {
        return this.serviceManager;
    }
}
