diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 31f329aa14f2..01d5388d917f 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -361,7 +361,7 @@ com.azure.resourcemanager:azure-resourcemanager-peering;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-policyinsights;1.0.0;1.1.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-support;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-subscription;1.0.0;1.1.0-beta.2 -com.azure.resourcemanager:azure-resourcemanager-powerbidedicated;1.0.0;1.1.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-powerbidedicated;1.0.0;1.1.0 com.azure.resourcemanager:azure-resourcemanager-applicationinsights;1.1.0;1.2.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-deploymentmanager;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-notificationhubs;1.0.0;1.1.0-beta.1 diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/CHANGELOG.md b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/CHANGELOG.md index e401b16d5f01..03e7147e6a11 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/CHANGELOG.md +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/CHANGELOG.md @@ -1,14 +1,98 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0 (2026-03-05) -### Features Added +- Azure Resource Manager PowerBIDedicated client library for Java. This package contains Microsoft Azure SDK for PowerBIDedicated Management SDK. PowerBI Dedicated Web API provides a RESTful set of web services that enables users to create, retrieve, update, and delete Power BI dedicated capacities. Package api-version 2021-01-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.OperationListResult` was removed -### Other Changes +#### `models.AutoScaleVCoreListResult` was removed + +#### `models.DedicatedCapacities` was removed + +#### `PowerBIDedicatedManager` was modified + +* `fluent.PowerBIDedicated serviceClient()` -> `fluent.PowerBIDedicatedManagementClient serviceClient()` + +#### `models.AutoScaleVCoreSku` was modified + +* `validate()` was removed + +#### `models.CheckCapacityNameAvailabilityParameters` was modified + +* `validate()` was removed + +#### `models.OperationDisplay` was modified + +* `OperationDisplay()` was changed to private access +* `validate()` was removed +* `withDescription(java.lang.String)` was removed + +#### `models.SkuDetailsForExistingResource` was modified + +* `SkuDetailsForExistingResource()` was changed to private access +* `withSku(models.CapacitySku)` was removed +* `withResourceType(java.lang.String)` was removed +* `validate()` was removed + +#### `models.DedicatedCapacityAdministrators` was modified + +* `validate()` was removed + +#### `models.MetricSpecificationDimensionsItem` was modified + +* `MetricSpecificationDimensionsItem()` was changed to private access +* `withDisplayName(java.lang.String)` was removed +* `validate()` was removed + +#### `models.AutoScaleVCoreUpdateParameters` was modified + +* `validate()` was removed + +#### `models.ServiceSpecification` was modified + +* `ServiceSpecification()` was changed to private access +* `withMetricSpecifications(java.util.List)` was removed +* `withLogSpecifications(java.util.List)` was removed +* `validate()` was removed + +#### `models.LogSpecification` was modified + +* `LogSpecification()` was changed to private access +* `withDisplayName(java.lang.String)` was removed +* `validate()` was removed + +#### `models.CapacitySku` was modified + +* `validate()` was removed + +#### `models.DedicatedCapacity$Definition` was modified + +* `withSystemData(com.azure.core.management.SystemData)` was removed + +#### `models.DedicatedCapacityUpdateParameters` was modified + +* `validate()` was removed + +#### `models.MetricSpecification` was modified + +* `MetricSpecification()` was changed to private access +* `validate()` was removed +* `withDisplayDescription(java.lang.String)` was removed +* `withDimensions(java.util.List)` was removed +* `withDisplayName(java.lang.String)` was removed + +#### `models.AutoScaleVCore$Definition` was modified + +* `withSystemData(com.azure.core.management.SystemData)` was removed + +#### `models.OperationProperties` was modified + +* `OperationProperties()` was changed to private access +* `withServiceSpecification(models.ServiceSpecification)` was removed +* `validate()` was removed ## 1.0.0 (2024-12-25) diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/README.md b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/README.md index f130e4c6135f..925b2b115e61 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/README.md +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/README.md @@ -2,7 +2,7 @@ Azure Resource Manager PowerBIDedicated client library for Java. -This package contains Microsoft Azure SDK for PowerBIDedicated Management SDK. PowerBI Dedicated Web API provides a RESTful set of web services that enables users to create, retrieve, update, and delete Power BI dedicated capacities. Package tag package-2021-01-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for PowerBIDedicated Management SDK. PowerBI Dedicated Web API provides a RESTful set of web services that enables users to create, retrieve, update, and delete Power BI dedicated capacities. Package api-version 2021-01-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-powerbidedicated - 1.1.0-beta.1 + 1.1.0 ``` [//]: # ({x-version-update-end}) @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ PowerBIDedicatedManager manager = PowerBIDedicatedManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/SAMPLE.md b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/SAMPLE.md index ebc830819408..f9800cf7f9df 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/SAMPLE.md +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/SAMPLE.md @@ -40,9 +40,7 @@ import java.util.Map; */ public final class AutoScaleVCoresCreateSamples { /* - * x-ms-original-file: - * specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/ - * createAutoScaleVCore.json + * x-ms-original-file: 2021-01-01/createAutoScaleVCore.json */ /** * Sample code: Create auto scale v-core. @@ -84,9 +82,7 @@ public final class AutoScaleVCoresCreateSamples { */ public final class AutoScaleVCoresDeleteSamples { /* - * x-ms-original-file: - * specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/ - * deleteAutoScaleVCore.json + * x-ms-original-file: 2021-01-01/deleteAutoScaleVCore.json */ /** * Sample code: Delete an auto scale v-core. @@ -109,9 +105,7 @@ public final class AutoScaleVCoresDeleteSamples { */ public final class AutoScaleVCoresGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/ - * getAutoScaleVCore.json + * x-ms-original-file: 2021-01-01/getAutoScaleVCore.json */ /** * Sample code: Get details of an auto scale v-core. @@ -134,9 +128,7 @@ public final class AutoScaleVCoresGetByResourceGroupSamples { */ public final class AutoScaleVCoresListSamples { /* - * x-ms-original-file: - * specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/ - * listAutoScaleVCoresInSubscription.json + * x-ms-original-file: 2021-01-01/listAutoScaleVCoresInSubscription.json */ /** * Sample code: List auto scale v-cores in subscription. @@ -158,9 +150,7 @@ public final class AutoScaleVCoresListSamples { */ public final class AutoScaleVCoresListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/ - * listAutoScaleVCoresInResourceGroup.json + * x-ms-original-file: 2021-01-01/listAutoScaleVCoresInResourceGroup.json */ /** * Sample code: List auto scale v-cores in resource group. @@ -188,9 +178,7 @@ import java.util.Map; */ public final class AutoScaleVCoresUpdateSamples { /* - * x-ms-original-file: - * specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/ - * updateAutoScaleVCore.json + * x-ms-original-file: 2021-01-01/updateAutoScaleVCore.json */ /** * Sample code: Update auto scale v-core parameters. @@ -233,9 +221,7 @@ import com.azure.resourcemanager.powerbidedicated.models.CheckCapacityNameAvaila */ public final class CapacitiesCheckNameAvailabilitySamples { /* - * x-ms-original-file: - * specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/ - * checkNameAvailability.json + * x-ms-original-file: 2021-01-01/checkNameAvailability.json */ /** * Sample code: Check name availability of a capacity. @@ -268,9 +254,7 @@ import java.util.Map; */ public final class CapacitiesCreateSamples { /* - * x-ms-original-file: - * specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/ - * createCapacity.json + * x-ms-original-file: 2021-01-01/createCapacity.json */ /** * Sample code: Create capacity. @@ -311,9 +295,7 @@ public final class CapacitiesCreateSamples { */ public final class CapacitiesDeleteSamples { /* - * x-ms-original-file: - * specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/ - * deleteCapacity.json + * x-ms-original-file: 2021-01-01/deleteCapacity.json */ /** * Sample code: Get details of a capacity. @@ -335,9 +317,7 @@ public final class CapacitiesDeleteSamples { */ public final class CapacitiesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/getCapacity - * .json + * x-ms-original-file: 2021-01-01/getCapacity.json */ /** * Sample code: Get details of a capacity. @@ -359,9 +339,7 @@ public final class CapacitiesGetByResourceGroupSamples { */ public final class CapacitiesListSamples { /* - * x-ms-original-file: - * specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/ - * listCapacitiesInSubscription.json + * x-ms-original-file: 2021-01-01/listCapacitiesInSubscription.json */ /** * Sample code: Get details of a capacity. @@ -383,9 +361,7 @@ public final class CapacitiesListSamples { */ public final class CapacitiesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/ - * listCapacitiesInResourceGroup.json + * x-ms-original-file: 2021-01-01/listCapacitiesInResourceGroup.json */ /** * Sample code: List capacities in resource group. @@ -407,9 +383,7 @@ public final class CapacitiesListByResourceGroupSamples { */ public final class CapacitiesListSkusSamples { /* - * x-ms-original-file: - * specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/ - * listSKUsForNew.json + * x-ms-original-file: 2021-01-01/listSKUsForNew.json */ /** * Sample code: List eligible SKUs for a new capacity. @@ -431,9 +405,7 @@ public final class CapacitiesListSkusSamples { */ public final class CapacitiesListSkusForCapacitySamples { /* - * x-ms-original-file: - * specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/ - * listSKUsForExisting.json + * x-ms-original-file: 2021-01-01/listSKUsForExisting.json */ /** * Sample code: List eligible SKUs for an existing capacity. @@ -455,9 +427,7 @@ public final class CapacitiesListSkusForCapacitySamples { */ public final class CapacitiesResumeSamples { /* - * x-ms-original-file: - * specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/ - * resumeCapacity.json + * x-ms-original-file: 2021-01-01/resumeCapacity.json */ /** * Sample code: Get details of a capacity. @@ -479,9 +449,7 @@ public final class CapacitiesResumeSamples { */ public final class CapacitiesSuspendSamples { /* - * x-ms-original-file: - * specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/ - * suspendCapacity.json + * x-ms-original-file: 2021-01-01/suspendCapacity.json */ /** * Sample code: Suspend capacity. @@ -511,9 +479,7 @@ import java.util.Map; */ public final class CapacitiesUpdateSamples { /* - * x-ms-original-file: - * specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/ - * updateToGen2.json + * x-ms-original-file: 2021-01-01/updateToGen2.json */ /** * Sample code: Update capacity to Generation 2. @@ -533,9 +499,7 @@ public final class CapacitiesUpdateSamples { } /* - * x-ms-original-file: - * specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/ - * updateCapacity.json + * x-ms-original-file: 2021-01-01/updateCapacity.json */ /** * Sample code: Update capacity parameters. @@ -577,9 +541,7 @@ public final class CapacitiesUpdateSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/operations. - * json + * x-ms-original-file: 2021-01-01/operations.json */ /** * Sample code: List operations. diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/pom.xml b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/pom.xml index aeadcb8bf9c6..d104e8b8b99c 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/pom.xml +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/pom.xml @@ -1,9 +1,9 @@ - + 4.0.0 com.azure @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-powerbidedicated - 1.1.0-beta.1 + 1.1.0 jar Microsoft Azure SDK for PowerBIDedicated Management - This package contains Microsoft Azure SDK for PowerBIDedicated Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. PowerBI Dedicated Web API provides a RESTful set of web services that enables users to create, retrieve, update, and delete Power BI dedicated capacities. Package tag package-2021-01-01. + This package contains Microsoft Azure SDK for PowerBIDedicated Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. PowerBI Dedicated Web API provides a RESTful set of web services that enables users to create, retrieve, update, and delete Power BI dedicated capacities. Package api-version 2021-01-01. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,7 @@ UTF-8 0 0 - false + true diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/PowerBIDedicatedManager.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/PowerBIDedicatedManager.java index b93ce66881dc..0c1d4cb99e49 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/PowerBIDedicatedManager.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/PowerBIDedicatedManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated; @@ -22,12 +22,13 @@ import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.powerbidedicated.fluent.PowerBIDedicated; +import com.azure.resourcemanager.powerbidedicated.fluent.PowerBIDedicatedManagementClient; import com.azure.resourcemanager.powerbidedicated.implementation.AutoScaleVCoresImpl; import com.azure.resourcemanager.powerbidedicated.implementation.CapacitiesImpl; import com.azure.resourcemanager.powerbidedicated.implementation.OperationsImpl; -import com.azure.resourcemanager.powerbidedicated.implementation.PowerBIDedicatedBuilder; +import com.azure.resourcemanager.powerbidedicated.implementation.PowerBIDedicatedManagementClientBuilder; import com.azure.resourcemanager.powerbidedicated.models.AutoScaleVCores; import com.azure.resourcemanager.powerbidedicated.models.Capacities; import com.azure.resourcemanager.powerbidedicated.models.Operations; @@ -35,6 +36,7 @@ import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; @@ -44,18 +46,18 @@ * delete Power BI dedicated capacities. */ public final class PowerBIDedicatedManager { - private Capacities capacities; - private Operations operations; + private Capacities capacities; + private AutoScaleVCores autoScaleVCores; - private final PowerBIDedicated clientObject; + private final PowerBIDedicatedManagementClient clientObject; private PowerBIDedicatedManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new PowerBIDedicatedBuilder().pipeline(httpPipeline) + this.clientObject = new PowerBIDedicatedManagementClientBuilder().pipeline(httpPipeline) .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .subscriptionId(profile.getSubscriptionId()) .defaultPollInterval(defaultPollInterval) @@ -102,6 +104,9 @@ public static Configurable configure() { */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + private static final String SDK_VERSION = "version"; + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-resourcemanager-powerbidedicated.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -209,12 +214,14 @@ public PowerBIDedicatedManager authenticate(TokenCredential credential, AzurePro Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.powerbidedicated") .append("/") - .append("1.0.0"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -260,18 +267,6 @@ public PowerBIDedicatedManager authenticate(TokenCredential credential, AzurePro } } - /** - * Gets the resource collection API of Capacities. It manages DedicatedCapacity. - * - * @return Resource collection API of Capacities. - */ - public Capacities capacities() { - if (this.capacities == null) { - this.capacities = new CapacitiesImpl(clientObject.getCapacities(), this); - } - return capacities; - } - /** * Gets the resource collection API of Operations. * @@ -284,6 +279,18 @@ public Operations operations() { return operations; } + /** + * Gets the resource collection API of Capacities. It manages DedicatedCapacity. + * + * @return Resource collection API of Capacities. + */ + public Capacities capacities() { + if (this.capacities == null) { + this.capacities = new CapacitiesImpl(clientObject.getCapacities(), this); + } + return capacities; + } + /** * Gets the resource collection API of AutoScaleVCores. It manages AutoScaleVCore. * @@ -297,12 +304,12 @@ public AutoScaleVCores autoScaleVCores() { } /** - * Gets wrapped service client PowerBIDedicated providing direct access to the underlying auto-generated API - * implementation, based on Azure REST API. + * Gets wrapped service client PowerBIDedicatedManagementClient providing direct access to the underlying + * auto-generated API implementation, based on Azure REST API. * - * @return Wrapped service client PowerBIDedicated. + * @return Wrapped service client PowerBIDedicatedManagementClient. */ - public PowerBIDedicated serviceClient() { + public PowerBIDedicatedManagementClient serviceClient() { return this.clientObject; } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/AutoScaleVCoresClient.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/AutoScaleVCoresClient.java index 853ec3e2bc7f..5032f72e2e3e 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/AutoScaleVCoresClient.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/AutoScaleVCoresClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.fluent; @@ -19,8 +19,7 @@ public interface AutoScaleVCoresClient { /** * Gets details about the specified auto scale v-core. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -35,8 +34,7 @@ Response getByResourceGroupWithResponse(String resourceGrou /** * Gets details about the specified auto scale v-core. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -49,8 +47,7 @@ Response getByResourceGroupWithResponse(String resourceGrou /** * Provisions the specified auto scale v-core based on the configuration specified in the request. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. * @param vCoreParameters Contains the information used to provision the auto scale v-core. * @param context The context to associate with this operation. @@ -66,8 +63,7 @@ Response createWithResponse(String resourceGroupName, Strin /** * Provisions the specified auto scale v-core based on the configuration specified in the request. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. * @param vCoreParameters Contains the information used to provision the auto scale v-core. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -79,71 +75,66 @@ Response createWithResponse(String resourceGroupName, Strin AutoScaleVCoreInner create(String resourceGroupName, String vcoreName, AutoScaleVCoreInner vCoreParameters); /** - * Deletes the specified auto scale v-core. + * Updates the current state of the specified auto scale v-core. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. + * @param vCoreUpdateParameters Request object that contains the updated information for the auto scale v-core. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return represents an instance of an auto scale v-core resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String vcoreName, Context context); + Response updateWithResponse(String resourceGroupName, String vcoreName, + AutoScaleVCoreUpdateParameters vCoreUpdateParameters, Context context); /** - * Deletes the specified auto scale v-core. + * Updates the current state of the specified auto scale v-core. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. + * @param vCoreUpdateParameters Request object that contains the updated information for the auto scale v-core. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents an instance of an auto scale v-core resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String vcoreName); + AutoScaleVCoreInner update(String resourceGroupName, String vcoreName, + AutoScaleVCoreUpdateParameters vCoreUpdateParameters); /** - * Updates the current state of the specified auto scale v-core. + * Deletes the specified auto scale v-core. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. - * @param vCoreUpdateParameters Request object that contains the updated information for the auto scale v-core. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an instance of an auto scale v-core resource along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String vcoreName, - AutoScaleVCoreUpdateParameters vCoreUpdateParameters, Context context); + Response deleteWithResponse(String resourceGroupName, String vcoreName, Context context); /** - * Updates the current state of the specified auto scale v-core. + * Deletes the specified auto scale v-core. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. - * @param vCoreUpdateParameters Request object that contains the updated information for the auto scale v-core. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an instance of an auto scale v-core resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - AutoScaleVCoreInner update(String resourceGroupName, String vcoreName, - AutoScaleVCoreUpdateParameters vCoreUpdateParameters); + void delete(String resourceGroupName, String vcoreName); /** * Gets all the auto scale v-cores for the given resource group. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -155,8 +146,7 @@ AutoScaleVCoreInner update(String resourceGroupName, String vcoreName, /** * Gets all the auto scale v-cores for the given resource group. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/CapacitiesClient.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/CapacitiesClient.java index 0e929b21341f..9fedd2c5d0db 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/CapacitiesClient.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/CapacitiesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.fluent; @@ -25,8 +25,7 @@ public interface CapacitiesClient { /** * Gets details about the specified dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a * maximum of 63. * @param context The context to associate with this operation. @@ -42,8 +41,7 @@ Response getByResourceGroupWithResponse(String resourceG /** * Gets details about the specified dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,9 +55,8 @@ Response getByResourceGroupWithResponse(String resourceG /** * Provisions the specified Dedicated capacity based on the configuration specified in the request. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be a minimum of 3 characters, and a + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a * maximum of 63. * @param capacityParameters Contains the information used to provision the Dedicated capacity. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -74,9 +71,8 @@ SyncPoller, DedicatedCapacityInner> beginCrea /** * Provisions the specified Dedicated capacity based on the configuration specified in the request. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be a minimum of 3 characters, and a + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a * maximum of 63. * @param capacityParameters Contains the information used to provision the Dedicated capacity. * @param context The context to associate with this operation. @@ -92,9 +88,8 @@ SyncPoller, DedicatedCapacityInner> beginCrea /** * Provisions the specified Dedicated capacity based on the configuration specified in the request. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be a minimum of 3 characters, and a + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a * maximum of 63. * @param capacityParameters Contains the information used to provision the Dedicated capacity. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -109,9 +104,8 @@ DedicatedCapacityInner create(String resourceGroupName, String dedicatedCapacity /** * Provisions the specified Dedicated capacity based on the configuration specified in the request. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be a minimum of 3 characters, and a + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a * maximum of 63. * @param capacityParameters Contains the information used to provision the Dedicated capacity. * @param context The context to associate with this operation. @@ -124,13 +118,78 @@ DedicatedCapacityInner create(String resourceGroupName, String dedicatedCapacity DedicatedCapacityInner create(String resourceGroupName, String dedicatedCapacityName, DedicatedCapacityInner capacityParameters, Context context); + /** + * Updates the current state of the specified Dedicated capacity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. + * @param capacityUpdateParameters Request object that contains the updated information for the capacity. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of represents an instance of a Dedicated Capacity resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DedicatedCapacityInner> beginUpdate(String resourceGroupName, + String dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters); + + /** + * Updates the current state of the specified Dedicated capacity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. + * @param capacityUpdateParameters Request object that contains the updated information for the capacity. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of represents an instance of a Dedicated Capacity resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DedicatedCapacityInner> beginUpdate(String resourceGroupName, + String dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters, Context context); + + /** + * Updates the current state of the specified Dedicated capacity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. + * @param capacityUpdateParameters Request object that contains the updated information for the capacity. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents an instance of a Dedicated Capacity resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DedicatedCapacityInner update(String resourceGroupName, String dedicatedCapacityName, + DedicatedCapacityUpdateParameters capacityUpdateParameters); + + /** + * Updates the current state of the specified Dedicated capacity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. + * @param capacityUpdateParameters Request object that contains the updated information for the capacity. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents an instance of a Dedicated Capacity resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DedicatedCapacityInner update(String resourceGroupName, String dedicatedCapacityName, + DedicatedCapacityUpdateParameters capacityUpdateParameters, Context context); + /** * Deletes the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -142,10 +201,9 @@ DedicatedCapacityInner create(String resourceGroupName, String dedicatedCapacity /** * Deletes the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -159,10 +217,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -173,10 +230,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -186,82 +242,60 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String dedicatedCapacityName, Context context); /** - * Updates the current state of the specified Dedicated capacity. + * Gets all the Dedicated capacities for the given resource group. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param capacityUpdateParameters Request object that contains the updated information for the capacity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents an instance of a Dedicated Capacity resource. + * @return all the Dedicated capacities for the given resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DedicatedCapacityInner> beginUpdate(String resourceGroupName, - String dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Updates the current state of the specified Dedicated capacity. + * Gets all the Dedicated capacities for the given resource group. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param capacityUpdateParameters Request object that contains the updated information for the capacity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents an instance of a Dedicated Capacity resource. + * @return all the Dedicated capacities for the given resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DedicatedCapacityInner> beginUpdate(String resourceGroupName, - String dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Updates the current state of the specified Dedicated capacity. + * Lists all the Dedicated capacities for the given subscription. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param capacityUpdateParameters Request object that contains the updated information for the capacity. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an instance of a Dedicated Capacity resource. + * @return an array of Dedicated capacities resources as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DedicatedCapacityInner update(String resourceGroupName, String dedicatedCapacityName, - DedicatedCapacityUpdateParameters capacityUpdateParameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); /** - * Updates the current state of the specified Dedicated capacity. + * Lists all the Dedicated capacities for the given subscription. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param capacityUpdateParameters Request object that contains the updated information for the capacity. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an instance of a Dedicated Capacity resource. + * @return an array of Dedicated capacities resources as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DedicatedCapacityInner update(String resourceGroupName, String dedicatedCapacityName, - DedicatedCapacityUpdateParameters capacityUpdateParameters, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); /** * Suspends operation of the specified dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -273,10 +307,9 @@ DedicatedCapacityInner update(String resourceGroupName, String dedicatedCapacity /** * Suspends operation of the specified dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -290,10 +323,9 @@ SyncPoller, Void> beginSuspend(String resourceGroupName, String /** * Suspends operation of the specified dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -304,10 +336,9 @@ SyncPoller, Void> beginSuspend(String resourceGroupName, String /** * Suspends operation of the specified dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -319,10 +350,9 @@ SyncPoller, Void> beginSuspend(String resourceGroupName, String /** * Resumes operation of the specified Dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -334,10 +364,9 @@ SyncPoller, Void> beginSuspend(String resourceGroupName, String /** * Resumes operation of the specified Dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -351,10 +380,9 @@ SyncPoller, Void> beginResume(String resourceGroupName, String /** * Resumes operation of the specified Dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -365,10 +393,9 @@ SyncPoller, Void> beginResume(String resourceGroupName, String /** * Resumes operation of the specified Dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -378,55 +405,35 @@ SyncPoller, Void> beginResume(String resourceGroupName, String void resume(String resourceGroupName, String dedicatedCapacityName, Context context); /** - * Gets all the Dedicated capacities for the given resource group. - * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Dedicated capacities for the given resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Gets all the Dedicated capacities for the given resource group. + * Lists eligible SKUs for a PowerBI Dedicated resource. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Dedicated capacities for the given resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Lists all the Dedicated capacities for the given subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of Dedicated capacities resources as paginated response with {@link PagedIterable}. + * @return an object that represents enumerating SKUs for existing resources along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + @ServiceMethod(returns = ReturnType.SINGLE) + Response listSkusForCapacityWithResponse(String resourceGroupName, + String dedicatedCapacityName, Context context); /** - * Lists all the Dedicated capacities for the given subscription. + * Lists eligible SKUs for a PowerBI Dedicated resource. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of Dedicated capacities resources as paginated response with {@link PagedIterable}. + * @return an object that represents enumerating SKUs for existing resources. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + SkuEnumerationForExistingResourceResultInner listSkusForCapacity(String resourceGroupName, + String dedicatedCapacityName); /** * Lists eligible SKUs for PowerBI Dedicated resource provider. @@ -450,44 +457,11 @@ SyncPoller, Void> beginResume(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) SkuEnumerationForNewResourceResultInner listSkus(); - /** - * Lists eligible SKUs for a PowerBI Dedicated resource. - * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents enumerating SKUs for existing resources along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listSkusForCapacityWithResponse(String resourceGroupName, - String dedicatedCapacityName, Context context); - - /** - * Lists eligible SKUs for a PowerBI Dedicated resource. - * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents enumerating SKUs for existing resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SkuEnumerationForExistingResourceResultInner listSkusForCapacity(String resourceGroupName, - String dedicatedCapacityName); - /** * Check the name availability in the target location. * - * @param location The region name which the operation will lookup into. - * @param capacityParameters The name of the capacity. + * @param location The location name. + * @param capacityParameters The request body. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -501,8 +475,8 @@ Response checkNameAvailabilityWithResp /** * Check the name availability in the target location. * - * @param location The region name which the operation will lookup into. - * @param capacityParameters The name of the capacity. + * @param location The location name. + * @param capacityParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/OperationsClient.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/OperationsClient.java index bc7deda04e85..4bb4aef9ce95 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/OperationsClient.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.fluent; @@ -15,7 +15,7 @@ */ public interface OperationsClient { /** - * Lists all of the available PowerBIDedicated REST API operations. + * List the operations for the provider. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -25,7 +25,7 @@ public interface OperationsClient { PagedIterable list(); /** - * Lists all of the available PowerBIDedicated REST API operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/PowerBIDedicated.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/PowerBIDedicatedManagementClient.java similarity index 80% rename from sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/PowerBIDedicated.java rename to sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/PowerBIDedicatedManagementClient.java index eeb6defe0a3a..e37dfd7a0bff 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/PowerBIDedicated.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/PowerBIDedicatedManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.fluent; @@ -8,31 +8,30 @@ import java.time.Duration; /** - * The interface for PowerBIDedicated class. + * The interface for PowerBIDedicatedManagementClient class. */ -public interface PowerBIDedicated { +public interface PowerBIDedicatedManagementClient { /** - * Gets A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every - * service call. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -48,18 +47,18 @@ public interface PowerBIDedicated { Duration getDefaultPollInterval(); /** - * Gets the CapacitiesClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the CapacitiesClient object. + * @return the OperationsClient object. */ - CapacitiesClient getCapacities(); + OperationsClient getOperations(); /** - * Gets the OperationsClient object to access its operations. + * Gets the CapacitiesClient object to access its operations. * - * @return the OperationsClient object. + * @return the CapacitiesClient object. */ - OperationsClient getOperations(); + CapacitiesClient getCapacities(); /** * Gets the AutoScaleVCoresClient object to access its operations. diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/AutoScaleVCoreInner.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/AutoScaleVCoreInner.java index 45ca878bb520..a6d5a7715f26 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/AutoScaleVCoreInner.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/AutoScaleVCoreInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -22,17 +21,17 @@ @Fluent public final class AutoScaleVCoreInner extends Resource { /* - * The SKU of the auto scale v-core resource. + * Properties of an auto scale v-core resource. */ - private AutoScaleVCoreSku sku; + private AutoScaleVCoreProperties innerProperties; /* - * Properties of an auto scale v-core resource. + * The SKU of the auto scale v-core resource. */ - private AutoScaleVCoreProperties innerProperties; + private AutoScaleVCoreSku sku; /* - * Metadata pertaining to creation and last modification of the resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -57,6 +56,15 @@ public final class AutoScaleVCoreInner extends Resource { public AutoScaleVCoreInner() { } + /** + * Get the innerProperties property: Properties of an auto scale v-core resource. + * + * @return the innerProperties value. + */ + private AutoScaleVCoreProperties innerProperties() { + return this.innerProperties; + } + /** * Get the sku property: The SKU of the auto scale v-core resource. * @@ -78,16 +86,7 @@ public AutoScaleVCoreInner withSku(AutoScaleVCoreSku sku) { } /** - * Get the innerProperties property: Properties of an auto scale v-core resource. - * - * @return the innerProperties value. - */ - private AutoScaleVCoreProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -95,17 +94,6 @@ public SystemData systemData() { return this.systemData; } - /** - * Set the systemData property: Metadata pertaining to creation and last modification of the resource. - * - * @param systemData the systemData value to set. - * @return the AutoScaleVCoreInner object itself. - */ - public AutoScaleVCoreInner withSystemData(SystemData systemData) { - this.systemData = systemData; - return this; - } - /** * Get the type property: The type of the resource. * @@ -212,25 +200,6 @@ public AutoScaleVCoreInner withCapacityLimit(Integer capacityLimit) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sku() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property sku in model AutoScaleVCoreInner")); - } else { - sku().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AutoScaleVCoreInner.class); - /** * {@inheritDoc} */ @@ -241,7 +210,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("sku", this.sku); jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeJsonField("systemData", this.systemData); return jsonWriter.writeEndObject(); } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/AutoScaleVCoreMutableProperties.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/AutoScaleVCoreMutableProperties.java index 9c4492636174..7eaa414a1d46 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/AutoScaleVCoreMutableProperties.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/AutoScaleVCoreMutableProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.fluent.models; @@ -47,14 +47,6 @@ public AutoScaleVCoreMutableProperties withCapacityLimit(Integer capacityLimit) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/AutoScaleVCoreProperties.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/AutoScaleVCoreProperties.java index 15236e7757d0..aff9bb62fe67 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/AutoScaleVCoreProperties.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/AutoScaleVCoreProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.fluent.models; @@ -74,15 +74,6 @@ public AutoScaleVCoreProperties withCapacityLimit(Integer capacityLimit) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/CheckCapacityNameAvailabilityResultInner.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/CheckCapacityNameAvailabilityResultInner.java index 2025acb5721a..ea777f5845ec 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/CheckCapacityNameAvailabilityResultInner.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/CheckCapacityNameAvailabilityResultInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The checking result of capacity name availability. */ -@Fluent +@Immutable public final class CheckCapacityNameAvailabilityResultInner implements JsonSerializable { /* @@ -35,7 +35,7 @@ public final class CheckCapacityNameAvailabilityResultInner /** * Creates an instance of CheckCapacityNameAvailabilityResultInner class. */ - public CheckCapacityNameAvailabilityResultInner() { + private CheckCapacityNameAvailabilityResultInner() { } /** @@ -47,17 +47,6 @@ public Boolean nameAvailable() { return this.nameAvailable; } - /** - * Set the nameAvailable property: Indicator of availability of the capacity name. - * - * @param nameAvailable the nameAvailable value to set. - * @return the CheckCapacityNameAvailabilityResultInner object itself. - */ - public CheckCapacityNameAvailabilityResultInner withNameAvailable(Boolean nameAvailable) { - this.nameAvailable = nameAvailable; - return this; - } - /** * Get the reason property: The reason of unavailability. * @@ -67,17 +56,6 @@ public String reason() { return this.reason; } - /** - * Set the reason property: The reason of unavailability. - * - * @param reason the reason value to set. - * @return the CheckCapacityNameAvailabilityResultInner object itself. - */ - public CheckCapacityNameAvailabilityResultInner withReason(String reason) { - this.reason = reason; - return this; - } - /** * Get the message property: The detailed message of the request unavailability. * @@ -87,25 +65,6 @@ public String message() { return this.message; } - /** - * Set the message property: The detailed message of the request unavailability. - * - * @param message the message value to set. - * @return the CheckCapacityNameAvailabilityResultInner object itself. - */ - public CheckCapacityNameAvailabilityResultInner withMessage(String message) { - this.message = message; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/DedicatedCapacityInner.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/DedicatedCapacityInner.java index 5504bf28b687..9270c4857bbb 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/DedicatedCapacityInner.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/DedicatedCapacityInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -25,17 +24,17 @@ @Fluent public final class DedicatedCapacityInner extends Resource { /* - * The SKU of the PowerBI Dedicated capacity resource. + * Properties of the provision operation request. */ - private CapacitySku sku; + private DedicatedCapacityProperties innerProperties; /* - * Properties of the provision operation request. + * The SKU of the PowerBI Dedicated capacity resource. */ - private DedicatedCapacityProperties innerProperties; + private CapacitySku sku; /* - * Metadata pertaining to creation and last modification of the resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -60,6 +59,15 @@ public final class DedicatedCapacityInner extends Resource { public DedicatedCapacityInner() { } + /** + * Get the innerProperties property: Properties of the provision operation request. + * + * @return the innerProperties value. + */ + private DedicatedCapacityProperties innerProperties() { + return this.innerProperties; + } + /** * Get the sku property: The SKU of the PowerBI Dedicated capacity resource. * @@ -81,16 +89,7 @@ public DedicatedCapacityInner withSku(CapacitySku sku) { } /** - * Get the innerProperties property: Properties of the provision operation request. - * - * @return the innerProperties value. - */ - private DedicatedCapacityProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -98,17 +97,6 @@ public SystemData systemData() { return this.systemData; } - /** - * Set the systemData property: Metadata pertaining to creation and last modification of the resource. - * - * @param systemData the systemData value to set. - * @return the DedicatedCapacityInner object itself. - */ - public DedicatedCapacityInner withSystemData(SystemData systemData) { - this.systemData = systemData; - return this; - } - /** * Get the type property: The type of the resource. * @@ -245,25 +233,6 @@ public String friendlyName() { return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sku() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property sku in model DedicatedCapacityInner")); - } else { - sku().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DedicatedCapacityInner.class); - /** * {@inheritDoc} */ @@ -274,7 +243,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("sku", this.sku); jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeJsonField("systemData", this.systemData); return jsonWriter.writeEndObject(); } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/DedicatedCapacityMutableProperties.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/DedicatedCapacityMutableProperties.java index 76e42036f882..d46c91329eb5 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/DedicatedCapacityMutableProperties.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/DedicatedCapacityMutableProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.fluent.models; @@ -129,17 +129,6 @@ DedicatedCapacityMutableProperties withFriendlyName(String friendlyName) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (administration() != null) { - administration().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/DedicatedCapacityProperties.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/DedicatedCapacityProperties.java index 5a5f9e60a34f..886a36a205ff 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/DedicatedCapacityProperties.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/DedicatedCapacityProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.fluent.models; @@ -105,18 +105,6 @@ public DedicatedCapacityProperties withMode(Mode mode) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (administration() != null) { - administration().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/OperationInner.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/OperationInner.java index 09c00bb36102..9a798c67636c 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/OperationInner.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/OperationInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * Capacities REST API operation. */ -@Fluent +@Immutable public final class OperationInner implements JsonSerializable { /* * Operation name: {provider}/{resource}/{operation}. @@ -41,7 +41,7 @@ public final class OperationInner implements JsonSerializable { /** * Creates an instance of OperationInner class. */ - public OperationInner() { + private OperationInner() { } /** @@ -62,17 +62,6 @@ public OperationDisplay display() { return this.display; } - /** - * Set the display property: The object that represents the operation. - * - * @param display the display value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - /** * Get the origin property: Origin of the operation. * @@ -91,31 +80,6 @@ public OperationProperties properties() { return this.properties; } - /** - * Set the properties property: Additional properties to expose performance metrics to shoebox. - * - * @param properties the properties value to set. - * @return the OperationInner object itself. - */ - public OperationInner withProperties(OperationProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/SkuEnumerationForExistingResourceResultInner.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/SkuEnumerationForExistingResourceResultInner.java index fad1d81e57c7..bb3a692336cc 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/SkuEnumerationForExistingResourceResultInner.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/SkuEnumerationForExistingResourceResultInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * An object that represents enumerating SKUs for existing resources. */ -@Fluent +@Immutable public final class SkuEnumerationForExistingResourceResultInner implements JsonSerializable { /* @@ -27,7 +27,7 @@ public final class SkuEnumerationForExistingResourceResultInner /** * Creates an instance of SkuEnumerationForExistingResourceResultInner class. */ - public SkuEnumerationForExistingResourceResultInner() { + private SkuEnumerationForExistingResourceResultInner() { } /** @@ -39,28 +39,6 @@ public List value() { return this.value; } - /** - * Set the value property: The collection of available SKUs for existing resources. - * - * @param value the value value to set. - * @return the SkuEnumerationForExistingResourceResultInner object itself. - */ - public SkuEnumerationForExistingResourceResultInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/SkuEnumerationForNewResourceResultInner.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/SkuEnumerationForNewResourceResultInner.java index 1531dfda4c4c..561cb14581cc 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/SkuEnumerationForNewResourceResultInner.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/SkuEnumerationForNewResourceResultInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * An object that represents enumerating SKUs for new resources. */ -@Fluent +@Immutable public final class SkuEnumerationForNewResourceResultInner implements JsonSerializable { /* @@ -27,7 +27,7 @@ public final class SkuEnumerationForNewResourceResultInner /** * Creates an instance of SkuEnumerationForNewResourceResultInner class. */ - public SkuEnumerationForNewResourceResultInner() { + private SkuEnumerationForNewResourceResultInner() { } /** @@ -39,28 +39,6 @@ public List value() { return this.value; } - /** - * Set the value property: The collection of available SKUs for new resources. - * - * @param value the value value to set. - * @return the SkuEnumerationForNewResourceResultInner object itself. - */ - public SkuEnumerationForNewResourceResultInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/package-info.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/package-info.java index 1e09c8525a5c..f544b5b2d2c0 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/package-info.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/package-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the inner data models for PowerBIDedicated. diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/package-info.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/package-info.java index 0941b81ce6cf..f01bcdfaf580 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/package-info.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/package-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the service clients for PowerBIDedicated. diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/AutoScaleVCoreImpl.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/AutoScaleVCoreImpl.java index 6d0c30480b80..3d7fb0c3f244 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/AutoScaleVCoreImpl.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/AutoScaleVCoreImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.implementation; @@ -193,11 +193,6 @@ public AutoScaleVCoreImpl withTags(Map tags) { } } - public AutoScaleVCoreImpl withSystemData(SystemData systemData) { - this.innerModel().withSystemData(systemData); - return this; - } - public AutoScaleVCoreImpl withCapacityObjectId(String capacityObjectId) { this.innerModel().withCapacityObjectId(capacityObjectId); return this; @@ -214,6 +209,6 @@ public AutoScaleVCoreImpl withCapacityLimit(Integer capacityLimit) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/AutoScaleVCoresClientImpl.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/AutoScaleVCoresClientImpl.java index 48ec36b312c2..cc82f4ef6f45 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/AutoScaleVCoresClientImpl.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/AutoScaleVCoresClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.implementation; @@ -31,7 +31,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.powerbidedicated.fluent.AutoScaleVCoresClient; import com.azure.resourcemanager.powerbidedicated.fluent.models.AutoScaleVCoreInner; -import com.azure.resourcemanager.powerbidedicated.models.AutoScaleVCoreListResult; +import com.azure.resourcemanager.powerbidedicated.implementation.models.AutoScaleVCoreListResult; import com.azure.resourcemanager.powerbidedicated.models.AutoScaleVCoreUpdateParameters; import reactor.core.publisher.Mono; @@ -47,89 +47,169 @@ public final class AutoScaleVCoresClientImpl implements AutoScaleVCoresClient { /** * The service client containing this operation class. */ - private final PowerBIDedicatedImpl client; + private final PowerBIDedicatedManagementClientImpl client; /** * Initializes an instance of AutoScaleVCoresClientImpl. * * @param client the instance of the service client containing this operation class. */ - AutoScaleVCoresClientImpl(PowerBIDedicatedImpl client) { + AutoScaleVCoresClientImpl(PowerBIDedicatedManagementClientImpl client) { this.service = RestProxy.create(AutoScaleVCoresService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for PowerBIDedicatedAutoScaleVCores to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for PowerBIDedicatedManagementClientAutoScaleVCores to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "PowerBIDedicatedAuto") + @Host("{endpoint}") + @ServiceInterface(name = "PowerBIDedicatedManagementClientAutoScaleVCores") public interface AutoScaleVCoresService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vcoreName") String vcoreName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vcoreName") String vcoreName, + @HeaderParam("Accept") String accept, Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vcoreName") String vcoreName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AutoScaleVCoreInner vCoreParameters, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vcoreName") String vcoreName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AutoScaleVCoreInner vCoreParameters, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vcoreName") String vcoreName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AutoScaleVCoreUpdateParameters vCoreUpdateParameters, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vcoreName") String vcoreName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AutoScaleVCoreUpdateParameters vCoreUpdateParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vcoreName") String vcoreName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AutoScaleVCoreInner vCoreParameters, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vcoreName") String vcoreName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vcoreName") String vcoreName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AutoScaleVCoreUpdateParameters vCoreUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/autoScaleVCores") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/autoScaleVCores") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets details about the specified auto scale v-core. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -140,71 +220,17 @@ Mono> list(@HostParam("$host") String endpoin @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String vcoreName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vcoreName == null) { - return Mono.error(new IllegalArgumentException("Parameter vcoreName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, vcoreName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vcoreName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets details about the specified auto scale v-core. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details about the specified auto scale v-core along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String vcoreName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vcoreName == null) { - return Mono.error(new IllegalArgumentException("Parameter vcoreName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - vcoreName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets details about the specified auto scale v-core. - * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -220,8 +246,7 @@ private Mono getByResourceGroupAsync(String resourceGroupNa /** * Gets details about the specified auto scale v-core. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -232,14 +257,15 @@ private Mono getByResourceGroupAsync(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String vcoreName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, vcoreName, context).block(); + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vcoreName, accept, context); } /** * Gets details about the specified auto scale v-core. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -254,8 +280,7 @@ public AutoScaleVCoreInner getByResourceGroup(String resourceGroupName, String v /** * Provisions the specified auto scale v-core based on the configuration specified in the request. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. * @param vCoreParameters Contains the information used to provision the auto scale v-core. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -267,83 +292,19 @@ public AutoScaleVCoreInner getByResourceGroup(String resourceGroupName, String v @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync(String resourceGroupName, String vcoreName, AutoScaleVCoreInner vCoreParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vcoreName == null) { - return Mono.error(new IllegalArgumentException("Parameter vcoreName is required and cannot be null.")); - } - if (vCoreParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter vCoreParameters is required and cannot be null.")); - } else { - vCoreParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, vcoreName, this.client.getApiVersion(), vCoreParameters, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vcoreName, contentType, accept, vCoreParameters, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Provisions the specified auto scale v-core based on the configuration specified in the request. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. - * @param vCoreParameters Contains the information used to provision the auto scale v-core. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an instance of an auto scale v-core resource along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync(String resourceGroupName, String vcoreName, - AutoScaleVCoreInner vCoreParameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vcoreName == null) { - return Mono.error(new IllegalArgumentException("Parameter vcoreName is required and cannot be null.")); - } - if (vCoreParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter vCoreParameters is required and cannot be null.")); - } else { - vCoreParameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, vcoreName, - this.client.getApiVersion(), vCoreParameters, accept, context); - } - - /** - * Provisions the specified auto scale v-core based on the configuration specified in the request. - * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. * @param vCoreParameters Contains the information used to provision the auto scale v-core. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -361,8 +322,7 @@ private Mono createAsync(String resourceGroupName, String v /** * Provisions the specified auto scale v-core based on the configuration specified in the request. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. * @param vCoreParameters Contains the information used to provision the auto scale v-core. * @param context The context to associate with this operation. @@ -374,14 +334,17 @@ private Mono createAsync(String resourceGroupName, String v @ServiceMethod(returns = ReturnType.SINGLE) public Response createWithResponse(String resourceGroupName, String vcoreName, AutoScaleVCoreInner vCoreParameters, Context context) { - return createWithResponseAsync(resourceGroupName, vcoreName, vCoreParameters, context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vcoreName, contentType, accept, vCoreParameters, + context); } /** * Provisions the specified auto scale v-core based on the configuration specified in the request. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. * @param vCoreParameters Contains the information used to provision the auto scale v-core. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -395,272 +358,154 @@ public AutoScaleVCoreInner create(String resourceGroupName, String vcoreName, Au } /** - * Deletes the specified auto scale v-core. + * Updates the current state of the specified auto scale v-core. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. + * @param vCoreUpdateParameters Request object that contains the updated information for the auto scale v-core. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return represents an instance of an auto scale v-core resource along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String vcoreName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vcoreName == null) { - return Mono.error(new IllegalArgumentException("Parameter vcoreName is required and cannot be null.")); - } + private Mono> updateWithResponseAsync(String resourceGroupName, String vcoreName, + AutoScaleVCoreUpdateParameters vCoreUpdateParameters) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, vcoreName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vcoreName, contentType, accept, + vCoreUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes the specified auto scale v-core. - * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String vcoreName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vcoreName == null) { - return Mono.error(new IllegalArgumentException("Parameter vcoreName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, vcoreName, - this.client.getApiVersion(), accept, context); - } - - /** - * Deletes the specified auto scale v-core. + * Updates the current state of the specified auto scale v-core. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. + * @param vCoreUpdateParameters Request object that contains the updated information for the auto scale v-core. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return represents an instance of an auto scale v-core resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String vcoreName) { - return deleteWithResponseAsync(resourceGroupName, vcoreName).flatMap(ignored -> Mono.empty()); + private Mono updateAsync(String resourceGroupName, String vcoreName, + AutoScaleVCoreUpdateParameters vCoreUpdateParameters) { + return updateWithResponseAsync(resourceGroupName, vcoreName, vCoreUpdateParameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Deletes the specified auto scale v-core. + * Updates the current state of the specified auto scale v-core. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. + * @param vCoreUpdateParameters Request object that contains the updated information for the auto scale v-core. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String vcoreName, Context context) { - return deleteWithResponseAsync(resourceGroupName, vcoreName, context).block(); - } - - /** - * Deletes the specified auto scale v-core. - * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents an instance of an auto scale v-core resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String vcoreName) { - deleteWithResponse(resourceGroupName, vcoreName, Context.NONE); + public Response updateWithResponse(String resourceGroupName, String vcoreName, + AutoScaleVCoreUpdateParameters vCoreUpdateParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vcoreName, contentType, accept, vCoreUpdateParameters, + context); } /** * Updates the current state of the specified auto scale v-core. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. * @param vCoreUpdateParameters Request object that contains the updated information for the auto scale v-core. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an instance of an auto scale v-core resource along with {@link Response} on successful - * completion of {@link Mono}. + * @return represents an instance of an auto scale v-core resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String vcoreName, + public AutoScaleVCoreInner update(String resourceGroupName, String vcoreName, AutoScaleVCoreUpdateParameters vCoreUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vcoreName == null) { - return Mono.error(new IllegalArgumentException("Parameter vcoreName is required and cannot be null.")); - } - if (vCoreUpdateParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter vCoreUpdateParameters is required and cannot be null.")); - } else { - vCoreUpdateParameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, vcoreName, this.client.getApiVersion(), vCoreUpdateParameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return updateWithResponse(resourceGroupName, vcoreName, vCoreUpdateParameters, Context.NONE).getValue(); } /** - * Updates the current state of the specified auto scale v-core. + * Deletes the specified auto scale v-core. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. - * @param vCoreUpdateParameters Request object that contains the updated information for the auto scale v-core. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an instance of an auto scale v-core resource along with {@link Response} on successful - * completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String vcoreName, - AutoScaleVCoreUpdateParameters vCoreUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vcoreName == null) { - return Mono.error(new IllegalArgumentException("Parameter vcoreName is required and cannot be null.")); - } - if (vCoreUpdateParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter vCoreUpdateParameters is required and cannot be null.")); - } else { - vCoreUpdateParameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, vcoreName, - this.client.getApiVersion(), vCoreUpdateParameters, accept, context); + private Mono> deleteWithResponseAsync(String resourceGroupName, String vcoreName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vcoreName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the current state of the specified auto scale v-core. + * Deletes the specified auto scale v-core. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. - * @param vCoreUpdateParameters Request object that contains the updated information for the auto scale v-core. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an instance of an auto scale v-core resource on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String vcoreName, - AutoScaleVCoreUpdateParameters vCoreUpdateParameters) { - return updateWithResponseAsync(resourceGroupName, vcoreName, vCoreUpdateParameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono deleteAsync(String resourceGroupName, String vcoreName) { + return deleteWithResponseAsync(resourceGroupName, vcoreName).flatMap(ignored -> Mono.empty()); } /** - * Updates the current state of the specified auto scale v-core. + * Deletes the specified auto scale v-core. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. - * @param vCoreUpdateParameters Request object that contains the updated information for the auto scale v-core. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an instance of an auto scale v-core resource along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String vcoreName, - AutoScaleVCoreUpdateParameters vCoreUpdateParameters, Context context) { - return updateWithResponseAsync(resourceGroupName, vcoreName, vCoreUpdateParameters, context).block(); + public Response deleteWithResponse(String resourceGroupName, String vcoreName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vcoreName, context); } /** - * Updates the current state of the specified auto scale v-core. + * Deletes the specified auto scale v-core. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. - * @param vCoreUpdateParameters Request object that contains the updated information for the auto scale v-core. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an instance of an auto scale v-core resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AutoScaleVCoreInner update(String resourceGroupName, String vcoreName, - AutoScaleVCoreUpdateParameters vCoreUpdateParameters) { - return updateWithResponse(resourceGroupName, vcoreName, vCoreUpdateParameters, Context.NONE).getValue(); + public void delete(String resourceGroupName, String vcoreName) { + deleteWithResponse(resourceGroupName, vcoreName, Context.NONE); } /** * Gets all the auto scale v-cores for the given resource group. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -669,99 +514,72 @@ public AutoScaleVCoreInner update(String resourceGroupName, String vcoreName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets all the auto scale v-cores for the given resource group. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the auto scale v-cores for the given resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return all the auto scale v-cores for the given resource group as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Gets all the auto scale v-cores for the given resource group. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the auto scale v-cores for the given resource group as paginated response with {@link PagedFlux}. + * @return all the auto scale v-cores for the given resource group along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * Gets all the auto scale v-cores for the given resource group. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the auto scale v-cores for the given resource group as paginated response with {@link PagedFlux}. + * @return all the auto scale v-cores for the given resource group along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * Gets all the auto scale v-cores for the given resource group. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -769,14 +587,14 @@ private PagedFlux listByResourceGroupAsync(String resourceG */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** * Gets all the auto scale v-cores for the given resource group. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -785,7 +603,8 @@ public PagedIterable listByResourceGroup(String resourceGro */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** @@ -798,50 +617,26 @@ public PagedIterable listByResourceGroup(String resourceGro */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all the auto scale v-cores for the given subscription. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of auto scale v-core resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return an array of auto scale v-core resources as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** @@ -849,11 +644,15 @@ private Mono> listSinglePageAsync(Context con * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of auto scale v-core resources as paginated response with {@link PagedFlux}. + * @return an array of auto scale v-core resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -863,11 +662,15 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of auto scale v-core resources as paginated response with {@link PagedFlux}. + * @return an array of auto scale v-core resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -879,7 +682,7 @@ private PagedFlux listAsync(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** @@ -893,6 +696,123 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the auto scale v-cores for the given resource group along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the auto scale v-cores for the given resource group along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the auto scale v-cores for the given resource group along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an array of auto scale v-core resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an array of auto scale v-core resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an array of auto scale v-core resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/AutoScaleVCoresImpl.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/AutoScaleVCoresImpl.java index c70baa73a0a5..a1c68e62c6a9 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/AutoScaleVCoresImpl.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/AutoScaleVCoresImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.implementation; diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/CapacitiesClientImpl.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/CapacitiesClientImpl.java index 8232f2f3debc..b5f9b94a305d 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/CapacitiesClientImpl.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/CapacitiesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.implementation; @@ -29,6 +29,7 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -38,8 +39,8 @@ import com.azure.resourcemanager.powerbidedicated.fluent.models.DedicatedCapacityInner; import com.azure.resourcemanager.powerbidedicated.fluent.models.SkuEnumerationForExistingResourceResultInner; import com.azure.resourcemanager.powerbidedicated.fluent.models.SkuEnumerationForNewResourceResultInner; +import com.azure.resourcemanager.powerbidedicated.implementation.models.DedicatedCapacities; import com.azure.resourcemanager.powerbidedicated.models.CheckCapacityNameAvailabilityParameters; -import com.azure.resourcemanager.powerbidedicated.models.DedicatedCapacities; import com.azure.resourcemanager.powerbidedicated.models.DedicatedCapacityUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -57,138 +58,265 @@ public final class CapacitiesClientImpl implements CapacitiesClient { /** * The service client containing this operation class. */ - private final PowerBIDedicatedImpl client; + private final PowerBIDedicatedManagementClientImpl client; /** * Initializes an instance of CapacitiesClientImpl. * * @param client the instance of the service client containing this operation class. */ - CapacitiesClientImpl(PowerBIDedicatedImpl client) { + CapacitiesClientImpl(PowerBIDedicatedManagementClientImpl client) { this.service = RestProxy.create(CapacitiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for PowerBIDedicatedCapacities to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for PowerBIDedicatedManagementClientCapacities to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "PowerBIDedicatedCapa") + @Host("{endpoint}") + @ServiceInterface(name = "PowerBIDedicatedManagementClientCapacities") public interface CapacitiesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dedicatedCapacityName") String dedicatedCapacityName, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dedicatedCapacityName") String dedicatedCapacityName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dedicatedCapacityName") String dedicatedCapacityName, @HeaderParam("Accept") String accept, + Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dedicatedCapacityName") String dedicatedCapacityName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") DedicatedCapacityInner capacityParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DedicatedCapacityInner capacityParameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}") - @ExpectedResponses({ 200, 202, 204 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dedicatedCapacityName") String dedicatedCapacityName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DedicatedCapacityInner capacityParameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dedicatedCapacityName") String dedicatedCapacityName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") DedicatedCapacityUpdateParameters capacityUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DedicatedCapacityUpdateParameters capacityUpdateParameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/suspend") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> suspend(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dedicatedCapacityName") String dedicatedCapacityName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DedicatedCapacityUpdateParameters capacityUpdateParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dedicatedCapacityName") String dedicatedCapacityName, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/resume") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resume(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dedicatedCapacityName") String dedicatedCapacityName, + @PathParam("dedicatedCapacityName") String dedicatedCapacityName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/capacities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/skus") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/capacities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSkus(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/suspend") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> suspend(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dedicatedCapacityName") String dedicatedCapacityName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/suspend") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response suspendSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dedicatedCapacityName") String dedicatedCapacityName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/resume") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resume(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dedicatedCapacityName") String dedicatedCapacityName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/resume") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response resumeSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dedicatedCapacityName") String dedicatedCapacityName, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/skus") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listSkusForCapacity( - @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dedicatedCapacityName") String dedicatedCapacityName, + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dedicatedCapacityName") String dedicatedCapacityName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/skus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSkusForCapacitySync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dedicatedCapacityName") String dedicatedCapacityName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/skus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSkus(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/skus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSkusSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/locations/{location}/checkNameAvailability") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> checkNameAvailability( - @HostParam("$host") String endpoint, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") CheckCapacityNameAvailabilityParameters capacityParameters, + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CheckCapacityNameAvailabilityParameters capacityParameters, Context context); + + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/locations/{location}/checkNameAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response checkNameAvailabilitySync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CheckCapacityNameAvailabilityParameters capacityParameters, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets details about the specified dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -200,73 +328,17 @@ Mono> checkNameAvailability( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String dedicatedCapacityName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dedicatedCapacityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dedicatedCapacityName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, - dedicatedCapacityName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dedicatedCapacityName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets details about the specified dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a - * maximum of 63. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details about the specified dedicated capacity along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String dedicatedCapacityName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dedicatedCapacityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dedicatedCapacityName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, dedicatedCapacityName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - } - - /** - * Gets details about the specified dedicated capacity. - * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -284,8 +356,7 @@ private Mono getByResourceGroupAsync(String resourceGrou /** * Gets details about the specified dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a * maximum of 63. * @param context The context to associate with this operation. @@ -297,14 +368,15 @@ private Mono getByResourceGroupAsync(String resourceGrou @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String dedicatedCapacityName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, dedicatedCapacityName, context).block(); + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dedicatedCapacityName, accept, context); } /** * Gets details about the specified dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -320,9 +392,8 @@ public DedicatedCapacityInner getByResourceGroup(String resourceGroupName, Strin /** * Provisions the specified Dedicated capacity based on the configuration specified in the request. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be a minimum of 3 characters, and a + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a * maximum of 63. * @param capacityParameters Contains the information used to provision the Dedicated capacity. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -334,113 +405,67 @@ public DedicatedCapacityInner getByResourceGroup(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync(String resourceGroupName, String dedicatedCapacityName, DedicatedCapacityInner capacityParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dedicatedCapacityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dedicatedCapacityName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (capacityParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter capacityParameters is required and cannot be null.")); - } else { - capacityParameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, dedicatedCapacityName, - this.client.getApiVersion(), this.client.getSubscriptionId(), capacityParameters, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dedicatedCapacityName, contentType, accept, + capacityParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Provisions the specified Dedicated capacity based on the configuration specified in the request. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be a minimum of 3 characters, and a + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a * maximum of 63. * @param capacityParameters Contains the information used to provision the Dedicated capacity. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an instance of a Dedicated Capacity resource along with {@link Response} on successful - * completion of {@link Mono}. + * @return represents an instance of a Dedicated Capacity resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String dedicatedCapacityName, DedicatedCapacityInner capacityParameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dedicatedCapacityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dedicatedCapacityName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (capacityParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter capacityParameters is required and cannot be null.")); - } else { - capacityParameters.validate(); - } + private Response createWithResponse(String resourceGroupName, String dedicatedCapacityName, + DedicatedCapacityInner capacityParameters) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, dedicatedCapacityName, - this.client.getApiVersion(), this.client.getSubscriptionId(), capacityParameters, accept, context); + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dedicatedCapacityName, contentType, accept, + capacityParameters, Context.NONE); } /** * Provisions the specified Dedicated capacity based on the configuration specified in the request. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be a minimum of 3 characters, and a + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a * maximum of 63. * @param capacityParameters Contains the information used to provision the Dedicated capacity. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of represents an instance of a Dedicated Capacity resource. + * @return represents an instance of a Dedicated Capacity resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DedicatedCapacityInner> beginCreateAsync( - String resourceGroupName, String dedicatedCapacityName, DedicatedCapacityInner capacityParameters) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, dedicatedCapacityName, capacityParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DedicatedCapacityInner.class, DedicatedCapacityInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String dedicatedCapacityName, + DedicatedCapacityInner capacityParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dedicatedCapacityName, contentType, accept, + capacityParameters, context); } /** * Provisions the specified Dedicated capacity based on the configuration specified in the request. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be a minimum of 3 characters, and a + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a * maximum of 63. * @param capacityParameters Contains the information used to provision the Dedicated capacity. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -448,21 +473,19 @@ private PollerFlux, DedicatedCapacityInner> b */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DedicatedCapacityInner> beginCreateAsync( - String resourceGroupName, String dedicatedCapacityName, DedicatedCapacityInner capacityParameters, - Context context) { - context = this.client.mergeContext(context); + String resourceGroupName, String dedicatedCapacityName, DedicatedCapacityInner capacityParameters) { Mono>> mono - = createWithResponseAsync(resourceGroupName, dedicatedCapacityName, capacityParameters, context); + = createWithResponseAsync(resourceGroupName, dedicatedCapacityName, capacityParameters); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DedicatedCapacityInner.class, DedicatedCapacityInner.class, context); + this.client.getHttpPipeline(), DedicatedCapacityInner.class, DedicatedCapacityInner.class, + this.client.getContext()); } /** * Provisions the specified Dedicated capacity based on the configuration specified in the request. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be a minimum of 3 characters, and a + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a * maximum of 63. * @param capacityParameters Contains the information used to provision the Dedicated capacity. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -473,15 +496,17 @@ private PollerFlux, DedicatedCapacityInner> b @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DedicatedCapacityInner> beginCreate(String resourceGroupName, String dedicatedCapacityName, DedicatedCapacityInner capacityParameters) { - return this.beginCreateAsync(resourceGroupName, dedicatedCapacityName, capacityParameters).getSyncPoller(); + Response response + = createWithResponse(resourceGroupName, dedicatedCapacityName, capacityParameters); + return this.client.getLroResult(response, + DedicatedCapacityInner.class, DedicatedCapacityInner.class, Context.NONE); } /** * Provisions the specified Dedicated capacity based on the configuration specified in the request. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be a minimum of 3 characters, and a + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a * maximum of 63. * @param capacityParameters Contains the information used to provision the Dedicated capacity. * @param context The context to associate with this operation. @@ -493,16 +518,17 @@ public SyncPoller, DedicatedCapacityInner> be @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DedicatedCapacityInner> beginCreate(String resourceGroupName, String dedicatedCapacityName, DedicatedCapacityInner capacityParameters, Context context) { - return this.beginCreateAsync(resourceGroupName, dedicatedCapacityName, capacityParameters, context) - .getSyncPoller(); + Response response + = createWithResponse(resourceGroupName, dedicatedCapacityName, capacityParameters, context); + return this.client.getLroResult(response, + DedicatedCapacityInner.class, DedicatedCapacityInner.class, context); } /** * Provisions the specified Dedicated capacity based on the configuration specified in the request. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be a minimum of 3 characters, and a + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a * maximum of 63. * @param capacityParameters Contains the information used to provision the Dedicated capacity. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -520,30 +546,8 @@ private Mono createAsync(String resourceGroupName, Strin /** * Provisions the specified Dedicated capacity based on the configuration specified in the request. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be a minimum of 3 characters, and a - * maximum of 63. - * @param capacityParameters Contains the information used to provision the Dedicated capacity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an instance of a Dedicated Capacity resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String dedicatedCapacityName, - DedicatedCapacityInner capacityParameters, Context context) { - return beginCreateAsync(resourceGroupName, dedicatedCapacityName, capacityParameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Provisions the specified Dedicated capacity based on the configuration specified in the request. - * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be a minimum of 3 characters, and a + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a * maximum of 63. * @param capacityParameters Contains the information used to provision the Dedicated capacity. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -554,15 +558,14 @@ private Mono createAsync(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) public DedicatedCapacityInner create(String resourceGroupName, String dedicatedCapacityName, DedicatedCapacityInner capacityParameters) { - return createAsync(resourceGroupName, dedicatedCapacityName, capacityParameters).block(); + return beginCreate(resourceGroupName, dedicatedCapacityName, capacityParameters).getFinalResult(); } /** * Provisions the specified Dedicated capacity based on the configuration specified in the request. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be a minimum of 3 characters, and a + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a * maximum of 63. * @param capacityParameters Contains the information used to provision the Dedicated capacity. * @param context The context to associate with this operation. @@ -574,865 +577,657 @@ public DedicatedCapacityInner create(String resourceGroupName, String dedicatedC @ServiceMethod(returns = ReturnType.SINGLE) public DedicatedCapacityInner create(String resourceGroupName, String dedicatedCapacityName, DedicatedCapacityInner capacityParameters, Context context) { - return createAsync(resourceGroupName, dedicatedCapacityName, capacityParameters, context).block(); + return beginCreate(resourceGroupName, dedicatedCapacityName, capacityParameters, context).getFinalResult(); } /** - * Deletes the specified Dedicated capacity. + * Updates the current state of the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. + * @param capacityUpdateParameters Request object that contains the updated information for the capacity. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return represents an instance of a Dedicated Capacity resource along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String dedicatedCapacityName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dedicatedCapacityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dedicatedCapacityName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, + String dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, dedicatedCapacityName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dedicatedCapacityName, contentType, accept, + capacityUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes the specified Dedicated capacity. + * Updates the current state of the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. + * @param capacityUpdateParameters Request object that contains the updated information for the capacity. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return represents an instance of a Dedicated Capacity resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String dedicatedCapacityName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dedicatedCapacityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dedicatedCapacityName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String dedicatedCapacityName, + DedicatedCapacityUpdateParameters capacityUpdateParameters) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, dedicatedCapacityName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dedicatedCapacityName, contentType, accept, + capacityUpdateParameters, Context.NONE); } /** - * Deletes the specified Dedicated capacity. + * Updates the current state of the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. + * @param capacityUpdateParameters Request object that contains the updated information for the capacity. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return represents an instance of a Dedicated Capacity resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String dedicatedCapacityName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, dedicatedCapacityName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String dedicatedCapacityName, + DedicatedCapacityUpdateParameters capacityUpdateParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dedicatedCapacityName, contentType, accept, + capacityUpdateParameters, context); } /** - * Deletes the specified Dedicated capacity. + * Updates the current state of the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. + * @param capacityUpdateParameters Request object that contains the updated information for the capacity. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of represents an instance of a Dedicated Capacity resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String dedicatedCapacityName, - Context context) { - context = this.client.mergeContext(context); + private PollerFlux, DedicatedCapacityInner> beginUpdateAsync( + String resourceGroupName, String dedicatedCapacityName, + DedicatedCapacityUpdateParameters capacityUpdateParameters) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, dedicatedCapacityName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = updateWithResponseAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DedicatedCapacityInner.class, DedicatedCapacityInner.class, + this.client.getContext()); } /** - * Deletes the specified Dedicated capacity. + * Updates the current state of the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. + * @param capacityUpdateParameters Request object that contains the updated information for the capacity. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of represents an instance of a Dedicated Capacity resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String dedicatedCapacityName) { - return this.beginDeleteAsync(resourceGroupName, dedicatedCapacityName).getSyncPoller(); + public SyncPoller, DedicatedCapacityInner> beginUpdate(String resourceGroupName, + String dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters) { + Response response + = updateWithResponse(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters); + return this.client.getLroResult(response, + DedicatedCapacityInner.class, DedicatedCapacityInner.class, Context.NONE); } /** - * Deletes the specified Dedicated capacity. + * Updates the current state of the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. + * @param capacityUpdateParameters Request object that contains the updated information for the capacity. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of represents an instance of a Dedicated Capacity resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String dedicatedCapacityName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, dedicatedCapacityName, context).getSyncPoller(); + public SyncPoller, DedicatedCapacityInner> beginUpdate(String resourceGroupName, + String dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters, Context context) { + Response response + = updateWithResponse(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters, context); + return this.client.getLroResult(response, + DedicatedCapacityInner.class, DedicatedCapacityInner.class, context); } /** - * Deletes the specified Dedicated capacity. + * Updates the current state of the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. + * @param capacityUpdateParameters Request object that contains the updated information for the capacity. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return represents an instance of a Dedicated Capacity resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String dedicatedCapacityName) { - return beginDeleteAsync(resourceGroupName, dedicatedCapacityName).last() + private Mono updateAsync(String resourceGroupName, String dedicatedCapacityName, + DedicatedCapacityUpdateParameters capacityUpdateParameters) { + return beginUpdateAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes the specified Dedicated capacity. + * Updates the current state of the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. + * @param capacityUpdateParameters Request object that contains the updated information for the capacity. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return represents an instance of a Dedicated Capacity resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String dedicatedCapacityName, Context context) { - return beginDeleteAsync(resourceGroupName, dedicatedCapacityName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public DedicatedCapacityInner update(String resourceGroupName, String dedicatedCapacityName, + DedicatedCapacityUpdateParameters capacityUpdateParameters) { + return beginUpdate(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters).getFinalResult(); } /** - * Deletes the specified Dedicated capacity. + * Updates the current state of the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. + * @param capacityUpdateParameters Request object that contains the updated information for the capacity. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents an instance of a Dedicated Capacity resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String dedicatedCapacityName) { - deleteAsync(resourceGroupName, dedicatedCapacityName).block(); + public DedicatedCapacityInner update(String resourceGroupName, String dedicatedCapacityName, + DedicatedCapacityUpdateParameters capacityUpdateParameters, Context context) { + return beginUpdate(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters, context) + .getFinalResult(); } /** * Deletes the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String dedicatedCapacityName, Context context) { - deleteAsync(resourceGroupName, dedicatedCapacityName, context).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String dedicatedCapacityName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dedicatedCapacityName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the current state of the specified Dedicated capacity. + * Deletes the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param capacityUpdateParameters Request object that contains the updated information for the capacity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an instance of a Dedicated Capacity resource along with {@link Response} on successful - * completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dedicatedCapacityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dedicatedCapacityName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (capacityUpdateParameters == null) { - return Mono.error( - new IllegalArgumentException("Parameter capacityUpdateParameters is required and cannot be null.")); - } else { - capacityUpdateParameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, dedicatedCapacityName, - this.client.getApiVersion(), this.client.getSubscriptionId(), capacityUpdateParameters, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Response deleteWithResponse(String resourceGroupName, String dedicatedCapacityName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dedicatedCapacityName, Context.NONE); } /** - * Updates the current state of the specified Dedicated capacity. + * Deletes the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param capacityUpdateParameters Request object that contains the updated information for the capacity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an instance of a Dedicated Capacity resource along with {@link Response} on successful - * completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dedicatedCapacityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dedicatedCapacityName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (capacityUpdateParameters == null) { - return Mono.error( - new IllegalArgumentException("Parameter capacityUpdateParameters is required and cannot be null.")); - } else { - capacityUpdateParameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, dedicatedCapacityName, - this.client.getApiVersion(), this.client.getSubscriptionId(), capacityUpdateParameters, accept, context); + private Response deleteWithResponse(String resourceGroupName, String dedicatedCapacityName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dedicatedCapacityName, context); } /** - * Updates the current state of the specified Dedicated capacity. + * Deletes the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param capacityUpdateParameters Request object that contains the updated information for the capacity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of represents an instance of a Dedicated Capacity resource. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DedicatedCapacityInner> beginUpdateAsync( - String resourceGroupName, String dedicatedCapacityName, - DedicatedCapacityUpdateParameters capacityUpdateParameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DedicatedCapacityInner.class, DedicatedCapacityInner.class, + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String dedicatedCapacityName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, dedicatedCapacityName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Updates the current state of the specified Dedicated capacity. + * Deletes the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param capacityUpdateParameters Request object that contains the updated information for the capacity. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of represents an instance of a Dedicated Capacity resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DedicatedCapacityInner> beginUpdateAsync( - String resourceGroupName, String dedicatedCapacityName, - DedicatedCapacityUpdateParameters capacityUpdateParameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DedicatedCapacityInner.class, DedicatedCapacityInner.class, context); + public SyncPoller, Void> beginDelete(String resourceGroupName, String dedicatedCapacityName) { + Response response = deleteWithResponse(resourceGroupName, dedicatedCapacityName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Updates the current state of the specified Dedicated capacity. + * Deletes the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param capacityUpdateParameters Request object that contains the updated information for the capacity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents an instance of a Dedicated Capacity resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DedicatedCapacityInner> beginUpdate(String resourceGroupName, - String dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters) { - return this.beginUpdateAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters) - .getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String dedicatedCapacityName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, dedicatedCapacityName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Updates the current state of the specified Dedicated capacity. + * Deletes the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param capacityUpdateParameters Request object that contains the updated information for the capacity. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents an instance of a Dedicated Capacity resource. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DedicatedCapacityInner> beginUpdate(String resourceGroupName, - String dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String dedicatedCapacityName) { + return beginDeleteAsync(resourceGroupName, dedicatedCapacityName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates the current state of the specified Dedicated capacity. + * Deletes the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param capacityUpdateParameters Request object that contains the updated information for the capacity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an instance of a Dedicated Capacity resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String dedicatedCapacityName, - DedicatedCapacityUpdateParameters capacityUpdateParameters) { - return beginUpdateAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String dedicatedCapacityName) { + beginDelete(resourceGroupName, dedicatedCapacityName).getFinalResult(); } /** - * Updates the current state of the specified Dedicated capacity. + * Deletes the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param capacityUpdateParameters Request object that contains the updated information for the capacity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an instance of a Dedicated Capacity resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String dedicatedCapacityName, - DedicatedCapacityUpdateParameters capacityUpdateParameters, Context context) { - return beginUpdateAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String dedicatedCapacityName, Context context) { + beginDelete(resourceGroupName, dedicatedCapacityName, context).getFinalResult(); } /** - * Updates the current state of the specified Dedicated capacity. + * Gets all the Dedicated capacities for the given resource group. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param capacityUpdateParameters Request object that contains the updated information for the capacity. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an instance of a Dedicated Capacity resource. + * @return all the Dedicated capacities for the given resource group along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DedicatedCapacityInner update(String resourceGroupName, String dedicatedCapacityName, - DedicatedCapacityUpdateParameters capacityUpdateParameters) { - return updateAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters).block(); + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the current state of the specified Dedicated capacity. + * Gets all the Dedicated capacities for the given resource group. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param capacityUpdateParameters Request object that contains the updated information for the capacity. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an instance of a Dedicated Capacity resource. + * @return all the Dedicated capacities for the given resource group as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DedicatedCapacityInner update(String resourceGroupName, String dedicatedCapacityName, - DedicatedCapacityUpdateParameters capacityUpdateParameters, Context context) { - return updateAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Suspends operation of the specified dedicated capacity instance. + * Gets all the Dedicated capacities for the given resource group. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return all the Dedicated capacities for the given resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> suspendWithResponseAsync(String resourceGroupName, - String dedicatedCapacityName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dedicatedCapacityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dedicatedCapacityName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.suspend(this.client.getEndpoint(), resourceGroupName, dedicatedCapacityName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Suspends operation of the specified dedicated capacity instance. + * Gets all the Dedicated capacities for the given resource group. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return all the Dedicated capacities for the given resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> suspendWithResponseAsync(String resourceGroupName, - String dedicatedCapacityName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dedicatedCapacityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dedicatedCapacityName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.suspend(this.client.getEndpoint(), resourceGroupName, dedicatedCapacityName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Suspends operation of the specified dedicated capacity instance. + * Gets all the Dedicated capacities for the given resource group. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return all the Dedicated capacities for the given resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginSuspendAsync(String resourceGroupName, - String dedicatedCapacityName) { - Mono>> mono = suspendWithResponseAsync(resourceGroupName, dedicatedCapacityName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * Suspends operation of the specified dedicated capacity instance. + * Gets all the Dedicated capacities for the given resource group. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return all the Dedicated capacities for the given resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginSuspendAsync(String resourceGroupName, String dedicatedCapacityName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = suspendWithResponseAsync(resourceGroupName, dedicatedCapacityName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * Suspends operation of the specified dedicated capacity instance. + * Lists all the Dedicated capacities for the given subscription. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return an array of Dedicated capacities resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginSuspend(String resourceGroupName, String dedicatedCapacityName) { - return this.beginSuspendAsync(resourceGroupName, dedicatedCapacityName).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Suspends operation of the specified dedicated capacity instance. + * Lists all the Dedicated capacities for the given subscription. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return an array of Dedicated capacities resources as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginSuspend(String resourceGroupName, String dedicatedCapacityName, - Context context) { - return this.beginSuspendAsync(resourceGroupName, dedicatedCapacityName, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Suspends operation of the specified dedicated capacity instance. + * Lists all the Dedicated capacities for the given subscription. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return an array of Dedicated capacities resources along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono suspendAsync(String resourceGroupName, String dedicatedCapacityName) { - return beginSuspendAsync(resourceGroupName, dedicatedCapacityName).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Suspends operation of the specified dedicated capacity instance. + * Lists all the Dedicated capacities for the given subscription. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return an array of Dedicated capacities resources along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono suspendAsync(String resourceGroupName, String dedicatedCapacityName, Context context) { - return beginSuspendAsync(resourceGroupName, dedicatedCapacityName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Suspends operation of the specified dedicated capacity instance. + * Lists all the Dedicated capacities for the given subscription. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an array of Dedicated capacities resources as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void suspend(String resourceGroupName, String dedicatedCapacityName) { - suspendAsync(resourceGroupName, dedicatedCapacityName).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** - * Suspends operation of the specified dedicated capacity instance. + * Lists all the Dedicated capacities for the given subscription. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an array of Dedicated capacities resources as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void suspend(String resourceGroupName, String dedicatedCapacityName, Context context) { - suspendAsync(resourceGroupName, dedicatedCapacityName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } /** - * Resumes operation of the specified Dedicated capacity instance. + * Suspends operation of the specified dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resumeWithResponseAsync(String resourceGroupName, + private Mono>> suspendWithResponseAsync(String resourceGroupName, String dedicatedCapacityName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dedicatedCapacityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dedicatedCapacityName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.resume(this.client.getEndpoint(), resourceGroupName, dedicatedCapacityName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.suspend(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dedicatedCapacityName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Resumes operation of the specified Dedicated capacity instance. + * Suspends operation of the specified dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resumeWithResponseAsync(String resourceGroupName, - String dedicatedCapacityName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dedicatedCapacityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dedicatedCapacityName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.resume(this.client.getEndpoint(), resourceGroupName, dedicatedCapacityName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + private Response suspendWithResponse(String resourceGroupName, String dedicatedCapacityName) { + return service.suspendSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dedicatedCapacityName, Context.NONE); } /** - * Resumes operation of the specified Dedicated capacity instance. + * Suspends operation of the specified dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginResumeAsync(String resourceGroupName, - String dedicatedCapacityName) { - Mono>> mono = resumeWithResponseAsync(resourceGroupName, dedicatedCapacityName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response suspendWithResponse(String resourceGroupName, String dedicatedCapacityName, + Context context) { + return service.suspendSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dedicatedCapacityName, context); } /** - * Resumes operation of the specified Dedicated capacity instance. + * Suspends operation of the specified dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginResumeAsync(String resourceGroupName, String dedicatedCapacityName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = resumeWithResponseAsync(resourceGroupName, dedicatedCapacityName, context); + private PollerFlux, Void> beginSuspendAsync(String resourceGroupName, + String dedicatedCapacityName) { + Mono>> mono = suspendWithResponseAsync(resourceGroupName, dedicatedCapacityName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Resumes operation of the specified Dedicated capacity instance. + * Suspends operation of the specified dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResume(String resourceGroupName, String dedicatedCapacityName) { - return this.beginResumeAsync(resourceGroupName, dedicatedCapacityName).getSyncPoller(); + public SyncPoller, Void> beginSuspend(String resourceGroupName, String dedicatedCapacityName) { + Response response = suspendWithResponse(resourceGroupName, dedicatedCapacityName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Resumes operation of the specified Dedicated capacity instance. + * Suspends operation of the specified dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1440,321 +1235,295 @@ public SyncPoller, Void> beginResume(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResume(String resourceGroupName, String dedicatedCapacityName, + public SyncPoller, Void> beginSuspend(String resourceGroupName, String dedicatedCapacityName, Context context) { - return this.beginResumeAsync(resourceGroupName, dedicatedCapacityName, context).getSyncPoller(); + Response response = suspendWithResponse(resourceGroupName, dedicatedCapacityName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Resumes operation of the specified Dedicated capacity instance. + * Suspends operation of the specified dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resumeAsync(String resourceGroupName, String dedicatedCapacityName) { - return beginResumeAsync(resourceGroupName, dedicatedCapacityName).last() + private Mono suspendAsync(String resourceGroupName, String dedicatedCapacityName) { + return beginSuspendAsync(resourceGroupName, dedicatedCapacityName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Resumes operation of the specified Dedicated capacity instance. + * Suspends operation of the specified dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resumeAsync(String resourceGroupName, String dedicatedCapacityName, Context context) { - return beginResumeAsync(resourceGroupName, dedicatedCapacityName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void suspend(String resourceGroupName, String dedicatedCapacityName) { + beginSuspend(resourceGroupName, dedicatedCapacityName).getFinalResult(); } /** - * Resumes operation of the specified Dedicated capacity instance. + * Suspends operation of the specified dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void resume(String resourceGroupName, String dedicatedCapacityName) { - resumeAsync(resourceGroupName, dedicatedCapacityName).block(); + public void suspend(String resourceGroupName, String dedicatedCapacityName, Context context) { + beginSuspend(resourceGroupName, dedicatedCapacityName, context).getFinalResult(); } /** * Resumes operation of the specified Dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void resume(String resourceGroupName, String dedicatedCapacityName, Context context) { - resumeAsync(resourceGroupName, dedicatedCapacityName, context).block(); + private Mono>> resumeWithResponseAsync(String resourceGroupName, + String dedicatedCapacityName) { + return FluxUtil + .withContext(context -> service.resume(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dedicatedCapacityName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets all the Dedicated capacities for the given resource group. + * Resumes operation of the specified Dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Dedicated capacities for the given resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Response resumeWithResponse(String resourceGroupName, String dedicatedCapacityName) { + return service.resumeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dedicatedCapacityName, Context.NONE); } /** - * Gets all the Dedicated capacities for the given resource group. + * Resumes operation of the specified Dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Dedicated capacities for the given resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + private Response resumeWithResponse(String resourceGroupName, String dedicatedCapacityName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); + return service.resumeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dedicatedCapacityName, context); } /** - * Gets all the Dedicated capacities for the given resource group. + * Resumes operation of the specified Dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Dedicated capacities for the given resource group as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginResumeAsync(String resourceGroupName, + String dedicatedCapacityName) { + Mono>> mono = resumeWithResponseAsync(resourceGroupName, dedicatedCapacityName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Gets all the Dedicated capacities for the given resource group. + * Resumes operation of the specified Dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Dedicated capacities for the given resource group as paginated response with {@link PagedFlux}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResume(String resourceGroupName, String dedicatedCapacityName) { + Response response = resumeWithResponse(resourceGroupName, dedicatedCapacityName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Gets all the Dedicated capacities for the given resource group. + * Resumes operation of the specified Dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Dedicated capacities for the given resource group as paginated response with - * {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResume(String resourceGroupName, String dedicatedCapacityName, + Context context) { + Response response = resumeWithResponse(resourceGroupName, dedicatedCapacityName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Gets all the Dedicated capacities for the given resource group. + * Resumes operation of the specified Dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Dedicated capacities for the given resource group as paginated response with - * {@link PagedIterable}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resumeAsync(String resourceGroupName, String dedicatedCapacityName) { + return beginResumeAsync(resourceGroupName, dedicatedCapacityName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Lists all the Dedicated capacities for the given subscription. + * Resumes operation of the specified Dedicated capacity instance. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of Dedicated capacities resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public void resume(String resourceGroupName, String dedicatedCapacityName) { + beginResume(resourceGroupName, dedicatedCapacityName).getFinalResult(); } /** - * Lists all the Dedicated capacities for the given subscription. + * Resumes operation of the specified Dedicated capacity instance. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of Dedicated capacities resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); + public void resume(String resourceGroupName, String dedicatedCapacityName, Context context) { + beginResume(resourceGroupName, dedicatedCapacityName, context).getFinalResult(); } /** - * Lists all the Dedicated capacities for the given subscription. + * Lists eligible SKUs for a PowerBI Dedicated resource. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of Dedicated capacities resources as paginated response with {@link PagedFlux}. + * @return an object that represents enumerating SKUs for existing resources along with {@link Response} on + * successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listSkusForCapacityWithResponseAsync(String resourceGroupName, String dedicatedCapacityName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listSkusForCapacity(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dedicatedCapacityName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists all the Dedicated capacities for the given subscription. + * Lists eligible SKUs for a PowerBI Dedicated resource. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of Dedicated capacities resources as paginated response with {@link PagedFlux}. + * @return an object that represents enumerating SKUs for existing resources on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listSkusForCapacityAsync(String resourceGroupName, + String dedicatedCapacityName) { + return listSkusForCapacityWithResponseAsync(resourceGroupName, dedicatedCapacityName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists all the Dedicated capacities for the given subscription. + * Lists eligible SKUs for a PowerBI Dedicated resource. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of Dedicated capacities resources as paginated response with {@link PagedIterable}. + * @return an object that represents enumerating SKUs for existing resources along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response + listSkusForCapacityWithResponse(String resourceGroupName, String dedicatedCapacityName, Context context) { + final String accept = "application/json"; + return service.listSkusForCapacitySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dedicatedCapacityName, accept, context); } /** - * Lists all the Dedicated capacities for the given subscription. + * Lists eligible SKUs for a PowerBI Dedicated resource. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of Dedicated capacities resources as paginated response with {@link PagedIterable}. + * @return an object that represents enumerating SKUs for existing resources. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public SkuEnumerationForExistingResourceResultInner listSkusForCapacity(String resourceGroupName, + String dedicatedCapacityName) { + return listSkusForCapacityWithResponse(resourceGroupName, dedicatedCapacityName, Context.NONE).getValue(); } /** @@ -1767,14 +1536,6 @@ public PagedIterable list(Context context) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSkusWithResponseAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listSkus(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1782,32 +1543,6 @@ private Mono> listSkusWithResp .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Lists eligible SKUs for PowerBI Dedicated resource provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents enumerating SKUs for new resources along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusWithResponseAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listSkus(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - accept, context); - } - /** * Lists eligible SKUs for PowerBI Dedicated resource provider. * @@ -1831,7 +1566,9 @@ private Mono listSkusAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listSkusWithResponse(Context context) { - return listSkusWithResponseAsync(context).block(); + final String accept = "application/json"; + return service.listSkusSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); } /** @@ -1847,263 +1584,191 @@ public SkuEnumerationForNewResourceResultInner listSkus() { } /** - * Lists eligible SKUs for a PowerBI Dedicated resource. + * Check the name availability in the target location. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param location The location name. + * @param capacityParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents enumerating SKUs for existing resources along with {@link Response} on - * successful completion of {@link Mono}. + * @return the checking result of capacity name availability along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listSkusForCapacityWithResponseAsync(String resourceGroupName, String dedicatedCapacityName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dedicatedCapacityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dedicatedCapacityName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> checkNameAvailabilityWithResponseAsync( + String location, CheckCapacityNameAvailabilityParameters capacityParameters) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listSkusForCapacity(this.client.getEndpoint(), resourceGroupName, - dedicatedCapacityName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext( + context -> service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, contentType, accept, capacityParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists eligible SKUs for a PowerBI Dedicated resource. + * Check the name availability in the target location. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param context The context to associate with this operation. + * @param location The location name. + * @param capacityParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents enumerating SKUs for existing resources along with {@link Response} on - * successful completion of {@link Mono}. + * @return the checking result of capacity name availability on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listSkusForCapacityWithResponseAsync(String resourceGroupName, String dedicatedCapacityName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dedicatedCapacityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dedicatedCapacityName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listSkusForCapacity(this.client.getEndpoint(), resourceGroupName, dedicatedCapacityName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + private Mono checkNameAvailabilityAsync(String location, + CheckCapacityNameAvailabilityParameters capacityParameters) { + return checkNameAvailabilityWithResponseAsync(location, capacityParameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists eligible SKUs for a PowerBI Dedicated resource. + * Check the name availability in the target location. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param location The location name. + * @param capacityParameters The request body. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents enumerating SKUs for existing resources on successful completion of - * {@link Mono}. + * @return the checking result of capacity name availability along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listSkusForCapacityAsync(String resourceGroupName, - String dedicatedCapacityName) { - return listSkusForCapacityWithResponseAsync(resourceGroupName, dedicatedCapacityName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response checkNameAvailabilityWithResponse(String location, + CheckCapacityNameAvailabilityParameters capacityParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.checkNameAvailabilitySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, contentType, accept, capacityParameters, context); } /** - * Lists eligible SKUs for a PowerBI Dedicated resource. + * Check the name availability in the target location. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @param context The context to associate with this operation. + * @param location The location name. + * @param capacityParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents enumerating SKUs for existing resources along with {@link Response}. + * @return the checking result of capacity name availability. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response - listSkusForCapacityWithResponse(String resourceGroupName, String dedicatedCapacityName, Context context) { - return listSkusForCapacityWithResponseAsync(resourceGroupName, dedicatedCapacityName, context).block(); + public CheckCapacityNameAvailabilityResultInner checkNameAvailability(String location, + CheckCapacityNameAvailabilityParameters capacityParameters) { + return checkNameAvailabilityWithResponse(location, capacityParameters, Context.NONE).getValue(); } /** - * Lists eligible SKUs for a PowerBI Dedicated resource. + * Get the next page of items. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents enumerating SKUs for existing resources. + * @return all the Dedicated capacities for the given resource group along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SkuEnumerationForExistingResourceResultInner listSkusForCapacity(String resourceGroupName, - String dedicatedCapacityName) { - return listSkusForCapacityWithResponse(resourceGroupName, dedicatedCapacityName, Context.NONE).getValue(); + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Check the name availability in the target location. + * Get the next page of items. * - * @param location The region name which the operation will lookup into. - * @param capacityParameters The name of the capacity. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the checking result of capacity name availability along with {@link Response} on successful completion of - * {@link Mono}. + * @return all the Dedicated capacities for the given resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - String location, CheckCapacityNameAvailabilityParameters capacityParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (capacityParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter capacityParameters is required and cannot be null.")); - } else { - capacityParameters.validate(); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.checkNameAvailability(this.client.getEndpoint(), location, - this.client.getApiVersion(), this.client.getSubscriptionId(), capacityParameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Check the name availability in the target location. + * Get the next page of items. * - * @param location The region name which the operation will lookup into. - * @param capacityParameters The name of the capacity. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the checking result of capacity name availability along with {@link Response} on successful completion of - * {@link Mono}. + * @return all the Dedicated capacities for the given resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - String location, CheckCapacityNameAvailabilityParameters capacityParameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (capacityParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter capacityParameters is required and cannot be null.")); - } else { - capacityParameters.validate(); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.checkNameAvailability(this.client.getEndpoint(), location, this.client.getApiVersion(), - this.client.getSubscriptionId(), capacityParameters, accept, context); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Check the name availability in the target location. + * Get the next page of items. * - * @param location The region name which the operation will lookup into. - * @param capacityParameters The name of the capacity. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the checking result of capacity name availability on successful completion of {@link Mono}. + * @return an array of Dedicated capacities resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkNameAvailabilityAsync(String location, - CheckCapacityNameAvailabilityParameters capacityParameters) { - return checkNameAvailabilityWithResponseAsync(location, capacityParameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Check the name availability in the target location. + * Get the next page of items. * - * @param location The region name which the operation will lookup into. - * @param capacityParameters The name of the capacity. - * @param context The context to associate with this operation. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the checking result of capacity name availability along with {@link Response}. + * @return an array of Dedicated capacities resources along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkNameAvailabilityWithResponse(String location, - CheckCapacityNameAvailabilityParameters capacityParameters, Context context) { - return checkNameAvailabilityWithResponseAsync(location, capacityParameters, context).block(); + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Check the name availability in the target location. + * Get the next page of items. * - * @param location The region name which the operation will lookup into. - * @param capacityParameters The name of the capacity. + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the checking result of capacity name availability. + * @return an array of Dedicated capacities resources along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CheckCapacityNameAvailabilityResultInner checkNameAvailability(String location, - CheckCapacityNameAvailabilityParameters capacityParameters) { - return checkNameAvailabilityWithResponse(location, capacityParameters, Context.NONE).getValue(); + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/CapacitiesImpl.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/CapacitiesImpl.java index 31e1b85187db..08964f7d9da6 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/CapacitiesImpl.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/CapacitiesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.implementation; @@ -64,22 +64,6 @@ public void delete(String resourceGroupName, String dedicatedCapacityName, Conte this.serviceClient().delete(resourceGroupName, dedicatedCapacityName, context); } - public void suspend(String resourceGroupName, String dedicatedCapacityName) { - this.serviceClient().suspend(resourceGroupName, dedicatedCapacityName); - } - - public void suspend(String resourceGroupName, String dedicatedCapacityName, Context context) { - this.serviceClient().suspend(resourceGroupName, dedicatedCapacityName, context); - } - - public void resume(String resourceGroupName, String dedicatedCapacityName) { - this.serviceClient().resume(resourceGroupName, dedicatedCapacityName); - } - - public void resume(String resourceGroupName, String dedicatedCapacityName, Context context) { - this.serviceClient().resume(resourceGroupName, dedicatedCapacityName, context); - } - public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return ResourceManagerUtils.mapPage(inner, inner1 -> new DedicatedCapacityImpl(inner1, this.manager())); @@ -101,23 +85,20 @@ public PagedIterable list(Context context) { return ResourceManagerUtils.mapPage(inner, inner1 -> new DedicatedCapacityImpl(inner1, this.manager())); } - public Response listSkusWithResponse(Context context) { - Response inner = this.serviceClient().listSkusWithResponse(context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new SkuEnumerationForNewResourceResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public void suspend(String resourceGroupName, String dedicatedCapacityName) { + this.serviceClient().suspend(resourceGroupName, dedicatedCapacityName); } - public SkuEnumerationForNewResourceResult listSkus() { - SkuEnumerationForNewResourceResultInner inner = this.serviceClient().listSkus(); - if (inner != null) { - return new SkuEnumerationForNewResourceResultImpl(inner, this.manager()); - } else { - return null; - } + public void suspend(String resourceGroupName, String dedicatedCapacityName, Context context) { + this.serviceClient().suspend(resourceGroupName, dedicatedCapacityName, context); + } + + public void resume(String resourceGroupName, String dedicatedCapacityName) { + this.serviceClient().resume(resourceGroupName, dedicatedCapacityName); + } + + public void resume(String resourceGroupName, String dedicatedCapacityName, Context context) { + this.serviceClient().resume(resourceGroupName, dedicatedCapacityName, context); } public Response listSkusForCapacityWithResponse(String resourceGroupName, @@ -143,6 +124,25 @@ public SkuEnumerationForExistingResourceResult listSkusForCapacity(String resour } } + public Response listSkusWithResponse(Context context) { + Response inner = this.serviceClient().listSkusWithResponse(context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SkuEnumerationForNewResourceResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SkuEnumerationForNewResourceResult listSkus() { + SkuEnumerationForNewResourceResultInner inner = this.serviceClient().listSkus(); + if (inner != null) { + return new SkuEnumerationForNewResourceResultImpl(inner, this.manager()); + } else { + return null; + } + } + public Response checkNameAvailabilityWithResponse(String location, CheckCapacityNameAvailabilityParameters capacityParameters, Context context) { Response inner diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/CheckCapacityNameAvailabilityResultImpl.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/CheckCapacityNameAvailabilityResultImpl.java index f4aa98859405..742bb2b3b149 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/CheckCapacityNameAvailabilityResultImpl.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/CheckCapacityNameAvailabilityResultImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.implementation; diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/DedicatedCapacityImpl.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/DedicatedCapacityImpl.java index 19a73f692baa..8706af6ff912 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/DedicatedCapacityImpl.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/DedicatedCapacityImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.implementation; @@ -222,11 +222,6 @@ public DedicatedCapacityImpl withTags(Map tags) { } } - public DedicatedCapacityImpl withSystemData(SystemData systemData) { - this.innerModel().withSystemData(systemData); - return this; - } - public DedicatedCapacityImpl withAdministration(DedicatedCapacityAdministrators administration) { if (isInCreateMode()) { this.innerModel().withAdministration(administration); @@ -248,6 +243,6 @@ public DedicatedCapacityImpl withMode(Mode mode) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/OperationImpl.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/OperationImpl.java index 77bca7d2650d..71d236abdb2b 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/OperationImpl.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/OperationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.implementation; diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/OperationsClientImpl.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/OperationsClientImpl.java index b07fac4f220a..e3ecf5d5ef80 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/OperationsClientImpl.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.powerbidedicated.fluent.OperationsClient; import com.azure.resourcemanager.powerbidedicated.fluent.models.OperationInner; -import com.azure.resourcemanager.powerbidedicated.models.OperationListResult; +import com.azure.resourcemanager.powerbidedicated.implementation.models.OperationListResult; import reactor.core.publisher.Mono; /** @@ -42,31 +42,38 @@ public final class OperationsClientImpl implements OperationsClient { /** * The service client containing this operation class. */ - private final PowerBIDedicatedImpl client; + private final PowerBIDedicatedManagementClientImpl client; /** * Initializes an instance of OperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OperationsClientImpl(PowerBIDedicatedImpl client) { + OperationsClientImpl(PowerBIDedicatedManagementClientImpl client) { this.service = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for PowerBIDedicatedOperations to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for PowerBIDedicatedManagementClientOperations to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "PowerBIDedicatedOper") + @Host("{endpoint}") + @ServiceInterface(name = "PowerBIDedicatedManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.PowerBIDedicated/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.PowerBIDedicated/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -74,11 +81,18 @@ Mono> list(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Lists all of the available PowerBIDedicated REST API operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -86,10 +100,6 @@ Mono> listNext(@PathParam(value = "nextLink", enco */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -100,56 +110,53 @@ private Mono> listSinglePageAsync() { } /** - * Lists all of the available PowerBIDedicated REST API operations. + * List the operations for the provider. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result listing capacities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return result listing capacities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Lists all of the available PowerBIDedicated REST API operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result listing capacities as paginated response with {@link PagedFlux}. + * @return result listing capacities along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Lists all of the available PowerBIDedicated REST API operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result listing capacities as paginated response with {@link PagedFlux}. + * @return result listing capacities along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Lists all of the available PowerBIDedicated REST API operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -157,11 +164,11 @@ private PagedFlux listAsync(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** - * Lists all of the available PowerBIDedicated REST API operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -171,7 +178,7 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -185,13 +192,6 @@ public PagedIterable list(Context context) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), @@ -199,6 +199,24 @@ private Mono> listNextSinglePageAsync(String nextL .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result listing capacities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -207,21 +225,13 @@ private Mono> listNextSinglePageAsync(String nextL * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result listing capacities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return result listing capacities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/OperationsImpl.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/OperationsImpl.java index 8377f3f25ad0..ecb843dad625 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/OperationsImpl.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/OperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.implementation; diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/PowerBIDedicatedBuilder.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/PowerBIDedicatedManagementClientBuilder.java similarity index 63% rename from sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/PowerBIDedicatedBuilder.java rename to sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/PowerBIDedicatedManagementClientBuilder.java index bc55c63e40b3..c5ec1a255a5d 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/PowerBIDedicatedBuilder.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/PowerBIDedicatedManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.implementation; @@ -15,41 +15,39 @@ import java.time.Duration; /** - * A builder for creating a new instance of the PowerBIDedicatedImpl type. + * A builder for creating a new instance of the PowerBIDedicatedManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = { PowerBIDedicatedImpl.class }) -public final class PowerBIDedicatedBuilder { +@ServiceClientBuilder(serviceClients = { PowerBIDedicatedManagementClientImpl.class }) +public final class PowerBIDedicatedManagementClientBuilder { /* - * A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every - * service call. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every - * service call. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. - * @return the PowerBIDedicatedBuilder. + * @param endpoint the endpoint value. + * @return the PowerBIDedicatedManagementClientBuilder. */ - public PowerBIDedicatedBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public PowerBIDedicatedManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. - * @return the PowerBIDedicatedBuilder. + * @param subscriptionId the subscriptionId value. + * @return the PowerBIDedicatedManagementClientBuilder. */ - public PowerBIDedicatedBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public PowerBIDedicatedManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -62,9 +60,9 @@ public PowerBIDedicatedBuilder endpoint(String endpoint) { * Sets The environment to connect to. * * @param environment the environment value. - * @return the PowerBIDedicatedBuilder. + * @return the PowerBIDedicatedManagementClientBuilder. */ - public PowerBIDedicatedBuilder environment(AzureEnvironment environment) { + public PowerBIDedicatedManagementClientBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -78,9 +76,9 @@ public PowerBIDedicatedBuilder environment(AzureEnvironment environment) { * Sets The HTTP pipeline to send requests through. * * @param pipeline the pipeline value. - * @return the PowerBIDedicatedBuilder. + * @return the PowerBIDedicatedManagementClientBuilder. */ - public PowerBIDedicatedBuilder pipeline(HttpPipeline pipeline) { + public PowerBIDedicatedManagementClientBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -94,9 +92,9 @@ public PowerBIDedicatedBuilder pipeline(HttpPipeline pipeline) { * Sets The default poll interval for long-running operation. * * @param defaultPollInterval the defaultPollInterval value. - * @return the PowerBIDedicatedBuilder. + * @return the PowerBIDedicatedManagementClientBuilder. */ - public PowerBIDedicatedBuilder defaultPollInterval(Duration defaultPollInterval) { + public PowerBIDedicatedManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -110,19 +108,19 @@ public PowerBIDedicatedBuilder defaultPollInterval(Duration defaultPollInterval) * Sets The serializer to serialize an object into a string. * * @param serializerAdapter the serializerAdapter value. - * @return the PowerBIDedicatedBuilder. + * @return the PowerBIDedicatedManagementClientBuilder. */ - public PowerBIDedicatedBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public PowerBIDedicatedManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of PowerBIDedicatedImpl with the provided parameters. + * Builds an instance of PowerBIDedicatedManagementClientImpl with the provided parameters. * - * @return an instance of PowerBIDedicatedImpl. + * @return an instance of PowerBIDedicatedManagementClientImpl. */ - public PowerBIDedicatedImpl buildClient() { + public PowerBIDedicatedManagementClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; HttpPipeline localPipeline = (pipeline != null) @@ -133,8 +131,8 @@ public PowerBIDedicatedImpl buildClient() { SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); - PowerBIDedicatedImpl client = new PowerBIDedicatedImpl(localPipeline, localSerializerAdapter, - localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + PowerBIDedicatedManagementClientImpl client = new PowerBIDedicatedManagementClientImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/PowerBIDedicatedImpl.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/PowerBIDedicatedManagementClientImpl.java similarity index 83% rename from sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/PowerBIDedicatedImpl.java rename to sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/PowerBIDedicatedManagementClientImpl.java index a02c871b45ae..3c35fec5f330 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/PowerBIDedicatedImpl.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/PowerBIDedicatedManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.implementation; @@ -15,18 +15,21 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.SyncPollerFactory; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.powerbidedicated.fluent.AutoScaleVCoresClient; import com.azure.resourcemanager.powerbidedicated.fluent.CapacitiesClient; import com.azure.resourcemanager.powerbidedicated.fluent.OperationsClient; -import com.azure.resourcemanager.powerbidedicated.fluent.PowerBIDedicated; +import com.azure.resourcemanager.powerbidedicated.fluent.PowerBIDedicatedManagementClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -37,33 +40,17 @@ import reactor.core.publisher.Mono; /** - * Initializes a new instance of the PowerBIDedicatedImpl type. + * Initializes a new instance of the PowerBIDedicatedManagementClientImpl type. */ -@ServiceClient(builder = PowerBIDedicatedBuilder.class) -public final class PowerBIDedicatedImpl implements PowerBIDedicated { +@ServiceClient(builder = PowerBIDedicatedManagementClientBuilder.class) +public final class PowerBIDedicatedManagementClientImpl implements PowerBIDedicatedManagementClient { /** - * A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every - * service call. - */ - private final String subscriptionId; - - /** - * Gets A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every - * service call. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. + * Service host. */ private final String endpoint; /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ @@ -72,12 +59,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -85,6 +72,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -128,31 +129,31 @@ public Duration getDefaultPollInterval() { } /** - * The CapacitiesClient object to access its operations. + * The OperationsClient object to access its operations. */ - private final CapacitiesClient capacities; + private final OperationsClient operations; /** - * Gets the CapacitiesClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the CapacitiesClient object. + * @return the OperationsClient object. */ - public CapacitiesClient getCapacities() { - return this.capacities; + public OperationsClient getOperations() { + return this.operations; } /** - * The OperationsClient object to access its operations. + * The CapacitiesClient object to access its operations. */ - private final OperationsClient operations; + private final CapacitiesClient capacities; /** - * Gets the OperationsClient object to access its operations. + * Gets the CapacitiesClient object to access its operations. * - * @return the OperationsClient object. + * @return the CapacitiesClient object. */ - public OperationsClient getOperations() { - return this.operations; + public CapacitiesClient getCapacities() { + return this.capacities; } /** @@ -170,26 +171,25 @@ public AutoScaleVCoresClient getAutoScaleVCores() { } /** - * Initializes an instance of PowerBIDedicated client. + * Initializes an instance of PowerBIDedicatedManagementClient client. * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of - * the URI for every service call. - * @param endpoint server parameter. + * @param endpoint Service host. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. */ - PowerBIDedicatedImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, - AzureEnvironment environment, String subscriptionId, String endpoint) { + PowerBIDedicatedManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; + this.subscriptionId = subscriptionId; this.apiVersion = "2021-01-01"; - this.capacities = new CapacitiesClientImpl(this); this.operations = new OperationsClientImpl(this); + this.capacities = new CapacitiesClientImpl(this); this.autoScaleVCores = new AutoScaleVCoresClientImpl(this); } @@ -230,6 +230,23 @@ public PollerFlux, U> getLroResult(Mono type of poll result. + * @param type of final result. + * @return SyncPoller for poll result and final result. + */ + public SyncPoller, U> getLroResult(Response activationResponse, + Type pollResultType, Type finalResultType, Context context) { + return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, () -> activationResponse, context); + } + /** * Gets the final result, or an error, based on last async poll response. * @@ -319,5 +336,5 @@ public Mono getBodyAsString(Charset charset) { } } - private static final ClientLogger LOGGER = new ClientLogger(PowerBIDedicatedImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(PowerBIDedicatedManagementClientImpl.class); } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/ResourceManagerUtils.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/ResourceManagerUtils.java index 8e17f5449865..8dd55ac08738 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/ResourceManagerUtils.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.implementation; diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/SkuEnumerationForExistingResourceResultImpl.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/SkuEnumerationForExistingResourceResultImpl.java index f56f95edc437..05b4458369fc 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/SkuEnumerationForExistingResourceResultImpl.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/SkuEnumerationForExistingResourceResultImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.implementation; diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/SkuEnumerationForNewResourceResultImpl.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/SkuEnumerationForNewResourceResultImpl.java index 0e134bacfd94..c2e68a47f57c 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/SkuEnumerationForNewResourceResultImpl.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/SkuEnumerationForNewResourceResultImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.implementation; diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCoreListResult.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/models/AutoScaleVCoreListResult.java similarity index 71% rename from sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCoreListResult.java rename to sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/models/AutoScaleVCoreListResult.java index f1a3f9383715..bfcca79dc87e 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCoreListResult.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/models/AutoScaleVCoreListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.powerbidedicated.models; +package com.azure.resourcemanager.powerbidedicated.implementation.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -17,17 +16,22 @@ /** * An array of auto scale v-core resources. */ -@Fluent +@Immutable public final class AutoScaleVCoreListResult implements JsonSerializable { /* * An array of auto scale v-core resources. */ private List value; + /* + * The nextLink property. + */ + private String nextLink; + /** * Creates an instance of AutoScaleVCoreListResult class. */ - public AutoScaleVCoreListResult() { + private AutoScaleVCoreListResult() { } /** @@ -40,32 +44,14 @@ public List value() { } /** - * Set the value property: An array of auto scale v-core resources. + * Get the nextLink property: The nextLink property. * - * @param value the value value to set. - * @return the AutoScaleVCoreListResult object itself. + * @return the nextLink value. */ - public AutoScaleVCoreListResult withValue(List value) { - this.value = value; - return this; + public String nextLink() { + return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model AutoScaleVCoreListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AutoScaleVCoreListResult.class); - /** * {@inheritDoc} */ @@ -73,6 +59,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -96,6 +83,8 @@ public static AutoScaleVCoreListResult fromJson(JsonReader jsonReader) throws IO List value = reader.readArray(reader1 -> AutoScaleVCoreInner.fromJson(reader1)); deserializedAutoScaleVCoreListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedAutoScaleVCoreListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/DedicatedCapacities.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/models/DedicatedCapacities.java similarity index 71% rename from sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/DedicatedCapacities.java rename to sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/models/DedicatedCapacities.java index dc9e450f66ae..86643a9b0e09 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/DedicatedCapacities.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/models/DedicatedCapacities.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.powerbidedicated.models; +package com.azure.resourcemanager.powerbidedicated.implementation.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -17,17 +16,22 @@ /** * An array of Dedicated capacities resources. */ -@Fluent +@Immutable public final class DedicatedCapacities implements JsonSerializable { /* * An array of Dedicated capacities resources. */ private List value; + /* + * The link to the next page of items + */ + private String nextLink; + /** * Creates an instance of DedicatedCapacities class. */ - public DedicatedCapacities() { + private DedicatedCapacities() { } /** @@ -40,32 +44,14 @@ public List value() { } /** - * Set the value property: An array of Dedicated capacities resources. + * Get the nextLink property: The link to the next page of items. * - * @param value the value value to set. - * @return the DedicatedCapacities object itself. + * @return the nextLink value. */ - public DedicatedCapacities withValue(List value) { - this.value = value; - return this; + public String nextLink() { + return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model DedicatedCapacities")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DedicatedCapacities.class); - /** * {@inheritDoc} */ @@ -73,6 +59,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -96,6 +83,8 @@ public static DedicatedCapacities fromJson(JsonReader jsonReader) throws IOExcep List value = reader.readArray(reader1 -> DedicatedCapacityInner.fromJson(reader1)); deserializedDedicatedCapacities.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDedicatedCapacities.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/OperationListResult.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/models/OperationListResult.java similarity index 87% rename from sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/OperationListResult.java rename to sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/models/OperationListResult.java index 18e2d1ce6dc5..d210a75f7bdc 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/OperationListResult.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/models/OperationListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.powerbidedicated.models; +package com.azure.resourcemanager.powerbidedicated.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -31,7 +31,7 @@ public final class OperationListResult implements JsonSerializable e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/package-info.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/package-info.java index e6df05bbe071..d20cf303f606 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/package-info.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/implementation/package-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the implementations for PowerBIDedicated. diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCore.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCore.java index 5769bea6db6b..2743fcff26ec 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCore.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCore.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.models; @@ -57,7 +57,7 @@ public interface AutoScaleVCore { AutoScaleVCoreSku sku(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -159,8 +159,7 @@ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity - * is part. This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithSku withExistingResourceGroup(String resourceGroupName); @@ -183,8 +182,8 @@ interface WithSku { * The stage of the AutoScaleVCore definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithSystemData, - DefinitionStages.WithCapacityObjectId, DefinitionStages.WithCapacityLimit { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithCapacityObjectId, + DefinitionStages.WithCapacityLimit { /** * Executes the create request. * @@ -214,20 +213,6 @@ interface WithTags { WithCreate withTags(Map tags); } - /** - * The stage of the AutoScaleVCore definition allowing to specify systemData. - */ - interface WithSystemData { - /** - * Specifies the systemData property: Metadata pertaining to creation and last modification of the - * resource.. - * - * @param systemData Metadata pertaining to creation and last modification of the resource. - * @return the next definition stage. - */ - WithCreate withSystemData(SystemData systemData); - } - /** * The stage of the AutoScaleVCore definition allowing to specify capacityObjectId. */ diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCoreSku.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCoreSku.java index e5017eaabafc..736b05347f54 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCoreSku.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCoreSku.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -98,20 +97,6 @@ public AutoScaleVCoreSku withCapacity(Integer capacity) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model AutoScaleVCoreSku")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AutoScaleVCoreSku.class); - /** * {@inheritDoc} */ diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCoreUpdateParameters.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCoreUpdateParameters.java index a2bf4075eebd..b5d7d850929b 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCoreUpdateParameters.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCoreUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.models; @@ -111,20 +111,6 @@ public AutoScaleVCoreUpdateParameters withCapacityLimit(Integer capacityLimit) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sku() != null) { - sku().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCores.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCores.java index cf999dd98931..ad1f88427dda 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCores.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCores.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.models; @@ -15,8 +15,7 @@ public interface AutoScaleVCores { /** * Gets details about the specified auto scale v-core. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -30,8 +29,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName /** * Gets details about the specified auto scale v-core. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -43,8 +41,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName /** * Deletes the specified auto scale v-core. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,8 +54,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName /** * Deletes the specified auto scale v-core. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -69,8 +65,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName /** * Gets all the auto scale v-cores for the given resource group. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -81,8 +76,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName /** * Gets all the auto scale v-cores for the given resource group. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/Capacities.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/Capacities.java index 542aaf37f4f7..f9e250bda5c7 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/Capacities.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/Capacities.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.models; @@ -15,8 +15,7 @@ public interface Capacities { /** * Gets details about the specified dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a * maximum of 63. * @param context The context to associate with this operation. @@ -31,8 +30,7 @@ Response getByResourceGroupWithResponse(String resourceGroupN /** * Gets details about the specified dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -45,10 +43,9 @@ Response getByResourceGroupWithResponse(String resourceGroupN /** * Deletes the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -58,10 +55,9 @@ Response getByResourceGroupWithResponse(String resourceGroupN /** * Deletes the specified Dedicated capacity. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -70,161 +66,153 @@ Response getByResourceGroupWithResponse(String resourceGroupN void delete(String resourceGroupName, String dedicatedCapacityName, Context context); /** - * Suspends operation of the specified dedicated capacity instance. + * Gets all the Dedicated capacities for the given resource group. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the Dedicated capacities for the given resource group as paginated response with + * {@link PagedIterable}. */ - void suspend(String resourceGroupName, String dedicatedCapacityName); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Suspends operation of the specified dedicated capacity instance. + * Gets all the Dedicated capacities for the given resource group. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the Dedicated capacities for the given resource group as paginated response with + * {@link PagedIterable}. */ - void suspend(String resourceGroupName, String dedicatedCapacityName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Resumes operation of the specified Dedicated capacity instance. + * Lists all the Dedicated capacities for the given subscription. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an array of Dedicated capacities resources as paginated response with {@link PagedIterable}. */ - void resume(String resourceGroupName, String dedicatedCapacityName); + PagedIterable list(); /** - * Resumes operation of the specified Dedicated capacity instance. + * Lists all the Dedicated capacities for the given subscription. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an array of Dedicated capacities resources as paginated response with {@link PagedIterable}. */ - void resume(String resourceGroupName, String dedicatedCapacityName, Context context); + PagedIterable list(Context context); /** - * Gets all the Dedicated capacities for the given resource group. + * Suspends operation of the specified dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Dedicated capacities for the given resource group as paginated response with - * {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void suspend(String resourceGroupName, String dedicatedCapacityName); /** - * Gets all the Dedicated capacities for the given resource group. + * Suspends operation of the specified dedicated capacity instance. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Dedicated capacities for the given resource group as paginated response with - * {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + void suspend(String resourceGroupName, String dedicatedCapacityName, Context context); /** - * Lists all the Dedicated capacities for the given subscription. + * Resumes operation of the specified Dedicated capacity instance. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of Dedicated capacities resources as paginated response with {@link PagedIterable}. */ - PagedIterable list(); + void resume(String resourceGroupName, String dedicatedCapacityName); /** - * Lists all the Dedicated capacities for the given subscription. + * Resumes operation of the specified Dedicated capacity instance. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of Dedicated capacities resources as paginated response with {@link PagedIterable}. */ - PagedIterable list(Context context); + void resume(String resourceGroupName, String dedicatedCapacityName, Context context); /** - * Lists eligible SKUs for PowerBI Dedicated resource provider. + * Lists eligible SKUs for a PowerBI Dedicated resource. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents enumerating SKUs for new resources along with {@link Response}. + * @return an object that represents enumerating SKUs for existing resources along with {@link Response}. */ - Response listSkusWithResponse(Context context); + Response listSkusForCapacityWithResponse(String resourceGroupName, + String dedicatedCapacityName, Context context); /** - * Lists eligible SKUs for PowerBI Dedicated resource provider. + * Lists eligible SKUs for a PowerBI Dedicated resource. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a + * maximum of 63. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents enumerating SKUs for new resources. + * @return an object that represents enumerating SKUs for existing resources. */ - SkuEnumerationForNewResourceResult listSkus(); + SkuEnumerationForExistingResourceResult listSkusForCapacity(String resourceGroupName, String dedicatedCapacityName); /** - * Lists eligible SKUs for a PowerBI Dedicated resource. + * Lists eligible SKUs for PowerBI Dedicated resource provider. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents enumerating SKUs for existing resources along with {@link Response}. + * @return an object that represents enumerating SKUs for new resources along with {@link Response}. */ - Response listSkusForCapacityWithResponse(String resourceGroupName, - String dedicatedCapacityName, Context context); + Response listSkusWithResponse(Context context); /** - * Lists eligible SKUs for a PowerBI Dedicated resource. + * Lists eligible SKUs for PowerBI Dedicated resource provider. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. - * This name must be at least 1 character in length, and no more than 90. - * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and - * no more than 63. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents enumerating SKUs for existing resources. + * @return an object that represents enumerating SKUs for new resources. */ - SkuEnumerationForExistingResourceResult listSkusForCapacity(String resourceGroupName, String dedicatedCapacityName); + SkuEnumerationForNewResourceResult listSkus(); /** * Check the name availability in the target location. * - * @param location The region name which the operation will lookup into. - * @param capacityParameters The name of the capacity. + * @param location The location name. + * @param capacityParameters The request body. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -237,8 +225,8 @@ Response checkNameAvailabilityWithResponse( /** * Check the name availability in the target location. * - * @param location The region name which the operation will lookup into. - * @param capacityParameters The name of the capacity. + * @param location The location name. + * @param capacityParameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/CapacityProvisioningState.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/CapacityProvisioningState.java index 7e9b4f15edd4..db4d71d7589d 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/CapacityProvisioningState.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/CapacityProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.models; diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/CapacitySku.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/CapacitySku.java index 0afbb65741da..bfc3c55d797c 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/CapacitySku.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/CapacitySku.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -98,20 +97,6 @@ public CapacitySku withCapacity(Integer capacity) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model CapacitySku")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CapacitySku.class); - /** * {@inheritDoc} */ diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/CapacitySkuTier.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/CapacitySkuTier.java index eb1186d0a9ff..f48d01098bb6 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/CapacitySkuTier.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/CapacitySkuTier.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.models; diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/CheckCapacityNameAvailabilityParameters.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/CheckCapacityNameAvailabilityParameters.java index 4184b88845d1..7ed572b03ed2 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/CheckCapacityNameAvailabilityParameters.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/CheckCapacityNameAvailabilityParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.models; @@ -73,14 +73,6 @@ public CheckCapacityNameAvailabilityParameters withType(String type) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/CheckCapacityNameAvailabilityResult.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/CheckCapacityNameAvailabilityResult.java index 178e920de1dc..8d3da3408024 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/CheckCapacityNameAvailabilityResult.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/CheckCapacityNameAvailabilityResult.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.models; diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/DedicatedCapacity.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/DedicatedCapacity.java index 09aed282b36b..60e78cbfaf40 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/DedicatedCapacity.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/DedicatedCapacity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.models; @@ -57,7 +57,7 @@ public interface DedicatedCapacity { CapacitySku sku(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -182,8 +182,7 @@ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity - * is part. This name must be at least 1 character in length, and no more than 90. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithSku withExistingResourceGroup(String resourceGroupName); @@ -206,8 +205,8 @@ interface WithSku { * The stage of the DedicatedCapacity definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithSystemData, - DefinitionStages.WithAdministration, DefinitionStages.WithMode { + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithAdministration, DefinitionStages.WithMode { /** * Executes the create request. * @@ -237,20 +236,6 @@ interface WithTags { WithCreate withTags(Map tags); } - /** - * The stage of the DedicatedCapacity definition allowing to specify systemData. - */ - interface WithSystemData { - /** - * Specifies the systemData property: Metadata pertaining to creation and last modification of the - * resource.. - * - * @param systemData Metadata pertaining to creation and last modification of the resource. - * @return the next definition stage. - */ - WithCreate withSystemData(SystemData systemData); - } - /** * The stage of the DedicatedCapacity definition allowing to specify administration. */ diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/DedicatedCapacityAdministrators.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/DedicatedCapacityAdministrators.java index 8414cc1c13f8..4d38b39ee49d 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/DedicatedCapacityAdministrators.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/DedicatedCapacityAdministrators.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.models; @@ -48,14 +48,6 @@ public DedicatedCapacityAdministrators withMembers(List members) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/DedicatedCapacityUpdateParameters.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/DedicatedCapacityUpdateParameters.java index dfd683ae9db7..a05b96daadd0 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/DedicatedCapacityUpdateParameters.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/DedicatedCapacityUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.models; @@ -156,20 +156,6 @@ public String friendlyName() { return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sku() != null) { - sku().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/LogSpecification.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/LogSpecification.java index 05ea7729030f..2771d67e8bce 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/LogSpecification.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/LogSpecification.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Log specification for exposing diagnostic logs to shoebox. */ -@Fluent +@Immutable public final class LogSpecification implements JsonSerializable { /* * Name of the log @@ -34,7 +34,7 @@ public final class LogSpecification implements JsonSerializable { /* * Metric name @@ -55,7 +55,7 @@ public final class MetricSpecification implements JsonSerializable dimensions() { return this.dimensions; } - /** - * Set the dimensions property: For describing multi dimensional metrics. - * - * @param dimensions the dimensions value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withDimensions(List dimensions) { - this.dimensions = dimensions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dimensions() != null) { - dimensions().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/MetricSpecificationDimensionsItem.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/MetricSpecificationDimensionsItem.java index 828f98af3151..85567e0b27b7 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/MetricSpecificationDimensionsItem.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/MetricSpecificationDimensionsItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The MetricSpecificationDimensionsItem model. */ -@Fluent +@Immutable public final class MetricSpecificationDimensionsItem implements JsonSerializable { /* * Dimension of the metric @@ -29,7 +29,7 @@ public final class MetricSpecificationDimensionsItem implements JsonSerializable /** * Creates an instance of MetricSpecificationDimensionsItem class. */ - public MetricSpecificationDimensionsItem() { + private MetricSpecificationDimensionsItem() { } /** @@ -50,25 +50,6 @@ public String displayName() { return this.displayName; } - /** - * Set the displayName property: Localizable dimension of the metric. - * - * @param displayName the displayName value to set. - * @return the MetricSpecificationDimensionsItem object itself. - */ - public MetricSpecificationDimensionsItem withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/Mode.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/Mode.java index 0339a12b8b27..4eb73c634847 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/Mode.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/Mode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.models; diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/Operation.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/Operation.java index 38655f6c6424..76f07f823999 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/Operation.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/Operation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.models; diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/OperationDisplay.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/OperationDisplay.java index 7e2a500e7908..b7d372759fc6 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/OperationDisplay.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/OperationDisplay.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -12,9 +12,9 @@ import java.io.IOException; /** - * The object that represents the operation. + * The OperationDisplay model. */ -@Fluent +@Immutable public final class OperationDisplay implements JsonSerializable { /* * Service provider: Microsoft.PowerBIDedicated. @@ -39,7 +39,7 @@ public final class OperationDisplay implements JsonSerializable { /* * Service specification for exposing performance metrics to shoebox. @@ -24,7 +24,7 @@ public final class OperationProperties implements JsonSerializable list(); /** - * Lists all of the available PowerBIDedicated REST API operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/ServiceSpecification.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/ServiceSpecification.java index 30ea5c74b06b..d4922e75bae3 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/ServiceSpecification.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/ServiceSpecification.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Service specification for exposing performance metrics to shoebox. */ -@Fluent +@Immutable public final class ServiceSpecification implements JsonSerializable { /* * Metric specifications for exposing performance metrics to shoebox. @@ -30,7 +30,7 @@ public final class ServiceSpecification implements JsonSerializable metricSpecifications() { return this.metricSpecifications; } - /** - * Set the metricSpecifications property: Metric specifications for exposing performance metrics to shoebox. - * - * @param metricSpecifications the metricSpecifications value to set. - * @return the ServiceSpecification object itself. - */ - public ServiceSpecification withMetricSpecifications(List metricSpecifications) { - this.metricSpecifications = metricSpecifications; - return this; - } - /** * Get the logSpecifications property: Log specifications for exposing diagnostic logs to shoebox. * @@ -62,31 +51,6 @@ public List logSpecifications() { return this.logSpecifications; } - /** - * Set the logSpecifications property: Log specifications for exposing diagnostic logs to shoebox. - * - * @param logSpecifications the logSpecifications value to set. - * @return the ServiceSpecification object itself. - */ - public ServiceSpecification withLogSpecifications(List logSpecifications) { - this.logSpecifications = logSpecifications; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (metricSpecifications() != null) { - metricSpecifications().forEach(e -> e.validate()); - } - if (logSpecifications() != null) { - logSpecifications().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/SkuDetailsForExistingResource.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/SkuDetailsForExistingResource.java index 705efb2d7ee7..652c63d1cd02 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/SkuDetailsForExistingResource.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/SkuDetailsForExistingResource.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * An object that represents SKU details for existing resources. */ -@Fluent +@Immutable public final class SkuDetailsForExistingResource implements JsonSerializable { /* * The resource type @@ -29,7 +29,7 @@ public final class SkuDetailsForExistingResource implements JsonSerializable Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals(1122159032, model.value().get(0).sku().capacity()); + Assertions.assertEquals("xzpuzycisp", model.value().get(0).capacityObjectId()); + Assertions.assertEquals(64383308, model.value().get(0).capacityLimit()); + Assertions.assertEquals("azqugxywpmueefj", model.nextLink()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoreMutablePropertiesTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoreMutablePropertiesTests.java index 0cbf74a7c29f..e35c7677aac0 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoreMutablePropertiesTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoreMutablePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; @@ -12,14 +12,14 @@ public final class AutoScaleVCoreMutablePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AutoScaleVCoreMutableProperties model - = BinaryData.fromString("{\"capacityLimit\":1260987021}").toObject(AutoScaleVCoreMutableProperties.class); - Assertions.assertEquals(1260987021, model.capacityLimit()); + = BinaryData.fromString("{\"capacityLimit\":414754267}").toObject(AutoScaleVCoreMutableProperties.class); + Assertions.assertEquals(414754267, model.capacityLimit()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AutoScaleVCoreMutableProperties model = new AutoScaleVCoreMutableProperties().withCapacityLimit(1260987021); + AutoScaleVCoreMutableProperties model = new AutoScaleVCoreMutableProperties().withCapacityLimit(414754267); model = BinaryData.fromObject(model).toObject(AutoScaleVCoreMutableProperties.class); - Assertions.assertEquals(1260987021, model.capacityLimit()); + Assertions.assertEquals(414754267, model.capacityLimit()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCorePropertiesTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCorePropertiesTests.java index 66b00b825999..be9fa1222a35 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCorePropertiesTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCorePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; @@ -12,18 +12,18 @@ public final class AutoScaleVCorePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AutoScaleVCoreProperties model = BinaryData.fromString( - "{\"capacityObjectId\":\"deyeamdphagalpbu\",\"provisioningState\":\"Succeeded\",\"capacityLimit\":9013568}") + "{\"capacityObjectId\":\"civfsnkymuctq\",\"provisioningState\":\"Succeeded\",\"capacityLimit\":1657324555}") .toObject(AutoScaleVCoreProperties.class); - Assertions.assertEquals(9013568, model.capacityLimit()); - Assertions.assertEquals("deyeamdphagalpbu", model.capacityObjectId()); + Assertions.assertEquals(1657324555, model.capacityLimit()); + Assertions.assertEquals("civfsnkymuctq", model.capacityObjectId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AutoScaleVCoreProperties model - = new AutoScaleVCoreProperties().withCapacityLimit(9013568).withCapacityObjectId("deyeamdphagalpbu"); + = new AutoScaleVCoreProperties().withCapacityLimit(1657324555).withCapacityObjectId("civfsnkymuctq"); model = BinaryData.fromObject(model).toObject(AutoScaleVCoreProperties.class); - Assertions.assertEquals(9013568, model.capacityLimit()); - Assertions.assertEquals("deyeamdphagalpbu", model.capacityObjectId()); + Assertions.assertEquals(1657324555, model.capacityLimit()); + Assertions.assertEquals("civfsnkymuctq", model.capacityObjectId()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoreSkuTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoreSkuTests.java index 16ec014a12ae..7a6053406b26 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoreSkuTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoreSkuTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; @@ -13,21 +13,20 @@ public final class AutoScaleVCoreSkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AutoScaleVCoreSku model - = BinaryData.fromString("{\"name\":\"sjttgzfbish\",\"tier\":\"AutoScale\",\"capacity\":1409405599}") + = BinaryData.fromString("{\"name\":\"jcxerfuwu\",\"tier\":\"AutoScale\",\"capacity\":1379118334}") .toObject(AutoScaleVCoreSku.class); - Assertions.assertEquals("sjttgzfbish", model.name()); + Assertions.assertEquals("jcxerfuwu", model.name()); Assertions.assertEquals(VCoreSkuTier.AUTO_SCALE, model.tier()); - Assertions.assertEquals(1409405599, model.capacity()); + Assertions.assertEquals(1379118334, model.capacity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AutoScaleVCoreSku model = new AutoScaleVCoreSku().withName("sjttgzfbish") - .withTier(VCoreSkuTier.AUTO_SCALE) - .withCapacity(1409405599); + AutoScaleVCoreSku model + = new AutoScaleVCoreSku().withName("jcxerfuwu").withTier(VCoreSkuTier.AUTO_SCALE).withCapacity(1379118334); model = BinaryData.fromObject(model).toObject(AutoScaleVCoreSku.class); - Assertions.assertEquals("sjttgzfbish", model.name()); + Assertions.assertEquals("jcxerfuwu", model.name()); Assertions.assertEquals(VCoreSkuTier.AUTO_SCALE, model.tier()); - Assertions.assertEquals(1409405599, model.capacity()); + Assertions.assertEquals(1379118334, model.capacity()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoreUpdateParametersTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoreUpdateParametersTests.java index 84a663a12463..e948b433cd64 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoreUpdateParametersTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoreUpdateParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; @@ -16,28 +16,28 @@ public final class AutoScaleVCoreUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AutoScaleVCoreUpdateParameters model = BinaryData.fromString( - "{\"sku\":{\"name\":\"nowkgshw\",\"tier\":\"AutoScale\",\"capacity\":691407592},\"tags\":{\"ttmrywnuzoqf\":\"injep\"},\"properties\":{\"capacityLimit\":1348586485}}") + "{\"sku\":{\"name\":\"jrbirphxepcyv\",\"tier\":\"AutoScale\",\"capacity\":772905747},\"tags\":{\"j\":\"yq\",\"gvcl\":\"uujqgidokgjljyo\",\"jhtxfvgxbfsmxne\":\"bgsncghkjeszzhb\",\"rbmpukgri\":\"mpvecxgodebfqk\"},\"properties\":{\"capacityLimit\":1920273783}}") .toObject(AutoScaleVCoreUpdateParameters.class); - Assertions.assertEquals("nowkgshw", model.sku().name()); + Assertions.assertEquals("jrbirphxepcyv", model.sku().name()); Assertions.assertEquals(VCoreSkuTier.AUTO_SCALE, model.sku().tier()); - Assertions.assertEquals(691407592, model.sku().capacity()); - Assertions.assertEquals("injep", model.tags().get("ttmrywnuzoqf")); - Assertions.assertEquals(1348586485, model.capacityLimit()); + Assertions.assertEquals(772905747, model.sku().capacity()); + Assertions.assertEquals("yq", model.tags().get("j")); + Assertions.assertEquals(1920273783, model.capacityLimit()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AutoScaleVCoreUpdateParameters model = new AutoScaleVCoreUpdateParameters() - .withSku( - new AutoScaleVCoreSku().withName("nowkgshw").withTier(VCoreSkuTier.AUTO_SCALE).withCapacity(691407592)) - .withTags(mapOf("ttmrywnuzoqf", "injep")) - .withCapacityLimit(1348586485); + AutoScaleVCoreUpdateParameters model = new AutoScaleVCoreUpdateParameters().withSku( + new AutoScaleVCoreSku().withName("jrbirphxepcyv").withTier(VCoreSkuTier.AUTO_SCALE).withCapacity(772905747)) + .withTags(mapOf("j", "yq", "gvcl", "uujqgidokgjljyo", "jhtxfvgxbfsmxne", "bgsncghkjeszzhb", "rbmpukgri", + "mpvecxgodebfqk")) + .withCapacityLimit(1920273783); model = BinaryData.fromObject(model).toObject(AutoScaleVCoreUpdateParameters.class); - Assertions.assertEquals("nowkgshw", model.sku().name()); + Assertions.assertEquals("jrbirphxepcyv", model.sku().name()); Assertions.assertEquals(VCoreSkuTier.AUTO_SCALE, model.sku().tier()); - Assertions.assertEquals(691407592, model.sku().capacity()); - Assertions.assertEquals("injep", model.tags().get("ttmrywnuzoqf")); - Assertions.assertEquals(1348586485, model.capacityLimit()); + Assertions.assertEquals(772905747, model.sku().capacity()); + Assertions.assertEquals("yq", model.tags().get("j")); + Assertions.assertEquals(1920273783, model.capacityLimit()); } // Use "Map.of" if available diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoresCreateWithResponseMockTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoresCreateWithResponseMockTests.java index a5e8efae82de..356c3ca11c6b 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoresCreateWithResponseMockTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoresCreateWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.powerbidedicated.PowerBIDedicatedManager; import com.azure.resourcemanager.powerbidedicated.models.AutoScaleVCore; @@ -25,35 +25,34 @@ public final class AutoScaleVCoresCreateWithResponseMockTests { @Test public void testCreateWithResponse() throws Exception { String responseStr - = "{\"sku\":{\"name\":\"wlauwzizxbmpg\",\"tier\":\"AutoScale\",\"capacity\":85590242},\"properties\":{\"capacityObjectId\":\"uvpb\",\"provisioningState\":\"Succeeded\",\"capacityLimit\":1773574052},\"location\":\"rp\",\"tags\":{\"fgohdneuelfphs\":\"bmnzbtbhjpgl\",\"v\":\"yhtozfikdowwqu\",\"lvithhqzonosgg\":\"zx\",\"ljuti\":\"hcohfwdsjnk\"},\"id\":\"swacffgdkzz\",\"name\":\"wkfvhqcrailvp\",\"type\":\"ppfufl\"}"; + = "{\"properties\":{\"capacityObjectId\":\"yynpcdpumnzgmwz\",\"provisioningState\":\"Succeeded\",\"capacityLimit\":130212191},\"sku\":{\"name\":\"knso\",\"tier\":\"AutoScale\",\"capacity\":1807799282},\"location\":\"ldtlwwr\",\"tags\":{\"ncvokotllxdyhg\":\"m\",\"cogjltdtbn\":\"y\"},\"id\":\"hadoocrk\",\"name\":\"cikhnv\",\"type\":\"amqgxqquezikyw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); PowerBIDedicatedManager manager = PowerBIDedicatedManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AutoScaleVCore response = manager.autoScaleVCores() - .define("fiwjmygtdssls") - .withRegion("d") - .withExistingResourceGroup("erscdntne") - .withSku(new AutoScaleVCoreSku().withName("tmweriofzpyq") + .define("e") + .withRegion("ljphuopxodl") + .withExistingResourceGroup("jfqka") + .withSku(new AutoScaleVCoreSku().withName("qkvpuvksgplsakn") .withTier(VCoreSkuTier.AUTO_SCALE) - .withCapacity(1966587888)) - .withTags(mapOf("mbes", "wiwubm", "okonzmnsikvmkqz", "dnkwwtppjflcxog", "eodkwobda", "qqkdltfzxmhhvhgu", - "xndlkzgxhu", "xtibqdxbxwakbog")) - .withCapacityObjectId("ets") - .withCapacityLimit(199039203) + .withCapacity(654967336)) + .withTags(mapOf("slyzrpzbchckqq", "ntorzihleosjswsr")) + .withCapacityObjectId("pfpubjibww") + .withCapacityLimit(1856548413) .create(); - Assertions.assertEquals("rp", response.location()); - Assertions.assertEquals("bmnzbtbhjpgl", response.tags().get("fgohdneuelfphs")); - Assertions.assertEquals("wlauwzizxbmpg", response.sku().name()); + Assertions.assertEquals("ldtlwwr", response.location()); + Assertions.assertEquals("m", response.tags().get("ncvokotllxdyhg")); + Assertions.assertEquals("knso", response.sku().name()); Assertions.assertEquals(VCoreSkuTier.AUTO_SCALE, response.sku().tier()); - Assertions.assertEquals(85590242, response.sku().capacity()); - Assertions.assertEquals("uvpb", response.capacityObjectId()); - Assertions.assertEquals(1773574052, response.capacityLimit()); + Assertions.assertEquals(1807799282, response.sku().capacity()); + Assertions.assertEquals("yynpcdpumnzgmwz", response.capacityObjectId()); + Assertions.assertEquals(130212191, response.capacityLimit()); } // Use "Map.of" if available diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoresDeleteByResourceGroupWithResponseMockTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoresDeleteByResourceGroupWithResponseMockTests.java index 8b7533b77cf4..3530a77a50c4 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoresDeleteByResourceGroupWithResponseMockTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoresDeleteByResourceGroupWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.powerbidedicated.PowerBIDedicatedManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,10 @@ public void testDeleteWithResponse() throws Exception { PowerBIDedicatedManager manager = PowerBIDedicatedManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.autoScaleVCores() - .deleteByResourceGroupWithResponse("shqjohxcrsbf", "vasrruvwb", com.azure.core.util.Context.NONE); + .deleteByResourceGroupWithResponse("apvhelxprgly", "tddckcb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoresGetByResourceGroupWithResponseMockTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoresGetByResourceGroupWithResponseMockTests.java index 52a9852508ee..6860cdc46eb0 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoresGetByResourceGroupWithResponseMockTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoresGetByResourceGroupWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.powerbidedicated.PowerBIDedicatedManager; import com.azure.resourcemanager.powerbidedicated.models.AutoScaleVCore; @@ -22,25 +22,25 @@ public final class AutoScaleVCoresGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"sku\":{\"name\":\"j\",\"tier\":\"AutoScale\",\"capacity\":1547170393},\"properties\":{\"capacityObjectId\":\"krtswbxqz\",\"provisioningState\":\"Succeeded\",\"capacityLimit\":133351915},\"location\":\"uvjfdxxive\",\"tags\":{\"wvxysl\":\"cqaqtdoqmcbx\"},\"id\":\"bhsfxob\",\"name\":\"ytkblmpew\",\"type\":\"wfbkrvrns\"}"; + = "{\"properties\":{\"capacityObjectId\":\"sluicpdggkzz\",\"provisioningState\":\"Succeeded\",\"capacityLimit\":1881096651},\"sku\":{\"name\":\"paxmodfvuefywsb\",\"tier\":\"AutoScale\",\"capacity\":1491614176},\"location\":\"hrfou\",\"tags\":{\"wiyzvqtmnubexkp\":\"aakc\",\"mquxvypo\":\"ksmond\"},\"id\":\"gkopkwhojvpajqgx\",\"name\":\"smocmbq\",\"type\":\"qvmkcxo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); PowerBIDedicatedManager manager = PowerBIDedicatedManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AutoScaleVCore response = manager.autoScaleVCores() - .getByResourceGroupWithResponse("nrmfqjhhk", "bpvjymjhx", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("mutwuoe", "rpkhjwn", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("uvjfdxxive", response.location()); - Assertions.assertEquals("cqaqtdoqmcbx", response.tags().get("wvxysl")); - Assertions.assertEquals("j", response.sku().name()); + Assertions.assertEquals("hrfou", response.location()); + Assertions.assertEquals("aakc", response.tags().get("wiyzvqtmnubexkp")); + Assertions.assertEquals("paxmodfvuefywsb", response.sku().name()); Assertions.assertEquals(VCoreSkuTier.AUTO_SCALE, response.sku().tier()); - Assertions.assertEquals(1547170393, response.sku().capacity()); - Assertions.assertEquals("krtswbxqz", response.capacityObjectId()); - Assertions.assertEquals(133351915, response.capacityLimit()); + Assertions.assertEquals(1491614176, response.sku().capacity()); + Assertions.assertEquals("sluicpdggkzz", response.capacityObjectId()); + Assertions.assertEquals(1881096651, response.capacityLimit()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoresListByResourceGroupMockTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoresListByResourceGroupMockTests.java index da28b3c2c119..52b3a3a2e4bd 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoresListByResourceGroupMockTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoresListByResourceGroupMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.powerbidedicated.PowerBIDedicatedManager; import com.azure.resourcemanager.powerbidedicated.models.AutoScaleVCore; @@ -23,24 +23,24 @@ public final class AutoScaleVCoresListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"sku\":{\"name\":\"ybsrfbjfdtwss\",\"tier\":\"AutoScale\",\"capacity\":1553831435},\"properties\":{\"capacityObjectId\":\"zbexilzznfqqnvw\",\"provisioningState\":\"Succeeded\",\"capacityLimit\":1787439694},\"location\":\"uoujmkcjhwqy\",\"tags\":{\"jewgdrjerv\":\"ybn\"},\"id\":\"aen\",\"name\":\"pehindoygm\",\"type\":\"fthnzdn\"}]}"; + = "{\"value\":[{\"properties\":{\"capacityObjectId\":\"brh\",\"provisioningState\":\"Succeeded\",\"capacityLimit\":341443712},\"sku\":{\"name\":\"qrhzoymibmrqyib\",\"tier\":\"AutoScale\",\"capacity\":1263635295},\"location\":\"szdtmhrkwof\",\"tags\":{\"iexpbtgiwbwo\":\"oqac\",\"kcnqxwbpo\":\"nwashrtd\",\"aasipqi\":\"ulpiuj\"},\"id\":\"obyu\",\"name\":\"erpqlpqwcciuqg\",\"type\":\"dbutauvfbtkuwhh\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); PowerBIDedicatedManager manager = PowerBIDedicatedManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.autoScaleVCores().listByResourceGroup("sqfsubcgjbirxb", com.azure.core.util.Context.NONE); + = manager.autoScaleVCores().listByResourceGroup("uejrjxgc", com.azure.core.util.Context.NONE); - Assertions.assertEquals("uoujmkcjhwqy", response.iterator().next().location()); - Assertions.assertEquals("ybn", response.iterator().next().tags().get("jewgdrjerv")); - Assertions.assertEquals("ybsrfbjfdtwss", response.iterator().next().sku().name()); + Assertions.assertEquals("szdtmhrkwof", response.iterator().next().location()); + Assertions.assertEquals("oqac", response.iterator().next().tags().get("iexpbtgiwbwo")); + Assertions.assertEquals("qrhzoymibmrqyib", response.iterator().next().sku().name()); Assertions.assertEquals(VCoreSkuTier.AUTO_SCALE, response.iterator().next().sku().tier()); - Assertions.assertEquals(1553831435, response.iterator().next().sku().capacity()); - Assertions.assertEquals("zbexilzznfqqnvw", response.iterator().next().capacityObjectId()); - Assertions.assertEquals(1787439694, response.iterator().next().capacityLimit()); + Assertions.assertEquals(1263635295, response.iterator().next().sku().capacity()); + Assertions.assertEquals("brh", response.iterator().next().capacityObjectId()); + Assertions.assertEquals(341443712, response.iterator().next().capacityLimit()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoresListMockTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoresListMockTests.java index 89162d331391..20fca7e2b07d 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoresListMockTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/AutoScaleVCoresListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.powerbidedicated.PowerBIDedicatedManager; import com.azure.resourcemanager.powerbidedicated.models.AutoScaleVCore; @@ -23,23 +23,23 @@ public final class AutoScaleVCoresListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"sku\":{\"name\":\"sl\",\"tier\":\"AutoScale\",\"capacity\":782103033},\"properties\":{\"capacityObjectId\":\"ynduha\",\"provisioningState\":\"Succeeded\",\"capacityLimit\":1924710891},\"location\":\"humaqolbgyc\",\"tags\":{\"l\":\"ertgccymva\",\"lfmmdnbbglzpswi\":\"ssl\",\"cwyhzdxssa\":\"d\",\"od\":\"bzmnvdfznud\"},\"id\":\"xzb\",\"name\":\"cblylpstdbhhxsr\",\"type\":\"dzu\"}]}"; + = "{\"value\":[{\"properties\":{\"capacityObjectId\":\"k\",\"provisioningState\":\"Succeeded\",\"capacityLimit\":806847230},\"sku\":{\"name\":\"fnndl\",\"tier\":\"AutoScale\",\"capacity\":1639639314},\"location\":\"ymkcdyhb\",\"tags\":{\"vljxywsu\":\"pwdreqnovvqf\"},\"id\":\"syrsndsytgadgvra\",\"name\":\"aeneqnzarrwl\",\"type\":\"uu\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); PowerBIDedicatedManager manager = PowerBIDedicatedManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.autoScaleVCores().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("humaqolbgyc", response.iterator().next().location()); - Assertions.assertEquals("ertgccymva", response.iterator().next().tags().get("l")); - Assertions.assertEquals("sl", response.iterator().next().sku().name()); + Assertions.assertEquals("ymkcdyhb", response.iterator().next().location()); + Assertions.assertEquals("pwdreqnovvqf", response.iterator().next().tags().get("vljxywsu")); + Assertions.assertEquals("fnndl", response.iterator().next().sku().name()); Assertions.assertEquals(VCoreSkuTier.AUTO_SCALE, response.iterator().next().sku().tier()); - Assertions.assertEquals(782103033, response.iterator().next().sku().capacity()); - Assertions.assertEquals("ynduha", response.iterator().next().capacityObjectId()); - Assertions.assertEquals(1924710891, response.iterator().next().capacityLimit()); + Assertions.assertEquals(1639639314, response.iterator().next().sku().capacity()); + Assertions.assertEquals("k", response.iterator().next().capacityObjectId()); + Assertions.assertEquals(806847230, response.iterator().next().capacityLimit()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesCheckNameAvailabilityWithResponseMockTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesCheckNameAvailabilityWithResponseMockTests.java index e2902b8f9356..2f41593cfa48 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesCheckNameAvailabilityWithResponseMockTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesCheckNameAvailabilityWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.powerbidedicated.PowerBIDedicatedManager; import com.azure.resourcemanager.powerbidedicated.models.CheckCapacityNameAvailabilityParameters; @@ -21,23 +21,23 @@ public final class CapacitiesCheckNameAvailabilityWithResponseMockTests { @Test public void testCheckNameAvailabilityWithResponse() throws Exception { - String responseStr = "{\"nameAvailable\":true,\"reason\":\"wpucwwfvovbv\",\"message\":\"uecivyhz\"}"; + String responseStr = "{\"nameAvailable\":false,\"reason\":\"wubmwmbesldn\",\"message\":\"wtppjflcxogaoko\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); PowerBIDedicatedManager manager = PowerBIDedicatedManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CheckCapacityNameAvailabilityResult response = manager.capacities() - .checkNameAvailabilityWithResponse("liourqhak", - new CheckCapacityNameAvailabilityParameters().withName("hashsfwxosow").withType("cugicjoox"), + .checkNameAvailabilityWithResponse("lswtmweriofzpyqs", + new CheckCapacityNameAvailabilityParameters().withName("wab").withType("tshhszhedp"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(true, response.nameAvailable()); - Assertions.assertEquals("wpucwwfvovbv", response.reason()); - Assertions.assertEquals("uecivyhz", response.message()); + Assertions.assertFalse(response.nameAvailable()); + Assertions.assertEquals("wubmwmbesldn", response.reason()); + Assertions.assertEquals("wtppjflcxogaoko", response.message()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesCreateMockTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesCreateMockTests.java index 39417648cddf..f55503701b94 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesCreateMockTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesCreateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.powerbidedicated.PowerBIDedicatedManager; import com.azure.resourcemanager.powerbidedicated.models.CapacitySku; @@ -28,34 +28,35 @@ public final class CapacitiesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"sku\":{\"name\":\"gibtnm\",\"tier\":\"Premium\",\"capacity\":1258750458},\"properties\":{\"state\":\"Suspended\",\"provisioningState\":\"Succeeded\",\"administration\":{\"members\":[\"gwrtzju\",\"gwyzm\",\"txon\"]},\"mode\":\"Gen1\",\"tenantId\":\"avjcbpwx\",\"friendlyName\":\"srknftguv\"},\"location\":\"uhprwmdyvxqt\",\"tags\":{\"ibycno\":\"iwwroyqbexrmc\",\"nmefqsgzvahapj\":\"v\"},\"id\":\"zhpvgqzcjrvxd\",\"name\":\"zlmwlxkvugfhz\",\"type\":\"vawjvzunlu\"}"; + = "{\"properties\":{\"state\":\"Succeeded\",\"provisioningState\":\"Succeeded\",\"administration\":{\"members\":[\"fphsdyhtozfikdow\",\"quuvxzxcl\",\"ithhqzon\",\"sg\"]},\"mode\":\"Gen2\",\"tenantId\":\"ohfwds\",\"friendlyName\":\"ka\"},\"sku\":{\"name\":\"jutiiswacff\",\"tier\":\"PBIE_Azure\",\"capacity\":900444322},\"location\":\"wkfvhqcrailvp\",\"tags\":{\"jrxs\":\"fuflrwdmhdlx\",\"bcvkcvqvpkeq\":\"gafcnihgwqapnedg\"},\"id\":\"cvdrhvoodsot\",\"name\":\"obzdopcjwvnhdl\",\"type\":\"wmgxcxrsl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); PowerBIDedicatedManager manager = PowerBIDedicatedManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DedicatedCapacity response = manager.capacities() - .define("iotwmcdytdxwit") - .withRegion("ow") - .withExistingResourceGroup("euojgjrwju") - .withSku(new CapacitySku().withName("nrjawgqwg") + .define("nsikvmkqzeqqkdl") + .withRegion("koievseo") + .withExistingResourceGroup("z") + .withSku(new CapacitySku().withName("bxmubyynt") .withTier(CapacitySkuTier.AUTO_PREMIUM_HOST) - .withCapacity(1353933533)) - .withTags(mapOf("lupj", "rzqlveu", "riplrbpbewtg", "khfxobbcswsrt")) - .withAdministration(new DedicatedCapacityAdministrators().withMembers(Arrays.asList("gklwn"))) - .withMode(Mode.GEN2) + .withCapacity(2005326650)) + .withTags(mapOf("mpgcjefuzmuvpbt", "rlltmuwlauwzizx")) + .withAdministration( + new DedicatedCapacityAdministrators().withMembers(Arrays.asList("gureodkwobdag", "tibqdxbxwakb"))) + .withMode(Mode.GEN1) .create(); - Assertions.assertEquals("uhprwmdyvxqt", response.location()); - Assertions.assertEquals("iwwroyqbexrmc", response.tags().get("ibycno")); - Assertions.assertEquals("gibtnm", response.sku().name()); - Assertions.assertEquals(CapacitySkuTier.PREMIUM, response.sku().tier()); - Assertions.assertEquals(1258750458, response.sku().capacity()); - Assertions.assertEquals("gwrtzju", response.administration().members().get(0)); - Assertions.assertEquals(Mode.GEN1, response.mode()); + Assertions.assertEquals("wkfvhqcrailvp", response.location()); + Assertions.assertEquals("fuflrwdmhdlx", response.tags().get("jrxs")); + Assertions.assertEquals("jutiiswacff", response.sku().name()); + Assertions.assertEquals(CapacitySkuTier.PBIE_AZURE, response.sku().tier()); + Assertions.assertEquals(900444322, response.sku().capacity()); + Assertions.assertEquals("fphsdyhtozfikdow", response.administration().members().get(0)); + Assertions.assertEquals(Mode.GEN2, response.mode()); } // Use "Map.of" if available diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesDeleteMockTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesDeleteMockTests.java index b73afd488175..056eaad65e00 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesDeleteMockTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.powerbidedicated.PowerBIDedicatedManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { PowerBIDedicatedManager manager = PowerBIDedicatedManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.capacities().delete("xbzpfzab", "lcuhxwtctyqiklb", com.azure.core.util.Context.NONE); + manager.capacities().delete("ixisxyawjoy", "qcslyjpkiid", com.azure.core.util.Context.NONE); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesGetByResourceGroupWithResponseMockTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesGetByResourceGroupWithResponseMockTests.java index 19f35cd91f45..9d5df3e7e8ff 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesGetByResourceGroupWithResponseMockTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesGetByResourceGroupWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.powerbidedicated.PowerBIDedicatedManager; import com.azure.resourcemanager.powerbidedicated.models.CapacitySkuTier; @@ -23,25 +23,25 @@ public final class CapacitiesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"sku\":{\"name\":\"nlqidybyxczf\",\"tier\":\"Premium\",\"capacity\":2035107412},\"properties\":{\"state\":\"Paused\",\"provisioningState\":\"Deleting\",\"administration\":{\"members\":[\"wrqlfktsthsuco\"]},\"mode\":\"Gen2\",\"tenantId\":\"yazttbtwwrqpue\",\"friendlyName\":\"kzywbiex\"},\"location\":\"eyueaxibxujwb\",\"tags\":{\"cuxrhdwbavx\":\"almuzyoxaepdkzja\"},\"id\":\"niwdjsw\",\"name\":\"tsdbpgn\",\"type\":\"ytxhp\"}"; + = "{\"properties\":{\"state\":\"Scaling\",\"provisioningState\":\"Updating\",\"administration\":{\"members\":[\"uhprwmdyvxqt\",\"yriwwroyqb\",\"xrmcqibycnojvk\",\"mefqsgzvahapjyzh\"]},\"mode\":\"Gen1\",\"tenantId\":\"zcjrvxdjzlmwlx\",\"friendlyName\":\"ug\"},\"sku\":{\"name\":\"hzovawjvzunlut\",\"tier\":\"Premium\",\"capacity\":1845273018},\"location\":\"xipeilpjzuaejx\",\"tags\":{\"pwo\":\"tskzbbtdzumveek\",\"fpbsjyofdxl\":\"uh\",\"ttouwaboekqvkel\":\"us\"},\"id\":\"smv\",\"name\":\"xwyjsflhhc\",\"type\":\"aln\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); PowerBIDedicatedManager manager = PowerBIDedicatedManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DedicatedCapacity response = manager.capacities() - .getByResourceGroupWithResponse("enbtkcxywny", "nrs", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("tzjuzgwyzmhtxo", "gmtsavjcbpwxqpsr", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("eyueaxibxujwb", response.location()); - Assertions.assertEquals("almuzyoxaepdkzja", response.tags().get("cuxrhdwbavx")); - Assertions.assertEquals("nlqidybyxczf", response.sku().name()); + Assertions.assertEquals("xipeilpjzuaejx", response.location()); + Assertions.assertEquals("tskzbbtdzumveek", response.tags().get("pwo")); + Assertions.assertEquals("hzovawjvzunlut", response.sku().name()); Assertions.assertEquals(CapacitySkuTier.PREMIUM, response.sku().tier()); - Assertions.assertEquals(2035107412, response.sku().capacity()); - Assertions.assertEquals("wrqlfktsthsuco", response.administration().members().get(0)); - Assertions.assertEquals(Mode.GEN2, response.mode()); + Assertions.assertEquals(1845273018, response.sku().capacity()); + Assertions.assertEquals("uhprwmdyvxqt", response.administration().members().get(0)); + Assertions.assertEquals(Mode.GEN1, response.mode()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesListByResourceGroupMockTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesListByResourceGroupMockTests.java index 939de9d16c14..898e8a1a624c 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesListByResourceGroupMockTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesListByResourceGroupMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.powerbidedicated.PowerBIDedicatedManager; import com.azure.resourcemanager.powerbidedicated.models.CapacitySkuTier; @@ -24,24 +24,24 @@ public final class CapacitiesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"sku\":{\"name\":\"mg\",\"tier\":\"Premium\",\"capacity\":1542113973},\"properties\":{\"state\":\"Pausing\",\"provisioningState\":\"Deleting\",\"administration\":{\"members\":[\"lopwiyig\",\"xpkd\",\"zb\"]},\"mode\":\"Gen2\",\"tenantId\":\"bbaumnyquped\",\"friendlyName\":\"jn\"},\"location\":\"ckhsmtxpsieb\",\"tags\":{\"tldwkyzxuutk\":\"vpesapskrdqmhjjd\",\"togt\":\"cwscwsvlx\",\"vce\":\"rupqsxvnmicy\",\"ovnotyfjfcnjbkcn\":\"vei\"},\"id\":\"dhbt\",\"name\":\"kphywpnvjto\",\"type\":\"nermcl\"}]}"; + = "{\"value\":[{\"properties\":{\"state\":\"Paused\",\"provisioningState\":\"Resuming\",\"administration\":{\"members\":[\"tfolhbnx\",\"nalaulppg\",\"dtpnapnyiropuhp\"]},\"mode\":\"Gen2\",\"tenantId\":\"gylgqgitxmedjvcs\",\"friendlyName\":\"n\"},\"sku\":{\"name\":\"wwncwzzhxgk\",\"tier\":\"Premium\",\"capacity\":1536396877},\"location\":\"napkteoellw\",\"tags\":{\"gpfqbuace\":\"d\",\"qeqxo\":\"pzfqrhhuaoppp\",\"ahzxctobgbk\":\"z\",\"mgrcfbu\":\"moizpos\"},\"id\":\"rmfqjhhkxbpvj\",\"name\":\"mjh\",\"type\":\"xjyngudivk\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); PowerBIDedicatedManager manager = PowerBIDedicatedManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.capacities().listByResourceGroup("fpl", com.azure.core.util.Context.NONE); + = manager.capacities().listByResourceGroup("yexz", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ckhsmtxpsieb", response.iterator().next().location()); - Assertions.assertEquals("vpesapskrdqmhjjd", response.iterator().next().tags().get("tldwkyzxuutk")); - Assertions.assertEquals("mg", response.iterator().next().sku().name()); + Assertions.assertEquals("napkteoellw", response.iterator().next().location()); + Assertions.assertEquals("d", response.iterator().next().tags().get("gpfqbuace")); + Assertions.assertEquals("wwncwzzhxgk", response.iterator().next().sku().name()); Assertions.assertEquals(CapacitySkuTier.PREMIUM, response.iterator().next().sku().tier()); - Assertions.assertEquals(1542113973, response.iterator().next().sku().capacity()); - Assertions.assertEquals("lopwiyig", response.iterator().next().administration().members().get(0)); + Assertions.assertEquals(1536396877, response.iterator().next().sku().capacity()); + Assertions.assertEquals("tfolhbnx", response.iterator().next().administration().members().get(0)); Assertions.assertEquals(Mode.GEN2, response.iterator().next().mode()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesListMockTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesListMockTests.java index f7a1974c47c7..26f4bb1073fb 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesListMockTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.powerbidedicated.PowerBIDedicatedManager; import com.azure.resourcemanager.powerbidedicated.models.CapacitySkuTier; @@ -24,23 +24,23 @@ public final class CapacitiesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"sku\":{\"name\":\"plpho\",\"tier\":\"AutoPremiumHost\",\"capacity\":1106219716},\"properties\":{\"state\":\"Suspended\",\"provisioningState\":\"Suspended\",\"administration\":{\"members\":[\"bjtazqugxywpmu\"]},\"mode\":\"Gen1\",\"tenantId\":\"zwfqkqujidsuyon\",\"friendlyName\":\"glaocq\"},\"location\":\"ccm\",\"tags\":{\"moyrxvwfudwpz\":\"dxyt\",\"rqjbhckfrl\":\"txhdzh\",\"ca\":\"rxsbkyvp\"},\"id\":\"uzbpzkafku\",\"name\":\"b\",\"type\":\"rnwb\"}]}"; + = "{\"value\":[{\"properties\":{\"state\":\"Preparing\",\"provisioningState\":\"Succeeded\",\"administration\":{\"members\":[\"szjfauvjfdxxivet\",\"t\",\"qaqtdoqmcbxvwvxy\",\"lqbhsf\"]},\"mode\":\"Gen1\",\"tenantId\":\"ytkblmpew\",\"friendlyName\":\"fbkrvrnsvs\"},\"sku\":{\"name\":\"q\",\"tier\":\"AutoPremiumHost\",\"capacity\":392993819},\"location\":\"sbfov\",\"tags\":{\"hsqfsubcgjbirxbp\":\"ruvw\",\"dtws\":\"bsrfbj\",\"nfqqnvwp\":\"otftpvjzbexilz\"},\"id\":\"qtaruoujmkcjhwq\",\"name\":\"tjrybnwjewgdr\",\"type\":\"ervnaenqpehi\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); PowerBIDedicatedManager manager = PowerBIDedicatedManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.capacities().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("ccm", response.iterator().next().location()); - Assertions.assertEquals("dxyt", response.iterator().next().tags().get("moyrxvwfudwpz")); - Assertions.assertEquals("plpho", response.iterator().next().sku().name()); + Assertions.assertEquals("sbfov", response.iterator().next().location()); + Assertions.assertEquals("ruvw", response.iterator().next().tags().get("hsqfsubcgjbirxbp")); + Assertions.assertEquals("q", response.iterator().next().sku().name()); Assertions.assertEquals(CapacitySkuTier.AUTO_PREMIUM_HOST, response.iterator().next().sku().tier()); - Assertions.assertEquals(1106219716, response.iterator().next().sku().capacity()); - Assertions.assertEquals("bjtazqugxywpmu", response.iterator().next().administration().members().get(0)); + Assertions.assertEquals(392993819, response.iterator().next().sku().capacity()); + Assertions.assertEquals("szjfauvjfdxxivet", response.iterator().next().administration().members().get(0)); Assertions.assertEquals(Mode.GEN1, response.iterator().next().mode()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesListSkusForCapacityWithResponseMockTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesListSkusForCapacityWithResponseMockTests.java index 60be230e3ed1..d9d62803ebbc 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesListSkusForCapacityWithResponseMockTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesListSkusForCapacityWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.powerbidedicated.PowerBIDedicatedManager; import com.azure.resourcemanager.powerbidedicated.models.CapacitySkuTier; @@ -22,22 +22,22 @@ public final class CapacitiesListSkusForCapacityWithResponseMockTests { @Test public void testListSkusForCapacityWithResponse() throws Exception { String responseStr - = "{\"value\":[{\"resourceType\":\"uahaquhcdhmd\",\"sku\":{\"name\":\"laexqp\",\"tier\":\"PBIE_Azure\",\"capacity\":1087061022}},{\"resourceType\":\"sr\",\"sku\":{\"name\":\"gvxp\",\"tier\":\"Premium\",\"capacity\":1677729561}},{\"resourceType\":\"fmisg\",\"sku\":{\"name\":\"nbbelda\",\"tier\":\"PBIE_Azure\",\"capacity\":585337534}}]}"; + = "{\"value\":[{\"resourceType\":\"cdui\",\"sku\":{\"name\":\"tgccymvaolpss\",\"tier\":\"AutoPremiumHost\",\"capacity\":718226275}},{\"resourceType\":\"dnbbglzps\",\"sku\":{\"name\":\"ydmcwyhzdxssa\",\"tier\":\"Premium\",\"capacity\":122725512}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); PowerBIDedicatedManager manager = PowerBIDedicatedManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SkuEnumerationForExistingResourceResult response = manager.capacities() - .listSkusForCapacityWithResponse("kv", "melmqkrha", com.azure.core.util.Context.NONE) + .listSkusForCapacityWithResponse("ynduha", "hqlkthumaqo", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("uahaquhcdhmd", response.value().get(0).resourceType()); - Assertions.assertEquals("laexqp", response.value().get(0).sku().name()); - Assertions.assertEquals(CapacitySkuTier.PBIE_AZURE, response.value().get(0).sku().tier()); - Assertions.assertEquals(1087061022, response.value().get(0).sku().capacity()); + Assertions.assertEquals("cdui", response.value().get(0).resourceType()); + Assertions.assertEquals("tgccymvaolpss", response.value().get(0).sku().name()); + Assertions.assertEquals(CapacitySkuTier.AUTO_PREMIUM_HOST, response.value().get(0).sku().tier()); + Assertions.assertEquals(718226275, response.value().get(0).sku().capacity()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesListSkusWithResponseMockTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesListSkusWithResponseMockTests.java index 60e526ec7a81..c522ea4982f2 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesListSkusWithResponseMockTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesListSkusWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.powerbidedicated.PowerBIDedicatedManager; import com.azure.resourcemanager.powerbidedicated.models.CapacitySkuTier; @@ -22,20 +22,20 @@ public final class CapacitiesListSkusWithResponseMockTests { @Test public void testListSkusWithResponse() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"hseyvju\",\"tier\":\"AutoPremiumHost\",\"capacity\":2138659261},{\"name\":\"hspkdeemao\",\"tier\":\"Premium\",\"capacity\":1437529213}]}"; + = "{\"value\":[{\"name\":\"fznudaodvxzb\",\"tier\":\"Premium\",\"capacity\":1795882398},{\"name\":\"lpstdbhhxsrzdz\",\"tier\":\"PBIE_Azure\",\"capacity\":223200807},{\"name\":\"cdntnevfiwjmy\",\"tier\":\"PBIE_Azure\",\"capacity\":1448354996}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); PowerBIDedicatedManager manager = PowerBIDedicatedManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SkuEnumerationForNewResourceResult response = manager.capacities().listSkusWithResponse(com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("hseyvju", response.value().get(0).name()); - Assertions.assertEquals(CapacitySkuTier.AUTO_PREMIUM_HOST, response.value().get(0).tier()); - Assertions.assertEquals(2138659261, response.value().get(0).capacity()); + Assertions.assertEquals("fznudaodvxzb", response.value().get(0).name()); + Assertions.assertEquals(CapacitySkuTier.PREMIUM, response.value().get(0).tier()); + Assertions.assertEquals(1795882398, response.value().get(0).capacity()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesResumeMockTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesResumeMockTests.java index 991c76153f89..0eb536172820 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesResumeMockTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesResumeMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.powerbidedicated.PowerBIDedicatedManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testResume() throws Exception { PowerBIDedicatedManager manager = PowerBIDedicatedManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.capacities().resume("gu", "svmkfssxquk", com.azure.core.util.Context.NONE); + manager.capacities().resume("l", "nayqi", com.azure.core.util.Context.NONE); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesSuspendMockTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesSuspendMockTests.java index d9ff5e9d5e8e..c90670b07f5b 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesSuspendMockTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitiesSuspendMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.powerbidedicated.PowerBIDedicatedManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testSuspend() throws Exception { PowerBIDedicatedManager manager = PowerBIDedicatedManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.capacities().suspend("ovplw", "bhvgy", com.azure.core.util.Context.NONE); + manager.capacities().suspend("doy", "mifthnzdnd", com.azure.core.util.Context.NONE); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitySkuTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitySkuTests.java index aaf5e570c496..d3882eb9641c 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitySkuTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CapacitySkuTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; @@ -12,19 +12,20 @@ public final class CapacitySkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CapacitySku model = BinaryData.fromString("{\"name\":\"zyf\",\"tier\":\"Premium\",\"capacity\":272665329}") + CapacitySku model = BinaryData.fromString("{\"name\":\"mi\",\"tier\":\"PBIE_Azure\",\"capacity\":1389822474}") .toObject(CapacitySku.class); - Assertions.assertEquals("zyf", model.name()); - Assertions.assertEquals(CapacitySkuTier.PREMIUM, model.tier()); - Assertions.assertEquals(272665329, model.capacity()); + Assertions.assertEquals("mi", model.name()); + Assertions.assertEquals(CapacitySkuTier.PBIE_AZURE, model.tier()); + Assertions.assertEquals(1389822474, model.capacity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CapacitySku model = new CapacitySku().withName("zyf").withTier(CapacitySkuTier.PREMIUM).withCapacity(272665329); + CapacitySku model + = new CapacitySku().withName("mi").withTier(CapacitySkuTier.PBIE_AZURE).withCapacity(1389822474); model = BinaryData.fromObject(model).toObject(CapacitySku.class); - Assertions.assertEquals("zyf", model.name()); - Assertions.assertEquals(CapacitySkuTier.PREMIUM, model.tier()); - Assertions.assertEquals(272665329, model.capacity()); + Assertions.assertEquals("mi", model.name()); + Assertions.assertEquals(CapacitySkuTier.PBIE_AZURE, model.tier()); + Assertions.assertEquals(1389822474, model.capacity()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CheckCapacityNameAvailabilityParametersTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CheckCapacityNameAvailabilityParametersTests.java index 973730acd50c..e55d507c6f26 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CheckCapacityNameAvailabilityParametersTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CheckCapacityNameAvailabilityParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; @@ -12,18 +12,18 @@ public final class CheckCapacityNameAvailabilityParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CheckCapacityNameAvailabilityParameters model - = BinaryData.fromString("{\"name\":\"lkevle\",\"type\":\"zfbuhf\"}") + = BinaryData.fromString("{\"name\":\"ankixzbinjeput\",\"type\":\"rywn\"}") .toObject(CheckCapacityNameAvailabilityParameters.class); - Assertions.assertEquals("lkevle", model.name()); - Assertions.assertEquals("zfbuhf", model.type()); + Assertions.assertEquals("ankixzbinjeput", model.name()); + Assertions.assertEquals("rywn", model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CheckCapacityNameAvailabilityParameters model - = new CheckCapacityNameAvailabilityParameters().withName("lkevle").withType("zfbuhf"); + = new CheckCapacityNameAvailabilityParameters().withName("ankixzbinjeput").withType("rywn"); model = BinaryData.fromObject(model).toObject(CheckCapacityNameAvailabilityParameters.class); - Assertions.assertEquals("lkevle", model.name()); - Assertions.assertEquals("zfbuhf", model.type()); + Assertions.assertEquals("ankixzbinjeput", model.name()); + Assertions.assertEquals("rywn", model.type()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CheckCapacityNameAvailabilityResultInnerTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CheckCapacityNameAvailabilityResultInnerTests.java index 2e4aa7511148..d4b0ca80f991 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CheckCapacityNameAvailabilityResultInnerTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/CheckCapacityNameAvailabilityResultInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; @@ -12,22 +12,10 @@ public final class CheckCapacityNameAvailabilityResultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CheckCapacityNameAvailabilityResultInner model - = BinaryData.fromString("{\"nameAvailable\":true,\"reason\":\"x\",\"message\":\"feiithlvmez\"}") + = BinaryData.fromString("{\"nameAvailable\":true,\"reason\":\"ftiyqzrnkcq\",\"message\":\"xlwhzlsicoh\"}") .toObject(CheckCapacityNameAvailabilityResultInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals("x", model.reason()); - Assertions.assertEquals("feiithlvmez", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckCapacityNameAvailabilityResultInner model - = new CheckCapacityNameAvailabilityResultInner().withNameAvailable(true) - .withReason("x") - .withMessage("feiithlvmez"); - model = BinaryData.fromObject(model).toObject(CheckCapacityNameAvailabilityResultInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals("x", model.reason()); - Assertions.assertEquals("feiithlvmez", model.message()); + Assertions.assertTrue(model.nameAvailable()); + Assertions.assertEquals("ftiyqzrnkcq", model.reason()); + Assertions.assertEquals("xlwhzlsicoh", model.message()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacitiesTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacitiesTests.java index 269b848e2d93..defec56650b0 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacitiesTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacitiesTests.java @@ -1,91 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.powerbidedicated.fluent.models.DedicatedCapacityInner; -import com.azure.resourcemanager.powerbidedicated.models.CapacitySku; +import com.azure.resourcemanager.powerbidedicated.implementation.models.DedicatedCapacities; import com.azure.resourcemanager.powerbidedicated.models.CapacitySkuTier; -import com.azure.resourcemanager.powerbidedicated.models.DedicatedCapacities; -import com.azure.resourcemanager.powerbidedicated.models.DedicatedCapacityAdministrators; import com.azure.resourcemanager.powerbidedicated.models.Mode; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class DedicatedCapacitiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DedicatedCapacities model = BinaryData.fromString( - "{\"value\":[{\"sku\":{\"name\":\"pmqnja\",\"tier\":\"AutoPremiumHost\",\"capacity\":1052966015},\"properties\":{\"state\":\"Scaling\",\"provisioningState\":\"Suspended\",\"administration\":{\"members\":[\"utegjvwmfdats\",\"mdvpjhulsu\",\"vmkjozkrwfndiodj\"]},\"mode\":\"Gen1\",\"tenantId\":\"ej\",\"friendlyName\":\"vwryoqpso\"},\"location\":\"ctazakljlahbcryf\",\"tags\":{\"xpaojakhmsbz\":\"dosyg\",\"hlxaolthqtr\":\"hcrzevd\"},\"id\":\"qjbpfzfsin\",\"name\":\"gvfcj\",\"type\":\"wzo\"},{\"sku\":{\"name\":\"xjtfelluwfzit\",\"tier\":\"PBIE_Azure\",\"capacity\":1181425969},\"properties\":{\"state\":\"Succeeded\",\"provisioningState\":\"Failed\",\"administration\":{\"members\":[\"fpdvhpfxxypi\",\"i\"]},\"mode\":\"Gen1\",\"tenantId\":\"huyb\",\"friendlyName\":\"podepoo\"},\"location\":\"nuvamiheogna\",\"tags\":{\"o\":\"xth\",\"cciqihnhungbwjz\":\"usivye\",\"kufubljo\":\"nfygxgispemvtz\",\"v\":\"xqeofjaeqjhqjba\"},\"id\":\"smjqulngsntnbyb\",\"name\":\"zgcwrw\",\"type\":\"lxxwrljdouskc\"},{\"sku\":{\"name\":\"vkocrcjdkwtn\",\"tier\":\"PBIE_Azure\",\"capacity\":1299495603},\"properties\":{\"state\":\"Preparing\",\"provisioningState\":\"Pausing\",\"administration\":{\"members\":[\"ssainqpjwnzll\",\"fmppe\"]},\"mode\":\"Gen1\",\"tenantId\":\"gxsabkyq\",\"friendlyName\":\"ujitcjcz\"},\"location\":\"evndh\",\"tags\":{\"dkvwrwjfe\":\"pdappds\",\"je\":\"snhu\",\"hocdgeab\":\"tmrldhugjzzdatq\"},\"id\":\"gphuticndvka\",\"name\":\"zwyiftyhxhur\",\"type\":\"k\"},{\"sku\":{\"name\":\"tyxolniwpwc\",\"tier\":\"Premium\",\"capacity\":1720882214},\"properties\":{\"state\":\"Suspended\",\"provisioningState\":\"Suspended\",\"administration\":{\"members\":[\"ypl\",\"ckbasyypndd\",\"sgcbac\",\"hejkotynqgou\"]},\"mode\":\"Gen1\",\"tenantId\":\"likwyqkgfgib\",\"friendlyName\":\"dgak\"},\"location\":\"s\",\"tags\":{\"ouf\":\"bzqqedqytbciq\"},\"id\":\"mmnkzsmodmgl\",\"name\":\"ugpbkw\",\"type\":\"mutduqktaps\"}]}") + "{\"value\":[{\"properties\":{\"state\":\"Preparing\",\"provisioningState\":\"Failed\",\"administration\":{\"members\":[\"xaqwoochcbonqv\"]},\"mode\":\"Gen2\",\"tenantId\":\"rxnjeaseipheofl\",\"friendlyName\":\"eyy\"},\"sku\":{\"name\":\"enjbdlwtgrhp\",\"tier\":\"AutoPremiumHost\",\"capacity\":523400535},\"location\":\"asxazjpqyegualhb\",\"tags\":{\"jzzvdud\":\"e\",\"pwlbjnpg\":\"wdslfhotwmcy\"},\"id\":\"cftadeh\",\"name\":\"nltyfsoppusuesnz\",\"type\":\"dejbavo\"},{\"properties\":{\"state\":\"Succeeded\",\"provisioningState\":\"Updating\",\"administration\":{\"members\":[\"bqvudwxdndn\",\"owgujjugwdkcglhs\"]},\"mode\":\"Gen1\",\"tenantId\":\"dyggdtjixhbku\",\"friendlyName\":\"qweykhmenev\"},\"sku\":{\"name\":\"yexfwh\",\"tier\":\"Premium\",\"capacity\":412595968},\"location\":\"yvdcsitynnaa\",\"tags\":{\"vhezrkgqhcj\":\"ctehfiqscjey\",\"sle\":\"efovgmk\"},\"id\":\"yvxyqjp\",\"name\":\"cattpngjcrcczsq\",\"type\":\"jh\"},{\"properties\":{\"state\":\"Succeeded\",\"provisioningState\":\"Scaling\",\"administration\":{\"members\":[\"ounqecano\",\"eupfhyhltrpm\",\"pjmcmatuokthfuiu\",\"odsfcpkvxodpuozm\"]},\"mode\":\"Gen2\",\"tenantId\":\"agfuaxbezyiu\",\"friendlyName\":\"ktwh\"},\"sku\":{\"name\":\"dxwzywqsmbsurexi\",\"tier\":\"AutoPremiumHost\",\"capacity\":1010959661},\"location\":\"fsfksymddyst\",\"tags\":{\"yudxorrqnbp\":\"uxh\",\"vkd\":\"czvyifq\",\"d\":\"jsllrmv\"},\"id\":\"watkpnpulexxb\",\"name\":\"zwtruwiqzbqjvsov\",\"type\":\"yokacspkw\"},{\"properties\":{\"state\":\"Suspending\",\"provisioningState\":\"Updating\",\"administration\":{\"members\":[\"mflbv\",\"nchrkcciww\",\"juqk\"]},\"mode\":\"Gen1\",\"tenantId\":\"jiwkuofoskghsau\",\"friendlyName\":\"mjmvxieduugidyjr\"},\"sku\":{\"name\":\"f\",\"tier\":\"AutoPremiumHost\",\"capacity\":1874197992},\"location\":\"e\",\"tags\":{\"hocohslkev\":\"onpc\",\"hfmvfaxkffe\":\"eggzfb\",\"sbbzo\":\"ithlvmezyvshxm\"},\"id\":\"gigr\",\"name\":\"wburvjxxjnspydpt\",\"type\":\"oenkouknvudwti\"}],\"nextLink\":\"bldngkpoc\"}") .toObject(DedicatedCapacities.class); - Assertions.assertEquals("ctazakljlahbcryf", model.value().get(0).location()); - Assertions.assertEquals("dosyg", model.value().get(0).tags().get("xpaojakhmsbz")); - Assertions.assertEquals("pmqnja", model.value().get(0).sku().name()); + Assertions.assertEquals("asxazjpqyegualhb", model.value().get(0).location()); + Assertions.assertEquals("e", model.value().get(0).tags().get("jzzvdud")); + Assertions.assertEquals("enjbdlwtgrhp", model.value().get(0).sku().name()); Assertions.assertEquals(CapacitySkuTier.AUTO_PREMIUM_HOST, model.value().get(0).sku().tier()); - Assertions.assertEquals(1052966015, model.value().get(0).sku().capacity()); - Assertions.assertEquals("utegjvwmfdats", model.value().get(0).administration().members().get(0)); - Assertions.assertEquals(Mode.GEN1, model.value().get(0).mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DedicatedCapacities model = new DedicatedCapacities().withValue(Arrays.asList( - new DedicatedCapacityInner().withLocation("ctazakljlahbcryf") - .withTags(mapOf("xpaojakhmsbz", "dosyg", "hlxaolthqtr", "hcrzevd")) - .withSku(new CapacitySku().withName("pmqnja") - .withTier(CapacitySkuTier.AUTO_PREMIUM_HOST) - .withCapacity(1052966015)) - .withAdministration(new DedicatedCapacityAdministrators() - .withMembers(Arrays.asList("utegjvwmfdats", "mdvpjhulsu", "vmkjozkrwfndiodj"))) - .withMode(Mode.GEN1), - new DedicatedCapacityInner().withLocation("nuvamiheogna") - .withTags(mapOf("o", "xth", "cciqihnhungbwjz", "usivye", "kufubljo", "nfygxgispemvtz", "v", - "xqeofjaeqjhqjba")) - .withSku(new CapacitySku().withName("xjtfelluwfzit") - .withTier(CapacitySkuTier.PBIE_AZURE) - .withCapacity(1181425969)) - .withAdministration( - new DedicatedCapacityAdministrators().withMembers(Arrays.asList("fpdvhpfxxypi", "i"))) - .withMode(Mode.GEN1), - new DedicatedCapacityInner().withLocation("evndh") - .withTags(mapOf("dkvwrwjfe", "pdappds", "je", "snhu", "hocdgeab", "tmrldhugjzzdatq")) - .withSku(new CapacitySku().withName("vkocrcjdkwtn") - .withTier(CapacitySkuTier.PBIE_AZURE) - .withCapacity(1299495603)) - .withAdministration( - new DedicatedCapacityAdministrators().withMembers(Arrays.asList("ssainqpjwnzll", "fmppe"))) - .withMode(Mode.GEN1), - new DedicatedCapacityInner().withLocation("s") - .withTags(mapOf("ouf", "bzqqedqytbciq")) - .withSku(new CapacitySku().withName("tyxolniwpwc") - .withTier(CapacitySkuTier.PREMIUM) - .withCapacity(1720882214)) - .withAdministration(new DedicatedCapacityAdministrators() - .withMembers(Arrays.asList("ypl", "ckbasyypndd", "sgcbac", "hejkotynqgou"))) - .withMode(Mode.GEN1))); - model = BinaryData.fromObject(model).toObject(DedicatedCapacities.class); - Assertions.assertEquals("ctazakljlahbcryf", model.value().get(0).location()); - Assertions.assertEquals("dosyg", model.value().get(0).tags().get("xpaojakhmsbz")); - Assertions.assertEquals("pmqnja", model.value().get(0).sku().name()); - Assertions.assertEquals(CapacitySkuTier.AUTO_PREMIUM_HOST, model.value().get(0).sku().tier()); - Assertions.assertEquals(1052966015, model.value().get(0).sku().capacity()); - Assertions.assertEquals("utegjvwmfdats", model.value().get(0).administration().members().get(0)); - Assertions.assertEquals(Mode.GEN1, model.value().get(0).mode()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals(523400535, model.value().get(0).sku().capacity()); + Assertions.assertEquals("xaqwoochcbonqv", model.value().get(0).administration().members().get(0)); + Assertions.assertEquals(Mode.GEN2, model.value().get(0).mode()); + Assertions.assertEquals("bldngkpoc", model.nextLink()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacityAdministratorsTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacityAdministratorsTests.java index 9f4497befc2d..dd2d337e005f 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacityAdministratorsTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacityAdministratorsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; @@ -12,17 +12,17 @@ public final class DedicatedCapacityAdministratorsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DedicatedCapacityAdministrators model = BinaryData - .fromString("{\"members\":[\"cyzkohdbihanuf\",\"fcbjysagithxqha\",\"ifpikxwczby\",\"cnpqxuhivyqniwby\"]}") - .toObject(DedicatedCapacityAdministrators.class); - Assertions.assertEquals("cyzkohdbihanuf", model.members().get(0)); + DedicatedCapacityAdministrators model + = BinaryData.fromString("{\"members\":[\"hrzayvvtpgvdf\",\"iotkftutqxl\",\"gxlefgugnxkrxd\"]}") + .toObject(DedicatedCapacityAdministrators.class); + Assertions.assertEquals("hrzayvvtpgvdf", model.members().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DedicatedCapacityAdministrators model = new DedicatedCapacityAdministrators() - .withMembers(Arrays.asList("cyzkohdbihanuf", "fcbjysagithxqha", "ifpikxwczby", "cnpqxuhivyqniwby")); + .withMembers(Arrays.asList("hrzayvvtpgvdf", "iotkftutqxl", "gxlefgugnxkrxd")); model = BinaryData.fromObject(model).toObject(DedicatedCapacityAdministrators.class); - Assertions.assertEquals("cyzkohdbihanuf", model.members().get(0)); + Assertions.assertEquals("hrzayvvtpgvdf", model.members().get(0)); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacityInnerTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacityInnerTests.java index 20d4d165e4a3..0fbe7b7d83ea 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacityInnerTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacityInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; @@ -19,36 +19,34 @@ public final class DedicatedCapacityInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DedicatedCapacityInner model = BinaryData.fromString( - "{\"sku\":{\"name\":\"mmhquvgjxpyb\",\"tier\":\"PBIE_Azure\",\"capacity\":1336465504},\"properties\":{\"state\":\"Suspending\",\"provisioningState\":\"Deleting\",\"administration\":{\"members\":[\"h\",\"upi\",\"gsybbejhp\",\"oycmsxaobhdxbmt\"]},\"mode\":\"Gen2\",\"tenantId\":\"jzehtb\",\"friendlyName\":\"fpownoizhwlr\"},\"location\":\"bqsoqijg\",\"tags\":{\"btcqq\":\"bpazlobcufpdzn\",\"lhqgnufooojy\":\"nq\",\"zlhjxrifkwmrvkt\":\"ifsqesaagdfmg\",\"ajpsquc\":\"izntocipao\"},\"id\":\"poyfdkfogkn\",\"name\":\"gjofjd\",\"type\":\"eqsrdeupewnwreit\"}") + "{\"properties\":{\"state\":\"Preparing\",\"provisioningState\":\"Succeeded\",\"administration\":{\"members\":[\"hbzhfepg\",\"gqexzlocxs\",\"paierh\"]},\"mode\":\"Gen1\",\"tenantId\":\"glu\",\"friendlyName\":\"a\"},\"sku\":{\"name\":\"tjaodxobnb\",\"tier\":\"PBIE_Azure\",\"capacity\":372100049},\"location\":\"okaj\",\"tags\":{\"aajrm\":\"pimexgstxgcpodg\",\"clwhijcoejctbz\":\"djwzrlov\"},\"id\":\"qsqsy\",\"name\":\"bkbfkgukdkex\",\"type\":\"ppofmxaxcfjpgdd\"}") .toObject(DedicatedCapacityInner.class); - Assertions.assertEquals("bqsoqijg", model.location()); - Assertions.assertEquals("bpazlobcufpdzn", model.tags().get("btcqq")); - Assertions.assertEquals("mmhquvgjxpyb", model.sku().name()); + Assertions.assertEquals("okaj", model.location()); + Assertions.assertEquals("pimexgstxgcpodg", model.tags().get("aajrm")); + Assertions.assertEquals("tjaodxobnb", model.sku().name()); Assertions.assertEquals(CapacitySkuTier.PBIE_AZURE, model.sku().tier()); - Assertions.assertEquals(1336465504, model.sku().capacity()); - Assertions.assertEquals("h", model.administration().members().get(0)); - Assertions.assertEquals(Mode.GEN2, model.mode()); + Assertions.assertEquals(372100049, model.sku().capacity()); + Assertions.assertEquals("hbzhfepg", model.administration().members().get(0)); + Assertions.assertEquals(Mode.GEN1, model.mode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DedicatedCapacityInner model = new DedicatedCapacityInner().withLocation("bqsoqijg") - .withTags(mapOf("btcqq", "bpazlobcufpdzn", "lhqgnufooojy", "nq", "zlhjxrifkwmrvkt", "ifsqesaagdfmg", - "ajpsquc", "izntocipao")) - .withSku(new CapacitySku().withName("mmhquvgjxpyb") - .withTier(CapacitySkuTier.PBIE_AZURE) - .withCapacity(1336465504)) - .withAdministration(new DedicatedCapacityAdministrators() - .withMembers(Arrays.asList("h", "upi", "gsybbejhp", "oycmsxaobhdxbmt"))) - .withMode(Mode.GEN2); + DedicatedCapacityInner model = new DedicatedCapacityInner().withLocation("okaj") + .withTags(mapOf("aajrm", "pimexgstxgcpodg", "clwhijcoejctbz", "djwzrlov")) + .withSku( + new CapacitySku().withName("tjaodxobnb").withTier(CapacitySkuTier.PBIE_AZURE).withCapacity(372100049)) + .withAdministration( + new DedicatedCapacityAdministrators().withMembers(Arrays.asList("hbzhfepg", "gqexzlocxs", "paierh"))) + .withMode(Mode.GEN1); model = BinaryData.fromObject(model).toObject(DedicatedCapacityInner.class); - Assertions.assertEquals("bqsoqijg", model.location()); - Assertions.assertEquals("bpazlobcufpdzn", model.tags().get("btcqq")); - Assertions.assertEquals("mmhquvgjxpyb", model.sku().name()); + Assertions.assertEquals("okaj", model.location()); + Assertions.assertEquals("pimexgstxgcpodg", model.tags().get("aajrm")); + Assertions.assertEquals("tjaodxobnb", model.sku().name()); Assertions.assertEquals(CapacitySkuTier.PBIE_AZURE, model.sku().tier()); - Assertions.assertEquals(1336465504, model.sku().capacity()); - Assertions.assertEquals("h", model.administration().members().get(0)); - Assertions.assertEquals(Mode.GEN2, model.mode()); + Assertions.assertEquals(372100049, model.sku().capacity()); + Assertions.assertEquals("hbzhfepg", model.administration().members().get(0)); + Assertions.assertEquals(Mode.GEN1, model.mode()); } // Use "Map.of" if available diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacityMutablePropertiesTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacityMutablePropertiesTests.java index 747d58492c47..19b364397d76 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacityMutablePropertiesTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacityMutablePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; @@ -15,20 +15,20 @@ public final class DedicatedCapacityMutablePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DedicatedCapacityMutableProperties model = BinaryData.fromString( - "{\"administration\":{\"members\":[\"ryuanzwuxzdxtay\",\"lhmwhfpmrqobm\"]},\"mode\":\"Gen2\",\"tenantId\":\"nryrtihf\",\"friendlyName\":\"ijbpzvgnwzsymgl\"}") + "{\"administration\":{\"members\":[\"xmqci\",\"q\",\"hkh\",\"xuigdtopbobj\"]},\"mode\":\"Gen1\",\"tenantId\":\"e\",\"friendlyName\":\"a\"}") .toObject(DedicatedCapacityMutableProperties.class); - Assertions.assertEquals("ryuanzwuxzdxtay", model.administration().members().get(0)); - Assertions.assertEquals(Mode.GEN2, model.mode()); + Assertions.assertEquals("xmqci", model.administration().members().get(0)); + Assertions.assertEquals(Mode.GEN1, model.mode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DedicatedCapacityMutableProperties model = new DedicatedCapacityMutableProperties() .withAdministration( - new DedicatedCapacityAdministrators().withMembers(Arrays.asList("ryuanzwuxzdxtay", "lhmwhfpmrqobm"))) - .withMode(Mode.GEN2); + new DedicatedCapacityAdministrators().withMembers(Arrays.asList("xmqci", "q", "hkh", "xuigdtopbobj"))) + .withMode(Mode.GEN1); model = BinaryData.fromObject(model).toObject(DedicatedCapacityMutableProperties.class); - Assertions.assertEquals("ryuanzwuxzdxtay", model.administration().members().get(0)); - Assertions.assertEquals(Mode.GEN2, model.mode()); + Assertions.assertEquals("xmqci", model.administration().members().get(0)); + Assertions.assertEquals(Mode.GEN1, model.mode()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacityPropertiesTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacityPropertiesTests.java index 036e61c66637..79ee7b18923a 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacityPropertiesTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacityPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; @@ -15,19 +15,21 @@ public final class DedicatedCapacityPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DedicatedCapacityProperties model = BinaryData.fromString( - "{\"state\":\"Suspending\",\"provisioningState\":\"Updating\",\"administration\":{\"members\":[\"smy\"]},\"mode\":\"Gen2\",\"tenantId\":\"tmlxhekuksjtx\",\"friendlyName\":\"cdm\"}") + "{\"state\":\"Failed\",\"provisioningState\":\"Paused\",\"administration\":{\"members\":[\"pmouexhdz\",\"i\",\"qeojnxqbzvddntw\",\"deicbtwnpzao\"]},\"mode\":\"Gen2\",\"tenantId\":\"rhcffcydd\",\"friendlyName\":\"mjthjqkwp\"}") .toObject(DedicatedCapacityProperties.class); - Assertions.assertEquals("smy", model.administration().members().get(0)); + Assertions.assertEquals("pmouexhdz", model.administration().members().get(0)); Assertions.assertEquals(Mode.GEN2, model.mode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DedicatedCapacityProperties model = new DedicatedCapacityProperties() - .withAdministration(new DedicatedCapacityAdministrators().withMembers(Arrays.asList("smy"))) - .withMode(Mode.GEN2); + DedicatedCapacityProperties model + = new DedicatedCapacityProperties() + .withAdministration(new DedicatedCapacityAdministrators() + .withMembers(Arrays.asList("pmouexhdz", "i", "qeojnxqbzvddntw", "deicbtwnpzao"))) + .withMode(Mode.GEN2); model = BinaryData.fromObject(model).toObject(DedicatedCapacityProperties.class); - Assertions.assertEquals("smy", model.administration().members().get(0)); + Assertions.assertEquals("pmouexhdz", model.administration().members().get(0)); Assertions.assertEquals(Mode.GEN2, model.mode()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacityUpdateParametersTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacityUpdateParametersTests.java index 3a0129d86b09..208d5fd9e60d 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacityUpdateParametersTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/DedicatedCapacityUpdateParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; @@ -19,30 +19,31 @@ public final class DedicatedCapacityUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DedicatedCapacityUpdateParameters model = BinaryData.fromString( - "{\"sku\":{\"name\":\"k\",\"tier\":\"Premium\",\"capacity\":832798449},\"tags\":{\"ukxgaud\":\"rtfw\",\"h\":\"cs\"},\"properties\":{\"administration\":{\"members\":[\"ejhkry\",\"tnapczwlokjyemkk\"]},\"mode\":\"Gen2\",\"tenantId\":\"joxzjnchgejspodm\",\"friendlyName\":\"lzydehojwyahux\"}}") + "{\"sku\":{\"name\":\"vqdra\",\"tier\":\"Premium\",\"capacity\":792570944},\"tags\":{\"ktzlcuiywg\":\"ehoqfbowskan\",\"nhzgpphrcgyn\":\"ywgndrv\",\"fsxlzevgbmqjqa\":\"ocpecfvmmco\",\"pmivkwlzu\":\"c\"},\"properties\":{\"administration\":{\"members\":[\"nfnbacfionlebxe\",\"qgtz\"]},\"mode\":\"Gen2\",\"tenantId\":\"qbqqwxr\",\"friendlyName\":\"eallnwsubisnj\"}}") .toObject(DedicatedCapacityUpdateParameters.class); - Assertions.assertEquals("k", model.sku().name()); + Assertions.assertEquals("vqdra", model.sku().name()); Assertions.assertEquals(CapacitySkuTier.PREMIUM, model.sku().tier()); - Assertions.assertEquals(832798449, model.sku().capacity()); - Assertions.assertEquals("rtfw", model.tags().get("ukxgaud")); - Assertions.assertEquals("ejhkry", model.administration().members().get(0)); + Assertions.assertEquals(792570944, model.sku().capacity()); + Assertions.assertEquals("ehoqfbowskan", model.tags().get("ktzlcuiywg")); + Assertions.assertEquals("nfnbacfionlebxe", model.administration().members().get(0)); Assertions.assertEquals(Mode.GEN2, model.mode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DedicatedCapacityUpdateParameters model = new DedicatedCapacityUpdateParameters() - .withSku(new CapacitySku().withName("k").withTier(CapacitySkuTier.PREMIUM).withCapacity(832798449)) - .withTags(mapOf("ukxgaud", "rtfw", "h", "cs")) + .withSku(new CapacitySku().withName("vqdra").withTier(CapacitySkuTier.PREMIUM).withCapacity(792570944)) + .withTags(mapOf("ktzlcuiywg", "ehoqfbowskan", "nhzgpphrcgyn", "ywgndrv", "fsxlzevgbmqjqa", "ocpecfvmmco", + "pmivkwlzu", "c")) .withAdministration( - new DedicatedCapacityAdministrators().withMembers(Arrays.asList("ejhkry", "tnapczwlokjyemkk"))) + new DedicatedCapacityAdministrators().withMembers(Arrays.asList("nfnbacfionlebxe", "qgtz"))) .withMode(Mode.GEN2); model = BinaryData.fromObject(model).toObject(DedicatedCapacityUpdateParameters.class); - Assertions.assertEquals("k", model.sku().name()); + Assertions.assertEquals("vqdra", model.sku().name()); Assertions.assertEquals(CapacitySkuTier.PREMIUM, model.sku().tier()); - Assertions.assertEquals(832798449, model.sku().capacity()); - Assertions.assertEquals("rtfw", model.tags().get("ukxgaud")); - Assertions.assertEquals("ejhkry", model.administration().members().get(0)); + Assertions.assertEquals(792570944, model.sku().capacity()); + Assertions.assertEquals("ehoqfbowskan", model.tags().get("ktzlcuiywg")); + Assertions.assertEquals("nfnbacfionlebxe", model.administration().members().get(0)); Assertions.assertEquals(Mode.GEN2, model.mode()); } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/LogSpecificationTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/LogSpecificationTests.java index baf05978ee3f..0c2784952269 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/LogSpecificationTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/LogSpecificationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; @@ -11,16 +11,9 @@ public final class LogSpecificationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LogSpecification model = BinaryData - .fromString("{\"name\":\"ugidyjrr\",\"displayName\":\"y\",\"blobDuration\":\"svexcsonpclhoco\"}") - .toObject(LogSpecification.class); - Assertions.assertEquals("y", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogSpecification model = new LogSpecification().withDisplayName("y"); - model = BinaryData.fromObject(model).toObject(LogSpecification.class); - Assertions.assertEquals("y", model.displayName()); + LogSpecification model + = BinaryData.fromString("{\"name\":\"j\",\"displayName\":\"btoqcjmkljavbqid\",\"blobDuration\":\"ajzyul\"}") + .toObject(LogSpecification.class); + Assertions.assertEquals("btoqcjmkljavbqid", model.displayName()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/MetricSpecificationDimensionsItemTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/MetricSpecificationDimensionsItemTests.java index 68bf7c8fb882..b2f244cd7069 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/MetricSpecificationDimensionsItemTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/MetricSpecificationDimensionsItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; @@ -11,16 +11,8 @@ public final class MetricSpecificationDimensionsItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MetricSpecificationDimensionsItem model - = BinaryData.fromString("{\"name\":\"wkuofoskghsauu\",\"displayName\":\"jmvxie\"}") - .toObject(MetricSpecificationDimensionsItem.class); - Assertions.assertEquals("jmvxie", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricSpecificationDimensionsItem model = new MetricSpecificationDimensionsItem().withDisplayName("jmvxie"); - model = BinaryData.fromObject(model).toObject(MetricSpecificationDimensionsItem.class); - Assertions.assertEquals("jmvxie", model.displayName()); + MetricSpecificationDimensionsItem model = BinaryData.fromString("{\"name\":\"ysh\",\"displayName\":\"zafb\"}") + .toObject(MetricSpecificationDimensionsItem.class); + Assertions.assertEquals("zafb", model.displayName()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/MetricSpecificationTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/MetricSpecificationTests.java index 48d134997944..33ddbfe56659 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/MetricSpecificationTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/MetricSpecificationTests.java @@ -1,34 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.powerbidedicated.models.MetricSpecification; -import com.azure.resourcemanager.powerbidedicated.models.MetricSpecificationDimensionsItem; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class MetricSpecificationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MetricSpecification model = BinaryData.fromString( - "{\"name\":\"vvdfwatkpnpul\",\"displayName\":\"xbczwtruwiqz\",\"displayDescription\":\"j\",\"unit\":\"ovm\",\"aggregationType\":\"kacspkw\",\"metricFilterPattern\":\"zdobpxjmflbvvnch\",\"dimensions\":[{\"name\":\"iwwzjuqk\",\"displayName\":\"sa\"}]}") + "{\"name\":\"fufsrpymzi\",\"displayName\":\"sezcxtb\",\"displayDescription\":\"gfycc\",\"unit\":\"ewmdw\",\"aggregationType\":\"eiachboosflnr\",\"metricFilterPattern\":\"fqpte\",\"dimensions\":[{\"name\":\"vypyqrimzinpv\",\"displayName\":\"jdkirsoodqx\"},{\"name\":\"rmnohj\",\"displayName\":\"kwh\"},{\"name\":\"oifiyipjxsqwpgr\",\"displayName\":\"znorcj\"},{\"name\":\"snb\",\"displayName\":\"qabnmoc\"}]}") .toObject(MetricSpecification.class); - Assertions.assertEquals("xbczwtruwiqz", model.displayName()); - Assertions.assertEquals("j", model.displayDescription()); - Assertions.assertEquals("sa", model.dimensions().get(0).displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricSpecification model = new MetricSpecification().withDisplayName("xbczwtruwiqz") - .withDisplayDescription("j") - .withDimensions(Arrays.asList(new MetricSpecificationDimensionsItem().withDisplayName("sa"))); - model = BinaryData.fromObject(model).toObject(MetricSpecification.class); - Assertions.assertEquals("xbczwtruwiqz", model.displayName()); - Assertions.assertEquals("j", model.displayDescription()); - Assertions.assertEquals("sa", model.dimensions().get(0).displayName()); + Assertions.assertEquals("sezcxtb", model.displayName()); + Assertions.assertEquals("gfycc", model.displayDescription()); + Assertions.assertEquals("jdkirsoodqx", model.dimensions().get(0).displayName()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/OperationDisplayTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/OperationDisplayTests.java index 4df9c6f3aae5..592517a9b352 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/OperationDisplayTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/OperationDisplayTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; @@ -11,16 +11,10 @@ public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"ajrmvdjwzrlovmc\",\"resource\":\"hijco\",\"operation\":\"ctbzaq\",\"description\":\"sycbkbfk\"}") + OperationDisplay model = BinaryData + .fromString( + "{\"provider\":\"vnipjox\",\"resource\":\"nchgej\",\"operation\":\"odmailzyd\",\"description\":\"o\"}") .toObject(OperationDisplay.class); - Assertions.assertEquals("sycbkbfk", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay().withDescription("sycbkbfk"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("sycbkbfk", model.description()); + Assertions.assertEquals("o", model.description()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/OperationInnerTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/OperationInnerTests.java index 5b4a2cf872e3..fee6b2fef403 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/OperationInnerTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/OperationInnerTests.java @@ -1,51 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.powerbidedicated.fluent.models.OperationInner; -import com.azure.resourcemanager.powerbidedicated.models.LogSpecification; -import com.azure.resourcemanager.powerbidedicated.models.MetricSpecification; -import com.azure.resourcemanager.powerbidedicated.models.MetricSpecificationDimensionsItem; -import com.azure.resourcemanager.powerbidedicated.models.OperationDisplay; -import com.azure.resourcemanager.powerbidedicated.models.OperationProperties; -import com.azure.resourcemanager.powerbidedicated.models.ServiceSpecification; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class OperationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationInner model = BinaryData.fromString( - "{\"name\":\"whdsoifiyip\",\"display\":{\"provider\":\"qwpgrjbzn\",\"resource\":\"cjxvsnbyxqab\",\"operation\":\"ocpcy\",\"description\":\"urzafb\"},\"origin\":\"j\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"c\",\"displayName\":\"klj\",\"displayDescription\":\"bqidtqaj\",\"unit\":\"ulpkudjkrl\",\"aggregationType\":\"bzhfepgzgqexz\",\"metricFilterPattern\":\"c\",\"dimensions\":[{}]}],\"logSpecifications\":[{\"name\":\"erhhbcsglumm\",\"displayName\":\"tjaodxobnb\",\"blobDuration\":\"k\"},{\"name\":\"xo\",\"displayName\":\"jionpimexgstxgc\",\"blobDuration\":\"dg\"}]}}}") + "{\"name\":\"pewnw\",\"display\":{\"provider\":\"tjzyflus\",\"resource\":\"hmofc\",\"operation\":\"smy\",\"description\":\"kdtmlxhekuk\"},\"origin\":\"txukcdmp\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"anzwuxzdxta\",\"displayName\":\"lhmwhfpmrqobm\",\"displayDescription\":\"kknryrtihf\",\"unit\":\"ijbpzvgnwzsymgl\",\"aggregationType\":\"fcyzkohdbihanufh\",\"metricFilterPattern\":\"bj\",\"dimensions\":[{}]}],\"logSpecifications\":[{\"name\":\"hxqh\",\"displayName\":\"ifpikxwczby\",\"blobDuration\":\"npqxuh\"},{\"name\":\"y\",\"displayName\":\"iwbybrkxvdumjg\",\"blobDuration\":\"fwvuk\"},{\"name\":\"audccsnhs\",\"displayName\":\"nyejhkryhtnap\",\"blobDuration\":\"wlokjyem\"}]}}}") .toObject(OperationInner.class); - Assertions.assertEquals("urzafb", model.display().description()); - Assertions.assertEquals("klj", + Assertions.assertEquals("kdtmlxhekuk", model.display().description()); + Assertions.assertEquals("lhmwhfpmrqobm", model.properties().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("bqidtqaj", + Assertions.assertEquals("kknryrtihf", model.properties().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("tjaodxobnb", - model.properties().serviceSpecification().logSpecifications().get(0).displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withDisplay(new OperationDisplay().withDescription("urzafb")) - .withProperties(new OperationProperties().withServiceSpecification(new ServiceSpecification() - .withMetricSpecifications(Arrays.asList(new MetricSpecification().withDisplayName("klj") - .withDisplayDescription("bqidtqaj") - .withDimensions(Arrays.asList(new MetricSpecificationDimensionsItem())))) - .withLogSpecifications(Arrays.asList(new LogSpecification().withDisplayName("tjaodxobnb"), - new LogSpecification().withDisplayName("jionpimexgstxgc"))))); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("urzafb", model.display().description()); - Assertions.assertEquals("klj", - model.properties().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("bqidtqaj", - model.properties().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("tjaodxobnb", + Assertions.assertEquals("ifpikxwczby", model.properties().serviceSpecification().logSpecifications().get(0).displayName()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/OperationListResultTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/OperationListResultTests.java index 17e45c1b1495..aa8d88fe957d 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/OperationListResultTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/OperationListResultTests.java @@ -1,23 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.powerbidedicated.models.OperationListResult; +import com.azure.resourcemanager.powerbidedicated.implementation.models.OperationListResult; public final class OperationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"fqawrlyxw\",\"display\":{\"provider\":\"prbnwbxgjvtbv\",\"resource\":\"sszdnru\",\"operation\":\"guhmuouqfpr\",\"description\":\"wbnguitnwui\"},\"origin\":\"a\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{},{},{}],\"logSpecifications\":[{},{}]}}},{\"name\":\"kyfi\",\"display\":{\"provider\":\"idf\",\"resource\":\"wdzuhtymwisd\",\"operation\":\"thwxmnteiwaopvkm\",\"description\":\"c\"},\"origin\":\"xdcu\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{},{}],\"logSpecifications\":[{},{}]}}},{\"name\":\"zidnsezcxtbzsgfy\",\"display\":{\"provider\":\"newmdwzjeiachbo\",\"resource\":\"flnrosfqpteehzz\",\"operation\":\"pyqr\",\"description\":\"z\"},\"origin\":\"pvswjdkirso\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{}],\"logSpecifications\":[{},{}]}}}],\"nextLink\":\"nohjt\"}") + "{\"value\":[{\"name\":\"quvgjxpybczme\",\"display\":{\"provider\":\"zopbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"ownoizhw\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{}],\"logSpecifications\":[{},{}]}}},{\"name\":\"qijgkd\",\"display\":{\"provider\":\"azlobcufpdznrbt\",\"resource\":\"qjnqglhqgnufoooj\",\"operation\":\"ifsqesaagdfmg\",\"description\":\"lhjxr\"},\"origin\":\"kwm\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{}],\"logSpecifications\":[{},{},{},{}]}}},{\"name\":\"to\",\"display\":{\"provider\":\"a\",\"resource\":\"ajpsquc\",\"operation\":\"o\",\"description\":\"dkfo\"},\"origin\":\"nygj\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{},{}],\"logSpecifications\":[{}]}}}],\"nextLink\":\"rd\"}") .toObject(OperationListResult.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult(); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/OperationPropertiesTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/OperationPropertiesTests.java index aac1697caef5..8a4a2b85749c 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/OperationPropertiesTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/OperationPropertiesTests.java @@ -1,61 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.powerbidedicated.models.LogSpecification; -import com.azure.resourcemanager.powerbidedicated.models.MetricSpecification; -import com.azure.resourcemanager.powerbidedicated.models.MetricSpecificationDimensionsItem; import com.azure.resourcemanager.powerbidedicated.models.OperationProperties; -import com.azure.resourcemanager.powerbidedicated.models.ServiceSpecification; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class OperationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationProperties model = BinaryData.fromString( - "{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"exxppofmxaxcfjp\",\"displayName\":\"dtocj\",\"displayDescription\":\"hvpmoue\",\"unit\":\"dzxibqeojnxqbzvd\",\"aggregationType\":\"t\",\"metricFilterPattern\":\"deicbtwnpzao\",\"dimensions\":[{\"name\":\"rhcffcydd\",\"displayName\":\"mjthjqkwp\"},{\"name\":\"icxm\",\"displayName\":\"iwqvhkh\"},{\"name\":\"uigdtopbobjog\",\"displayName\":\"e\"},{\"name\":\"a\",\"displayName\":\"uhrzayvvt\"}]},{\"name\":\"vdfgiotk\",\"displayName\":\"utqxlngx\",\"displayDescription\":\"fgugnxkrxdqmid\",\"unit\":\"hzrvqd\",\"aggregationType\":\"bhj\",\"metricFilterPattern\":\"igeho\",\"dimensions\":[{\"name\":\"wska\",\"displayName\":\"ktzlcuiywg\"},{\"name\":\"wgndrvynhzgpp\",\"displayName\":\"cgyncocpecf\"}]},{\"name\":\"mcoo\",\"displayName\":\"xlzevgbmqjqabcy\",\"displayDescription\":\"ivkwlzuvccfwnfnb\",\"unit\":\"fionl\",\"aggregationType\":\"x\",\"metricFilterPattern\":\"qgtz\",\"dimensions\":[{\"name\":\"qbqqwxr\",\"displayName\":\"eallnwsubisnj\"},{\"name\":\"pmng\",\"displayName\":\"scxaq\"},{\"name\":\"ochcbonqvpkvl\",\"displayName\":\"njeaseipheofloke\"}]}],\"logSpecifications\":[{\"name\":\"nj\",\"displayName\":\"lwtgrhpdj\",\"blobDuration\":\"umasxazjpq\"},{\"name\":\"gual\",\"displayName\":\"xxhejjzzvd\",\"blobDuration\":\"gwdslfhotwm\"},{\"name\":\"npwlbjnpg\",\"displayName\":\"ftadehxnltyfs\",\"blobDuration\":\"pusuesn\"}]}}") + "{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"uxinpmqnjaq\",\"displayName\":\"xj\",\"displayDescription\":\"r\",\"unit\":\"vcputegj\",\"aggregationType\":\"mfdatscmdvpj\",\"metricFilterPattern\":\"lsuuvmkjozkrwfnd\",\"dimensions\":[{\"name\":\"pslwejdpvw\",\"displayName\":\"oqpsoa\"},{\"name\":\"tazak\",\"displayName\":\"lahbcryff\"}]},{\"name\":\"dosyg\",\"displayName\":\"paojakhmsbzjh\",\"displayDescription\":\"zevdphlx\",\"unit\":\"lthqtrgqjbp\",\"aggregationType\":\"fsinzgvfcjrwzoxx\",\"metricFilterPattern\":\"felluwfzitonpe\",\"dimensions\":[{\"name\":\"kjlxofpdvhpf\",\"displayName\":\"ypininm\"},{\"name\":\"huyb\",\"displayName\":\"podepoo\"},{\"name\":\"nuvamiheogna\",\"displayName\":\"zxtheotusivyevcc\"}]}],\"logSpecifications\":[{\"name\":\"nhungbw\",\"displayName\":\"rnfygxgispem\",\"blobDuration\":\"zfkufubljofx\"},{\"name\":\"ofjaeqjhqjb\",\"displayName\":\"v\",\"blobDuration\":\"mjqulngsn\"}]}}") .toObject(OperationProperties.class); - Assertions.assertEquals("dtocj", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("hvpmoue", - model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("mjthjqkwp", + Assertions.assertEquals("xj", model.serviceSpecification().metricSpecifications().get(0).displayName()); + Assertions.assertEquals("r", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); + Assertions.assertEquals("oqpsoa", model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("lwtgrhpdj", model.serviceSpecification().logSpecifications().get(0).displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationProperties model = new OperationProperties().withServiceSpecification(new ServiceSpecification() - .withMetricSpecifications(Arrays.asList( - new MetricSpecification().withDisplayName("dtocj") - .withDisplayDescription("hvpmoue") - .withDimensions(Arrays.asList(new MetricSpecificationDimensionsItem().withDisplayName("mjthjqkwp"), - new MetricSpecificationDimensionsItem().withDisplayName("iwqvhkh"), - new MetricSpecificationDimensionsItem().withDisplayName("e"), - new MetricSpecificationDimensionsItem().withDisplayName("uhrzayvvt"))), - new MetricSpecification().withDisplayName("utqxlngx") - .withDisplayDescription("fgugnxkrxdqmid") - .withDimensions(Arrays.asList(new MetricSpecificationDimensionsItem().withDisplayName("ktzlcuiywg"), - new MetricSpecificationDimensionsItem().withDisplayName("cgyncocpecf"))), - new MetricSpecification().withDisplayName("xlzevgbmqjqabcy") - .withDisplayDescription("ivkwlzuvccfwnfnb") - .withDimensions( - Arrays.asList(new MetricSpecificationDimensionsItem().withDisplayName("eallnwsubisnj"), - new MetricSpecificationDimensionsItem().withDisplayName("scxaq"), - new MetricSpecificationDimensionsItem().withDisplayName("njeaseipheofloke"))))) - .withLogSpecifications(Arrays.asList(new LogSpecification().withDisplayName("lwtgrhpdj"), - new LogSpecification().withDisplayName("xxhejjzzvd"), - new LogSpecification().withDisplayName("ftadehxnltyfs")))); - model = BinaryData.fromObject(model).toObject(OperationProperties.class); - Assertions.assertEquals("dtocj", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("hvpmoue", - model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("mjthjqkwp", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("lwtgrhpdj", model.serviceSpecification().logSpecifications().get(0).displayName()); + Assertions.assertEquals("rnfygxgispem", model.serviceSpecification().logSpecifications().get(0).displayName()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/OperationsListMockTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/OperationsListMockTests.java index df39e1ad9a4b..366d30b4326e 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/OperationsListMockTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/OperationsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.powerbidedicated.PowerBIDedicatedManager; import com.azure.resourcemanager.powerbidedicated.models.Operation; @@ -22,21 +22,21 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"nnprn\",\"display\":{\"provider\":\"eilpjzuaejxdu\",\"resource\":\"skzbb\",\"operation\":\"zumveekgpwo\",\"description\":\"hkfpbs\"},\"origin\":\"ofd\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"ttouwaboekqvkel\",\"displayName\":\"mvb\",\"displayDescription\":\"yjsflhhcaalnji\",\"unit\":\"sxyawjoyaqcs\",\"aggregationType\":\"jpkiidzyexznelix\",\"metricFilterPattern\":\"rzt\",\"dimensions\":[{},{}]}],\"logSpecifications\":[{\"name\":\"xknalaulppg\",\"displayName\":\"tpnapnyiropuhpig\",\"blobDuration\":\"gylgqgitxmedjvcs\"},{\"name\":\"n\",\"displayName\":\"wncwzzhxgktrmg\",\"blobDuration\":\"napkteoellw\"},{\"name\":\"fdygpfqbuaceopz\",\"displayName\":\"rhhuaopppcqeqx\",\"blobDuration\":\"z\"},{\"name\":\"hzxct\",\"displayName\":\"gbkdmoizpos\",\"blobDuration\":\"grcfb\"}]}}}]}"; + = "{\"value\":[{\"name\":\"fqkquj\",\"display\":{\"provider\":\"uyonobglaoc\",\"resource\":\"tcc\",\"operation\":\"yudxytlmoy\",\"description\":\"vwfudwpzntxhd\"},\"origin\":\"lrqjbhckfr\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"kyv\",\"displayName\":\"ca\",\"displayDescription\":\"z\",\"unit\":\"zka\",\"aggregationType\":\"uwbc\",\"metricFilterPattern\":\"wbme\",\"dimensions\":[{},{}]},{\"name\":\"yvjusrtslhsp\",\"displayName\":\"eemaofmxagkvtme\",\"displayDescription\":\"qkrhahvljua\",\"unit\":\"quhcdhmduala\",\"aggregationType\":\"qpv\",\"metricFilterPattern\":\"dmwsrcrgvxpvgomz\",\"dimensions\":[{},{}]},{\"name\":\"sgwbnbbeld\",\"displayName\":\"k\",\"displayDescription\":\"ali\",\"unit\":\"rqhakauha\",\"aggregationType\":\"sfwxosowzxc\",\"metricFilterPattern\":\"i\",\"dimensions\":[{},{},{}]},{\"name\":\"xdje\",\"displayName\":\"pucwwfvovbvme\",\"displayDescription\":\"civyhzceuo\",\"unit\":\"jrwjueiotwm\",\"aggregationType\":\"ytdxwit\",\"metricFilterPattern\":\"rjaw\",\"dimensions\":[{},{}]}],\"logSpecifications\":[{\"name\":\"ni\",\"displayName\":\"x\",\"blobDuration\":\"kpycgklwndnhjd\"},{\"name\":\"whvylw\",\"displayName\":\"tdhxujznbmpowuwp\",\"blobDuration\":\"qlveualupjmkh\"},{\"name\":\"obbc\",\"displayName\":\"s\",\"blobDuration\":\"jriplrbpbewtghf\"},{\"name\":\"lcgwxzvlvqh\",\"displayName\":\"begibtnmxiebwwa\",\"blobDuration\":\"ayqcgw\"}]}}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); PowerBIDedicatedManager manager = PowerBIDedicatedManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("hkfpbs", response.iterator().next().display().description()); - Assertions.assertEquals("mvb", + Assertions.assertEquals("vwfudwpzntxhd", response.iterator().next().display().description()); + Assertions.assertEquals("ca", response.iterator().next().properties().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("yjsflhhcaalnji", + Assertions.assertEquals("z", response.iterator() .next() .properties() @@ -44,7 +44,7 @@ public void testList() throws Exception { .metricSpecifications() .get(0) .displayDescription()); - Assertions.assertEquals("tpnapnyiropuhpig", + Assertions.assertEquals("x", response.iterator().next().properties().serviceSpecification().logSpecifications().get(0).displayName()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/ServiceSpecificationTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/ServiceSpecificationTests.java index e3e3103d9431..3c645e2e68ee 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/ServiceSpecificationTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/ServiceSpecificationTests.java @@ -1,49 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.powerbidedicated.models.LogSpecification; -import com.azure.resourcemanager.powerbidedicated.models.MetricSpecification; -import com.azure.resourcemanager.powerbidedicated.models.MetricSpecificationDimensionsItem; import com.azure.resourcemanager.powerbidedicated.models.ServiceSpecification; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ServiceSpecificationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceSpecification model = BinaryData.fromString( - "{\"metricSpecifications\":[{\"name\":\"jbavorxzdm\",\"displayName\":\"ctbqvudwx\",\"displayDescription\":\"dnvowg\",\"unit\":\"jugwdkcglhsl\",\"aggregationType\":\"jdyggdtji\",\"metricFilterPattern\":\"b\",\"dimensions\":[{\"name\":\"qweykhmenev\",\"displayName\":\"exfwhy\"},{\"name\":\"i\",\"displayName\":\"yvdcsitynnaa\"},{\"name\":\"ectehf\",\"displayName\":\"scjeypv\"},{\"name\":\"zrkgqhcjrefovg\",\"displayName\":\"qsl\"}]},{\"name\":\"yvxyqjp\",\"displayName\":\"attpngjcrcczsq\",\"displayDescription\":\"hvmdajvnysounq\",\"unit\":\"a\",\"aggregationType\":\"ae\",\"metricFilterPattern\":\"fhyhltrpmopjmcma\",\"dimensions\":[{\"name\":\"thfuiuaodsfcpkvx\",\"displayName\":\"puozmyzydag\"}]}],\"logSpecifications\":[{\"name\":\"bezy\",\"displayName\":\"okktwhrdxw\",\"blobDuration\":\"wqsmbsur\"},{\"name\":\"imoryocfsfksym\",\"displayName\":\"ys\",\"blobDuration\":\"i\"},{\"name\":\"xhqyudxorrqnb\",\"displayName\":\"czvyifq\",\"blobDuration\":\"kdvjsll\"}]}") + "{\"metricSpecifications\":[{\"name\":\"bkzgcwrwclx\",\"displayName\":\"rljdouskcqv\",\"displayDescription\":\"cr\",\"unit\":\"dkwt\",\"aggregationType\":\"xbnjbiksq\",\"metricFilterPattern\":\"lssai\",\"dimensions\":[{\"name\":\"wnzlljfmppeeb\",\"displayName\":\"gxsabkyq\"}]},{\"name\":\"ujitcjcz\",\"displayName\":\"evndh\",\"displayDescription\":\"wpdappdsbdkv\",\"unit\":\"wjfeusnhutjel\",\"aggregationType\":\"rl\",\"metricFilterPattern\":\"ugjzzdatqxhocdge\",\"dimensions\":[{\"name\":\"phut\",\"displayName\":\"ndv\"},{\"name\":\"ozwyiftyhxhuro\",\"displayName\":\"tyxolniwpwc\"}]},{\"name\":\"jfkgiawxk\",\"displayName\":\"ypl\",\"displayDescription\":\"kbasyypn\",\"unit\":\"hsgcbacphejkot\",\"aggregationType\":\"qgoulznd\",\"metricFilterPattern\":\"kwy\",\"dimensions\":[{\"name\":\"gibma\",\"displayName\":\"akeqs\"},{\"name\":\"yb\",\"displayName\":\"qedqytbciqfoufl\"}]},{\"name\":\"nkzsmodmglou\",\"displayName\":\"b\",\"displayDescription\":\"tmut\",\"unit\":\"qktapspwgcuert\",\"aggregationType\":\"kdosvqw\",\"metricFilterPattern\":\"mdgbbjfdd\",\"dimensions\":[{\"name\":\"bexppb\",\"displayName\":\"q\"},{\"name\":\"ol\",\"displayName\":\"fpsalgbqu\"},{\"name\":\"gjyjgzjaoyfhrtxi\",\"displayName\":\"erkujys\"},{\"name\":\"eju\",\"displayName\":\"qawrlyxwj\"}]}],\"logSpecifications\":[{\"name\":\"bnwbxgjvtbvpyssz\",\"displayName\":\"rujqg\",\"blobDuration\":\"muouqfp\"},{\"name\":\"zw\",\"displayName\":\"g\",\"blobDuration\":\"tnwu\"},{\"name\":\"gazxuf\",\"displayName\":\"uckyf\",\"blobDuration\":\"rfidfvzwdz\"},{\"name\":\"tymw\",\"displayName\":\"dkfthwxmnt\",\"blobDuration\":\"waopvkmijcmmxd\"}]}") .toObject(ServiceSpecification.class); - Assertions.assertEquals("ctbqvudwx", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("dnvowg", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("exfwhy", model.metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("okktwhrdxw", model.logSpecifications().get(0).displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceSpecification model = new ServiceSpecification() - .withMetricSpecifications(Arrays.asList( - new MetricSpecification().withDisplayName("ctbqvudwx") - .withDisplayDescription("dnvowg") - .withDimensions(Arrays.asList(new MetricSpecificationDimensionsItem().withDisplayName("exfwhy"), - new MetricSpecificationDimensionsItem().withDisplayName("yvdcsitynnaa"), - new MetricSpecificationDimensionsItem().withDisplayName("scjeypv"), - new MetricSpecificationDimensionsItem().withDisplayName("qsl"))), - new MetricSpecification().withDisplayName("attpngjcrcczsq") - .withDisplayDescription("hvmdajvnysounq") - .withDimensions( - Arrays.asList(new MetricSpecificationDimensionsItem().withDisplayName("puozmyzydag"))))) - .withLogSpecifications(Arrays.asList(new LogSpecification().withDisplayName("okktwhrdxw"), - new LogSpecification().withDisplayName("ys"), new LogSpecification().withDisplayName("czvyifq"))); - model = BinaryData.fromObject(model).toObject(ServiceSpecification.class); - Assertions.assertEquals("ctbqvudwx", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("dnvowg", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("exfwhy", model.metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("okktwhrdxw", model.logSpecifications().get(0).displayName()); + Assertions.assertEquals("rljdouskcqv", model.metricSpecifications().get(0).displayName()); + Assertions.assertEquals("cr", model.metricSpecifications().get(0).displayDescription()); + Assertions.assertEquals("gxsabkyq", model.metricSpecifications().get(0).dimensions().get(0).displayName()); + Assertions.assertEquals("rujqg", model.logSpecifications().get(0).displayName()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/SkuDetailsForExistingResourceTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/SkuDetailsForExistingResourceTests.java index 8dd06b318509..04058b77eb79 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/SkuDetailsForExistingResourceTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/SkuDetailsForExistingResourceTests.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.powerbidedicated.models.CapacitySku; import com.azure.resourcemanager.powerbidedicated.models.CapacitySkuTier; import com.azure.resourcemanager.powerbidedicated.models.SkuDetailsForExistingResource; import org.junit.jupiter.api.Assertions; @@ -14,24 +13,11 @@ public final class SkuDetailsForExistingResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkuDetailsForExistingResource model = BinaryData.fromString( - "{\"resourceType\":\"algbquxigjyjg\",\"sku\":{\"name\":\"aoyfhrtxilnerkuj\",\"tier\":\"Premium\",\"capacity\":709635131}}") + "{\"resourceType\":\"ishc\",\"sku\":{\"name\":\"hajdeyeamdpha\",\"tier\":\"Premium\",\"capacity\":1821646506}}") .toObject(SkuDetailsForExistingResource.class); - Assertions.assertEquals("algbquxigjyjg", model.resourceType()); - Assertions.assertEquals("aoyfhrtxilnerkuj", model.sku().name()); + Assertions.assertEquals("ishc", model.resourceType()); + Assertions.assertEquals("hajdeyeamdpha", model.sku().name()); Assertions.assertEquals(CapacitySkuTier.PREMIUM, model.sku().tier()); - Assertions.assertEquals(709635131, model.sku().capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuDetailsForExistingResource model = new SkuDetailsForExistingResource().withResourceType("algbquxigjyjg") - .withSku(new CapacitySku().withName("aoyfhrtxilnerkuj") - .withTier(CapacitySkuTier.PREMIUM) - .withCapacity(709635131)); - model = BinaryData.fromObject(model).toObject(SkuDetailsForExistingResource.class); - Assertions.assertEquals("algbquxigjyjg", model.resourceType()); - Assertions.assertEquals("aoyfhrtxilnerkuj", model.sku().name()); - Assertions.assertEquals(CapacitySkuTier.PREMIUM, model.sku().tier()); - Assertions.assertEquals(709635131, model.sku().capacity()); + Assertions.assertEquals(1821646506, model.sku().capacity()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/SkuEnumerationForExistingResourceResultInnerTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/SkuEnumerationForExistingResourceResultInnerTests.java index e1c7be4cc203..364adb68153f 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/SkuEnumerationForExistingResourceResultInnerTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/SkuEnumerationForExistingResourceResultInnerTests.java @@ -1,40 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.powerbidedicated.fluent.models.SkuEnumerationForExistingResourceResultInner; -import com.azure.resourcemanager.powerbidedicated.models.CapacitySku; import com.azure.resourcemanager.powerbidedicated.models.CapacitySkuTier; -import com.azure.resourcemanager.powerbidedicated.models.SkuDetailsForExistingResource; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class SkuEnumerationForExistingResourceResultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkuEnumerationForExistingResourceResultInner model = BinaryData.fromString( - "{\"value\":[{\"resourceType\":\"hbmdgbbjfdd\",\"sku\":{\"name\":\"bmbexppbhtqqro\",\"tier\":\"PBIE_Azure\",\"capacity\":191482446}}]}") + "{\"value\":[{\"resourceType\":\"yxoegukgjnp\",\"sku\":{\"name\":\"cgygev\",\"tier\":\"AutoPremiumHost\",\"capacity\":278176639}},{\"resourceType\":\"mrbpizcdrqj\",\"sku\":{\"name\":\"pyd\",\"tier\":\"PBIE_Azure\",\"capacity\":229483686}},{\"resourceType\":\"eoejzic\",\"sku\":{\"name\":\"fsj\",\"tier\":\"Premium\",\"capacity\":378929954}}]}") .toObject(SkuEnumerationForExistingResourceResultInner.class); - Assertions.assertEquals("hbmdgbbjfdd", model.value().get(0).resourceType()); - Assertions.assertEquals("bmbexppbhtqqro", model.value().get(0).sku().name()); - Assertions.assertEquals(CapacitySkuTier.PBIE_AZURE, model.value().get(0).sku().tier()); - Assertions.assertEquals(191482446, model.value().get(0).sku().capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuEnumerationForExistingResourceResultInner model = new SkuEnumerationForExistingResourceResultInner() - .withValue(Arrays.asList(new SkuDetailsForExistingResource().withResourceType("hbmdgbbjfdd") - .withSku(new CapacitySku().withName("bmbexppbhtqqro") - .withTier(CapacitySkuTier.PBIE_AZURE) - .withCapacity(191482446)))); - model = BinaryData.fromObject(model).toObject(SkuEnumerationForExistingResourceResultInner.class); - Assertions.assertEquals("hbmdgbbjfdd", model.value().get(0).resourceType()); - Assertions.assertEquals("bmbexppbhtqqro", model.value().get(0).sku().name()); - Assertions.assertEquals(CapacitySkuTier.PBIE_AZURE, model.value().get(0).sku().tier()); - Assertions.assertEquals(191482446, model.value().get(0).sku().capacity()); + Assertions.assertEquals("yxoegukgjnp", model.value().get(0).resourceType()); + Assertions.assertEquals("cgygev", model.value().get(0).sku().name()); + Assertions.assertEquals(CapacitySkuTier.AUTO_PREMIUM_HOST, model.value().get(0).sku().tier()); + Assertions.assertEquals(278176639, model.value().get(0).sku().capacity()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/SkuEnumerationForNewResourceResultInnerTests.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/SkuEnumerationForNewResourceResultInnerTests.java index b9ed9197ceee..061c3c115ece 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/SkuEnumerationForNewResourceResultInnerTests.java +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/test/java/com/azure/resourcemanager/powerbidedicated/generated/SkuEnumerationForNewResourceResultInnerTests.java @@ -1,36 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.powerbidedicated.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.powerbidedicated.fluent.models.SkuEnumerationForNewResourceResultInner; -import com.azure.resourcemanager.powerbidedicated.models.CapacitySku; import com.azure.resourcemanager.powerbidedicated.models.CapacitySkuTier; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class SkuEnumerationForNewResourceResultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkuEnumerationForNewResourceResultInner model = BinaryData - .fromString("{\"value\":[{\"name\":\"cuertu\",\"tier\":\"AutoPremiumHost\",\"capacity\":1475833169}]}") + .fromString("{\"value\":[{\"name\":\"wgipwhono\",\"tier\":\"AutoPremiumHost\",\"capacity\":1714142157}]}") .toObject(SkuEnumerationForNewResourceResultInner.class); - Assertions.assertEquals("cuertu", model.value().get(0).name()); + Assertions.assertEquals("wgipwhono", model.value().get(0).name()); Assertions.assertEquals(CapacitySkuTier.AUTO_PREMIUM_HOST, model.value().get(0).tier()); - Assertions.assertEquals(1475833169, model.value().get(0).capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuEnumerationForNewResourceResultInner model - = new SkuEnumerationForNewResourceResultInner().withValue(Arrays.asList(new CapacitySku().withName("cuertu") - .withTier(CapacitySkuTier.AUTO_PREMIUM_HOST) - .withCapacity(1475833169))); - model = BinaryData.fromObject(model).toObject(SkuEnumerationForNewResourceResultInner.class); - Assertions.assertEquals("cuertu", model.value().get(0).name()); - Assertions.assertEquals(CapacitySkuTier.AUTO_PREMIUM_HOST, model.value().get(0).tier()); - Assertions.assertEquals(1475833169, model.value().get(0).capacity()); + Assertions.assertEquals(1714142157, model.value().get(0).capacity()); } } diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/tsp-location.yaml b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/tsp-location.yaml new file mode 100644 index 000000000000..a7750c78b8e7 --- /dev/null +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/PowerBIDedicated +commit: a1e9f5a38b5b753dbf0ff01b278d44027044be34 +repo: Azure/azure-rest-api-specs +additionalDirectories: