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

com.azure.resourcemanager.costmanagement.implementation.DimensionsImpl Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure SDK for CostManagement Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. CostManagement management client provides access to CostManagement resources for Azure Enterprise Subscriptions. Package tag package-2022-10.

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

package com.azure.resourcemanager.costmanagement.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.costmanagement.fluent.DimensionsClient;
import com.azure.resourcemanager.costmanagement.fluent.models.DimensionInner;
import com.azure.resourcemanager.costmanagement.models.Dimension;
import com.azure.resourcemanager.costmanagement.models.Dimensions;
import com.azure.resourcemanager.costmanagement.models.ExternalCloudProviderType;

public final class DimensionsImpl implements Dimensions {
    private static final ClientLogger LOGGER = new ClientLogger(DimensionsImpl.class);

    private final DimensionsClient innerClient;

    private final com.azure.resourcemanager.costmanagement.CostManagementManager serviceManager;

    public DimensionsImpl(
        DimensionsClient innerClient, com.azure.resourcemanager.costmanagement.CostManagementManager serviceManager) {
        this.innerClient = innerClient;
        this.serviceManager = serviceManager;
    }

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

    public PagedIterable list(
        String scope, String filter, String expand, String skiptoken, Integer top, Context context) {
        PagedIterable inner = this.serviceClient().list(scope, filter, expand, skiptoken, top, context);
        return Utils.mapPage(inner, inner1 -> new DimensionImpl(inner1, this.manager()));
    }

    public PagedIterable byExternalCloudProviderType(
        ExternalCloudProviderType externalCloudProviderType, String externalCloudProviderId) {
        PagedIterable inner =
            this.serviceClient().byExternalCloudProviderType(externalCloudProviderType, externalCloudProviderId);
        return Utils.mapPage(inner, inner1 -> new DimensionImpl(inner1, this.manager()));
    }

    public PagedIterable byExternalCloudProviderType(
        ExternalCloudProviderType externalCloudProviderType,
        String externalCloudProviderId,
        String filter,
        String expand,
        String skiptoken,
        Integer top,
        Context context) {
        PagedIterable inner =
            this
                .serviceClient()
                .byExternalCloudProviderType(
                    externalCloudProviderType, externalCloudProviderId, filter, expand, skiptoken, top, context);
        return Utils.mapPage(inner, inner1 -> new DimensionImpl(inner1, this.manager()));
    }

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

    private com.azure.resourcemanager.costmanagement.CostManagementManager manager() {
        return this.serviceManager;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy