// 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.SnapshotsClient;
import com.azure.resourcemanager.appcomplianceautomation.fluent.models.SnapshotResourceInner;
import com.azure.resourcemanager.appcomplianceautomation.models.SnapshotResource;
import com.azure.resourcemanager.appcomplianceautomation.models.Snapshots;

public final class SnapshotsImpl implements Snapshots {
    private static final ClientLogger LOGGER = new ClientLogger(SnapshotsImpl.class);

    private final SnapshotsClient innerClient;

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

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

    public PagedIterable<SnapshotResource> list(String reportName) {
        PagedIterable<SnapshotResourceInner> inner = this.serviceClient().list(reportName);
        return Utils.mapPage(inner, inner1 -> new SnapshotResourceImpl(inner1, this.manager()));
    }

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

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

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