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

package com.azure.resourcemanager.appcomplianceautomation.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.appcomplianceautomation.fluent.ReportsClient;
import com.azure.resourcemanager.appcomplianceautomation.fluent.models.ReportResourceInner;
import com.azure.resourcemanager.appcomplianceautomation.models.ReportResource;
import com.azure.resourcemanager.appcomplianceautomation.models.Reports;

public final class ReportsImpl implements Reports {
    private static final ClientLogger LOGGER = new ClientLogger(ReportsImpl.class);

    private final ReportsClient innerClient;

    private final com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager;

    public ReportsImpl(
        ReportsClient innerClient,
        com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager serviceManager) {
        this.innerClient = innerClient;
        this.serviceManager = serviceManager;
    }

    public PagedIterable<ReportResource> list() {
        PagedIterable<ReportResourceInner> inner = this.serviceClient().list();
        return Utils.mapPage(inner, inner1 -> new ReportResourceImpl(inner1, this.manager()));
    }

    public PagedIterable<ReportResource> list(
        String skipToken, Integer top, String select, String offerGuid, String reportCreatorTenantId, Context context) {
        PagedIterable<ReportResourceInner> inner =
            this.serviceClient().list(skipToken, top, select, offerGuid, reportCreatorTenantId, context);
        return Utils.mapPage(inner, inner1 -> new ReportResourceImpl(inner1, this.manager()));
    }

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

    private com.azure.resourcemanager.appcomplianceautomation.AppComplianceAutomationManager manager() {
        return this.serviceManager;
    }
}
