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

package com.azure.resourcemanager.security.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.security.fluent.HealthReportsClient;
import com.azure.resourcemanager.security.fluent.models.HealthReportInner;
import com.azure.resourcemanager.security.models.HealthReport;
import com.azure.resourcemanager.security.models.HealthReports;

public final class HealthReportsImpl implements HealthReports {
    private static final ClientLogger LOGGER = new ClientLogger(HealthReportsImpl.class);

    private final HealthReportsClient innerClient;

    private final com.azure.resourcemanager.security.SecurityManager serviceManager;

    public HealthReportsImpl(
        HealthReportsClient innerClient, com.azure.resourcemanager.security.SecurityManager serviceManager) {
        this.innerClient = innerClient;
        this.serviceManager = serviceManager;
    }

    public PagedIterable<HealthReport> list(String scope) {
        PagedIterable<HealthReportInner> inner = this.serviceClient().list(scope);
        return Utils.mapPage(inner, inner1 -> new HealthReportImpl(inner1, this.manager()));
    }

    public PagedIterable<HealthReport> list(String scope, Context context) {
        PagedIterable<HealthReportInner> inner = this.serviceClient().list(scope, context);
        return Utils.mapPage(inner, inner1 -> new HealthReportImpl(inner1, this.manager()));
    }

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

    private com.azure.resourcemanager.security.SecurityManager manager() {
        return this.serviceManager;
    }
}
