diff --git a/sdk/quota/azure-resourcemanager-quota/CHANGELOG.md b/sdk/quota/azure-resourcemanager-quota/CHANGELOG.md
index e553d17d4f80..3b90cc2fefff 100644
--- a/sdk/quota/azure-resourcemanager-quota/CHANGELOG.md
+++ b/sdk/quota/azure-resourcemanager-quota/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2021-10-21)
+
+- Azure Resource Manager quota client library for Java. This package contains Microsoft Azure SDK for quota Management SDK. Microsoft Azure Quota Resource Provider. Package tag package-2021-03-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Features Added
diff --git a/sdk/quota/azure-resourcemanager-quota/README.md b/sdk/quota/azure-resourcemanager-quota/README.md
index 2ee403fd72ec..551fa366fec2 100644
--- a/sdk/quota/azure-resourcemanager-quota/README.md
+++ b/sdk/quota/azure-resourcemanager-quota/README.md
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-quota
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
diff --git a/sdk/quota/azure-resourcemanager-quota/SAMPLE.md b/sdk/quota/azure-resourcemanager-quota/SAMPLE.md
index 5bf8a81349ca..f371ebb5029a 100644
--- a/sdk/quota/azure-resourcemanager-quota/SAMPLE.md
+++ b/sdk/quota/azure-resourcemanager-quota/SAMPLE.md
@@ -1,10 +1,6 @@
# Code snippets and samples
-## Operation
-
-- [List](#operation_list)
-
## Quota
- [CreateOrUpdate](#quota_createorupdate)
@@ -12,6 +8,10 @@
- [List](#quota_list)
- [Update](#quota_update)
+## QuotaOperation
+
+- [List](#quotaoperation_list)
+
## QuotaRequestStatus
- [Get](#quotarequeststatus_get)
@@ -21,32 +21,10 @@
- [Get](#usages_get)
- [List](#usages_list)
-### Operation_List
-
-```java
-import com.azure.core.util.Context;
-
-/** Samples for Operation List. */
-public final class OperationListSamples {
- /*
- * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/GetOperations.json
- */
- /**
- * Sample code: GetOperations.
- *
- * @param manager Entry point to QuotaManager.
- */
- public static void getOperations(com.azure.resourcemanager.quota.QuotaManager manager) {
- manager.operations().list(Context.NONE);
- }
-}
-```
-
### Quota_CreateOrUpdate
```java
-import com.azure.resourcemanager.quota.models.LimitType;
-import com.azure.resourcemanager.quota.models.LimitValue;
+import com.azure.resourcemanager.quota.models.LimitObject;
import com.azure.resourcemanager.quota.models.QuotaProperties;
import com.azure.resourcemanager.quota.models.ResourceName;
@@ -69,7 +47,7 @@ public final class QuotaCreateOrUpdateSamples {
"subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.MachineLearningServices/locations/eastus")
.withProperties(
new QuotaProperties()
- .withLimit(new LimitValue().withValue(10).withLimitObjectType(LimitType.LIMIT_VALUE))
+ .withLimit(new LimitObject().withValue(10))
.withName(new ResourceName().withValue("TotalLowPriorityCores"))
.withResourceType("lowPriority"))
.create();
@@ -92,7 +70,7 @@ public final class QuotaCreateOrUpdateSamples {
"subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Network/locations/eastus")
.withProperties(
new QuotaProperties()
- .withLimit(new LimitValue().withValue(10).withLimitObjectType(LimitType.LIMIT_VALUE))
+ .withLimit(new LimitObject().withValue(10))
.withName(new ResourceName().withValue("StandardSkuPublicIpAddresses"))
.withResourceType("PublicIpAddresses"))
.create();
@@ -114,7 +92,7 @@ public final class QuotaCreateOrUpdateSamples {
"subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Compute/locations/eastus")
.withProperties(
new QuotaProperties()
- .withLimit(new LimitValue().withValue(10).withLimitObjectType(LimitType.LIMIT_VALUE))
+ .withLimit(new LimitObject().withValue(10))
.withName(new ResourceName().withValue("standardFSv2Family")))
.create();
}
@@ -135,7 +113,7 @@ public final class QuotaCreateOrUpdateSamples {
"subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Network/locations/eastus")
.withProperties(
new QuotaProperties()
- .withLimit(new LimitValue().withValue(10).withLimitObjectType(LimitType.LIMIT_VALUE))
+ .withLimit(new LimitObject().withValue(10))
.withName(new ResourceName().withValue("MinPublicIpInterNetworkPrefixLength"))
.withResourceType("MinPublicIpInterNetworkPrefixLength"))
.create();
@@ -249,8 +227,7 @@ public final class QuotaListSamples {
```java
import com.azure.core.util.Context;
import com.azure.resourcemanager.quota.models.CurrentQuotaLimitBase;
-import com.azure.resourcemanager.quota.models.LimitType;
-import com.azure.resourcemanager.quota.models.LimitValue;
+import com.azure.resourcemanager.quota.models.LimitObject;
import com.azure.resourcemanager.quota.models.QuotaProperties;
import com.azure.resourcemanager.quota.models.ResourceName;
@@ -277,7 +254,7 @@ public final class QuotaUpdateSamples {
.update()
.withProperties(
new QuotaProperties()
- .withLimit(new LimitValue().withValue(10).withLimitObjectType(LimitType.LIMIT_VALUE))
+ .withLimit(new LimitObject().withValue(10))
.withName(new ResourceName().withValue("standardFSv2Family")))
.apply();
}
@@ -303,7 +280,7 @@ public final class QuotaUpdateSamples {
.update()
.withProperties(
new QuotaProperties()
- .withLimit(new LimitValue().withValue(10).withLimitObjectType(LimitType.LIMIT_VALUE))
+ .withLimit(new LimitObject().withValue(10))
.withName(new ResourceName().withValue("MinPublicIpInterNetworkPrefixLength"))
.withResourceType("MinPublicIpInterNetworkPrefixLength"))
.apply();
@@ -311,6 +288,27 @@ public final class QuotaUpdateSamples {
}
```
+### QuotaOperation_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for QuotaOperation List. */
+public final class QuotaOperationListSamples {
+ /*
+ * x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/GetOperations.json
+ */
+ /**
+ * Sample code: GetOperations.
+ *
+ * @param manager Entry point to QuotaManager.
+ */
+ public static void getOperations(com.azure.resourcemanager.quota.QuotaManager manager) {
+ manager.quotaOperations().list(Context.NONE);
+ }
+}
+```
+
### QuotaRequestStatus_Get
```java
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/QuotaManager.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/QuotaManager.java
index 0b1cc233d431..fdf0f39c94ba 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/QuotaManager.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/QuotaManager.java
@@ -22,11 +22,11 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.quota.fluent.AzureQuotaExtensionApi;
import com.azure.resourcemanager.quota.implementation.AzureQuotaExtensionApiBuilder;
-import com.azure.resourcemanager.quota.implementation.OperationsImpl;
+import com.azure.resourcemanager.quota.implementation.QuotaOperationsImpl;
import com.azure.resourcemanager.quota.implementation.QuotaRequestStatusImpl;
import com.azure.resourcemanager.quota.implementation.QuotasImpl;
import com.azure.resourcemanager.quota.implementation.UsagesImpl;
-import com.azure.resourcemanager.quota.models.Operations;
+import com.azure.resourcemanager.quota.models.QuotaOperations;
import com.azure.resourcemanager.quota.models.QuotaRequestStatus;
import com.azure.resourcemanager.quota.models.Quotas;
import com.azure.resourcemanager.quota.models.Usages;
@@ -44,7 +44,7 @@ public final class QuotaManager {
private QuotaRequestStatus quotaRequestStatus;
- private Operations operations;
+ private QuotaOperations quotaOperations;
private final AzureQuotaExtensionApi clientObject;
@@ -244,12 +244,12 @@ public QuotaRequestStatus quotaRequestStatus() {
return quotaRequestStatus;
}
- /** @return Resource collection API of Operations. */
- public Operations operations() {
- if (this.operations == null) {
- this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ /** @return Resource collection API of QuotaOperations. */
+ public QuotaOperations quotaOperations() {
+ if (this.quotaOperations == null) {
+ this.quotaOperations = new QuotaOperationsImpl(clientObject.getQuotaOperations(), this);
}
- return operations;
+ return quotaOperations;
}
/**
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/AzureQuotaExtensionApi.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/AzureQuotaExtensionApi.java
index c411077f0237..ca752d9f946d 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/AzureQuotaExtensionApi.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/AzureQuotaExtensionApi.java
@@ -59,9 +59,9 @@ public interface AzureQuotaExtensionApi {
QuotaRequestStatusClient getQuotaRequestStatus();
/**
- * Gets the OperationsClient object to access its operations.
+ * Gets the QuotaOperationsClient object to access its operations.
*
- * @return the OperationsClient object.
+ * @return the QuotaOperationsClient object.
*/
- OperationsClient getOperations();
+ QuotaOperationsClient getQuotaOperations();
}
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/OperationsClient.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/QuotaOperationsClient.java
similarity index 95%
rename from sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/OperationsClient.java
rename to sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/QuotaOperationsClient.java
index b873c1e774aa..7f8084915ea5 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/OperationsClient.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/QuotaOperationsClient.java
@@ -10,8 +10,8 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.quota.fluent.models.OperationResponseInner;
-/** An instance of this class provides access to all the operations defined in OperationsClient. */
-public interface OperationsClient {
+/** An instance of this class provides access to all the operations defined in QuotaOperationsClient. */
+public interface QuotaOperationsClient {
/**
* List all the operations supported by the Microsoft.Quota resource provider.
*
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/QuotasClient.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/QuotasClient.java
index 034a676241b9..81a5b5ab9865 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/QuotasClient.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/fluent/QuotasClient.java
@@ -72,7 +72,7 @@ public interface QuotasClient {
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return quota limit.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, CurrentQuotaLimitBaseInner> beginCreateOrUpdate(
String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest);
@@ -97,7 +97,7 @@ SyncPoller, CurrentQuotaLimitBaseInner> b
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return quota limit.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, CurrentQuotaLimitBaseInner> beginCreateOrUpdate(
String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest, Context context);
@@ -170,7 +170,7 @@ CurrentQuotaLimitBaseInner createOrUpdate(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return quota limit.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, CurrentQuotaLimitBaseInner> beginUpdate(
String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest);
@@ -195,7 +195,7 @@ SyncPoller, CurrentQuotaLimitBaseInner> b
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return quota limit.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, CurrentQuotaLimitBaseInner> beginUpdate(
String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest, Context context);
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/AzureQuotaExtensionApiImpl.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/AzureQuotaExtensionApiImpl.java
index 9c2ea5b83654..e5a964cf36ee 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/AzureQuotaExtensionApiImpl.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/AzureQuotaExtensionApiImpl.java
@@ -22,7 +22,7 @@
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.quota.fluent.AzureQuotaExtensionApi;
-import com.azure.resourcemanager.quota.fluent.OperationsClient;
+import com.azure.resourcemanager.quota.fluent.QuotaOperationsClient;
import com.azure.resourcemanager.quota.fluent.QuotaRequestStatusClient;
import com.azure.resourcemanager.quota.fluent.QuotasClient;
import com.azure.resourcemanager.quota.fluent.UsagesClient;
@@ -137,16 +137,16 @@ public QuotaRequestStatusClient getQuotaRequestStatus() {
return this.quotaRequestStatus;
}
- /** The OperationsClient object to access its operations. */
- private final OperationsClient operations;
+ /** The QuotaOperationsClient object to access its operations. */
+ private final QuotaOperationsClient quotaOperations;
/**
- * Gets the OperationsClient object to access its operations.
+ * Gets the QuotaOperationsClient object to access its operations.
*
- * @return the OperationsClient object.
+ * @return the QuotaOperationsClient object.
*/
- public OperationsClient getOperations() {
- return this.operations;
+ public QuotaOperationsClient getQuotaOperations() {
+ return this.quotaOperations;
}
/**
@@ -172,7 +172,7 @@ public OperationsClient getOperations() {
this.usages = new UsagesClientImpl(this);
this.quotas = new QuotasClientImpl(this);
this.quotaRequestStatus = new QuotaRequestStatusClientImpl(this);
- this.operations = new OperationsClientImpl(this);
+ this.quotaOperations = new QuotaOperationsClientImpl(this);
}
/**
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/OperationsClientImpl.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaOperationsClientImpl.java
similarity index 94%
rename from sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/OperationsClientImpl.java
rename to sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaOperationsClientImpl.java
index 0f1e4152c642..b7ec07abf01f 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/OperationsClientImpl.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaOperationsClientImpl.java
@@ -26,39 +26,39 @@
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.quota.fluent.OperationsClient;
+import com.azure.resourcemanager.quota.fluent.QuotaOperationsClient;
import com.azure.resourcemanager.quota.fluent.models.OperationResponseInner;
import com.azure.resourcemanager.quota.models.OperationList;
import reactor.core.publisher.Mono;
-/** An instance of this class provides access to all the operations defined in OperationsClient. */
-public final class OperationsClientImpl implements OperationsClient {
- private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class);
+/** An instance of this class provides access to all the operations defined in QuotaOperationsClient. */
+public final class QuotaOperationsClientImpl implements QuotaOperationsClient {
+ private final ClientLogger logger = new ClientLogger(QuotaOperationsClientImpl.class);
/** The proxy service used to perform REST calls. */
- private final OperationsService service;
+ private final QuotaOperationsService service;
/** The service client containing this operation class. */
private final AzureQuotaExtensionApiImpl client;
/**
- * Initializes an instance of OperationsClientImpl.
+ * Initializes an instance of QuotaOperationsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- OperationsClientImpl(AzureQuotaExtensionApiImpl client) {
+ QuotaOperationsClientImpl(AzureQuotaExtensionApiImpl client) {
this.service =
- RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ RestProxy.create(QuotaOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for AzureQuotaExtensionApiOperations to be used by the proxy service to
- * perform REST calls.
+ * The interface defining all the services for AzureQuotaExtensionApiQuotaOperations to be used by the proxy service
+ * to perform REST calls.
*/
@Host("{$host}")
@ServiceInterface(name = "AzureQuotaExtensionA")
- private interface OperationsService {
+ private interface QuotaOperationsService {
@Headers({"Content-Type: application/json"})
@Get("/providers/Microsoft.Quota/operations")
@ExpectedResponses({200})
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/OperationsImpl.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaOperationsImpl.java
similarity index 75%
rename from sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/OperationsImpl.java
rename to sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaOperationsImpl.java
index bfe495bd8e2c..729b3a2c9028 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/OperationsImpl.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotaOperationsImpl.java
@@ -7,20 +7,21 @@
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.quota.fluent.OperationsClient;
+import com.azure.resourcemanager.quota.fluent.QuotaOperationsClient;
import com.azure.resourcemanager.quota.fluent.models.OperationResponseInner;
import com.azure.resourcemanager.quota.models.OperationResponse;
-import com.azure.resourcemanager.quota.models.Operations;
+import com.azure.resourcemanager.quota.models.QuotaOperations;
import com.fasterxml.jackson.annotation.JsonIgnore;
-public final class OperationsImpl implements Operations {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class);
+public final class QuotaOperationsImpl implements QuotaOperations {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(QuotaOperationsImpl.class);
- private final OperationsClient innerClient;
+ private final QuotaOperationsClient innerClient;
private final com.azure.resourcemanager.quota.QuotaManager serviceManager;
- public OperationsImpl(OperationsClient innerClient, com.azure.resourcemanager.quota.QuotaManager serviceManager) {
+ public QuotaOperationsImpl(
+ QuotaOperationsClient innerClient, com.azure.resourcemanager.quota.QuotaManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -35,7 +36,7 @@ public PagedIterable list(Context context) {
return Utils.mapPage(inner, inner1 -> new OperationResponseImpl(inner1, this.manager()));
}
- private OperationsClient serviceClient() {
+ private QuotaOperationsClient serviceClient() {
return this.innerClient;
}
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotasClientImpl.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotasClientImpl.java
index 6c064b48185d..7980c9d179c2 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotasClientImpl.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/implementation/QuotasClientImpl.java
@@ -409,7 +409,7 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return quota limit.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, CurrentQuotaLimitBaseInner> beginCreateOrUpdateAsync(
String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest) {
Mono>> mono =
@@ -445,7 +445,7 @@ private PollerFlux, CurrentQuotaLimitBase
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return quota limit.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, CurrentQuotaLimitBaseInner> beginCreateOrUpdateAsync(
String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest, Context context) {
context = this.client.mergeContext(context);
@@ -481,7 +481,7 @@ private PollerFlux, CurrentQuotaLimitBase
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return quota limit.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, CurrentQuotaLimitBaseInner> beginCreateOrUpdate(
String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest) {
return beginCreateOrUpdateAsync(resourceName, scope, createQuotaRequest).getSyncPoller();
@@ -508,7 +508,7 @@ public SyncPoller, CurrentQuotaLimitBaseI
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return quota limit.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, CurrentQuotaLimitBaseInner> beginCreateOrUpdate(
String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest, Context context) {
return beginCreateOrUpdateAsync(resourceName, scope, createQuotaRequest, context).getSyncPoller();
@@ -756,7 +756,7 @@ private Mono>> updateWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return quota limit.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, CurrentQuotaLimitBaseInner> beginUpdateAsync(
String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest) {
Mono>> mono = updateWithResponseAsync(resourceName, scope, createQuotaRequest);
@@ -791,7 +791,7 @@ private PollerFlux, CurrentQuotaLimitBase
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return quota limit.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, CurrentQuotaLimitBaseInner> beginUpdateAsync(
String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest, Context context) {
context = this.client.mergeContext(context);
@@ -827,7 +827,7 @@ private PollerFlux, CurrentQuotaLimitBase
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return quota limit.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, CurrentQuotaLimitBaseInner> beginUpdate(
String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest) {
return beginUpdateAsync(resourceName, scope, createQuotaRequest).getSyncPoller();
@@ -854,7 +854,7 @@ public SyncPoller, CurrentQuotaLimitBaseI
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return quota limit.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, CurrentQuotaLimitBaseInner> beginUpdate(
String resourceName, String scope, CurrentQuotaLimitBaseInner createQuotaRequest, Context context) {
return beginUpdateAsync(resourceName, scope, createQuotaRequest, context).getSyncPoller();
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/LimitJsonObject.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/LimitJsonObject.java
index b47dca3f93e3..f24db64eed29 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/LimitJsonObject.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/LimitJsonObject.java
@@ -18,7 +18,7 @@
property = "limitObjectType",
defaultImpl = LimitJsonObject.class)
@JsonTypeName("LimitJsonObject")
-@JsonSubTypes({@JsonSubTypes.Type(name = "LimitValue", value = LimitValue.class)})
+@JsonSubTypes({@JsonSubTypes.Type(name = "LimitValue", value = LimitObject.class)})
@Immutable
public class LimitJsonObject {
@JsonIgnore private final ClientLogger logger = new ClientLogger(LimitJsonObject.class);
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/LimitObject.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/LimitObject.java
index 2a4df7e2d4c8..e5bc2e5f1194 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/LimitObject.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/LimitObject.java
@@ -8,10 +8,14 @@
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
/** The resource quota limit value. */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "limitObjectType")
+@JsonTypeName("LimitValue")
@Fluent
-public class LimitObject {
+public final class LimitObject extends LimitJsonObject {
@JsonIgnore private final ClientLogger logger = new ClientLogger(LimitObject.class);
/*
@@ -20,12 +24,6 @@ public class LimitObject {
@JsonProperty(value = "value", required = true)
private int value;
- /*
- * The limit object type.
- */
- @JsonProperty(value = "limitObjectType")
- private LimitType limitObjectType;
-
/*
* The quota or usages limit types.
*/
@@ -52,26 +50,6 @@ public LimitObject withValue(int value) {
return this;
}
- /**
- * Get the limitObjectType property: The limit object type.
- *
- * @return the limitObjectType value.
- */
- public LimitType limitObjectType() {
- return this.limitObjectType;
- }
-
- /**
- * Set the limitObjectType property: The limit object type.
- *
- * @param limitObjectType the limitObjectType value to set.
- * @return the LimitObject object itself.
- */
- public LimitObject withLimitObjectType(LimitType limitObjectType) {
- this.limitObjectType = limitObjectType;
- return this;
- }
-
/**
* Get the limitType property: The quota or usages limit types.
*
@@ -97,6 +75,8 @@ public LimitObject withLimitType(QuotaLimitTypes limitType) {
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
+ @Override
public void validate() {
+ super.validate();
}
}
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/LimitValue.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/LimitValue.java
deleted file mode 100644
index f645f2a1f4a7..000000000000
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/LimitValue.java
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.quota.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;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.fasterxml.jackson.annotation.JsonTypeName;
-
-/** The resource quota limit. */
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "limitObjectType")
-@JsonTypeName("LimitValue")
-@Fluent
-public final class LimitValue extends LimitJsonObject {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(LimitValue.class);
-
- /*
- * The quota/limit value
- */
- @JsonProperty(value = "value", required = true)
- private int value;
-
- /*
- * The limit object type.
- */
- @JsonProperty(value = "limitObjectType")
- private LimitType limitObjectType;
-
- /*
- * The quota or usages limit types.
- */
- @JsonProperty(value = "limitType")
- private QuotaLimitTypes limitType;
-
- /**
- * Get the value property: The quota/limit value.
- *
- * @return the value value.
- */
- public int value() {
- return this.value;
- }
-
- /**
- * Set the value property: The quota/limit value.
- *
- * @param value the value value to set.
- * @return the LimitValue object itself.
- */
- public LimitValue withValue(int value) {
- this.value = value;
- return this;
- }
-
- /**
- * Get the limitObjectType property: The limit object type.
- *
- * @return the limitObjectType value.
- */
- public LimitType limitObjectType() {
- return this.limitObjectType;
- }
-
- /**
- * Set the limitObjectType property: The limit object type.
- *
- * @param limitObjectType the limitObjectType value to set.
- * @return the LimitValue object itself.
- */
- public LimitValue withLimitObjectType(LimitType limitObjectType) {
- this.limitObjectType = limitObjectType;
- return this;
- }
-
- /**
- * Get the limitType property: The quota or usages limit types.
- *
- * @return the limitType value.
- */
- public QuotaLimitTypes limitType() {
- return this.limitType;
- }
-
- /**
- * Set the limitType property: The quota or usages limit types.
- *
- * @param limitType the limitType value to set.
- * @return the LimitValue object itself.
- */
- public LimitValue withLimitType(QuotaLimitTypes limitType) {
- this.limitType = limitType;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- super.validate();
- }
-}
diff --git a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/Operations.java b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaOperations.java
similarity index 93%
rename from sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/Operations.java
rename to sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaOperations.java
index 04484ba486ce..d01e7b1164e0 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/Operations.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/main/java/com/azure/resourcemanager/quota/models/QuotaOperations.java
@@ -7,8 +7,8 @@
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
-/** Resource collection API of Operations. */
-public interface Operations {
+/** Resource collection API of QuotaOperations. */
+public interface QuotaOperations {
/**
* List all the operations supported by the Microsoft.Quota resource provider.
*
diff --git a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaCreateOrUpdateSamples.java b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaCreateOrUpdateSamples.java
index 55bd28216b58..2cef6ae485b5 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaCreateOrUpdateSamples.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaCreateOrUpdateSamples.java
@@ -4,8 +4,7 @@
package com.azure.resourcemanager.quota.generated;
-import com.azure.resourcemanager.quota.models.LimitType;
-import com.azure.resourcemanager.quota.models.LimitValue;
+import com.azure.resourcemanager.quota.models.LimitObject;
import com.azure.resourcemanager.quota.models.QuotaProperties;
import com.azure.resourcemanager.quota.models.ResourceName;
@@ -28,7 +27,7 @@ public static void quotasRequestForMachineLearningServicesLowPriorityResource(
"subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.MachineLearningServices/locations/eastus")
.withProperties(
new QuotaProperties()
- .withLimit(new LimitValue().withValue(10).withLimitObjectType(LimitType.LIMIT_VALUE))
+ .withLimit(new LimitObject().withValue(10))
.withName(new ResourceName().withValue("TotalLowPriorityCores"))
.withResourceType("lowPriority"))
.create();
@@ -51,7 +50,7 @@ public static void quotasPutRequestForNetworkStandardSkuPublicIpAddressesResourc
"subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Network/locations/eastus")
.withProperties(
new QuotaProperties()
- .withLimit(new LimitValue().withValue(10).withLimitObjectType(LimitType.LIMIT_VALUE))
+ .withLimit(new LimitObject().withValue(10))
.withName(new ResourceName().withValue("StandardSkuPublicIpAddresses"))
.withResourceType("PublicIpAddresses"))
.create();
@@ -73,7 +72,7 @@ public static void quotasPutRequestForCompute(com.azure.resourcemanager.quota.Qu
"subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Compute/locations/eastus")
.withProperties(
new QuotaProperties()
- .withLimit(new LimitValue().withValue(10).withLimitObjectType(LimitType.LIMIT_VALUE))
+ .withLimit(new LimitObject().withValue(10))
.withName(new ResourceName().withValue("standardFSv2Family")))
.create();
}
@@ -94,7 +93,7 @@ public static void quotasPutRequestForNetwork(com.azure.resourcemanager.quota.Qu
"subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Network/locations/eastus")
.withProperties(
new QuotaProperties()
- .withLimit(new LimitValue().withValue(10).withLimitObjectType(LimitType.LIMIT_VALUE))
+ .withLimit(new LimitObject().withValue(10))
.withName(new ResourceName().withValue("MinPublicIpInterNetworkPrefixLength"))
.withResourceType("MinPublicIpInterNetworkPrefixLength"))
.create();
diff --git a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/OperationListSamples.java b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaOperationListSamples.java
similarity index 81%
rename from sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/OperationListSamples.java
rename to sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaOperationListSamples.java
index 8c88be8bc74e..7d8527573653 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/OperationListSamples.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaOperationListSamples.java
@@ -6,8 +6,8 @@
import com.azure.core.util.Context;
-/** Samples for Operation List. */
-public final class OperationListSamples {
+/** Samples for QuotaOperation List. */
+public final class QuotaOperationListSamples {
/*
* x-ms-original-file: specification/quota/resource-manager/Microsoft.Quota/preview/2021-03-15-preview/examples/GetOperations.json
*/
@@ -17,6 +17,6 @@ public final class OperationListSamples {
* @param manager Entry point to QuotaManager.
*/
public static void getOperations(com.azure.resourcemanager.quota.QuotaManager manager) {
- manager.operations().list(Context.NONE);
+ manager.quotaOperations().list(Context.NONE);
}
}
diff --git a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaUpdateSamples.java b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaUpdateSamples.java
index bfd7e66d480b..e6538690856c 100644
--- a/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaUpdateSamples.java
+++ b/sdk/quota/azure-resourcemanager-quota/src/samples/java/com/azure/resourcemanager/quota/generated/QuotaUpdateSamples.java
@@ -6,8 +6,7 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.quota.models.CurrentQuotaLimitBase;
-import com.azure.resourcemanager.quota.models.LimitType;
-import com.azure.resourcemanager.quota.models.LimitValue;
+import com.azure.resourcemanager.quota.models.LimitObject;
import com.azure.resourcemanager.quota.models.QuotaProperties;
import com.azure.resourcemanager.quota.models.ResourceName;
@@ -34,7 +33,7 @@ public static void quotasRequestPatchForCompute(com.azure.resourcemanager.quota.
.update()
.withProperties(
new QuotaProperties()
- .withLimit(new LimitValue().withValue(10).withLimitObjectType(LimitType.LIMIT_VALUE))
+ .withLimit(new LimitObject().withValue(10))
.withName(new ResourceName().withValue("standardFSv2Family")))
.apply();
}
@@ -60,7 +59,7 @@ public static void quotasRequestPatchForNetwork(com.azure.resourcemanager.quota.
.update()
.withProperties(
new QuotaProperties()
- .withLimit(new LimitValue().withValue(10).withLimitObjectType(LimitType.LIMIT_VALUE))
+ .withLimit(new LimitObject().withValue(10))
.withName(new ResourceName().withValue("MinPublicIpInterNetworkPrefixLength"))
.withResourceType("MinPublicIpInterNetworkPrefixLength"))
.apply();