From 756a1e3bdb0d310f71212bf9c2695865b7d0e0d1 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Tue, 31 Mar 2026 16:55:40 +0000 Subject: [PATCH 1/3] Configurations: 'specification/computelimit/resource-manager/Microsoft.ComputeLimit/ComputeLimit/tspconfig.yaml', API Version: 2026-03-20, SDK Release Type: stable, and CommitSHA: 'a83147fe12aece4ded0bd96be212e5242e087cb9' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6087535 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- eng/versioning/version_client.txt | 2 +- .../CHANGELOG.md | 18 +- .../README.md | 4 +- .../SAMPLE.md | 99 +++- .../pom.xml | 7 +- .../computelimit/ComputeLimitManager.java | 16 + .../fluent/ComputeLimitClient.java | 7 + .../computelimit/fluent/FeaturesClient.java | 128 +++++ .../fluent/models/FeatureInner.java | 144 +++++ .../models/OperationStatusResultInner.java | 222 ++++++++ .../ComputeLimitClientImpl.java | 18 +- .../implementation/FeatureImpl.java | 49 ++ .../implementation/FeaturesClientImpl.java | 527 ++++++++++++++++++ .../implementation/FeaturesImpl.java | 82 +++ .../OperationStatusResultImpl.java | 76 +++ .../models/FeatureListResult.java | 95 ++++ .../computelimit/models/Feature.java | 55 ++ .../models/FeatureProperties.java | 91 +++ .../computelimit/models/FeatureState.java | 51 ++ .../computelimit/models/Features.java | 87 +++ .../models/OperationStatusResult.java | 86 +++ ...resourcemanager-computelimit_metadata.json | 2 +- .../proxy-config.json | 2 +- .../generated/FeaturesEnableSamples.java | 22 + .../generated/FeaturesGetSamples.java | 34 ++ ...BySubscriptionLocationResourceSamples.java | 22 + .../GuestSubscriptionsCreateSamples.java | 2 +- .../GuestSubscriptionsDeleteSamples.java | 2 +- .../GuestSubscriptionsGetSamples.java | 2 +- ...BySubscriptionLocationResourceSamples.java | 2 +- .../generated/OperationsListSamples.java | 2 +- .../generated/SharedLimitsCreateSamples.java | 2 +- .../generated/SharedLimitsDeleteSamples.java | 2 +- .../generated/SharedLimitsGetSamples.java | 2 +- ...BySubscriptionLocationResourceSamples.java | 2 +- .../generated/FeatureInnerTests.java | 20 + .../generated/FeatureListResultTests.java | 21 + .../generated/FeaturePropertiesTests.java | 19 + .../FeaturesGetWithResponseMockTests.java | 39 ++ ...SubscriptionLocationResourceMockTests.java | 40 ++ ...scriptionsCreateWithResponseMockTests.java | 6 +- ...eByResourceGroupWithResponseMockTests.java | 2 +- ...SubscriptionsGetWithResponseMockTests.java | 4 +- ...SubscriptionLocationResourceMockTests.java | 4 +- .../generated/OperationsListMockTests.java | 2 +- ...aredLimitsCreateWithResponseMockTests.java | 6 +- ...eByResourceGroupWithResponseMockTests.java | 3 +- .../SharedLimitsGetWithResponseMockTests.java | 4 +- ...SubscriptionLocationResourceMockTests.java | 4 +- .../tsp-location.yaml | 2 +- 50 files changed, 2090 insertions(+), 50 deletions(-) create mode 100644 sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/fluent/FeaturesClient.java create mode 100644 sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/fluent/models/FeatureInner.java create mode 100644 sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/fluent/models/OperationStatusResultInner.java create mode 100644 sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/FeatureImpl.java create mode 100644 sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/FeaturesClientImpl.java create mode 100644 sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/FeaturesImpl.java create mode 100644 sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/OperationStatusResultImpl.java create mode 100644 sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/models/FeatureListResult.java create mode 100644 sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/models/Feature.java create mode 100644 sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/models/FeatureProperties.java create mode 100644 sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/models/FeatureState.java create mode 100644 sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/models/Features.java create mode 100644 sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/models/OperationStatusResult.java create mode 100644 sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/FeaturesEnableSamples.java create mode 100644 sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/FeaturesGetSamples.java create mode 100644 sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/FeaturesListBySubscriptionLocationResourceSamples.java create mode 100644 sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/FeatureInnerTests.java create mode 100644 sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/FeatureListResultTests.java create mode 100644 sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/FeaturePropertiesTests.java create mode 100644 sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/FeaturesGetWithResponseMockTests.java create mode 100644 sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/FeaturesListBySubscriptionLocationResourceMockTests.java diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 3a1a23875c27..fa0f59d04062 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -515,7 +515,7 @@ com.azure.resourcemanager:azure-resourcemanager-azurestackhci-vm;1.0.0-beta.1;1. com.azure.resourcemanager:azure-resourcemanager-workloadorchestration;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-disconnectedoperations;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-compute-recommender;1.0.0-beta.1;1.0.0-beta.2 -com.azure.resourcemanager:azure-resourcemanager-computelimit;1.0.0-beta.1;1.0.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-computelimit;1.0.0-beta.1;1.0.0 com.azure.resourcemanager:azure-resourcemanager-containerregistry-tasks;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-virtualenclaves;1.0.0-beta.1;1.0.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-edgeactions;1.0.0-beta.1;1.0.0-beta.2 diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/CHANGELOG.md b/sdk/computelimit/azure-resourcemanager-computelimit/CHANGELOG.md index 3dc86eb03faf..8df04d79b441 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/CHANGELOG.md +++ b/sdk/computelimit/azure-resourcemanager-computelimit/CHANGELOG.md @@ -1,14 +1,24 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0 (2026-03-31) + +- Azure Resource Manager ComputeLimit client library for Java. This package contains Microsoft Azure SDK for ComputeLimit Management SDK. Microsoft Azure Compute Limit Resource Provider. Package api-version 2026-03-20. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added -### Breaking Changes +* `models.OperationStatusResult` was added + +* `models.FeatureProperties` was added + +* `models.Feature` was added + +* `models.FeatureState` was added + +* `models.Features` was added -### Bugs Fixed +#### `ComputeLimitManager` was modified -### Other Changes +* `features()` was added ## 1.0.0-beta.1 (2025-11-12) diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/README.md b/sdk/computelimit/azure-resourcemanager-computelimit/README.md index 79f527144d67..5446cf045d74 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/README.md +++ b/sdk/computelimit/azure-resourcemanager-computelimit/README.md @@ -2,7 +2,7 @@ Azure Resource Manager ComputeLimit client library for Java. -This package contains Microsoft Azure SDK for ComputeLimit Management SDK. Microsoft Azure Compute Limit Resource Provider. Package api-version 2025-08-15. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for ComputeLimit Management SDK. Microsoft Azure Compute Limit Resource Provider. Package api-version 2026-03-20. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-computelimit - 1.0.0-beta.1 + 1.0.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/SAMPLE.md b/sdk/computelimit/azure-resourcemanager-computelimit/SAMPLE.md index ab824a3708d1..0df67fef22c3 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/SAMPLE.md +++ b/sdk/computelimit/azure-resourcemanager-computelimit/SAMPLE.md @@ -1,6 +1,12 @@ # Code snippets and samples +## Features + +- [Enable](#features_enable) +- [Get](#features_get) +- [ListBySubscriptionLocationResource](#features_listbysubscriptionlocationresource) + ## GuestSubscriptions - [Create](#guestsubscriptions_create) @@ -18,6 +24,81 @@ - [Delete](#sharedlimits_delete) - [Get](#sharedlimits_get) - [ListBySubscriptionLocationResource](#sharedlimits_listbysubscriptionlocationresource) +### Features_Enable + +```java +/** + * Samples for Features Enable. + */ +public final class FeaturesEnableSamples { + /* + * x-ms-original-file: 2026-03-20/Features_Enable.json + */ + /** + * Sample code: Enable feature. + * + * @param manager Entry point to ComputeLimitManager. + */ + public static void enableFeature(com.azure.resourcemanager.computelimit.ComputeLimitManager manager) { + manager.features().enable("eastus", "VmCategoryQuota", com.azure.core.util.Context.NONE); + } +} +``` + +### Features_Get + +```java +/** + * Samples for Features Get. + */ +public final class FeaturesGetSamples { + /* + * x-ms-original-file: 2026-03-20/Features_Get_SharedLimit.json + */ + /** + * Sample code: Get SharedLimit feature. + * + * @param manager Entry point to ComputeLimitManager. + */ + public static void getSharedLimitFeature(com.azure.resourcemanager.computelimit.ComputeLimitManager manager) { + manager.features().getWithResponse("eastus", "SharedLimit", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-03-20/Features_Get.json + */ + /** + * Sample code: Get feature. + * + * @param manager Entry point to ComputeLimitManager. + */ + public static void getFeature(com.azure.resourcemanager.computelimit.ComputeLimitManager manager) { + manager.features().getWithResponse("eastus", "VmCategoryQuota", com.azure.core.util.Context.NONE); + } +} +``` + +### Features_ListBySubscriptionLocationResource + +```java +/** + * Samples for Features ListBySubscriptionLocationResource. + */ +public final class FeaturesListBySubscriptionLocationResourceSamples { + /* + * x-ms-original-file: 2026-03-20/Features_List.json + */ + /** + * Sample code: List features. + * + * @param manager Entry point to ComputeLimitManager. + */ + public static void listFeatures(com.azure.resourcemanager.computelimit.ComputeLimitManager manager) { + manager.features().listBySubscriptionLocationResource("eastus", com.azure.core.util.Context.NONE); + } +} +``` + ### GuestSubscriptions_Create ```java @@ -28,7 +109,7 @@ import com.azure.resourcemanager.computelimit.models.GuestSubscriptionProperties */ public final class GuestSubscriptionsCreateSamples { /* - * x-ms-original-file: 2025-08-15/GuestSubscriptions_Create.json + * x-ms-original-file: 2026-03-20/GuestSubscriptions_Create.json */ /** * Sample code: Create a guest subscription. @@ -53,7 +134,7 @@ public final class GuestSubscriptionsCreateSamples { */ public final class GuestSubscriptionsDeleteSamples { /* - * x-ms-original-file: 2025-08-15/GuestSubscriptions_Delete.json + * x-ms-original-file: 2026-03-20/GuestSubscriptions_Delete.json */ /** * Sample code: Delete a guest subscription. @@ -76,7 +157,7 @@ public final class GuestSubscriptionsDeleteSamples { */ public final class GuestSubscriptionsGetSamples { /* - * x-ms-original-file: 2025-08-15/GuestSubscriptions_Get.json + * x-ms-original-file: 2026-03-20/GuestSubscriptions_Get.json */ /** * Sample code: Get a guest subscription. @@ -98,7 +179,7 @@ public final class GuestSubscriptionsGetSamples { */ public final class GuestSubscriptionsListBySubscriptionLocationResourceSamples { /* - * x-ms-original-file: 2025-08-15/GuestSubscriptions_List.json + * x-ms-original-file: 2026-03-20/GuestSubscriptions_List.json */ /** * Sample code: List guest subscriptions for a scope. @@ -120,7 +201,7 @@ public final class GuestSubscriptionsListBySubscriptionLocationResourceSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: 2025-08-15/Operations_List.json + * x-ms-original-file: 2026-03-20/Operations_List.json */ /** * Sample code: List operations. @@ -143,7 +224,7 @@ import com.azure.resourcemanager.computelimit.models.SharedLimitProperties; */ public final class SharedLimitsCreateSamples { /* - * x-ms-original-file: 2025-08-15/SharedLimits_Create.json + * x-ms-original-file: 2026-03-20/SharedLimits_Create.json */ /** * Sample code: Create a shared limit. @@ -168,7 +249,7 @@ public final class SharedLimitsCreateSamples { */ public final class SharedLimitsDeleteSamples { /* - * x-ms-original-file: 2025-08-15/SharedLimits_Delete.json + * x-ms-original-file: 2026-03-20/SharedLimits_Delete.json */ /** * Sample code: Delete a shared limit. @@ -190,7 +271,7 @@ public final class SharedLimitsDeleteSamples { */ public final class SharedLimitsGetSamples { /* - * x-ms-original-file: 2025-08-15/SharedLimits_Get.json + * x-ms-original-file: 2026-03-20/SharedLimits_Get.json */ /** * Sample code: Get a shared limit. @@ -211,7 +292,7 @@ public final class SharedLimitsGetSamples { */ public final class SharedLimitsListBySubscriptionLocationResourceSamples { /* - * x-ms-original-file: 2025-08-15/SharedLimits_List.json + * x-ms-original-file: 2026-03-20/SharedLimits_List.json */ /** * Sample code: List all shared limits for a scope. diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/pom.xml b/sdk/computelimit/azure-resourcemanager-computelimit/pom.xml index da4195b97a51..cb866e07553b 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/pom.xml +++ b/sdk/computelimit/azure-resourcemanager-computelimit/pom.xml @@ -3,7 +3,7 @@ ~ Licensed under the MIT License. ~ Code generated by Microsoft (R) TypeSpec Code Generator. --> - + 4.0.0 com.azure @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-computelimit - 1.0.0-beta.2 + 1.0.0 jar Microsoft Azure SDK for ComputeLimit Management - This package contains Microsoft Azure SDK for ComputeLimit Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft Azure Compute Limit Resource Provider. Package api-version 2025-08-15. + This package contains Microsoft Azure SDK for ComputeLimit Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft Azure Compute Limit Resource Provider. Package api-version 2026-03-20. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,6 @@ UTF-8 0 0 - true diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/ComputeLimitManager.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/ComputeLimitManager.java index b77ac1d00a54..9345f23370ce 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/ComputeLimitManager.java +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/ComputeLimitManager.java @@ -26,9 +26,11 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.computelimit.fluent.ComputeLimitClient; import com.azure.resourcemanager.computelimit.implementation.ComputeLimitClientBuilder; +import com.azure.resourcemanager.computelimit.implementation.FeaturesImpl; import com.azure.resourcemanager.computelimit.implementation.GuestSubscriptionsImpl; import com.azure.resourcemanager.computelimit.implementation.OperationsImpl; import com.azure.resourcemanager.computelimit.implementation.SharedLimitsImpl; +import com.azure.resourcemanager.computelimit.models.Features; import com.azure.resourcemanager.computelimit.models.GuestSubscriptions; import com.azure.resourcemanager.computelimit.models.Operations; import com.azure.resourcemanager.computelimit.models.SharedLimits; @@ -51,6 +53,8 @@ public final class ComputeLimitManager { private SharedLimits sharedLimits; + private Features features; + private final ComputeLimitClient clientObject; private ComputeLimitManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -302,6 +306,18 @@ public SharedLimits sharedLimits() { return sharedLimits; } + /** + * Gets the resource collection API of Features. + * + * @return Resource collection API of Features. + */ + public Features features() { + if (this.features == null) { + this.features = new FeaturesImpl(clientObject.getFeatures(), this); + } + return features; + } + /** * Gets wrapped service client ComputeLimitClient providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/fluent/ComputeLimitClient.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/fluent/ComputeLimitClient.java index bcfdb86405c1..33c8b275c29b 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/fluent/ComputeLimitClient.java +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/fluent/ComputeLimitClient.java @@ -66,4 +66,11 @@ public interface ComputeLimitClient { * @return the SharedLimitsClient object. */ SharedLimitsClient getSharedLimits(); + + /** + * Gets the FeaturesClient object to access its operations. + * + * @return the FeaturesClient object. + */ + FeaturesClient getFeatures(); } diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/fluent/FeaturesClient.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/fluent/FeaturesClient.java new file mode 100644 index 000000000000..12161abab3f4 --- /dev/null +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/fluent/FeaturesClient.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computelimit.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.computelimit.fluent.models.FeatureInner; +import com.azure.resourcemanager.computelimit.fluent.models.OperationStatusResultInner; + +/** + * An instance of this class provides access to all the operations defined in FeaturesClient. + */ +public interface FeaturesClient { + /** + * Gets the properties of a compute limit feature. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @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 properties of a compute limit feature along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String featureName, Context context); + + /** + * Gets the properties of a compute limit feature. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @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 properties of a compute limit feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FeatureInner get(String location, String featureName); + + /** + * Lists all compute limit features for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @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 of a Feature list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySubscriptionLocationResource(String location); + + /** + * Lists all compute limit features for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @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 of a Feature list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySubscriptionLocationResource(String location, Context context); + + /** + * Enables a compute limit feature for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusResultInner> beginEnable(String location, + String featureName); + + /** + * Enables a compute limit feature for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusResultInner> beginEnable(String location, + String featureName, Context context); + + /** + * Enables a compute limit feature for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @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) + OperationStatusResultInner enable(String location, String featureName); + + /** + * Enables a compute limit feature for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @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) + OperationStatusResultInner enable(String location, String featureName, Context context); +} diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/fluent/models/FeatureInner.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/fluent/models/FeatureInner.java new file mode 100644 index 000000000000..1ba75e3bb263 --- /dev/null +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/fluent/models/FeatureInner.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computelimit.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.computelimit.models.FeatureProperties; +import java.io.IOException; + +/** + * Compute limit feature. + */ +@Immutable +public final class FeatureInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private FeatureProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of FeatureInner class. + */ + private FeatureInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public FeatureProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FeatureInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FeatureInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the FeatureInner. + */ + public static FeatureInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FeatureInner deserializedFeatureInner = new FeatureInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedFeatureInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedFeatureInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedFeatureInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedFeatureInner.properties = FeatureProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedFeatureInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFeatureInner; + }); + } +} diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/fluent/models/OperationStatusResultInner.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/fluent/models/OperationStatusResultInner.java new file mode 100644 index 000000000000..1a56f31a1aa5 --- /dev/null +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/fluent/models/OperationStatusResultInner.java @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computelimit.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The current status of an async operation. + */ +@Immutable +public final class OperationStatusResultInner implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /** + * Creates an instance of OperationStatusResultInner class. + */ + private OperationStatusResultInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationStatusResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationStatusResultInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OperationStatusResultInner. + */ + public static OperationStatusResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationStatusResultInner deserializedOperationStatusResultInner = new OperationStatusResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedOperationStatusResultInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedOperationStatusResultInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedOperationStatusResultInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedOperationStatusResultInner.percentComplete = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedOperationStatusResultInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedOperationStatusResultInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedOperationStatusResultInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedOperationStatusResultInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedOperationStatusResultInner.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationStatusResultInner; + }); + } +} diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/ComputeLimitClientImpl.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/ComputeLimitClientImpl.java index 05db610b8e1a..4a8a8f991e99 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/ComputeLimitClientImpl.java +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/ComputeLimitClientImpl.java @@ -27,6 +27,7 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.computelimit.fluent.ComputeLimitClient; +import com.azure.resourcemanager.computelimit.fluent.FeaturesClient; import com.azure.resourcemanager.computelimit.fluent.GuestSubscriptionsClient; import com.azure.resourcemanager.computelimit.fluent.OperationsClient; import com.azure.resourcemanager.computelimit.fluent.SharedLimitsClient; @@ -170,6 +171,20 @@ public SharedLimitsClient getSharedLimits() { return this.sharedLimits; } + /** + * The FeaturesClient object to access its operations. + */ + private final FeaturesClient features; + + /** + * Gets the FeaturesClient object to access its operations. + * + * @return the FeaturesClient object. + */ + public FeaturesClient getFeatures() { + return this.features; + } + /** * Initializes an instance of ComputeLimitClient client. * @@ -187,10 +202,11 @@ public SharedLimitsClient getSharedLimits() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2025-08-15"; + this.apiVersion = "2026-03-20"; this.operations = new OperationsClientImpl(this); this.guestSubscriptions = new GuestSubscriptionsClientImpl(this); this.sharedLimits = new SharedLimitsClientImpl(this); + this.features = new FeaturesClientImpl(this); } /** diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/FeatureImpl.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/FeatureImpl.java new file mode 100644 index 000000000000..443df7872e55 --- /dev/null +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/FeatureImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computelimit.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.computelimit.fluent.models.FeatureInner; +import com.azure.resourcemanager.computelimit.models.Feature; +import com.azure.resourcemanager.computelimit.models.FeatureProperties; + +public final class FeatureImpl implements Feature { + private FeatureInner innerObject; + + private final com.azure.resourcemanager.computelimit.ComputeLimitManager serviceManager; + + FeatureImpl(FeatureInner innerObject, com.azure.resourcemanager.computelimit.ComputeLimitManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public FeatureProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public FeatureInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.computelimit.ComputeLimitManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/FeaturesClientImpl.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/FeaturesClientImpl.java new file mode 100644 index 000000000000..2ad8413ccaef --- /dev/null +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/FeaturesClientImpl.java @@ -0,0 +1,527 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computelimit.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.computelimit.fluent.FeaturesClient; +import com.azure.resourcemanager.computelimit.fluent.models.FeatureInner; +import com.azure.resourcemanager.computelimit.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.computelimit.implementation.models.FeatureListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in FeaturesClient. + */ +public final class FeaturesClientImpl implements FeaturesClient { + /** + * The proxy service used to perform REST calls. + */ + private final FeaturesService service; + + /** + * The service client containing this operation class. + */ + private final ComputeLimitClientImpl client; + + /** + * Initializes an instance of FeaturesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + FeaturesClientImpl(ComputeLimitClientImpl client) { + this.service = RestProxy.create(FeaturesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ComputeLimitClientFeatures to be used by the proxy service to perform + * REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ComputeLimitClientFeatures") + public interface FeaturesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/features/{featureName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("featureName") String featureName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/features/{featureName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("featureName") String featureName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/features") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionLocationResource(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/features") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionLocationResourceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/features/{featureName}/enable") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> enable(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("featureName") String featureName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/features/{featureName}/enable") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response enableSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("featureName") String featureName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionLocationResourceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionLocationResourceNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the properties of a compute limit feature. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @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 properties of a compute limit feature along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, String featureName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, featureName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the properties of a compute limit feature. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @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 properties of a compute limit feature on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String location, String featureName) { + return getWithResponseAsync(location, featureName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the properties of a compute limit feature. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @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 properties of a compute limit feature along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, String featureName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, featureName, accept, context); + } + + /** + * Gets the properties of a compute limit feature. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @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 properties of a compute limit feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FeatureInner get(String location, String featureName) { + return getWithResponse(location, featureName, Context.NONE).getValue(); + } + + /** + * Lists all compute limit features for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @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 of a Feature list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionLocationResourceSinglePageAsync(String location) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listBySubscriptionLocationResource(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all compute limit features for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @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 of a Feature list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBySubscriptionLocationResourceAsync(String location) { + return new PagedFlux<>(() -> listBySubscriptionLocationResourceSinglePageAsync(location), + nextLink -> listBySubscriptionLocationResourceNextSinglePageAsync(nextLink)); + } + + /** + * Lists all compute limit features for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @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 of a Feature list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionLocationResourceSinglePage(String location) { + final String accept = "application/json"; + Response res = service.listBySubscriptionLocationResourceSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all compute limit features for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @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 of a Feature list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionLocationResourceSinglePage(String location, Context context) { + final String accept = "application/json"; + Response res = service.listBySubscriptionLocationResourceSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all compute limit features for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @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 of a Feature list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySubscriptionLocationResource(String location) { + return new PagedIterable<>(() -> listBySubscriptionLocationResourceSinglePage(location), + nextLink -> listBySubscriptionLocationResourceNextSinglePage(nextLink)); + } + + /** + * Lists all compute limit features for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @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 of a Feature list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySubscriptionLocationResource(String location, Context context) { + return new PagedIterable<>(() -> listBySubscriptionLocationResourceSinglePage(location, context), + nextLink -> listBySubscriptionLocationResourceNextSinglePage(nextLink, context)); + } + + /** + * Enables a compute limit feature for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @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 body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> enableWithResponseAsync(String location, String featureName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.enable(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, featureName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Enables a compute limit feature for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @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 body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response enableWithResponse(String location, String featureName) { + final String accept = "application/json"; + return service.enableSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, featureName, accept, Context.NONE); + } + + /** + * Enables a compute limit feature for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @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 body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response enableWithResponse(String location, String featureName, Context context) { + final String accept = "application/json"; + return service.enableSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, featureName, accept, context); + } + + /** + * Enables a compute limit feature for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResultInner> + beginEnableAsync(String location, String featureName) { + Mono>> mono = enableWithResponseAsync(location, featureName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationStatusResultInner.class, OperationStatusResultInner.class, + this.client.getContext()); + } + + /** + * Enables a compute limit feature for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> beginEnable(String location, + String featureName) { + Response response = enableWithResponse(location, featureName); + return this.client.getLroResult(response, + OperationStatusResultInner.class, OperationStatusResultInner.class, Context.NONE); + } + + /** + * Enables a compute limit feature for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> beginEnable(String location, + String featureName, Context context) { + Response response = enableWithResponse(location, featureName, context); + return this.client.getLroResult(response, + OperationStatusResultInner.class, OperationStatusResultInner.class, context); + } + + /** + * Enables a compute limit feature for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @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 body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono enableAsync(String location, String featureName) { + return beginEnableAsync(location, featureName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Enables a compute limit feature for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @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 OperationStatusResultInner enable(String location, String featureName) { + return beginEnable(location, featureName).getFinalResult(); + } + + /** + * Enables a compute limit feature for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @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 OperationStatusResultInner enable(String location, String featureName, Context context) { + return beginEnable(location, featureName, context).getFinalResult(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Feature list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionLocationResourceNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listBySubscriptionLocationResourceNext(nextLink, this.client.getEndpoint(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Feature list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionLocationResourceNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res = service.listBySubscriptionLocationResourceNextSync(nextLink, + this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Feature list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionLocationResourceNextSinglePage(String nextLink, + Context context) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionLocationResourceNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/FeaturesImpl.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/FeaturesImpl.java new file mode 100644 index 000000000000..37c2b66ddca5 --- /dev/null +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/FeaturesImpl.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computelimit.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.computelimit.fluent.FeaturesClient; +import com.azure.resourcemanager.computelimit.fluent.models.FeatureInner; +import com.azure.resourcemanager.computelimit.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.computelimit.models.Feature; +import com.azure.resourcemanager.computelimit.models.Features; +import com.azure.resourcemanager.computelimit.models.OperationStatusResult; + +public final class FeaturesImpl implements Features { + private static final ClientLogger LOGGER = new ClientLogger(FeaturesImpl.class); + + private final FeaturesClient innerClient; + + private final com.azure.resourcemanager.computelimit.ComputeLimitManager serviceManager; + + public FeaturesImpl(FeaturesClient innerClient, + com.azure.resourcemanager.computelimit.ComputeLimitManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String location, String featureName, Context context) { + Response inner = this.serviceClient().getWithResponse(location, featureName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new FeatureImpl(inner.getValue(), this.manager())); + } + + public Feature get(String location, String featureName) { + FeatureInner inner = this.serviceClient().get(location, featureName); + if (inner != null) { + return new FeatureImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listBySubscriptionLocationResource(String location) { + PagedIterable inner = this.serviceClient().listBySubscriptionLocationResource(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FeatureImpl(inner1, this.manager())); + } + + public PagedIterable listBySubscriptionLocationResource(String location, Context context) { + PagedIterable inner = this.serviceClient().listBySubscriptionLocationResource(location, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FeatureImpl(inner1, this.manager())); + } + + public OperationStatusResult enable(String location, String featureName) { + OperationStatusResultInner inner = this.serviceClient().enable(location, featureName); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public OperationStatusResult enable(String location, String featureName, Context context) { + OperationStatusResultInner inner = this.serviceClient().enable(location, featureName, context); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + + private FeaturesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.computelimit.ComputeLimitManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/OperationStatusResultImpl.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/OperationStatusResultImpl.java new file mode 100644 index 000000000000..1d0de8494c05 --- /dev/null +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/OperationStatusResultImpl.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computelimit.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.computelimit.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.computelimit.models.OperationStatusResult; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class OperationStatusResultImpl implements OperationStatusResult { + private OperationStatusResultInner innerObject; + + private final com.azure.resourcemanager.computelimit.ComputeLimitManager serviceManager; + + OperationStatusResultImpl(OperationStatusResultInner innerObject, + com.azure.resourcemanager.computelimit.ComputeLimitManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List operations() { + List inner = this.innerModel().operations(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new OperationStatusResultImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public OperationStatusResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.computelimit.ComputeLimitManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/models/FeatureListResult.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/models/FeatureListResult.java new file mode 100644 index 000000000000..1340ec770a95 --- /dev/null +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/implementation/models/FeatureListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computelimit.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.computelimit.fluent.models.FeatureInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a Feature list operation. + */ +@Immutable +public final class FeatureListResult implements JsonSerializable { + /* + * The Feature items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of FeatureListResult class. + */ + private FeatureListResult() { + } + + /** + * Get the value property: The Feature items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FeatureListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FeatureListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the FeatureListResult. + */ + public static FeatureListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FeatureListResult deserializedFeatureListResult = new FeatureListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> FeatureInner.fromJson(reader1)); + deserializedFeatureListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedFeatureListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedFeatureListResult; + }); + } +} diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/models/Feature.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/models/Feature.java new file mode 100644 index 000000000000..366256897764 --- /dev/null +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/models/Feature.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computelimit.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.computelimit.fluent.models.FeatureInner; + +/** + * An immutable client-side representation of Feature. + */ +public interface Feature { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + FeatureProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.computelimit.fluent.models.FeatureInner object. + * + * @return the inner object. + */ + FeatureInner innerModel(); +} diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/models/FeatureProperties.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/models/FeatureProperties.java new file mode 100644 index 000000000000..dbbefaf48ed0 --- /dev/null +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/models/FeatureProperties.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computelimit.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Properties of the compute limit feature. + */ +@Immutable +public final class FeatureProperties implements JsonSerializable { + /* + * The current state of the feature (for example, Enabled, Disabled). + */ + private FeatureState state; + + /* + * The provisioning state of the resource. + */ + private ResourceProvisioningState provisioningState; + + /** + * Creates an instance of FeatureProperties class. + */ + private FeatureProperties() { + } + + /** + * Get the state property: The current state of the feature (for example, Enabled, Disabled). + * + * @return the state value. + */ + public FeatureState state() { + return this.state; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FeatureProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FeatureProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the FeatureProperties. + */ + public static FeatureProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FeatureProperties deserializedFeatureProperties = new FeatureProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedFeatureProperties.state = FeatureState.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedFeatureProperties.provisioningState + = ResourceProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedFeatureProperties; + }); + } +} diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/models/FeatureState.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/models/FeatureState.java new file mode 100644 index 000000000000..c16cdcb7e15b --- /dev/null +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/models/FeatureState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computelimit.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The allowed states for a compute limit feature. + */ +public final class FeatureState extends ExpandableStringEnum { + /** + * The feature is enabled. + */ + public static final FeatureState ENABLED = fromString("Enabled"); + + /** + * The feature is disabled. + */ + public static final FeatureState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of FeatureState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FeatureState() { + } + + /** + * Creates or finds a FeatureState from its string representation. + * + * @param name a name to look for. + * @return the corresponding FeatureState. + */ + public static FeatureState fromString(String name) { + return fromString(name, FeatureState.class); + } + + /** + * Gets known FeatureState values. + * + * @return known FeatureState values. + */ + public static Collection values() { + return values(FeatureState.class); + } +} diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/models/Features.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/models/Features.java new file mode 100644 index 000000000000..de15bf34e387 --- /dev/null +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/models/Features.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computelimit.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Features. + */ +public interface Features { + /** + * Gets the properties of a compute limit feature. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @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 properties of a compute limit feature along with {@link Response}. + */ + Response getWithResponse(String location, String featureName, Context context); + + /** + * Gets the properties of a compute limit feature. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @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 properties of a compute limit feature. + */ + Feature get(String location, String featureName); + + /** + * Lists all compute limit features for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @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 of a Feature list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listBySubscriptionLocationResource(String location); + + /** + * Lists all compute limit features for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @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 of a Feature list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listBySubscriptionLocationResource(String location, Context context); + + /** + * Enables a compute limit feature for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @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. + */ + OperationStatusResult enable(String location, String featureName); + + /** + * Enables a compute limit feature for the subscription at the specified location. + * + * @param location The name of the Azure region. + * @param featureName The name of the Feature. + * @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. + */ + OperationStatusResult enable(String location, String featureName, Context context); +} diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/models/OperationStatusResult.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/models/OperationStatusResult.java new file mode 100644 index 000000000000..0d1e6bdc4de6 --- /dev/null +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/java/com/azure/resourcemanager/computelimit/models/OperationStatusResult.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computelimit.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.computelimit.fluent.models.OperationStatusResultInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of OperationStatusResult. + */ +public interface OperationStatusResult { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the operations property: The operations list. + * + * @return the operations value. + */ + List operations(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the inner com.azure.resourcemanager.computelimit.fluent.models.OperationStatusResultInner object. + * + * @return the inner object. + */ + OperationStatusResultInner innerModel(); +} diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/resources/META-INF/azure-resourcemanager-computelimit_metadata.json b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/resources/META-INF/azure-resourcemanager-computelimit_metadata.json index 283fa6ee7bfc..944b0bd2e1bf 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/resources/META-INF/azure-resourcemanager-computelimit_metadata.json +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/resources/META-INF/azure-resourcemanager-computelimit_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"Microsoft.ComputeLimit":"2025-08-15"},"crossLanguageDefinitions":{"com.azure.resourcemanager.computelimit.fluent.ComputeLimitClient":"Microsoft.ComputeLimit","com.azure.resourcemanager.computelimit.fluent.GuestSubscriptionsClient":"Microsoft.ComputeLimit.GuestSubscriptions","com.azure.resourcemanager.computelimit.fluent.GuestSubscriptionsClient.create":"Microsoft.ComputeLimit.GuestSubscriptions.create","com.azure.resourcemanager.computelimit.fluent.GuestSubscriptionsClient.createWithResponse":"Microsoft.ComputeLimit.GuestSubscriptions.create","com.azure.resourcemanager.computelimit.fluent.GuestSubscriptionsClient.delete":"Microsoft.ComputeLimit.GuestSubscriptions.delete","com.azure.resourcemanager.computelimit.fluent.GuestSubscriptionsClient.deleteWithResponse":"Microsoft.ComputeLimit.GuestSubscriptions.delete","com.azure.resourcemanager.computelimit.fluent.GuestSubscriptionsClient.get":"Microsoft.ComputeLimit.GuestSubscriptions.get","com.azure.resourcemanager.computelimit.fluent.GuestSubscriptionsClient.getWithResponse":"Microsoft.ComputeLimit.GuestSubscriptions.get","com.azure.resourcemanager.computelimit.fluent.GuestSubscriptionsClient.listBySubscriptionLocationResource":"Microsoft.ComputeLimit.GuestSubscriptions.listBySubscriptionLocationResource","com.azure.resourcemanager.computelimit.fluent.OperationsClient":"Microsoft.ComputeLimit.Operations","com.azure.resourcemanager.computelimit.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.computelimit.fluent.SharedLimitsClient":"Microsoft.ComputeLimit.SharedLimits","com.azure.resourcemanager.computelimit.fluent.SharedLimitsClient.create":"Microsoft.ComputeLimit.SharedLimits.create","com.azure.resourcemanager.computelimit.fluent.SharedLimitsClient.createWithResponse":"Microsoft.ComputeLimit.SharedLimits.create","com.azure.resourcemanager.computelimit.fluent.SharedLimitsClient.delete":"Microsoft.ComputeLimit.SharedLimits.delete","com.azure.resourcemanager.computelimit.fluent.SharedLimitsClient.deleteWithResponse":"Microsoft.ComputeLimit.SharedLimits.delete","com.azure.resourcemanager.computelimit.fluent.SharedLimitsClient.get":"Microsoft.ComputeLimit.SharedLimits.get","com.azure.resourcemanager.computelimit.fluent.SharedLimitsClient.getWithResponse":"Microsoft.ComputeLimit.SharedLimits.get","com.azure.resourcemanager.computelimit.fluent.SharedLimitsClient.listBySubscriptionLocationResource":"Microsoft.ComputeLimit.SharedLimits.listBySubscriptionLocationResource","com.azure.resourcemanager.computelimit.fluent.models.GuestSubscriptionInner":"Microsoft.ComputeLimit.GuestSubscription","com.azure.resourcemanager.computelimit.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.computelimit.fluent.models.SharedLimitInner":"Microsoft.ComputeLimit.SharedLimit","com.azure.resourcemanager.computelimit.implementation.ComputeLimitClientBuilder":"Microsoft.ComputeLimit","com.azure.resourcemanager.computelimit.implementation.models.GuestSubscriptionListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.computelimit.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.computelimit.implementation.models.SharedLimitListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.computelimit.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.computelimit.models.GuestSubscriptionProperties":"Microsoft.ComputeLimit.GuestSubscriptionProperties","com.azure.resourcemanager.computelimit.models.LimitName":"Microsoft.ComputeLimit.LimitName","com.azure.resourcemanager.computelimit.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.computelimit.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.computelimit.models.ResourceProvisioningState":"Azure.ResourceManager.ResourceProvisioningState","com.azure.resourcemanager.computelimit.models.SharedLimitProperties":"Microsoft.ComputeLimit.SharedLimitProperties"},"generatedFiles":["src/main/java/com/azure/resourcemanager/computelimit/ComputeLimitManager.java","src/main/java/com/azure/resourcemanager/computelimit/fluent/ComputeLimitClient.java","src/main/java/com/azure/resourcemanager/computelimit/fluent/GuestSubscriptionsClient.java","src/main/java/com/azure/resourcemanager/computelimit/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/computelimit/fluent/SharedLimitsClient.java","src/main/java/com/azure/resourcemanager/computelimit/fluent/models/GuestSubscriptionInner.java","src/main/java/com/azure/resourcemanager/computelimit/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/computelimit/fluent/models/SharedLimitInner.java","src/main/java/com/azure/resourcemanager/computelimit/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/computelimit/fluent/package-info.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/ComputeLimitClientBuilder.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/ComputeLimitClientImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/GuestSubscriptionImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/GuestSubscriptionsClientImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/GuestSubscriptionsImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/SharedLimitImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/SharedLimitsClientImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/SharedLimitsImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/models/GuestSubscriptionListResult.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/models/SharedLimitListResult.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/package-info.java","src/main/java/com/azure/resourcemanager/computelimit/models/ActionType.java","src/main/java/com/azure/resourcemanager/computelimit/models/GuestSubscription.java","src/main/java/com/azure/resourcemanager/computelimit/models/GuestSubscriptionProperties.java","src/main/java/com/azure/resourcemanager/computelimit/models/GuestSubscriptions.java","src/main/java/com/azure/resourcemanager/computelimit/models/LimitName.java","src/main/java/com/azure/resourcemanager/computelimit/models/Operation.java","src/main/java/com/azure/resourcemanager/computelimit/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/computelimit/models/Operations.java","src/main/java/com/azure/resourcemanager/computelimit/models/Origin.java","src/main/java/com/azure/resourcemanager/computelimit/models/ResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/computelimit/models/SharedLimit.java","src/main/java/com/azure/resourcemanager/computelimit/models/SharedLimitProperties.java","src/main/java/com/azure/resourcemanager/computelimit/models/SharedLimits.java","src/main/java/com/azure/resourcemanager/computelimit/models/package-info.java","src/main/java/com/azure/resourcemanager/computelimit/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"Microsoft.ComputeLimit":"2026-03-20"},"crossLanguageDefinitions":{"com.azure.resourcemanager.computelimit.fluent.ComputeLimitClient":"Microsoft.ComputeLimit","com.azure.resourcemanager.computelimit.fluent.FeaturesClient":"Microsoft.ComputeLimit.Features","com.azure.resourcemanager.computelimit.fluent.FeaturesClient.beginEnable":"Microsoft.ComputeLimit.Features.enable","com.azure.resourcemanager.computelimit.fluent.FeaturesClient.enable":"Microsoft.ComputeLimit.Features.enable","com.azure.resourcemanager.computelimit.fluent.FeaturesClient.get":"Microsoft.ComputeLimit.Features.get","com.azure.resourcemanager.computelimit.fluent.FeaturesClient.getWithResponse":"Microsoft.ComputeLimit.Features.get","com.azure.resourcemanager.computelimit.fluent.FeaturesClient.listBySubscriptionLocationResource":"Microsoft.ComputeLimit.Features.listBySubscriptionLocationResource","com.azure.resourcemanager.computelimit.fluent.GuestSubscriptionsClient":"Microsoft.ComputeLimit.GuestSubscriptions","com.azure.resourcemanager.computelimit.fluent.GuestSubscriptionsClient.create":"Microsoft.ComputeLimit.GuestSubscriptions.create","com.azure.resourcemanager.computelimit.fluent.GuestSubscriptionsClient.createWithResponse":"Microsoft.ComputeLimit.GuestSubscriptions.create","com.azure.resourcemanager.computelimit.fluent.GuestSubscriptionsClient.delete":"Microsoft.ComputeLimit.GuestSubscriptions.delete","com.azure.resourcemanager.computelimit.fluent.GuestSubscriptionsClient.deleteWithResponse":"Microsoft.ComputeLimit.GuestSubscriptions.delete","com.azure.resourcemanager.computelimit.fluent.GuestSubscriptionsClient.get":"Microsoft.ComputeLimit.GuestSubscriptions.get","com.azure.resourcemanager.computelimit.fluent.GuestSubscriptionsClient.getWithResponse":"Microsoft.ComputeLimit.GuestSubscriptions.get","com.azure.resourcemanager.computelimit.fluent.GuestSubscriptionsClient.listBySubscriptionLocationResource":"Microsoft.ComputeLimit.GuestSubscriptions.listBySubscriptionLocationResource","com.azure.resourcemanager.computelimit.fluent.OperationsClient":"Microsoft.ComputeLimit.Operations","com.azure.resourcemanager.computelimit.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.computelimit.fluent.SharedLimitsClient":"Microsoft.ComputeLimit.SharedLimits","com.azure.resourcemanager.computelimit.fluent.SharedLimitsClient.create":"Microsoft.ComputeLimit.SharedLimits.create","com.azure.resourcemanager.computelimit.fluent.SharedLimitsClient.createWithResponse":"Microsoft.ComputeLimit.SharedLimits.create","com.azure.resourcemanager.computelimit.fluent.SharedLimitsClient.delete":"Microsoft.ComputeLimit.SharedLimits.delete","com.azure.resourcemanager.computelimit.fluent.SharedLimitsClient.deleteWithResponse":"Microsoft.ComputeLimit.SharedLimits.delete","com.azure.resourcemanager.computelimit.fluent.SharedLimitsClient.get":"Microsoft.ComputeLimit.SharedLimits.get","com.azure.resourcemanager.computelimit.fluent.SharedLimitsClient.getWithResponse":"Microsoft.ComputeLimit.SharedLimits.get","com.azure.resourcemanager.computelimit.fluent.SharedLimitsClient.listBySubscriptionLocationResource":"Microsoft.ComputeLimit.SharedLimits.listBySubscriptionLocationResource","com.azure.resourcemanager.computelimit.fluent.models.FeatureInner":"Microsoft.ComputeLimit.Feature","com.azure.resourcemanager.computelimit.fluent.models.GuestSubscriptionInner":"Microsoft.ComputeLimit.GuestSubscription","com.azure.resourcemanager.computelimit.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.computelimit.fluent.models.OperationStatusResultInner":"Azure.ResourceManager.CommonTypes.OperationStatusResult","com.azure.resourcemanager.computelimit.fluent.models.SharedLimitInner":"Microsoft.ComputeLimit.SharedLimit","com.azure.resourcemanager.computelimit.implementation.ComputeLimitClientBuilder":"Microsoft.ComputeLimit","com.azure.resourcemanager.computelimit.implementation.models.FeatureListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.computelimit.implementation.models.GuestSubscriptionListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.computelimit.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.computelimit.implementation.models.SharedLimitListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.computelimit.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.computelimit.models.FeatureProperties":"Microsoft.ComputeLimit.FeatureProperties","com.azure.resourcemanager.computelimit.models.FeatureState":"Microsoft.ComputeLimit.FeatureState","com.azure.resourcemanager.computelimit.models.GuestSubscriptionProperties":"Microsoft.ComputeLimit.GuestSubscriptionProperties","com.azure.resourcemanager.computelimit.models.LimitName":"Microsoft.ComputeLimit.LimitName","com.azure.resourcemanager.computelimit.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.computelimit.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.computelimit.models.ResourceProvisioningState":"Azure.ResourceManager.ResourceProvisioningState","com.azure.resourcemanager.computelimit.models.SharedLimitProperties":"Microsoft.ComputeLimit.SharedLimitProperties"},"generatedFiles":["src/main/java/com/azure/resourcemanager/computelimit/ComputeLimitManager.java","src/main/java/com/azure/resourcemanager/computelimit/fluent/ComputeLimitClient.java","src/main/java/com/azure/resourcemanager/computelimit/fluent/FeaturesClient.java","src/main/java/com/azure/resourcemanager/computelimit/fluent/GuestSubscriptionsClient.java","src/main/java/com/azure/resourcemanager/computelimit/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/computelimit/fluent/SharedLimitsClient.java","src/main/java/com/azure/resourcemanager/computelimit/fluent/models/FeatureInner.java","src/main/java/com/azure/resourcemanager/computelimit/fluent/models/GuestSubscriptionInner.java","src/main/java/com/azure/resourcemanager/computelimit/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/computelimit/fluent/models/OperationStatusResultInner.java","src/main/java/com/azure/resourcemanager/computelimit/fluent/models/SharedLimitInner.java","src/main/java/com/azure/resourcemanager/computelimit/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/computelimit/fluent/package-info.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/ComputeLimitClientBuilder.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/ComputeLimitClientImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/FeatureImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/FeaturesClientImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/FeaturesImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/GuestSubscriptionImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/GuestSubscriptionsClientImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/GuestSubscriptionsImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/OperationStatusResultImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/SharedLimitImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/SharedLimitsClientImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/SharedLimitsImpl.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/models/FeatureListResult.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/models/GuestSubscriptionListResult.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/models/SharedLimitListResult.java","src/main/java/com/azure/resourcemanager/computelimit/implementation/package-info.java","src/main/java/com/azure/resourcemanager/computelimit/models/ActionType.java","src/main/java/com/azure/resourcemanager/computelimit/models/Feature.java","src/main/java/com/azure/resourcemanager/computelimit/models/FeatureProperties.java","src/main/java/com/azure/resourcemanager/computelimit/models/FeatureState.java","src/main/java/com/azure/resourcemanager/computelimit/models/Features.java","src/main/java/com/azure/resourcemanager/computelimit/models/GuestSubscription.java","src/main/java/com/azure/resourcemanager/computelimit/models/GuestSubscriptionProperties.java","src/main/java/com/azure/resourcemanager/computelimit/models/GuestSubscriptions.java","src/main/java/com/azure/resourcemanager/computelimit/models/LimitName.java","src/main/java/com/azure/resourcemanager/computelimit/models/Operation.java","src/main/java/com/azure/resourcemanager/computelimit/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/computelimit/models/OperationStatusResult.java","src/main/java/com/azure/resourcemanager/computelimit/models/Operations.java","src/main/java/com/azure/resourcemanager/computelimit/models/Origin.java","src/main/java/com/azure/resourcemanager/computelimit/models/ResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/computelimit/models/SharedLimit.java","src/main/java/com/azure/resourcemanager/computelimit/models/SharedLimitProperties.java","src/main/java/com/azure/resourcemanager/computelimit/models/SharedLimits.java","src/main/java/com/azure/resourcemanager/computelimit/models/package-info.java","src/main/java/com/azure/resourcemanager/computelimit/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-computelimit/proxy-config.json b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-computelimit/proxy-config.json index 31d42060d9dd..928409118868 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-computelimit/proxy-config.json +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-computelimit/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.computelimit.implementation.GuestSubscriptionsClientImpl$GuestSubscriptionsService"],["com.azure.resourcemanager.computelimit.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.computelimit.implementation.SharedLimitsClientImpl$SharedLimitsService"]] \ No newline at end of file +[["com.azure.resourcemanager.computelimit.implementation.FeaturesClientImpl$FeaturesService"],["com.azure.resourcemanager.computelimit.implementation.GuestSubscriptionsClientImpl$GuestSubscriptionsService"],["com.azure.resourcemanager.computelimit.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.computelimit.implementation.SharedLimitsClientImpl$SharedLimitsService"]] \ No newline at end of file diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/FeaturesEnableSamples.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/FeaturesEnableSamples.java new file mode 100644 index 000000000000..c851da9d48f9 --- /dev/null +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/FeaturesEnableSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computelimit.generated; + +/** + * Samples for Features Enable. + */ +public final class FeaturesEnableSamples { + /* + * x-ms-original-file: 2026-03-20/Features_Enable.json + */ + /** + * Sample code: Enable feature. + * + * @param manager Entry point to ComputeLimitManager. + */ + public static void enableFeature(com.azure.resourcemanager.computelimit.ComputeLimitManager manager) { + manager.features().enable("eastus", "VmCategoryQuota", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/FeaturesGetSamples.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/FeaturesGetSamples.java new file mode 100644 index 000000000000..c66b4467f8b6 --- /dev/null +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/FeaturesGetSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computelimit.generated; + +/** + * Samples for Features Get. + */ +public final class FeaturesGetSamples { + /* + * x-ms-original-file: 2026-03-20/Features_Get_SharedLimit.json + */ + /** + * Sample code: Get SharedLimit feature. + * + * @param manager Entry point to ComputeLimitManager. + */ + public static void getSharedLimitFeature(com.azure.resourcemanager.computelimit.ComputeLimitManager manager) { + manager.features().getWithResponse("eastus", "SharedLimit", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-03-20/Features_Get.json + */ + /** + * Sample code: Get feature. + * + * @param manager Entry point to ComputeLimitManager. + */ + public static void getFeature(com.azure.resourcemanager.computelimit.ComputeLimitManager manager) { + manager.features().getWithResponse("eastus", "VmCategoryQuota", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/FeaturesListBySubscriptionLocationResourceSamples.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/FeaturesListBySubscriptionLocationResourceSamples.java new file mode 100644 index 000000000000..d666a3eb9f52 --- /dev/null +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/FeaturesListBySubscriptionLocationResourceSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computelimit.generated; + +/** + * Samples for Features ListBySubscriptionLocationResource. + */ +public final class FeaturesListBySubscriptionLocationResourceSamples { + /* + * x-ms-original-file: 2026-03-20/Features_List.json + */ + /** + * Sample code: List features. + * + * @param manager Entry point to ComputeLimitManager. + */ + public static void listFeatures(com.azure.resourcemanager.computelimit.ComputeLimitManager manager) { + manager.features().listBySubscriptionLocationResource("eastus", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsCreateSamples.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsCreateSamples.java index f63048609e3f..e55acb66cf8a 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsCreateSamples.java +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsCreateSamples.java @@ -11,7 +11,7 @@ */ public final class GuestSubscriptionsCreateSamples { /* - * x-ms-original-file: 2025-08-15/GuestSubscriptions_Create.json + * x-ms-original-file: 2026-03-20/GuestSubscriptions_Create.json */ /** * Sample code: Create a guest subscription. diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsDeleteSamples.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsDeleteSamples.java index 8feea3e2f2be..c44b712f4ea2 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsDeleteSamples.java +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class GuestSubscriptionsDeleteSamples { /* - * x-ms-original-file: 2025-08-15/GuestSubscriptions_Delete.json + * x-ms-original-file: 2026-03-20/GuestSubscriptions_Delete.json */ /** * Sample code: Delete a guest subscription. diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsGetSamples.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsGetSamples.java index d0ad7032e1cd..95620ed1b8a6 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsGetSamples.java +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class GuestSubscriptionsGetSamples { /* - * x-ms-original-file: 2025-08-15/GuestSubscriptions_Get.json + * x-ms-original-file: 2026-03-20/GuestSubscriptions_Get.json */ /** * Sample code: Get a guest subscription. diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsListBySubscriptionLocationResourceSamples.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsListBySubscriptionLocationResourceSamples.java index 266fcac71fbc..518deafa7dfa 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsListBySubscriptionLocationResourceSamples.java +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsListBySubscriptionLocationResourceSamples.java @@ -9,7 +9,7 @@ */ public final class GuestSubscriptionsListBySubscriptionLocationResourceSamples { /* - * x-ms-original-file: 2025-08-15/GuestSubscriptions_List.json + * x-ms-original-file: 2026-03-20/GuestSubscriptions_List.json */ /** * Sample code: List guest subscriptions for a scope. diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/OperationsListSamples.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/OperationsListSamples.java index 20fc786b9b1b..5b15de55cd4b 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/OperationsListSamples.java +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: 2025-08-15/Operations_List.json + * x-ms-original-file: 2026-03-20/Operations_List.json */ /** * Sample code: List operations. diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsCreateSamples.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsCreateSamples.java index 99cabc0dcdd3..97b5cd2d7869 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsCreateSamples.java +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsCreateSamples.java @@ -11,7 +11,7 @@ */ public final class SharedLimitsCreateSamples { /* - * x-ms-original-file: 2025-08-15/SharedLimits_Create.json + * x-ms-original-file: 2026-03-20/SharedLimits_Create.json */ /** * Sample code: Create a shared limit. diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsDeleteSamples.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsDeleteSamples.java index 488f41e8e5f8..907b7193e719 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsDeleteSamples.java +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class SharedLimitsDeleteSamples { /* - * x-ms-original-file: 2025-08-15/SharedLimits_Delete.json + * x-ms-original-file: 2026-03-20/SharedLimits_Delete.json */ /** * Sample code: Delete a shared limit. diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsGetSamples.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsGetSamples.java index cb58d0f2c6b3..fed737bea675 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsGetSamples.java +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsGetSamples.java @@ -9,7 +9,7 @@ */ public final class SharedLimitsGetSamples { /* - * x-ms-original-file: 2025-08-15/SharedLimits_Get.json + * x-ms-original-file: 2026-03-20/SharedLimits_Get.json */ /** * Sample code: Get a shared limit. diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsListBySubscriptionLocationResourceSamples.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsListBySubscriptionLocationResourceSamples.java index 1d239b10abc9..21af4ab72c63 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsListBySubscriptionLocationResourceSamples.java +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/samples/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsListBySubscriptionLocationResourceSamples.java @@ -9,7 +9,7 @@ */ public final class SharedLimitsListBySubscriptionLocationResourceSamples { /* - * x-ms-original-file: 2025-08-15/SharedLimits_List.json + * x-ms-original-file: 2026-03-20/SharedLimits_List.json */ /** * Sample code: List all shared limits for a scope. diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/FeatureInnerTests.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/FeatureInnerTests.java new file mode 100644 index 000000000000..4c5657c6fce8 --- /dev/null +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/FeatureInnerTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computelimit.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computelimit.fluent.models.FeatureInner; +import com.azure.resourcemanager.computelimit.models.FeatureState; +import org.junit.jupiter.api.Assertions; + +public final class FeatureInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FeatureInner model = BinaryData.fromString( + "{\"properties\":{\"state\":\"Disabled\",\"provisioningState\":\"Failed\"},\"id\":\"it\",\"name\":\"np\",\"type\":\"qfpjk\"}") + .toObject(FeatureInner.class); + Assertions.assertEquals(FeatureState.DISABLED, model.properties().state()); + } +} diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/FeatureListResultTests.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/FeatureListResultTests.java new file mode 100644 index 000000000000..9bb3e4943a16 --- /dev/null +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/FeatureListResultTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computelimit.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computelimit.implementation.models.FeatureListResult; +import com.azure.resourcemanager.computelimit.models.FeatureState; +import org.junit.jupiter.api.Assertions; + +public final class FeatureListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FeatureListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"state\":\"Enabled\",\"provisioningState\":\"Canceled\"},\"id\":\"xypininmayhuybbk\",\"name\":\"odepoogin\",\"type\":\"vamih\"},{\"properties\":{\"state\":\"Disabled\",\"provisioningState\":\"Canceled\"},\"id\":\"zxtheotusivyevcc\",\"name\":\"qi\",\"type\":\"nhungbw\"},{\"properties\":{\"state\":\"Disabled\",\"provisioningState\":\"Failed\"},\"id\":\"xgispemvtzfkufu\",\"name\":\"ljofxqeofjaeqjh\",\"type\":\"jbasvmsmjqulngs\"}],\"nextLink\":\"nbybkzgcwrwcl\"}") + .toObject(FeatureListResult.class); + Assertions.assertEquals(FeatureState.ENABLED, model.value().get(0).properties().state()); + Assertions.assertEquals("nbybkzgcwrwcl", model.nextLink()); + } +} diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/FeaturePropertiesTests.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/FeaturePropertiesTests.java new file mode 100644 index 000000000000..a6a9beaac9b6 --- /dev/null +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/FeaturePropertiesTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computelimit.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computelimit.models.FeatureProperties; +import com.azure.resourcemanager.computelimit.models.FeatureState; +import org.junit.jupiter.api.Assertions; + +public final class FeaturePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FeatureProperties model = BinaryData.fromString("{\"state\":\"Disabled\",\"provisioningState\":\"Succeeded\"}") + .toObject(FeatureProperties.class); + Assertions.assertEquals(FeatureState.DISABLED, model.state()); + } +} diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/FeaturesGetWithResponseMockTests.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/FeaturesGetWithResponseMockTests.java new file mode 100644 index 000000000000..8cb1254796c0 --- /dev/null +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/FeaturesGetWithResponseMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computelimit.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.computelimit.ComputeLimitManager; +import com.azure.resourcemanager.computelimit.models.Feature; +import com.azure.resourcemanager.computelimit.models.FeatureState; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class FeaturesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"state\":\"Enabled\",\"provisioningState\":\"Canceled\"},\"id\":\"mvdjwzrlovmc\",\"name\":\"whijcoejctbza\",\"type\":\"s\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ComputeLimitManager manager = ComputeLimitManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Feature response + = manager.features().getWithResponse("ajionpimexgstxg", "po", com.azure.core.util.Context.NONE).getValue(); + + Assertions.assertEquals(FeatureState.ENABLED, response.properties().state()); + } +} diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/FeaturesListBySubscriptionLocationResourceMockTests.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/FeaturesListBySubscriptionLocationResourceMockTests.java new file mode 100644 index 000000000000..b04670535fc3 --- /dev/null +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/FeaturesListBySubscriptionLocationResourceMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computelimit.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.computelimit.ComputeLimitManager; +import com.azure.resourcemanager.computelimit.models.Feature; +import com.azure.resourcemanager.computelimit.models.FeatureState; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class FeaturesListBySubscriptionLocationResourceMockTests { + @Test + public void testListBySubscriptionLocationResource() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"state\":\"Disabled\",\"provisioningState\":\"Failed\"},\"id\":\"xppofmxaxcfjp\",\"name\":\"ddtocjjxhvp\",\"type\":\"o\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ComputeLimitManager manager = ComputeLimitManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.features().listBySubscriptionLocationResource("sycbkbfk", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(FeatureState.DISABLED, response.iterator().next().properties().state()); + } +} diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsCreateWithResponseMockTests.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsCreateWithResponseMockTests.java index 3f90db38c35f..cd292016ded1 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsCreateWithResponseMockTests.java +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsCreateWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class GuestSubscriptionsCreateWithResponseMockTests { @Test public void testCreateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"ujitcjcz\",\"name\":\"zevndhkrwpdappds\",\"type\":\"dkvwrwjfe\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"f\",\"name\":\"rwzwbng\",\"type\":\"itnwuizgazxufi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,8 +31,8 @@ public void testCreateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); GuestSubscription response = manager.guestSubscriptions() - .define("gls") - .withExistingLocation("biksq") + .define("lnerkujysvleju") + .withExistingLocation("jgzjaoyfhrtx") .withProperties(new GuestSubscriptionProperties()) .create(); diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsDeleteByResourceGroupWithResponseMockTests.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsDeleteByResourceGroupWithResponseMockTests.java index 65456dae126b..fc0198d39c96 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsDeleteByResourceGroupWithResponseMockTests.java +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsDeleteByResourceGroupWithResponseMockTests.java @@ -28,7 +28,7 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.guestSubscriptions() - .deleteByResourceGroupWithResponse("v", "smjqulngsntnbyb", com.azure.core.util.Context.NONE); + .deleteByResourceGroupWithResponse("uqktap", "pwgcuertu", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsGetWithResponseMockTests.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsGetWithResponseMockTests.java index f4668d73b29e..346598e46cf6 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsGetWithResponseMockTests.java +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class GuestSubscriptionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"vtz\",\"name\":\"kufubljo\",\"type\":\"xqeofjaeqjhqjba\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\"},\"id\":\"qfou\",\"name\":\"lmmnkzsmodmglo\",\"type\":\"gpbkwtmut\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); GuestSubscription response = manager.guestSubscriptions() - .getWithResponse("hungbwjzrnf", "gxg", com.azure.core.util.Context.NONE) + .getWithResponse("ibmadgakeqsrxy", "zqqedq", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsListBySubscriptionLocationResourceMockTests.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsListBySubscriptionLocationResourceMockTests.java index de3d4adfeda7..8aa89c718a3a 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsListBySubscriptionLocationResourceMockTests.java +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/GuestSubscriptionsListBySubscriptionLocationResourceMockTests.java @@ -21,7 +21,7 @@ public final class GuestSubscriptionsListBySubscriptionLocationResourceMockTests @Test public void testListBySubscriptionLocationResource() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"rljdouskcqv\",\"name\":\"ocrcjdk\",\"type\":\"tnhxbn\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"bbjfddgmbmbexp\",\"name\":\"bhtqqrolfpfpsa\",\"type\":\"gbquxigj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testListBySubscriptionLocationResource() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.guestSubscriptions() - .listBySubscriptionLocationResource("zgcwrw", com.azure.core.util.Context.NONE); + .listBySubscriptionLocationResource("kdosvqw", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/OperationsListMockTests.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/OperationsListMockTests.java index d733409d4d20..1f1d8a7a4cd3 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/OperationsListMockTests.java +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/OperationsListMockTests.java @@ -21,7 +21,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"luwfzitonpeqfpjk\",\"isDataAction\":true,\"display\":{\"provider\":\"pdvhpfxxypin\",\"resource\":\"mayhuybbkpodepoo\",\"operation\":\"nuvamiheogna\",\"description\":\"zxtheotusivyevcc\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"awxklr\",\"isDataAction\":true,\"display\":{\"provider\":\"kbasyypn\",\"resource\":\"hsgcbacphejkot\",\"operation\":\"qgoulznd\",\"description\":\"kwy\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsCreateWithResponseMockTests.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsCreateWithResponseMockTests.java index 27f53c499d42..9937e6b1081f 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsCreateWithResponseMockTests.java +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsCreateWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class SharedLimitsCreateWithResponseMockTests { @Test public void testCreateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"resourceName\":{\"value\":\"yjgzjaoyfhrtxiln\",\"localizedValue\":\"kujysvlejuvfq\"},\"limit\":1135390068,\"unit\":\"yxwjkcp\",\"provisioningState\":\"Canceled\"},\"id\":\"b\",\"name\":\"gjvtbv\",\"type\":\"ysszdnrujqguh\"}"; + = "{\"properties\":{\"resourceName\":{\"value\":\"tqajzyulpkudjkrl\",\"localizedValue\":\"bzhfepgzgqexz\"},\"limit\":208705149,\"unit\":\"scpai\",\"provisioningState\":\"Failed\"},\"id\":\"bcsglumma\",\"name\":\"tjaodxobnb\",\"type\":\"xkqpxo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,8 +31,8 @@ public void testCreateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SharedLimit response = manager.sharedLimits() - .define("modmglougpb") - .withExistingLocation("iqfouflmmnkz") + .define("soifiyipjxsqw") + .withExistingLocation("kwh") .withProperties(new SharedLimitProperties()) .create(); diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsDeleteByResourceGroupWithResponseMockTests.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsDeleteByResourceGroupWithResponseMockTests.java index edbb30d559e9..9dff2d98959a 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsDeleteByResourceGroupWithResponseMockTests.java +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsDeleteByResourceGroupWithResponseMockTests.java @@ -27,7 +27,8 @@ public void testDeleteWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.sharedLimits().deleteByResourceGroupWithResponse("kjfkg", "awxklr", com.azure.core.util.Context.NONE); + manager.sharedLimits() + .deleteByResourceGroupWithResponse("dwzjeiach", "oosflnr", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsGetWithResponseMockTests.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsGetWithResponseMockTests.java index ede1d772a190..d1762ce692cd 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsGetWithResponseMockTests.java +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class SharedLimitsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"resourceName\":{\"value\":\"rl\",\"localizedValue\":\"ugjzzdatqxhocdge\"},\"limit\":1293628182,\"unit\":\"phut\",\"provisioningState\":\"Succeeded\"},\"id\":\"vkaozwyiftyhxhur\",\"name\":\"k\",\"type\":\"tyxolniwpwc\"}"; + = "{\"properties\":{\"resourceName\":{\"value\":\"fvzwdzuhty\",\"localizedValue\":\"isdkfthwxmnteiw\"},\"limit\":1352458229,\"unit\":\"km\",\"provisioningState\":\"Failed\"},\"id\":\"mxdcufufsrp\",\"name\":\"mzidnsezcxtb\",\"type\":\"sgfyccsnew\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SharedLimit response - = manager.sharedLimits().getWithResponse("snhu", "je", com.azure.core.util.Context.NONE).getValue(); + = manager.sharedLimits().getWithResponse("uckyf", "hr", com.azure.core.util.Context.NONE).getValue(); } } diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsListBySubscriptionLocationResourceMockTests.java b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsListBySubscriptionLocationResourceMockTests.java index 961c1ca5c66a..4977f22d8d8c 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsListBySubscriptionLocationResourceMockTests.java +++ b/sdk/computelimit/azure-resourcemanager-computelimit/src/test/java/com/azure/resourcemanager/computelimit/generated/SharedLimitsListBySubscriptionLocationResourceMockTests.java @@ -21,7 +21,7 @@ public final class SharedLimitsListBySubscriptionLocationResourceMockTests { @Test public void testListBySubscriptionLocationResource() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"resourceName\":{\"value\":\"nddhsgcbacph\",\"localizedValue\":\"koty\"},\"limit\":757698897,\"unit\":\"ulzndlikwyqk\",\"provisioningState\":\"Succeeded\"},\"id\":\"bmadgak\",\"name\":\"qsrxybzqqed\",\"type\":\"ytb\"}]}"; + = "{\"value\":[{\"properties\":{\"resourceName\":{\"value\":\"pyqr\",\"localizedValue\":\"z\"},\"limit\":697614114,\"unit\":\"swjdkirso\",\"provisioningState\":\"Canceled\"},\"id\":\"hc\",\"name\":\"mnoh\",\"type\":\"t\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testListBySubscriptionLocationResource() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.sharedLimits().listBySubscriptionLocationResource("plwckbas", com.azure.core.util.Context.NONE); + = manager.sharedLimits().listBySubscriptionLocationResource("sfqpteehz", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/tsp-location.yaml b/sdk/computelimit/azure-resourcemanager-computelimit/tsp-location.yaml index 637345c8748a..04b76b2ab9da 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/tsp-location.yaml +++ b/sdk/computelimit/azure-resourcemanager-computelimit/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/computelimit/resource-manager/Microsoft.ComputeLimit/ComputeLimit -commit: ea59de0de01a84fdea241f85e3cb518c0339c9ba +commit: a83147fe12aece4ded0bd96be212e5242e087cb9 repo: Azure/azure-rest-api-specs additionalDirectories: From 62d29d6d447118212a991bcac2a1f3bc9f491fac Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Tue, 31 Mar 2026 17:28:31 +0000 Subject: [PATCH 2/3] Configurations: 'specification/computelimit/resource-manager/Microsoft.ComputeLimit/ComputeLimit/tspconfig.yaml', API Version: 2026-03-20, SDK Release Type: stable, and CommitSHA: 'cca5b9fb049544c3bd14869f1642d4cc0187ef00' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6087783 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../azure-resourcemanager-computelimit/tsp-location.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/tsp-location.yaml b/sdk/computelimit/azure-resourcemanager-computelimit/tsp-location.yaml index 04b76b2ab9da..8deb66b50726 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/tsp-location.yaml +++ b/sdk/computelimit/azure-resourcemanager-computelimit/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/computelimit/resource-manager/Microsoft.ComputeLimit/ComputeLimit -commit: a83147fe12aece4ded0bd96be212e5242e087cb9 +commit: cca5b9fb049544c3bd14869f1642d4cc0187ef00 repo: Azure/azure-rest-api-specs additionalDirectories: From 782a56c1b56b14d02c4562dd3ca9a1943c3200c5 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Mon, 6 Apr 2026 21:09:20 +0000 Subject: [PATCH 3/3] Configurations: 'specification/computelimit/resource-manager/Microsoft.ComputeLimit/ComputeLimit/tspconfig.yaml', API Version: 2026-03-20, SDK Release Type: stable, and CommitSHA: 'd12a591062fc42adbad8c0105094f3de018a71b7' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6113665 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../azure-resourcemanager-computelimit/CHANGELOG.md | 2 +- .../azure-resourcemanager-computelimit/tsp-location.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/CHANGELOG.md b/sdk/computelimit/azure-resourcemanager-computelimit/CHANGELOG.md index 8df04d79b441..9ee577bf0e78 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/CHANGELOG.md +++ b/sdk/computelimit/azure-resourcemanager-computelimit/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0 (2026-03-31) +## 1.0.0 (2026-04-06) - Azure Resource Manager ComputeLimit client library for Java. This package contains Microsoft Azure SDK for ComputeLimit Management SDK. Microsoft Azure Compute Limit Resource Provider. Package api-version 2026-03-20. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/tsp-location.yaml b/sdk/computelimit/azure-resourcemanager-computelimit/tsp-location.yaml index 8deb66b50726..cb37481bdb8b 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/tsp-location.yaml +++ b/sdk/computelimit/azure-resourcemanager-computelimit/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/computelimit/resource-manager/Microsoft.ComputeLimit/ComputeLimit -commit: cca5b9fb049544c3bd14869f1642d4cc0187ef00 +commit: d12a591062fc42adbad8c0105094f3de018a71b7 repo: Azure/azure-rest-api-specs additionalDirectories: