All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.resourcemanager.maintenance.implementation.UpdatesImpl Maven / Gradle / Ivy

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

package com.azure.resourcemanager.maintenance.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.maintenance.fluent.UpdatesClient;
import com.azure.resourcemanager.maintenance.fluent.models.UpdateInner;
import com.azure.resourcemanager.maintenance.models.Update;
import com.azure.resourcemanager.maintenance.models.Updates;

public final class UpdatesImpl implements Updates {
    private static final ClientLogger LOGGER = new ClientLogger(UpdatesImpl.class);

    private final UpdatesClient innerClient;

    private final com.azure.resourcemanager.maintenance.MaintenanceManager serviceManager;

    public UpdatesImpl(UpdatesClient innerClient,
        com.azure.resourcemanager.maintenance.MaintenanceManager serviceManager) {
        this.innerClient = innerClient;
        this.serviceManager = serviceManager;
    }

    public PagedIterable listParent(String resourceGroupName, String providerName, String resourceParentType,
        String resourceParentName, String resourceType, String resourceName) {
        PagedIterable inner = this.serviceClient()
            .listParent(resourceGroupName, providerName, resourceParentType, resourceParentName, resourceType,
                resourceName);
        return ResourceManagerUtils.mapPage(inner, inner1 -> new UpdateImpl(inner1, this.manager()));
    }

    public PagedIterable listParent(String resourceGroupName, String providerName, String resourceParentType,
        String resourceParentName, String resourceType, String resourceName, Context context) {
        PagedIterable inner = this.serviceClient()
            .listParent(resourceGroupName, providerName, resourceParentType, resourceParentName, resourceType,
                resourceName, context);
        return ResourceManagerUtils.mapPage(inner, inner1 -> new UpdateImpl(inner1, this.manager()));
    }

    public PagedIterable list(String resourceGroupName, String providerName, String resourceType,
        String resourceName) {
        PagedIterable inner
            = this.serviceClient().list(resourceGroupName, providerName, resourceType, resourceName);
        return ResourceManagerUtils.mapPage(inner, inner1 -> new UpdateImpl(inner1, this.manager()));
    }

    public PagedIterable list(String resourceGroupName, String providerName, String resourceType,
        String resourceName, Context context) {
        PagedIterable inner
            = this.serviceClient().list(resourceGroupName, providerName, resourceType, resourceName, context);
        return ResourceManagerUtils.mapPage(inner, inner1 -> new UpdateImpl(inner1, this.manager()));
    }

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

    private com.azure.resourcemanager.maintenance.MaintenanceManager manager() {
        return this.serviceManager;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy