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

package com.azure.resourcemanager.resourcemover.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.resourcemover.fluent.UnresolvedDependenciesClient;
import com.azure.resourcemanager.resourcemover.fluent.models.UnresolvedDependencyInner;
import com.azure.resourcemanager.resourcemover.models.DependencyLevel;
import com.azure.resourcemanager.resourcemover.models.UnresolvedDependencies;
import com.azure.resourcemanager.resourcemover.models.UnresolvedDependency;

public final class UnresolvedDependenciesImpl implements UnresolvedDependencies {
    private static final ClientLogger LOGGER = new ClientLogger(UnresolvedDependenciesImpl.class);

    private final UnresolvedDependenciesClient innerClient;

    private final com.azure.resourcemanager.resourcemover.ResourceMoverManager serviceManager;

    public UnresolvedDependenciesImpl(
        UnresolvedDependenciesClient innerClient,
        com.azure.resourcemanager.resourcemover.ResourceMoverManager serviceManager) {
        this.innerClient = innerClient;
        this.serviceManager = serviceManager;
    }

    public PagedIterable<UnresolvedDependency> get(String resourceGroupName, String moveCollectionName) {
        PagedIterable<UnresolvedDependencyInner> inner =
            this.serviceClient().get(resourceGroupName, moveCollectionName);
        return Utils.mapPage(inner, inner1 -> new UnresolvedDependencyImpl(inner1, this.manager()));
    }

    public PagedIterable<UnresolvedDependency> get(
        String resourceGroupName,
        String moveCollectionName,
        DependencyLevel dependencyLevel,
        String orderby,
        String filter,
        Context context) {
        PagedIterable<UnresolvedDependencyInner> inner =
            this.serviceClient().get(resourceGroupName, moveCollectionName, dependencyLevel, orderby, filter, context);
        return Utils.mapPage(inner, inner1 -> new UnresolvedDependencyImpl(inner1, this.manager()));
    }

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

    private com.azure.resourcemanager.resourcemover.ResourceMoverManager manager() {
        return this.serviceManager;
    }
}
