From 501192e8aaf20dd08e775bd900f08308da8dfa77 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 21 Apr 2025 03:57:09 +0000 Subject: [PATCH] CodeGen from PR 33698 in Azure/azure-rest-api-specs Merge d82f6698c1524f8ad485970035643563a8889fb5 into f03aa628f37d2d7e10db8cc16e7471342d3beaaf --- .../CHANGELOG.md | 10 +- .../README.md | 6 +- .../SAMPLE.md | 228 +++++++++--------- .../pom.xml | 1 - .../tsp-location.yaml | 2 +- 5 files changed, 119 insertions(+), 128 deletions(-) diff --git a/sdk/healthdataaiservices/azure-resourcemanager-healthdataaiservices/CHANGELOG.md b/sdk/healthdataaiservices/azure-resourcemanager-healthdataaiservices/CHANGELOG.md index 9bed38ad115f..a17ed70632f0 100644 --- a/sdk/healthdataaiservices/azure-resourcemanager-healthdataaiservices/CHANGELOG.md +++ b/sdk/healthdataaiservices/azure-resourcemanager-healthdataaiservices/CHANGELOG.md @@ -1,14 +1,8 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2025-04-21) -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Azure Resource Manager Health Data AI Services client library for Java. This package contains Microsoft Azure SDK for Health Data AI Services Management SDK. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0 (2024-11-21) diff --git a/sdk/healthdataaiservices/azure-resourcemanager-healthdataaiservices/README.md b/sdk/healthdataaiservices/azure-resourcemanager-healthdataaiservices/README.md index 8eed2568d34f..715faa1da432 100644 --- a/sdk/healthdataaiservices/azure-resourcemanager-healthdataaiservices/README.md +++ b/sdk/healthdataaiservices/azure-resourcemanager-healthdataaiservices/README.md @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ HealthDataAIServicesManager manager = HealthDataAIServicesManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/healthdataaiservices/azure-resourcemanager-healthdataaiservices/SAMPLE.md b/sdk/healthdataaiservices/azure-resourcemanager-healthdataaiservices/SAMPLE.md index ae34f2a055f0..8e57b3061d9a 100644 --- a/sdk/healthdataaiservices/azure-resourcemanager-healthdataaiservices/SAMPLE.md +++ b/sdk/healthdataaiservices/azure-resourcemanager-healthdataaiservices/SAMPLE.md @@ -77,20 +77,21 @@ public final class DeidServicesCreateSamples { ```java /** - * Samples for DeidServices Delete. + * Samples for PrivateEndpointConnections Delete. */ -public final class DeidServicesDeleteSamples { +public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: 2024-09-20/DeidServices_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-09-20/PrivateEndpointConnections_Delete_MaximumSet_Gen.json */ /** - * Sample code: DeidServices_Delete - generated by [MaximumSet] rule. [stable]. + * Sample code: PrivateEndpointConnections_Delete - generated by [MaximumSet] rule. [stable]. * * @param manager Entry point to HealthDataAIServicesManager. */ - public static void deidServicesDeleteGeneratedByMaximumSetRuleStable( + public static void privateEndpointConnectionsDeleteGeneratedByMaximumSetRuleStable( com.azure.resourcemanager.healthdataaiservices.HealthDataAIServicesManager manager) { - manager.deidServices().delete("rgopenapi", "deidTest", com.azure.core.util.Context.NONE); + manager.privateEndpointConnections() + .delete("rgopenapi", "deidTest", "kgwgrrpabvrsrrvpcgcnfmyfgyrl", com.azure.core.util.Context.NONE); } } ``` @@ -98,22 +99,49 @@ public final class DeidServicesDeleteSamples { ### DeidServices_GetByResourceGroup ```java +import com.azure.resourcemanager.healthdataaiservices.models.DeidPropertiesUpdate; +import com.azure.resourcemanager.healthdataaiservices.models.DeidService; +import com.azure.resourcemanager.healthdataaiservices.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.healthdataaiservices.models.ManagedServiceIdentityUpdate; +import com.azure.resourcemanager.healthdataaiservices.models.PublicNetworkAccess; +import java.util.HashMap; +import java.util.Map; + /** - * Samples for DeidServices GetByResourceGroup. + * Samples for DeidServices Update. */ -public final class DeidServicesGetByResourceGroupSamples { +public final class DeidServicesUpdateSamples { /* - * x-ms-original-file: 2024-09-20/DeidServices_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-09-20/DeidServices_Update_MaximumSet_Gen.json */ /** - * Sample code: DeidServices_Get - generated by [MaximumSet] rule. [stable]. + * Sample code: DeidServices_Update - generated by [MaximumSet] rule. [stable]. * * @param manager Entry point to HealthDataAIServicesManager. */ - public static void deidServicesGetGeneratedByMaximumSetRuleStable( + public static void deidServicesUpdateGeneratedByMaximumSetRuleStable( com.azure.resourcemanager.healthdataaiservices.HealthDataAIServicesManager manager) { - manager.deidServices() - .getByResourceGroupWithResponse("rgopenapi", "deidTest", com.azure.core.util.Context.NONE); + DeidService resource = manager.deidServices() + .getByResourceGroupWithResponse("rgopenapi", "deidTest", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf()) + .withIdentity(new ManagedServiceIdentityUpdate().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf())) + .withProperties(new DeidPropertiesUpdate().withPublicNetworkAccess(PublicNetworkAccess.ENABLED)) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` @@ -121,21 +149,35 @@ public final class DeidServicesGetByResourceGroupSamples { ### DeidServices_List ```java +import com.azure.resourcemanager.healthdataaiservices.models.PrivateEndpoint; +import com.azure.resourcemanager.healthdataaiservices.models.PrivateEndpointConnectionProperties; +import com.azure.resourcemanager.healthdataaiservices.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.healthdataaiservices.models.PrivateLinkServiceConnectionState; + /** - * Samples for DeidServices List. + * Samples for PrivateEndpointConnections Create. */ -public final class DeidServicesListSamples { +public final class PrivateEndpointConnectionsCreateSamples { /* - * x-ms-original-file: 2024-09-20/DeidServices_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-09-20/PrivateEndpointConnections_Create_MaximumSet_Gen.json */ /** - * Sample code: DeidServices_ListBySubscription - generated by [MaximumSet] rule. [stable]. + * Sample code: PrivateEndpointConnections_Create - generated by [MaximumSet] rule. [stable]. * * @param manager Entry point to HealthDataAIServicesManager. */ - public static void deidServicesListBySubscriptionGeneratedByMaximumSetRuleStable( + public static void privateEndpointConnectionsCreateGeneratedByMaximumSetRuleStable( com.azure.resourcemanager.healthdataaiservices.HealthDataAIServicesManager manager) { - manager.deidServices().list(com.azure.core.util.Context.NONE); + manager.privateEndpointConnections() + .define("kgwgrrpabvrsrrvpcgcnfmyfgyrl") + .withExistingDeidService("rgopenapi", "deidTest") + .withProperties( + new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) + .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() + .withStatus(PrivateEndpointServiceConnectionStatus.PENDING) + .withDescription("xr") + .withActionsRequired("ulb"))) + .create(); } } ``` @@ -144,20 +186,21 @@ public final class DeidServicesListSamples { ```java /** - * Samples for DeidServices ListByResourceGroup. + * Samples for PrivateEndpointConnections Get. */ -public final class DeidServicesListByResourceGroupSamples { +public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: 2024-09-20/DeidServices_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-09-20/PrivateEndpointConnections_Get_MaximumSet_Gen.json */ /** - * Sample code: DeidServices_ListByResourceGroup - generated by [MaximumSet] rule. [stable]. + * Sample code: PrivateEndpointConnections_Get - generated by [MaximumSet] rule. [stable]. * * @param manager Entry point to HealthDataAIServicesManager. */ - public static void deidServicesListByResourceGroupGeneratedByMaximumSetRuleStable( + public static void privateEndpointConnectionsGetGeneratedByMaximumSetRuleStable( com.azure.resourcemanager.healthdataaiservices.HealthDataAIServicesManager manager) { - manager.deidServices().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + manager.privateEndpointConnections() + .getWithResponse("rgopenapi", "deidTest", "kgwgrrpabvrsrrvpcgcnfmyfgyrl", com.azure.core.util.Context.NONE); } } ``` @@ -165,54 +208,49 @@ public final class DeidServicesListByResourceGroupSamples { ### DeidServices_Update ```java -import com.azure.resourcemanager.healthdataaiservices.models.DeidPropertiesUpdate; -import com.azure.resourcemanager.healthdataaiservices.models.DeidService; -import com.azure.resourcemanager.healthdataaiservices.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.healthdataaiservices.models.ManagedServiceIdentityUpdate; -import com.azure.resourcemanager.healthdataaiservices.models.PublicNetworkAccess; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for DeidServices Update. + * Samples for DeidServices Delete. */ -public final class DeidServicesUpdateSamples { +public final class DeidServicesDeleteSamples { /* - * x-ms-original-file: 2024-09-20/DeidServices_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-09-20/DeidServices_Delete_MaximumSet_Gen.json */ /** - * Sample code: DeidServices_Update - generated by [MaximumSet] rule. [stable]. + * Sample code: DeidServices_Delete - generated by [MaximumSet] rule. [stable]. * * @param manager Entry point to HealthDataAIServicesManager. */ - public static void deidServicesUpdateGeneratedByMaximumSetRuleStable( + public static void deidServicesDeleteGeneratedByMaximumSetRuleStable( com.azure.resourcemanager.healthdataaiservices.HealthDataAIServicesManager manager) { - DeidService resource = manager.deidServices() - .getByResourceGroupWithResponse("rgopenapi", "deidTest", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf()) - .withIdentity(new ManagedServiceIdentityUpdate().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withProperties(new DeidPropertiesUpdate().withPublicNetworkAccess(PublicNetworkAccess.ENABLED)) - .apply(); + manager.deidServices().delete("rgopenapi", "deidTest", com.azure.core.util.Context.NONE); } +} +``` - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; +### Operations_List + +```java +/** + * Samples for DeidServices GetByResourceGroup. + */ +public final class DeidServicesGetByResourceGroupSamples { + /* + * x-ms-original-file: 2024-09-20/DeidServices_Get_MaximumSet_Gen.json + */ + /** + * Sample code: DeidServices_Get - generated by [MaximumSet] rule. [stable]. + * + * @param manager Entry point to HealthDataAIServicesManager. + */ + public static void deidServicesGetGeneratedByMaximumSetRuleStable( + com.azure.resourcemanager.healthdataaiservices.HealthDataAIServicesManager manager) { + manager.deidServices() + .getByResourceGroupWithResponse("rgopenapi", "deidTest", com.azure.core.util.Context.NONE); } } ``` -### Operations_List +### PrivateEndpointConnections_Create ```java /** @@ -247,61 +285,25 @@ public final class OperationsListSamples { } ``` -### PrivateEndpointConnections_Create - -```java -import com.azure.resourcemanager.healthdataaiservices.models.PrivateEndpoint; -import com.azure.resourcemanager.healthdataaiservices.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.healthdataaiservices.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.healthdataaiservices.models.PrivateLinkServiceConnectionState; - -/** - * Samples for PrivateEndpointConnections Create. - */ -public final class PrivateEndpointConnectionsCreateSamples { - /* - * x-ms-original-file: 2024-09-20/PrivateEndpointConnections_Create_MaximumSet_Gen.json - */ - /** - * Sample code: PrivateEndpointConnections_Create - generated by [MaximumSet] rule. [stable]. - * - * @param manager Entry point to HealthDataAIServicesManager. - */ - public static void privateEndpointConnectionsCreateGeneratedByMaximumSetRuleStable( - com.azure.resourcemanager.healthdataaiservices.HealthDataAIServicesManager manager) { - manager.privateEndpointConnections() - .define("kgwgrrpabvrsrrvpcgcnfmyfgyrl") - .withExistingDeidService("rgopenapi", "deidTest") - .withProperties( - new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.PENDING) - .withDescription("xr") - .withActionsRequired("ulb"))) - .create(); - } -} -``` - ### PrivateEndpointConnections_Delete ```java /** - * Samples for PrivateEndpointConnections Delete. + * Samples for PrivateEndpointConnections ListByDeidService. */ -public final class PrivateEndpointConnectionsDeleteSamples { +public final class PrivateEndpointConnectionsListByDeidServiceSamples { /* - * x-ms-original-file: 2024-09-20/PrivateEndpointConnections_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-09-20/PrivateEndpointConnections_ListByDeidService_MaximumSet_Gen.json */ /** - * Sample code: PrivateEndpointConnections_Delete - generated by [MaximumSet] rule. [stable]. + * Sample code: PrivateEndpointConnections_ListByDeidService - generated by [MaximumSet] rule. [stable]. * * @param manager Entry point to HealthDataAIServicesManager. */ - public static void privateEndpointConnectionsDeleteGeneratedByMaximumSetRuleStable( + public static void privateEndpointConnectionsListByDeidServiceGeneratedByMaximumSetRuleStable( com.azure.resourcemanager.healthdataaiservices.HealthDataAIServicesManager manager) { manager.privateEndpointConnections() - .delete("rgopenapi", "deidTest", "kgwgrrpabvrsrrvpcgcnfmyfgyrl", com.azure.core.util.Context.NONE); + .listByDeidService("rgopenapi", "deidTest", com.azure.core.util.Context.NONE); } } ``` @@ -310,21 +312,20 @@ public final class PrivateEndpointConnectionsDeleteSamples { ```java /** - * Samples for PrivateEndpointConnections Get. + * Samples for DeidServices ListByResourceGroup. */ -public final class PrivateEndpointConnectionsGetSamples { +public final class DeidServicesListByResourceGroupSamples { /* - * x-ms-original-file: 2024-09-20/PrivateEndpointConnections_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-09-20/DeidServices_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: PrivateEndpointConnections_Get - generated by [MaximumSet] rule. [stable]. + * Sample code: DeidServices_ListByResourceGroup - generated by [MaximumSet] rule. [stable]. * * @param manager Entry point to HealthDataAIServicesManager. */ - public static void privateEndpointConnectionsGetGeneratedByMaximumSetRuleStable( + public static void deidServicesListByResourceGroupGeneratedByMaximumSetRuleStable( com.azure.resourcemanager.healthdataaiservices.HealthDataAIServicesManager manager) { - manager.privateEndpointConnections() - .getWithResponse("rgopenapi", "deidTest", "kgwgrrpabvrsrrvpcgcnfmyfgyrl", com.azure.core.util.Context.NONE); + manager.deidServices().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); } } ``` @@ -333,21 +334,20 @@ public final class PrivateEndpointConnectionsGetSamples { ```java /** - * Samples for PrivateEndpointConnections ListByDeidService. + * Samples for DeidServices List. */ -public final class PrivateEndpointConnectionsListByDeidServiceSamples { +public final class DeidServicesListSamples { /* - * x-ms-original-file: 2024-09-20/PrivateEndpointConnections_ListByDeidService_MaximumSet_Gen.json + * x-ms-original-file: 2024-09-20/DeidServices_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: PrivateEndpointConnections_ListByDeidService - generated by [MaximumSet] rule. [stable]. + * Sample code: DeidServices_ListBySubscription - generated by [MaximumSet] rule. [stable]. * * @param manager Entry point to HealthDataAIServicesManager. */ - public static void privateEndpointConnectionsListByDeidServiceGeneratedByMaximumSetRuleStable( + public static void deidServicesListBySubscriptionGeneratedByMaximumSetRuleStable( com.azure.resourcemanager.healthdataaiservices.HealthDataAIServicesManager manager) { - manager.privateEndpointConnections() - .listByDeidService("rgopenapi", "deidTest", com.azure.core.util.Context.NONE); + manager.deidServices().list(com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/healthdataaiservices/azure-resourcemanager-healthdataaiservices/pom.xml b/sdk/healthdataaiservices/azure-resourcemanager-healthdataaiservices/pom.xml index 777d5944fdc8..1443235e9890 100644 --- a/sdk/healthdataaiservices/azure-resourcemanager-healthdataaiservices/pom.xml +++ b/sdk/healthdataaiservices/azure-resourcemanager-healthdataaiservices/pom.xml @@ -46,7 +46,6 @@ 0 0 true - false diff --git a/sdk/healthdataaiservices/azure-resourcemanager-healthdataaiservices/tsp-location.yaml b/sdk/healthdataaiservices/azure-resourcemanager-healthdataaiservices/tsp-location.yaml index 86c9b990e7a4..4ec4293ba4f8 100644 --- a/sdk/healthdataaiservices/azure-resourcemanager-healthdataaiservices/tsp-location.yaml +++ b/sdk/healthdataaiservices/azure-resourcemanager-healthdataaiservices/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/healthdataaiservices/HealthDataAIServices.Management -commit: 6f175c9c006269a1d0f1928fbc768cacc6ac379a +commit: 65ea9a38c20488eb047876e4207713aa4a392f82 repo: Azure/azure-rest-api-specs additionalDirectories: