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

package com.azure.resourcemanager.loadtesting.generated;

import com.azure.resourcemanager.loadtesting.models.QuotaBucketRequest;
import com.azure.resourcemanager.loadtesting.models.QuotaBucketRequestPropertiesDimensions;

/** Samples for Quotas CheckAvailability. */
public final class QuotasCheckAvailabilitySamples {
    /*
     * x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/Quotas_CheckAvailability.json
     */
    /**
     * Sample code: Quotas_CheckAvailability.
     *
     * @param manager Entry point to LoadTestManager.
     */
    public static void quotasCheckAvailability(com.azure.resourcemanager.loadtesting.LoadTestManager manager) {
        manager
            .quotas()
            .checkAvailabilityWithResponse(
                "westus",
                "testQuotaBucket",
                new QuotaBucketRequest()
                    .withCurrentUsage(20)
                    .withCurrentQuota(40)
                    .withNewQuota(50)
                    .withDimensions(
                        new QuotaBucketRequestPropertiesDimensions()
                            .withSubscriptionId("testsubscriptionId")
                            .withLocation("westus")),
                com.azure.core.util.Context.NONE);
    }
}
