scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -127,6 +146,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
return this;
}
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
/**
* Sets the retry policy to the HTTP pipeline.
*
@@ -138,6 +168,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
@@ -145,9 +188,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -169,7 +214,7 @@ public PowerBIDedicatedManager authenticate(TokenCredential credential, AzurePro
.append("-")
.append("com.azure.resourcemanager.powerbidedicated")
.append("/")
- .append("1.0.0-beta.1");
+ .append("1.0.0-beta.2");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -183,20 +228,38 @@ public PowerBIDedicatedManager authenticate(TokenCredential credential, AzurePro
userAgentBuilder.append(" (auto-generated)");
}
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
if (retryPolicy == null) {
- retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies
- .add(
- new BearerTokenAuthenticationPolicy(
- credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
- policies.addAll(this.policies);
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
@@ -208,7 +271,11 @@ public PowerBIDedicatedManager authenticate(TokenCredential credential, AzurePro
}
}
- /** @return Resource collection API of Capacities. */
+ /**
+ * 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);
@@ -216,7 +283,11 @@ public Capacities capacities() {
return capacities;
}
- /** @return Resource collection API of Operations. */
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
@@ -224,7 +295,11 @@ public Operations operations() {
return operations;
}
- /** @return Resource collection API of AutoScaleVCores. */
+ /**
+ * Gets the resource collection API of AutoScaleVCores. It manages AutoScaleVCore.
+ *
+ * @return Resource collection API of AutoScaleVCores.
+ */
public AutoScaleVCores autoScaleVCores() {
if (this.autoScaleVCores == null) {
this.autoScaleVCores = new AutoScaleVCoresImpl(clientObject.getAutoScaleVCores(), this);
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 db1d3ebc03e6..0c3955d8b967 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
@@ -20,13 +20,15 @@ public interface AutoScaleVCoresClient {
* @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 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 details about the specified auto scale v-core.
+ * @return details about the specified auto scale v-core along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- AutoScaleVCoreInner getByResourceGroup(String resourceGroupName, String vcoreName);
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String vcoreName, Context context);
/**
* Gets details about the specified auto scale v-core.
@@ -34,15 +36,13 @@ public interface AutoScaleVCoresClient {
* @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 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 details about the specified auto scale v-core.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(
- String resourceGroupName, String vcoreName, Context context);
+ AutoScaleVCoreInner getByResourceGroup(String resourceGroupName, String vcoreName);
/**
* Provisions the specified auto scale v-core based on the configuration specified in the request.
@@ -51,13 +51,15 @@ Response getByResourceGroupWithResponse(
* 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 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.
+ * @return represents an instance of an auto scale v-core resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- AutoScaleVCoreInner create(String resourceGroupName, String vcoreName, AutoScaleVCoreInner vCoreParameters);
+ Response createWithResponse(
+ String resourceGroupName, String vcoreName, AutoScaleVCoreInner vCoreParameters, Context context);
/**
* Provisions the specified auto scale v-core based on the configuration specified in the request.
@@ -66,15 +68,13 @@ Response getByResourceGroupWithResponse(
* 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 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)
- Response createWithResponse(
- String resourceGroupName, String vcoreName, AutoScaleVCoreInner vCoreParameters, Context context);
+ AutoScaleVCoreInner create(String resourceGroupName, String vcoreName, AutoScaleVCoreInner vCoreParameters);
/**
* Deletes the specified auto scale v-core.
@@ -82,12 +82,14 @@ Response createWithResponse(
* @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 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}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String vcoreName);
+ Response deleteWithResponse(String resourceGroupName, String vcoreName, Context context);
/**
* Deletes the specified auto scale v-core.
@@ -95,14 +97,12 @@ Response createWithResponse(
* @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 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 response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response deleteWithResponse(String resourceGroupName, String vcoreName, Context context);
+ void delete(String resourceGroupName, String vcoreName);
/**
* Updates the current state of the specified auto scale v-core.
@@ -111,14 +111,18 @@ Response createWithResponse(
* 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 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.
+ * @return represents an instance of an auto scale v-core resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- AutoScaleVCoreInner update(
- String resourceGroupName, String vcoreName, AutoScaleVCoreUpdateParameters vCoreUpdateParameters);
+ Response updateWithResponse(
+ String resourceGroupName,
+ String vcoreName,
+ AutoScaleVCoreUpdateParameters vCoreUpdateParameters,
+ Context context);
/**
* Updates the current state of the specified auto scale v-core.
@@ -127,18 +131,14 @@ AutoScaleVCoreInner update(
* 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 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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(
- String resourceGroupName,
- String vcoreName,
- AutoScaleVCoreUpdateParameters vCoreUpdateParameters,
- Context context);
+ AutoScaleVCoreInner update(
+ String resourceGroupName, String vcoreName, AutoScaleVCoreUpdateParameters vCoreUpdateParameters);
/**
* Gets all the auto scale v-cores for the given resource group.
@@ -148,7 +148,7 @@ Response updateWithResponse(
* @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 auto scale v-cores for the given resource group.
+ * @return all the auto scale v-cores for the given resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -162,7 +162,7 @@ Response updateWithResponse(
* @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 auto scale v-cores for the given resource group.
+ * @return all the auto scale v-cores for the given resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -172,7 +172,7 @@ Response updateWithResponse(
*
* @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 auto scale v-core resources.
+ * @return an array of auto scale v-core resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -184,7 +184,7 @@ Response updateWithResponse(
* @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 auto scale v-core resources.
+ * @return an array of auto scale v-core resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
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 9c573d317376..6578d229aae3 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
@@ -27,13 +27,15 @@ public interface CapacitiesClient {
* 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 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 details about the specified dedicated capacity.
+ * @return details about the specified dedicated capacity along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- DedicatedCapacityInner getByResourceGroup(String resourceGroupName, String dedicatedCapacityName);
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String dedicatedCapacityName, Context context);
/**
* Gets details about the specified dedicated capacity.
@@ -42,15 +44,13 @@ public interface CapacitiesClient {
* 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 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 details about the specified dedicated capacity.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(
- String resourceGroupName, String dedicatedCapacityName, Context context);
+ DedicatedCapacityInner getByResourceGroup(String resourceGroupName, String dedicatedCapacityName);
/**
* Provisions the specified Dedicated capacity based on the configuration specified in the request.
@@ -63,9 +63,9 @@ Response getByResourceGroupWithResponse(
* @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 the {@link SyncPoller} for polling of represents an instance of a Dedicated Capacity resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DedicatedCapacityInner> beginCreate(
String resourceGroupName, String dedicatedCapacityName, DedicatedCapacityInner capacityParameters);
@@ -81,9 +81,9 @@ SyncPoller, DedicatedCapacityInner> beginCrea
* @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 the {@link SyncPoller} for polling of represents an instance of a Dedicated Capacity resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DedicatedCapacityInner> beginCreate(
String resourceGroupName,
String dedicatedCapacityName,
@@ -138,9 +138,9 @@ DedicatedCapacityInner create(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String dedicatedCapacityName);
/**
@@ -154,9 +154,9 @@ DedicatedCapacityInner create(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String dedicatedCapacityName, Context context);
@@ -200,9 +200,9 @@ SyncPoller, Void> beginDelete(
* @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 the {@link SyncPoller} for polling of represents an instance of a Dedicated Capacity resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DedicatedCapacityInner> beginUpdate(
String resourceGroupName,
String dedicatedCapacityName,
@@ -220,9 +220,9 @@ SyncPoller, DedicatedCapacityInner> beginUpda
* @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 the {@link SyncPoller} for polling of represents an instance of a Dedicated Capacity resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DedicatedCapacityInner> beginUpdate(
String resourceGroupName,
String dedicatedCapacityName,
@@ -279,9 +279,9 @@ DedicatedCapacityInner update(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginSuspend(String resourceGroupName, String dedicatedCapacityName);
/**
@@ -295,9 +295,9 @@ DedicatedCapacityInner update(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginSuspend(
String resourceGroupName, String dedicatedCapacityName, Context context);
@@ -340,9 +340,9 @@ SyncPoller, Void> beginSuspend(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginResume(String resourceGroupName, String dedicatedCapacityName);
/**
@@ -356,9 +356,9 @@ SyncPoller, Void> beginSuspend(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginResume(
String resourceGroupName, String dedicatedCapacityName, Context context);
@@ -399,7 +399,8 @@ SyncPoller, Void> beginResume(
* @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.
+ * @return all the Dedicated capacities for the given resource group as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -413,7 +414,8 @@ SyncPoller, Void> beginResume(
* @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.
+ * @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);
@@ -423,7 +425,7 @@ SyncPoller, Void> beginResume(
*
* @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.
+ * @return an array of Dedicated capacities resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -435,7 +437,7 @@ SyncPoller, Void> beginResume(
* @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.
+ * @return an array of Dedicated capacities resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
@@ -443,24 +445,24 @@ SyncPoller, Void> beginResume(
/**
* 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 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 new resources along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SkuEnumerationForNewResourceResultInner listSkus();
+ Response listSkusWithResponse(Context context);
/**
* 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 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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response listSkusWithResponse(Context context);
+ SkuEnumerationForNewResourceResultInner listSkus();
/**
* Lists eligible SKUs for a PowerBI Dedicated resource.
@@ -469,14 +471,15 @@ SyncPoller, Void> beginResume(
* 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.
+ * @return an object that represents enumerating SKUs for existing resources along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SkuEnumerationForExistingResourceResultInner listSkusForCapacity(
- String resourceGroupName, String dedicatedCapacityName);
+ Response listSkusForCapacityWithResponse(
+ String resourceGroupName, String dedicatedCapacityName, Context context);
/**
* Lists eligible SKUs for a PowerBI Dedicated resource.
@@ -485,42 +488,41 @@ SkuEnumerationForExistingResourceResultInner listSkusForCapacity(
* 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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response listSkusForCapacityWithResponse(
- String resourceGroupName, String dedicatedCapacityName, Context context);
+ 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 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 checking result of capacity name availability.
+ * @return the checking result of capacity name availability along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- CheckCapacityNameAvailabilityResultInner checkNameAvailability(
- String location, CheckCapacityNameAvailabilityParameters capacityParameters);
+ Response checkNameAvailabilityWithResponse(
+ String location, CheckCapacityNameAvailabilityParameters capacityParameters, Context context);
/**
* 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 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 checking result of capacity name availability.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response checkNameAvailabilityWithResponse(
- String location, CheckCapacityNameAvailabilityParameters capacityParameters, Context context);
+ CheckCapacityNameAvailabilityResultInner checkNameAvailability(
+ String location, CheckCapacityNameAvailabilityParameters capacityParameters);
}
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 4b1f6bfe895c..2e416b3a95ef 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
@@ -17,7 +17,7 @@ public interface OperationsClient {
*
* @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 result listing capacities.
+ * @return result listing capacities as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,7 +29,7 @@ public interface OperationsClient {
* @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 result listing capacities.
+ * @return result listing capacities as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
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 a68a2dc39cd8..6f5c0e1a4c1a 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
@@ -5,22 +5,17 @@
package com.azure.resourcemanager.powerbidedicated.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.powerbidedicated.models.AutoScaleVCoreSku;
import com.azure.resourcemanager.powerbidedicated.models.VCoreProvisioningState;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** Represents an instance of an auto scale v-core resource. */
-@JsonFlatten
@Fluent
-public class AutoScaleVCoreInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AutoScaleVCoreInner.class);
-
+public final class AutoScaleVCoreInner extends Resource {
/*
* The SKU of the auto scale v-core resource.
*/
@@ -28,24 +23,10 @@ public class AutoScaleVCoreInner extends Resource {
private AutoScaleVCoreSku sku;
/*
- * The maximum capacity of an auto scale v-core resource.
- */
- @JsonProperty(value = "properties.capacityLimit")
- private Integer capacityLimit;
-
- /*
- * The object ID of the capacity resource associated with the auto scale
- * v-core resource.
- */
- @JsonProperty(value = "properties.capacityObjectId")
- private String capacityObjectId;
-
- /*
- * The current deployment state of an auto scale v-core resource. The
- * provisioningState is to indicate states for resource provisioning.
+ * Properties of an auto scale v-core resource.
*/
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private VCoreProvisioningState provisioningState;
+ @JsonProperty(value = "properties")
+ private AutoScaleVCoreProperties innerProperties;
/*
* Metadata pertaining to creation and last modification of the resource.
@@ -53,6 +34,10 @@ public class AutoScaleVCoreInner extends Resource {
@JsonProperty(value = "systemData")
private SystemData systemData;
+ /** Creates an instance of AutoScaleVCoreInner class. */
+ public AutoScaleVCoreInner() {
+ }
+
/**
* Get the sku property: The SKU of the auto scale v-core resource.
*
@@ -74,22 +59,45 @@ public AutoScaleVCoreInner withSku(AutoScaleVCoreSku sku) {
}
/**
- * Get the capacityLimit property: The maximum capacity of an auto scale v-core resource.
+ * Get the innerProperties property: Properties of an auto scale v-core resource.
*
- * @return the capacityLimit value.
+ * @return the innerProperties value.
*/
- public Integer capacityLimit() {
- return this.capacityLimit;
+ private AutoScaleVCoreProperties innerProperties() {
+ return this.innerProperties;
}
/**
- * Set the capacityLimit property: The maximum capacity of an auto scale v-core resource.
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
*
- * @param capacityLimit the capacityLimit value to set.
+ * @return the systemData value.
+ */
+ 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 withCapacityLimit(Integer capacityLimit) {
- this.capacityLimit = capacityLimit;
+ public AutoScaleVCoreInner withSystemData(SystemData systemData) {
+ this.systemData = systemData;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public AutoScaleVCoreInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public AutoScaleVCoreInner withTags(Map tags) {
+ super.withTags(tags);
return this;
}
@@ -100,7 +108,7 @@ public AutoScaleVCoreInner withCapacityLimit(Integer capacityLimit) {
* @return the capacityObjectId value.
*/
public String capacityObjectId() {
- return this.capacityObjectId;
+ return this.innerProperties() == null ? null : this.innerProperties().capacityObjectId();
}
/**
@@ -111,7 +119,10 @@ public String capacityObjectId() {
* @return the AutoScaleVCoreInner object itself.
*/
public AutoScaleVCoreInner withCapacityObjectId(String capacityObjectId) {
- this.capacityObjectId = capacityObjectId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AutoScaleVCoreProperties();
+ }
+ this.innerProperties().withCapacityObjectId(capacityObjectId);
return this;
}
@@ -122,40 +133,29 @@ public AutoScaleVCoreInner withCapacityObjectId(String capacityObjectId) {
* @return the provisioningState value.
*/
public VCoreProvisioningState provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
- * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ * Get the capacityLimit property: The maximum capacity of an auto scale v-core resource.
*
- * @return the systemData value.
+ * @return the capacityLimit value.
*/
- public SystemData systemData() {
- return this.systemData;
+ public Integer capacityLimit() {
+ return this.innerProperties() == null ? null : this.innerProperties().capacityLimit();
}
/**
- * Set the systemData property: Metadata pertaining to creation and last modification of the resource.
+ * Set the capacityLimit property: The maximum capacity of an auto scale v-core resource.
*
- * @param systemData the systemData value to set.
+ * @param capacityLimit the capacityLimit value to set.
* @return the AutoScaleVCoreInner object itself.
*/
- public AutoScaleVCoreInner withSystemData(SystemData systemData) {
- this.systemData = systemData;
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public AutoScaleVCoreInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public AutoScaleVCoreInner withTags(Map tags) {
- super.withTags(tags);
+ public AutoScaleVCoreInner withCapacityLimit(Integer capacityLimit) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AutoScaleVCoreProperties();
+ }
+ this.innerProperties().withCapacityLimit(capacityLimit);
return this;
}
@@ -166,11 +166,16 @@ public AutoScaleVCoreInner withTags(Map tags) {
*/
public void validate() {
if (sku() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
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);
}
diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCoreMutableProperties.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/AutoScaleVCoreMutableProperties.java
similarity index 83%
rename from sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCoreMutableProperties.java
rename to sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/AutoScaleVCoreMutableProperties.java
index 28211c5b1d21..8a4f5614338e 100644
--- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCoreMutableProperties.java
+++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/AutoScaleVCoreMutableProperties.java
@@ -2,24 +2,24 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.resourcemanager.powerbidedicated.models;
+package com.azure.resourcemanager.powerbidedicated.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** An object that represents a set of mutable auto scale v-core resource properties. */
@Fluent
public class AutoScaleVCoreMutableProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AutoScaleVCoreMutableProperties.class);
-
/*
* The maximum capacity of an auto scale v-core resource.
*/
@JsonProperty(value = "capacityLimit")
private Integer capacityLimit;
+ /** Creates an instance of AutoScaleVCoreMutableProperties class. */
+ public AutoScaleVCoreMutableProperties() {
+ }
+
/**
* Get the capacityLimit property: The maximum capacity of an auto scale v-core resource.
*
diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCoreProperties.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/AutoScaleVCoreProperties.java
similarity index 85%
rename from sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCoreProperties.java
rename to sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/AutoScaleVCoreProperties.java
index 75299a2bd611..f84b07a92012 100644
--- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/AutoScaleVCoreProperties.java
+++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/AutoScaleVCoreProperties.java
@@ -2,32 +2,32 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.resourcemanager.powerbidedicated.models;
+package com.azure.resourcemanager.powerbidedicated.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.resourcemanager.powerbidedicated.models.VCoreProvisioningState;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Properties of an auto scale v-core resource. */
@Fluent
public final class AutoScaleVCoreProperties extends AutoScaleVCoreMutableProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AutoScaleVCoreProperties.class);
-
/*
- * The object ID of the capacity resource associated with the auto scale
- * v-core resource.
+ * The object ID of the capacity resource associated with the auto scale v-core resource.
*/
@JsonProperty(value = "capacityObjectId")
private String capacityObjectId;
/*
- * The current deployment state of an auto scale v-core resource. The
- * provisioningState is to indicate states for resource provisioning.
+ * The current deployment state of an auto scale v-core resource. The provisioningState is to indicate states for
+ * resource provisioning.
*/
@JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
private VCoreProvisioningState provisioningState;
+ /** Creates an instance of AutoScaleVCoreProperties class. */
+ public AutoScaleVCoreProperties() {
+ }
+
/**
* Get the capacityObjectId property: The object ID of the capacity resource associated with the auto scale v-core
* resource.
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 2e3a4188e444..769ec75c1472 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
@@ -5,15 +5,11 @@
package com.azure.resourcemanager.powerbidedicated.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The checking result of capacity name availability. */
@Fluent
public final class CheckCapacityNameAvailabilityResultInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckCapacityNameAvailabilityResultInner.class);
-
/*
* Indicator of availability of the capacity name.
*/
@@ -32,6 +28,10 @@ public final class CheckCapacityNameAvailabilityResultInner {
@JsonProperty(value = "message")
private String message;
+ /** Creates an instance of CheckCapacityNameAvailabilityResultInner class. */
+ public CheckCapacityNameAvailabilityResultInner() {
+ }
+
/**
* Get the nameAvailable property: Indicator of availability of the capacity name.
*
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 1b32b2abb812..281a60424ba8 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
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.powerbidedicated.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
@@ -14,16 +13,12 @@
import com.azure.resourcemanager.powerbidedicated.models.DedicatedCapacityAdministrators;
import com.azure.resourcemanager.powerbidedicated.models.Mode;
import com.azure.resourcemanager.powerbidedicated.models.State;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** Represents an instance of a Dedicated Capacity resource. */
-@JsonFlatten
@Fluent
-public class DedicatedCapacityInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(DedicatedCapacityInner.class);
-
+public final class DedicatedCapacityInner extends Resource {
/*
* The SKU of the PowerBI Dedicated capacity resource.
*/
@@ -31,30 +26,10 @@ public class DedicatedCapacityInner extends Resource {
private CapacitySku sku;
/*
- * A collection of Dedicated capacity administrators
- */
- @JsonProperty(value = "properties.administration")
- private DedicatedCapacityAdministrators administration;
-
- /*
- * The capacity mode.
- */
- @JsonProperty(value = "properties.mode")
- private Mode mode;
-
- /*
- * The current state of PowerBI Dedicated resource. The state is to
- * indicate more states outside of resource provisioning.
+ * Properties of the provision operation request.
*/
- @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY)
- private State state;
-
- /*
- * The current deployment state of PowerBI Dedicated resource. The
- * provisioningState is to indicate states for resource provisioning.
- */
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private CapacityProvisioningState provisioningState;
+ @JsonProperty(value = "properties")
+ private DedicatedCapacityProperties innerProperties;
/*
* Metadata pertaining to creation and last modification of the resource.
@@ -62,6 +37,10 @@ public class DedicatedCapacityInner extends Resource {
@JsonProperty(value = "systemData")
private SystemData systemData;
+ /** Creates an instance of DedicatedCapacityInner class. */
+ public DedicatedCapacityInner() {
+ }
+
/**
* Get the sku property: The SKU of the PowerBI Dedicated capacity resource.
*
@@ -83,42 +62,45 @@ public DedicatedCapacityInner withSku(CapacitySku sku) {
}
/**
- * Get the administration property: A collection of Dedicated capacity administrators.
+ * Get the innerProperties property: Properties of the provision operation request.
*
- * @return the administration value.
+ * @return the innerProperties value.
*/
- public DedicatedCapacityAdministrators administration() {
- return this.administration;
+ private DedicatedCapacityProperties innerProperties() {
+ return this.innerProperties;
}
/**
- * Set the administration property: A collection of Dedicated capacity administrators.
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
*
- * @param administration the administration value to set.
- * @return the DedicatedCapacityInner object itself.
+ * @return the systemData value.
*/
- public DedicatedCapacityInner withAdministration(DedicatedCapacityAdministrators administration) {
- this.administration = administration;
- return this;
+ public SystemData systemData() {
+ return this.systemData;
}
/**
- * Get the mode property: The capacity mode.
+ * Set the systemData property: Metadata pertaining to creation and last modification of the resource.
*
- * @return the mode value.
+ * @param systemData the systemData value to set.
+ * @return the DedicatedCapacityInner object itself.
*/
- public Mode mode() {
- return this.mode;
+ public DedicatedCapacityInner withSystemData(SystemData systemData) {
+ this.systemData = systemData;
+ return this;
}
- /**
- * Set the mode property: The capacity mode.
- *
- * @param mode the mode value to set.
- * @return the DedicatedCapacityInner object itself.
- */
- public DedicatedCapacityInner withMode(Mode mode) {
- this.mode = mode;
+ /** {@inheritDoc} */
+ @Override
+ public DedicatedCapacityInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public DedicatedCapacityInner withTags(Map tags) {
+ super.withTags(tags);
return this;
}
@@ -129,7 +111,7 @@ public DedicatedCapacityInner withMode(Mode mode) {
* @return the state value.
*/
public State state() {
- return this.state;
+ return this.innerProperties() == null ? null : this.innerProperties().state();
}
/**
@@ -139,43 +121,77 @@ public State state() {
* @return the provisioningState value.
*/
public CapacityProvisioningState provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
- * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ * Get the administration property: A collection of Dedicated capacity administrators.
*
- * @return the systemData value.
+ * @return the administration value.
*/
- public SystemData systemData() {
- return this.systemData;
+ public DedicatedCapacityAdministrators administration() {
+ return this.innerProperties() == null ? null : this.innerProperties().administration();
}
/**
- * Set the systemData property: Metadata pertaining to creation and last modification of the resource.
+ * Set the administration property: A collection of Dedicated capacity administrators.
*
- * @param systemData the systemData value to set.
+ * @param administration the administration value to set.
* @return the DedicatedCapacityInner object itself.
*/
- public DedicatedCapacityInner withSystemData(SystemData systemData) {
- this.systemData = systemData;
+ public DedicatedCapacityInner withAdministration(DedicatedCapacityAdministrators administration) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DedicatedCapacityProperties();
+ }
+ this.innerProperties().withAdministration(administration);
return this;
}
- /** {@inheritDoc} */
- @Override
- public DedicatedCapacityInner withLocation(String location) {
- super.withLocation(location);
- return this;
+ /**
+ * Get the mode property: Specifies the generation of the Power BI Embedded capacity. If no value is specified, the
+ * default value 'Gen2' is used. [Learn
+ * More](https://docs.microsoft.com/power-bi/developer/embedded/power-bi-embedded-generation-2).
+ *
+ * @return the mode value.
+ */
+ public Mode mode() {
+ return this.innerProperties() == null ? null : this.innerProperties().mode();
}
- /** {@inheritDoc} */
- @Override
- public DedicatedCapacityInner withTags(Map tags) {
- super.withTags(tags);
+ /**
+ * Set the mode property: Specifies the generation of the Power BI Embedded capacity. If no value is specified, the
+ * default value 'Gen2' is used. [Learn
+ * More](https://docs.microsoft.com/power-bi/developer/embedded/power-bi-embedded-generation-2).
+ *
+ * @param mode the mode value to set.
+ * @return the DedicatedCapacityInner object itself.
+ */
+ public DedicatedCapacityInner withMode(Mode mode) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DedicatedCapacityProperties();
+ }
+ this.innerProperties().withMode(mode);
return this;
}
+ /**
+ * Get the tenantId property: Tenant ID for the capacity. Used for creating Pro Plus capacity.
+ *
+ * @return the tenantId value.
+ */
+ public String tenantId() {
+ return this.innerProperties() == null ? null : this.innerProperties().tenantId();
+ }
+
+ /**
+ * Get the friendlyName property: Capacity name.
+ *
+ * @return the friendlyName value.
+ */
+ public String friendlyName() {
+ return this.innerProperties() == null ? null : this.innerProperties().friendlyName();
+ }
+
/**
* Validates the instance.
*
@@ -183,14 +199,16 @@ public DedicatedCapacityInner withTags(Map tags) {
*/
public void validate() {
if (sku() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property sku in model DedicatedCapacityInner"));
} else {
sku().validate();
}
- if (administration() != null) {
- administration().validate();
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(DedicatedCapacityInner.class);
}
diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/DedicatedCapacityMutableProperties.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/DedicatedCapacityMutableProperties.java
similarity index 51%
rename from sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/DedicatedCapacityMutableProperties.java
rename to sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/DedicatedCapacityMutableProperties.java
index 4b0f2979d7a9..484aae4f5ea9 100644
--- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/DedicatedCapacityMutableProperties.java
+++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/DedicatedCapacityMutableProperties.java
@@ -2,18 +2,16 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.resourcemanager.powerbidedicated.models;
+package com.azure.resourcemanager.powerbidedicated.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.resourcemanager.powerbidedicated.models.DedicatedCapacityAdministrators;
+import com.azure.resourcemanager.powerbidedicated.models.Mode;
import com.fasterxml.jackson.annotation.JsonProperty;
/** An object that represents a set of mutable Dedicated capacity resource properties. */
@Fluent
public class DedicatedCapacityMutableProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(DedicatedCapacityMutableProperties.class);
-
/*
* A collection of Dedicated capacity administrators
*/
@@ -21,11 +19,28 @@ public class DedicatedCapacityMutableProperties {
private DedicatedCapacityAdministrators administration;
/*
- * The capacity mode.
+ * Specifies the generation of the Power BI Embedded capacity. If no value is specified, the default value 'Gen2'
+ * is used. [Learn More](https://docs.microsoft.com/power-bi/developer/embedded/power-bi-embedded-generation-2)
*/
@JsonProperty(value = "mode")
private Mode mode;
+ /*
+ * Tenant ID for the capacity. Used for creating Pro Plus capacity.
+ */
+ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY)
+ private String tenantId;
+
+ /*
+ * Capacity name
+ */
+ @JsonProperty(value = "friendlyName", access = JsonProperty.Access.WRITE_ONLY)
+ private String friendlyName;
+
+ /** Creates an instance of DedicatedCapacityMutableProperties class. */
+ public DedicatedCapacityMutableProperties() {
+ }
+
/**
* Get the administration property: A collection of Dedicated capacity administrators.
*
@@ -47,7 +62,9 @@ public DedicatedCapacityMutableProperties withAdministration(DedicatedCapacityAd
}
/**
- * Get the mode property: The capacity mode.
+ * Get the mode property: Specifies the generation of the Power BI Embedded capacity. If no value is specified, the
+ * default value 'Gen2' is used. [Learn
+ * More](https://docs.microsoft.com/power-bi/developer/embedded/power-bi-embedded-generation-2).
*
* @return the mode value.
*/
@@ -56,7 +73,9 @@ public Mode mode() {
}
/**
- * Set the mode property: The capacity mode.
+ * Set the mode property: Specifies the generation of the Power BI Embedded capacity. If no value is specified, the
+ * default value 'Gen2' is used. [Learn
+ * More](https://docs.microsoft.com/power-bi/developer/embedded/power-bi-embedded-generation-2).
*
* @param mode the mode value to set.
* @return the DedicatedCapacityMutableProperties object itself.
@@ -66,6 +85,24 @@ public DedicatedCapacityMutableProperties withMode(Mode mode) {
return this;
}
+ /**
+ * Get the tenantId property: Tenant ID for the capacity. Used for creating Pro Plus capacity.
+ *
+ * @return the tenantId value.
+ */
+ public String tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Get the friendlyName property: Capacity name.
+ *
+ * @return the friendlyName value.
+ */
+ public String friendlyName() {
+ return this.friendlyName;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/DedicatedCapacityProperties.java b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/DedicatedCapacityProperties.java
similarity index 74%
rename from sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/DedicatedCapacityProperties.java
rename to sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/DedicatedCapacityProperties.java
index e4d23c66aa87..f7ecb9fa02d7 100644
--- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/DedicatedCapacityProperties.java
+++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/fluent/models/DedicatedCapacityProperties.java
@@ -2,32 +2,36 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.resourcemanager.powerbidedicated.models;
+package com.azure.resourcemanager.powerbidedicated.fluent.models;
-import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.powerbidedicated.models.CapacityProvisioningState;
+import com.azure.resourcemanager.powerbidedicated.models.DedicatedCapacityAdministrators;
+import com.azure.resourcemanager.powerbidedicated.models.Mode;
+import com.azure.resourcemanager.powerbidedicated.models.State;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Properties of Dedicated Capacity resource. */
-@Immutable
+@Fluent
public final class DedicatedCapacityProperties extends DedicatedCapacityMutableProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(DedicatedCapacityProperties.class);
-
/*
- * The current state of PowerBI Dedicated resource. The state is to
- * indicate more states outside of resource provisioning.
+ * The current state of PowerBI Dedicated resource. The state is to indicate more states outside of resource
+ * provisioning.
*/
@JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY)
private State state;
/*
- * The current deployment state of PowerBI Dedicated resource. The
- * provisioningState is to indicate states for resource provisioning.
+ * The current deployment state of PowerBI Dedicated resource. The provisioningState is to indicate states for
+ * resource provisioning.
*/
@JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
private CapacityProvisioningState provisioningState;
+ /** Creates an instance of DedicatedCapacityProperties class. */
+ public DedicatedCapacityProperties() {
+ }
+
/**
* Get the state property: The current state of PowerBI Dedicated resource. The state is to indicate more states
* outside of resource provisioning.
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 54ed4f1f9379..f97ace29b97f 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
@@ -5,16 +5,13 @@
package com.azure.resourcemanager.powerbidedicated.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.powerbidedicated.models.OperationDisplay;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.resourcemanager.powerbidedicated.models.OperationProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Capacities REST API operation. */
@Fluent
public final class OperationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
-
/*
* Operation name: {provider}/{resource}/{operation}.
*/
@@ -27,6 +24,22 @@ public final class OperationInner {
@JsonProperty(value = "display")
private OperationDisplay display;
+ /*
+ * Origin of the operation.
+ */
+ @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY)
+ private String origin;
+
+ /*
+ * Additional properties to expose performance metrics to shoebox.
+ */
+ @JsonProperty(value = "properties")
+ private OperationProperties properties;
+
+ /** Creates an instance of OperationInner class. */
+ public OperationInner() {
+ }
+
/**
* Get the name property: Operation name: {provider}/{resource}/{operation}.
*
@@ -56,6 +69,35 @@ public OperationInner withDisplay(OperationDisplay display) {
return this;
}
+ /**
+ * Get the origin property: Origin of the operation.
+ *
+ * @return the origin value.
+ */
+ public String origin() {
+ return this.origin;
+ }
+
+ /**
+ * Get the properties property: Additional properties to expose performance metrics to shoebox.
+ *
+ * @return the properties value.
+ */
+ 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.
*
@@ -65,5 +107,8 @@ public void validate() {
if (display() != null) {
display().validate();
}
+ if (properties() != null) {
+ properties().validate();
+ }
}
}
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 f2d71f600ce8..b9f72ab58c33 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
@@ -5,24 +5,23 @@
package com.azure.resourcemanager.powerbidedicated.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.powerbidedicated.models.SkuDetailsForExistingResource;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** An object that represents enumerating SKUs for existing resources. */
@Fluent
public final class SkuEnumerationForExistingResourceResultInner {
- @JsonIgnore
- private final ClientLogger logger = new ClientLogger(SkuEnumerationForExistingResourceResultInner.class);
-
/*
* The collection of available SKUs for existing resources
*/
@JsonProperty(value = "value")
private List value;
+ /** Creates an instance of SkuEnumerationForExistingResourceResultInner class. */
+ public SkuEnumerationForExistingResourceResultInner() {
+ }
+
/**
* Get the value property: The collection of available SKUs for existing resources.
*
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 076da9a186c4..8a4798f5aeb1 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
@@ -5,23 +5,23 @@
package com.azure.resourcemanager.powerbidedicated.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.powerbidedicated.models.CapacitySku;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** An object that represents enumerating SKUs for new resources. */
@Fluent
public final class SkuEnumerationForNewResourceResultInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuEnumerationForNewResourceResultInner.class);
-
/*
* The collection of available SKUs for new resources
*/
@JsonProperty(value = "value")
private List value;
+ /** Creates an instance of SkuEnumerationForNewResourceResultInner class. */
+ public SkuEnumerationForNewResourceResultInner() {
+ }
+
/**
* Get the value property: The collection of available SKUs for new resources.
*
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 78cdc54f2fbb..30acff635585 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
@@ -49,8 +49,8 @@ public AutoScaleVCoreSku sku() {
return this.innerModel().sku();
}
- public Integer capacityLimit() {
- return this.innerModel().capacityLimit();
+ public SystemData systemData() {
+ return this.innerModel().systemData();
}
public String capacityObjectId() {
@@ -61,8 +61,8 @@ public VCoreProvisioningState provisioningState() {
return this.innerModel().provisioningState();
}
- public SystemData systemData() {
- return this.innerModel().systemData();
+ public Integer capacityLimit() {
+ return this.innerModel().capacityLimit();
}
public Region region() {
@@ -73,6 +73,10 @@ public String regionName() {
return this.location();
}
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
public AutoScaleVCoreInner innerModel() {
return this.innerObject;
}
@@ -202,6 +206,16 @@ 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;
+ }
+
public AutoScaleVCoreImpl withCapacityLimit(Integer capacityLimit) {
if (isInCreateMode()) {
this.innerModel().withCapacityLimit(capacityLimit);
@@ -212,16 +226,6 @@ public AutoScaleVCoreImpl withCapacityLimit(Integer capacityLimit) {
}
}
- public AutoScaleVCoreImpl withCapacityObjectId(String capacityObjectId) {
- this.innerModel().withCapacityObjectId(capacityObjectId);
- return this;
- }
-
- public AutoScaleVCoreImpl withSystemData(SystemData systemData) {
- this.innerModel().withSystemData(systemData);
- return this;
- }
-
private boolean isInCreateMode() {
return 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 f24844c9c0ca..2ae8a9e81574 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
@@ -29,7 +29,6 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.powerbidedicated.fluent.AutoScaleVCoresClient;
import com.azure.resourcemanager.powerbidedicated.fluent.models.AutoScaleVCoreInner;
import com.azure.resourcemanager.powerbidedicated.models.AutoScaleVCoreListResult;
@@ -38,8 +37,6 @@
/** An instance of this class provides access to all the operations defined in AutoScaleVCoresClient. */
public final class AutoScaleVCoresClientImpl implements AutoScaleVCoresClient {
- private final ClientLogger logger = new ClientLogger(AutoScaleVCoresClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final AutoScaleVCoresService service;
@@ -63,7 +60,7 @@ public final class AutoScaleVCoresClientImpl implements AutoScaleVCoresClient {
*/
@Host("{$host}")
@ServiceInterface(name = "PowerBIDedicatedAuto")
- private interface AutoScaleVCoresService {
+ public interface AutoScaleVCoresService {
@Headers({"Content-Type: application/json"})
@Get(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated"
@@ -161,7 +158,8 @@ Mono> list(
* @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.
+ * @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(
@@ -211,7 +209,8 @@ private Mono> getByResourceGroupWithResponseAsync(
* @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.
+ * @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(
@@ -257,19 +256,12 @@ private Mono> getByResourceGroupWithResponseAsync(
* @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.
+ * @return details about the specified auto scale v-core on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getByResourceGroupAsync(String resourceGroupName, String vcoreName) {
return getByResourceGroupWithResponseAsync(resourceGroupName, vcoreName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -278,14 +270,16 @@ private Mono getByResourceGroupAsync(String resourceGroupNa
* @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.
+ * @return details about the specified auto scale v-core along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public AutoScaleVCoreInner getByResourceGroup(String resourceGroupName, String vcoreName) {
- return getByResourceGroupAsync(resourceGroupName, vcoreName).block();
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String vcoreName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, vcoreName, context).block();
}
/**
@@ -294,16 +288,14 @@ public AutoScaleVCoreInner getByResourceGroup(String resourceGroupName, String v
* @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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getByResourceGroupWithResponse(
- String resourceGroupName, String vcoreName, Context context) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, vcoreName, context).block();
+ public AutoScaleVCoreInner getByResourceGroup(String resourceGroupName, String vcoreName) {
+ return getByResourceGroupWithResponse(resourceGroupName, vcoreName, Context.NONE).getValue();
}
/**
@@ -316,7 +308,8 @@ public Response getByResourceGroupWithResponse(
* @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.
+ * @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(
@@ -374,7 +367,8 @@ private Mono> createWithResponseAsync(
* @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.
+ * @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(
@@ -428,20 +422,13 @@ private Mono> createWithResponseAsync(
* @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.
+ * @return represents an instance of an auto scale v-core resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(
String resourceGroupName, String vcoreName, AutoScaleVCoreInner vCoreParameters) {
return createWithResponseAsync(resourceGroupName, vcoreName, vCoreParameters)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -451,14 +438,16 @@ private Mono createAsync(
* 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.
+ * @return represents an instance of an auto scale v-core resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public AutoScaleVCoreInner create(String resourceGroupName, String vcoreName, AutoScaleVCoreInner vCoreParameters) {
- return createAsync(resourceGroupName, vcoreName, vCoreParameters).block();
+ public Response createWithResponse(
+ String resourceGroupName, String vcoreName, AutoScaleVCoreInner vCoreParameters, Context context) {
+ return createWithResponseAsync(resourceGroupName, vcoreName, vCoreParameters, context).block();
}
/**
@@ -468,16 +457,14 @@ public AutoScaleVCoreInner create(String resourceGroupName, String vcoreName, Au
* 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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response createWithResponse(
- String resourceGroupName, String vcoreName, AutoScaleVCoreInner vCoreParameters, Context context) {
- return createWithResponseAsync(resourceGroupName, vcoreName, vCoreParameters, context).block();
+ public AutoScaleVCoreInner create(String resourceGroupName, String vcoreName, AutoScaleVCoreInner vCoreParameters) {
+ return createWithResponse(resourceGroupName, vcoreName, vCoreParameters, Context.NONE).getValue();
}
/**
@@ -489,7 +476,7 @@ public Response createWithResponse(
* @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 completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteWithResponseAsync(String resourceGroupName, String vcoreName) {
@@ -538,7 +525,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S
* @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 completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteWithResponseAsync(String resourceGroupName, String vcoreName, Context context) {
@@ -583,11 +570,11 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S
* @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 completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String vcoreName) {
- return deleteWithResponseAsync(resourceGroupName, vcoreName).flatMap((Response res) -> Mono.empty());
+ return deleteWithResponseAsync(resourceGroupName, vcoreName).flatMap(ignored -> Mono.empty());
}
/**
@@ -596,13 +583,15 @@ private Mono deleteAsync(String resourceGroupName, String vcoreName) {
* @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}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceGroupName, String vcoreName) {
- deleteAsync(resourceGroupName, vcoreName).block();
+ public Response deleteWithResponse(String resourceGroupName, String vcoreName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, vcoreName, context).block();
}
/**
@@ -611,15 +600,13 @@ public void delete(String resourceGroupName, String vcoreName) {
* @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 response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response deleteWithResponse(String resourceGroupName, String vcoreName, Context context) {
- return deleteWithResponseAsync(resourceGroupName, vcoreName, context).block();
+ public void delete(String resourceGroupName, String vcoreName) {
+ deleteWithResponse(resourceGroupName, vcoreName, Context.NONE);
}
/**
@@ -632,7 +619,8 @@ public Response deleteWithResponse(String resourceGroupName, String vcoreN
* @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.
+ * @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> updateWithResponseAsync(
@@ -690,7 +678,8 @@ private Mono> updateWithResponseAsync(
* @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.
+ * @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> updateWithResponseAsync(
@@ -747,20 +736,13 @@ private Mono> updateWithResponseAsync(
* @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.
+ * @return represents an instance of an auto scale v-core resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
String resourceGroupName, String vcoreName, AutoScaleVCoreUpdateParameters vCoreUpdateParameters) {
return updateWithResponseAsync(resourceGroupName, vcoreName, vCoreUpdateParameters)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -770,15 +752,19 @@ private Mono updateAsync(
* 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 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.
+ * @return represents an instance of an auto scale v-core resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public AutoScaleVCoreInner update(
- String resourceGroupName, String vcoreName, AutoScaleVCoreUpdateParameters vCoreUpdateParameters) {
- return updateAsync(resourceGroupName, vcoreName, vCoreUpdateParameters).block();
+ public Response updateWithResponse(
+ String resourceGroupName,
+ String vcoreName,
+ AutoScaleVCoreUpdateParameters vCoreUpdateParameters,
+ Context context) {
+ return updateWithResponseAsync(resourceGroupName, vcoreName, vCoreUpdateParameters, context).block();
}
/**
@@ -788,19 +774,15 @@ public AutoScaleVCoreInner update(
* 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 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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response updateWithResponse(
- String resourceGroupName,
- String vcoreName,
- AutoScaleVCoreUpdateParameters vCoreUpdateParameters,
- Context context) {
- return updateWithResponseAsync(resourceGroupName, vcoreName, vCoreUpdateParameters, context).block();
+ public AutoScaleVCoreInner update(
+ String resourceGroupName, String vcoreName, AutoScaleVCoreUpdateParameters vCoreUpdateParameters) {
+ return updateWithResponse(resourceGroupName, vcoreName, vCoreUpdateParameters, Context.NONE).getValue();
}
/**
@@ -811,7 +793,8 @@ public Response updateWithResponse(
* @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.
+ * @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> listByResourceGroupSinglePageAsync(String resourceGroupName) {
@@ -859,7 +842,8 @@ private Mono> listByResourceGroupSinglePageAs
* @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.
+ * @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> listByResourceGroupSinglePageAsync(
@@ -904,7 +888,7 @@ private Mono> listByResourceGroupSinglePageAs
* @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.
+ * @return all the auto scale v-cores for the given resource group as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
@@ -920,7 +904,7 @@ private PagedFlux listByResourceGroupAsync(String resourceG
* @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.
+ * @return all the auto scale v-cores for the given resource group as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
@@ -935,7 +919,7 @@ private PagedFlux listByResourceGroupAsync(String resourceG
* @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.
+ * @return all the auto scale v-cores for the given resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName) {
@@ -951,7 +935,7 @@ public PagedIterable listByResourceGroup(String resourceGro
* @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.
+ * @return all the auto scale v-cores for the given resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
@@ -963,7 +947,8 @@ public PagedIterable listByResourceGroup(String resourceGro
*
* @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.
+ * @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> listSinglePageAsync() {
@@ -1004,7 +989,8 @@ private Mono> listSinglePageAsync() {
* @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.
+ * @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> listSinglePageAsync(Context context) {
@@ -1040,7 +1026,7 @@ 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.
+ * @return an array of auto scale v-core resources as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -1054,7 +1040,7 @@ 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.
+ * @return an array of auto scale v-core resources as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Context context) {
@@ -1066,7 +1052,7 @@ private PagedFlux listAsync(Context context) {
*
* @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.
+ * @return an array of auto scale v-core resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
@@ -1080,7 +1066,7 @@ public PagedIterable list() {
* @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.
+ * @return an array of auto scale v-core resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
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 0af2960a6773..a2f2870299ab 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
@@ -13,10 +13,9 @@
import com.azure.resourcemanager.powerbidedicated.fluent.models.AutoScaleVCoreInner;
import com.azure.resourcemanager.powerbidedicated.models.AutoScaleVCore;
import com.azure.resourcemanager.powerbidedicated.models.AutoScaleVCores;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class AutoScaleVCoresImpl implements AutoScaleVCores {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AutoScaleVCoresImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(AutoScaleVCoresImpl.class);
private final AutoScaleVCoresClient innerClient;
@@ -29,15 +28,6 @@ public AutoScaleVCoresImpl(
this.serviceManager = serviceManager;
}
- public AutoScaleVCore getByResourceGroup(String resourceGroupName, String vcoreName) {
- AutoScaleVCoreInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, vcoreName);
- if (inner != null) {
- return new AutoScaleVCoreImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getByResourceGroupWithResponse(
String resourceGroupName, String vcoreName, Context context) {
Response inner =
@@ -53,14 +43,24 @@ public Response getByResourceGroupWithResponse(
}
}
- public void deleteByResourceGroup(String resourceGroupName, String vcoreName) {
- this.serviceClient().delete(resourceGroupName, vcoreName);
+ public AutoScaleVCore getByResourceGroup(String resourceGroupName, String vcoreName) {
+ AutoScaleVCoreInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, vcoreName);
+ if (inner != null) {
+ return new AutoScaleVCoreImpl(inner, this.manager());
+ } else {
+ return null;
+ }
}
- public Response deleteWithResponse(String resourceGroupName, String vcoreName, Context context) {
+ public Response deleteByResourceGroupWithResponse(
+ String resourceGroupName, String vcoreName, Context context) {
return this.serviceClient().deleteWithResponse(resourceGroupName, vcoreName, context);
}
+ public void deleteByResourceGroup(String resourceGroupName, String vcoreName) {
+ this.serviceClient().delete(resourceGroupName, vcoreName);
+ }
+
public PagedIterable listByResourceGroup(String resourceGroupName) {
PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
return Utils.mapPage(inner, inner1 -> new AutoScaleVCoreImpl(inner1, this.manager()));
@@ -84,7 +84,7 @@ public PagedIterable list(Context context) {
public AutoScaleVCore getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -92,7 +92,7 @@ public AutoScaleVCore getById(String id) {
}
String vcoreName = Utils.getValueFromIdByName(id, "autoScaleVCores");
if (vcoreName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -104,7 +104,7 @@ public AutoScaleVCore getById(String id) {
public Response getByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -112,7 +112,7 @@ public Response getByIdWithResponse(String id, Context context)
}
String vcoreName = Utils.getValueFromIdByName(id, "autoScaleVCores");
if (vcoreName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -124,7 +124,7 @@ public Response getByIdWithResponse(String id, Context context)
public void deleteById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -132,19 +132,19 @@ public void deleteById(String id) {
}
String vcoreName = Utils.getValueFromIdByName(id, "autoScaleVCores");
if (vcoreName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
.format("The resource ID '%s' is not valid. Missing path segment 'autoScaleVCores'.", id)));
}
- this.deleteWithResponse(resourceGroupName, vcoreName, Context.NONE).getValue();
+ this.deleteByResourceGroupWithResponse(resourceGroupName, vcoreName, Context.NONE);
}
public Response deleteByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -152,13 +152,13 @@ public Response deleteByIdWithResponse(String id, Context context) {
}
String vcoreName = Utils.getValueFromIdByName(id, "autoScaleVCores");
if (vcoreName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
.format("The resource ID '%s' is not valid. Missing path segment 'autoScaleVCores'.", id)));
}
- return this.deleteWithResponse(resourceGroupName, vcoreName, context);
+ return this.deleteByResourceGroupWithResponse(resourceGroupName, vcoreName, context);
}
private AutoScaleVCoresClient serviceClient() {
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 143494a8122d..23cbc283b82f 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
@@ -31,7 +31,6 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.powerbidedicated.fluent.CapacitiesClient;
@@ -48,8 +47,6 @@
/** An instance of this class provides access to all the operations defined in CapacitiesClient. */
public final class CapacitiesClientImpl implements CapacitiesClient {
- private final ClientLogger logger = new ClientLogger(CapacitiesClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final CapacitiesService service;
@@ -73,7 +70,7 @@ public final class CapacitiesClientImpl implements CapacitiesClient {
*/
@Host("{$host}")
@ServiceInterface(name = "PowerBIDedicatedCapa")
- private interface CapacitiesService {
+ public interface CapacitiesService {
@Headers({"Content-Type: application/json"})
@Get(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated"
@@ -243,7 +240,8 @@ Mono> checkNameAvailability(
* @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.
+ * @return details about the specified dedicated capacity along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(
@@ -295,7 +293,8 @@ private Mono> getByResourceGroupWithResponseAsy
* @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.
+ * @return details about the specified dedicated capacity along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(
@@ -343,20 +342,13 @@ private Mono> getByResourceGroupWithResponseAsy
* @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.
+ * @return details about the specified dedicated capacity on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getByResourceGroupAsync(
String resourceGroupName, String dedicatedCapacityName) {
return getByResourceGroupWithResponseAsync(resourceGroupName, dedicatedCapacityName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -366,14 +358,16 @@ private Mono getByResourceGroupAsync(
* 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.
+ * @return details about the specified dedicated capacity along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public DedicatedCapacityInner getByResourceGroup(String resourceGroupName, String dedicatedCapacityName) {
- return getByResourceGroupAsync(resourceGroupName, dedicatedCapacityName).block();
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String dedicatedCapacityName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, dedicatedCapacityName, context).block();
}
/**
@@ -383,16 +377,14 @@ public DedicatedCapacityInner getByResourceGroup(String resourceGroupName, Strin
* 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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getByResourceGroupWithResponse(
- String resourceGroupName, String dedicatedCapacityName, Context context) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, dedicatedCapacityName, context).block();
+ public DedicatedCapacityInner getByResourceGroup(String resourceGroupName, String dedicatedCapacityName) {
+ return getByResourceGroupWithResponse(resourceGroupName, dedicatedCapacityName, Context.NONE).getValue();
}
/**
@@ -406,7 +398,8 @@ public Response getByResourceGroupWithResponse(
* @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 represents an instance of a Dedicated Capacity resource along with {@link Response} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createWithResponseAsync(
@@ -466,7 +459,8 @@ private Mono>> createWithResponseAsync(
* @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 represents an instance of a Dedicated Capacity resource along with {@link Response} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createWithResponseAsync(
@@ -525,9 +519,9 @@ private Mono>> createWithResponseAsync(
* @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 the {@link PollerFlux} for polling of represents an instance of a Dedicated Capacity resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DedicatedCapacityInner> beginCreateAsync(
String resourceGroupName, String dedicatedCapacityName, DedicatedCapacityInner capacityParameters) {
Mono>> mono =
@@ -539,7 +533,7 @@ private PollerFlux, DedicatedCapacityInner> b
this.client.getHttpPipeline(),
DedicatedCapacityInner.class,
DedicatedCapacityInner.class,
- Context.NONE);
+ this.client.getContext());
}
/**
@@ -554,9 +548,9 @@ private PollerFlux, DedicatedCapacityInner> b
* @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 the {@link PollerFlux} for polling of represents an instance of a Dedicated Capacity resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DedicatedCapacityInner> beginCreateAsync(
String resourceGroupName,
String dedicatedCapacityName,
@@ -586,12 +580,12 @@ private PollerFlux, DedicatedCapacityInner> b
* @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 the {@link SyncPoller} for polling of represents an instance of a Dedicated Capacity resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DedicatedCapacityInner> beginCreate(
String resourceGroupName, String dedicatedCapacityName, DedicatedCapacityInner capacityParameters) {
- return beginCreateAsync(resourceGroupName, dedicatedCapacityName, capacityParameters).getSyncPoller();
+ return this.beginCreateAsync(resourceGroupName, dedicatedCapacityName, capacityParameters).getSyncPoller();
}
/**
@@ -606,15 +600,17 @@ public SyncPoller, DedicatedCapacityInner> be
* @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 the {@link SyncPoller} for polling of represents an instance of a Dedicated Capacity resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DedicatedCapacityInner> beginCreate(
String resourceGroupName,
String dedicatedCapacityName,
DedicatedCapacityInner capacityParameters,
Context context) {
- return beginCreateAsync(resourceGroupName, dedicatedCapacityName, capacityParameters, context).getSyncPoller();
+ return this
+ .beginCreateAsync(resourceGroupName, dedicatedCapacityName, capacityParameters, context)
+ .getSyncPoller();
}
/**
@@ -628,7 +624,7 @@ public SyncPoller, DedicatedCapacityInner> be
* @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 represents an instance of a Dedicated Capacity resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(
@@ -650,7 +646,7 @@ private Mono createAsync(
* @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 represents an instance of a Dedicated Capacity resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(
@@ -715,7 +711,7 @@ public DedicatedCapacityInner create(
* @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 completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> deleteWithResponseAsync(
@@ -767,7 +763,7 @@ private Mono>> deleteWithResponseAsync(
* @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 completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> deleteWithResponseAsync(
@@ -815,15 +811,16 @@ private Mono>> deleteWithResponseAsync(
* @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 completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @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, Context.NONE);
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}
/**
@@ -837,9 +834,9 @@ private PollerFlux, Void> beginDeleteAsync(
* @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 completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String dedicatedCapacityName, Context context) {
context = this.client.mergeContext(context);
@@ -860,11 +857,11 @@ private PollerFlux, Void> beginDeleteAsync(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String dedicatedCapacityName) {
- return beginDeleteAsync(resourceGroupName, dedicatedCapacityName).getSyncPoller();
+ return this.beginDeleteAsync(resourceGroupName, dedicatedCapacityName).getSyncPoller();
}
/**
@@ -878,12 +875,12 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String dedicatedCapacityName, Context context) {
- return beginDeleteAsync(resourceGroupName, dedicatedCapacityName, context).getSyncPoller();
+ return this.beginDeleteAsync(resourceGroupName, dedicatedCapacityName, context).getSyncPoller();
}
/**
@@ -896,7 +893,7 @@ public SyncPoller, Void> beginDelete(
* @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 completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String dedicatedCapacityName) {
@@ -916,7 +913,7 @@ private Mono deleteAsync(String resourceGroupName, String dedicatedCapacit
* @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 completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String dedicatedCapacityName, Context context) {
@@ -969,7 +966,8 @@ public void delete(String resourceGroupName, String dedicatedCapacityName, Conte
* @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 represents an instance of a Dedicated Capacity resource along with {@link Response} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> updateWithResponseAsync(
@@ -1032,7 +1030,8 @@ private Mono>> updateWithResponseAsync(
* @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 represents an instance of a Dedicated Capacity resource along with {@link Response} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> updateWithResponseAsync(
@@ -1092,9 +1091,9 @@ private Mono>> updateWithResponseAsync(
* @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 the {@link PollerFlux} for polling of represents an instance of a Dedicated Capacity resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DedicatedCapacityInner> beginUpdateAsync(
String resourceGroupName,
String dedicatedCapacityName,
@@ -1108,7 +1107,7 @@ private PollerFlux, DedicatedCapacityInner> b
this.client.getHttpPipeline(),
DedicatedCapacityInner.class,
DedicatedCapacityInner.class,
- Context.NONE);
+ this.client.getContext());
}
/**
@@ -1123,9 +1122,9 @@ private PollerFlux, DedicatedCapacityInner> b
* @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 the {@link PollerFlux} for polling of represents an instance of a Dedicated Capacity resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DedicatedCapacityInner> beginUpdateAsync(
String resourceGroupName,
String dedicatedCapacityName,
@@ -1155,14 +1154,16 @@ private PollerFlux, DedicatedCapacityInner> b
* @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 the {@link SyncPoller} for polling of represents an instance of a Dedicated Capacity resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DedicatedCapacityInner> beginUpdate(
String resourceGroupName,
String dedicatedCapacityName,
DedicatedCapacityUpdateParameters capacityUpdateParameters) {
- return beginUpdateAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters).getSyncPoller();
+ return this
+ .beginUpdateAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters)
+ .getSyncPoller();
}
/**
@@ -1177,15 +1178,16 @@ public SyncPoller, DedicatedCapacityInner> be
* @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 the {@link SyncPoller} for polling of represents an instance of a Dedicated Capacity resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DedicatedCapacityInner> beginUpdate(
String resourceGroupName,
String dedicatedCapacityName,
DedicatedCapacityUpdateParameters capacityUpdateParameters,
Context context) {
- return beginUpdateAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters, context)
+ return this
+ .beginUpdateAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters, context)
.getSyncPoller();
}
@@ -1200,7 +1202,7 @@ public SyncPoller, DedicatedCapacityInner> be
* @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 represents an instance of a Dedicated Capacity resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
@@ -1224,7 +1226,7 @@ private Mono updateAsync(
* @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 represents an instance of a Dedicated Capacity resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
@@ -1291,7 +1293,7 @@ public DedicatedCapacityInner update(
* @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 completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> suspendWithResponseAsync(
@@ -1343,7 +1345,7 @@ private Mono>> suspendWithResponseAsync(
* @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 completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> suspendWithResponseAsync(
@@ -1391,15 +1393,16 @@ private Mono>> suspendWithResponseAsync(
* @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 completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @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, Context.NONE);
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}
/**
@@ -1413,9 +1416,9 @@ private PollerFlux, Void> beginSuspendAsync(
* @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 completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginSuspendAsync(
String resourceGroupName, String dedicatedCapacityName, Context context) {
context = this.client.mergeContext(context);
@@ -1436,11 +1439,11 @@ private PollerFlux, Void> beginSuspendAsync(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginSuspend(String resourceGroupName, String dedicatedCapacityName) {
- return beginSuspendAsync(resourceGroupName, dedicatedCapacityName).getSyncPoller();
+ return this.beginSuspendAsync(resourceGroupName, dedicatedCapacityName).getSyncPoller();
}
/**
@@ -1454,12 +1457,12 @@ public SyncPoller, Void> beginSuspend(String resourceGroupName,
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginSuspend(
String resourceGroupName, String dedicatedCapacityName, Context context) {
- return beginSuspendAsync(resourceGroupName, dedicatedCapacityName, context).getSyncPoller();
+ return this.beginSuspendAsync(resourceGroupName, dedicatedCapacityName, context).getSyncPoller();
}
/**
@@ -1472,7 +1475,7 @@ public SyncPoller, Void> beginSuspend(
* @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 completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono suspendAsync(String resourceGroupName, String dedicatedCapacityName) {
@@ -1492,7 +1495,7 @@ private Mono suspendAsync(String resourceGroupName, String dedicatedCapaci
* @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 completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono suspendAsync(String resourceGroupName, String dedicatedCapacityName, Context context) {
@@ -1544,7 +1547,7 @@ public void suspend(String resourceGroupName, String dedicatedCapacityName, Cont
* @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 completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> resumeWithResponseAsync(
@@ -1596,7 +1599,7 @@ private Mono>> resumeWithResponseAsync(
* @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 completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> resumeWithResponseAsync(
@@ -1644,15 +1647,16 @@ private Mono>> resumeWithResponseAsync(
* @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 completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @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, Context.NONE);
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}
/**
@@ -1666,9 +1670,9 @@ private PollerFlux, Void> beginResumeAsync(
* @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 completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginResumeAsync(
String resourceGroupName, String dedicatedCapacityName, Context context) {
context = this.client.mergeContext(context);
@@ -1689,11 +1693,11 @@ private PollerFlux, Void> beginResumeAsync(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginResume(String resourceGroupName, String dedicatedCapacityName) {
- return beginResumeAsync(resourceGroupName, dedicatedCapacityName).getSyncPoller();
+ return this.beginResumeAsync(resourceGroupName, dedicatedCapacityName).getSyncPoller();
}
/**
@@ -1707,12 +1711,12 @@ public SyncPoller, Void> beginResume(String resourceGroupName,
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller