diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 74328db203f0f..7b595a6f6600c 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -403,7 +403,7 @@ com.azure.resourcemanager:azure-resourcemanager-dashboard;1.1.0;1.2.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-servicelinker;1.0.0-beta.4;1.0.0-beta.5
com.azure.resourcemanager:azure-resourcemanager-appcontainers;1.0.0;1.1.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-scvmm;1.0.0;1.1.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-hardwaresecuritymodules;1.0.0-beta.3;1.0.0-beta.4
+com.azure.resourcemanager:azure-resourcemanager-hardwaresecuritymodules;1.0.0-beta.3;1.0.0
com.azure.resourcemanager:azure-resourcemanager-workloads;1.1.0;1.2.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-confidentialledger;1.0.0-beta.5;1.0.0
com.azure.resourcemanager:azure-resourcemanager-dynatrace;1.0.0;1.1.0-beta.1
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/CHANGELOG.md b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/CHANGELOG.md
index f54b7716d6ff3..e876b16d4522d 100644
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/CHANGELOG.md
+++ b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/CHANGELOG.md
@@ -1,15 +1,13 @@
# Release History
-## 1.0.0-beta.4 (Unreleased)
+## 1.0.0 (2024-12-26)
-### Features Added
-
-### Breaking Changes
-
-### Bugs Fixed
+- Azure Resource Manager Hardware Security Modules client library for Java. This package contains Microsoft Azure SDK for Hardware Security Modules Management SDK. The Azure management API provides a RESTful set of web services that interact with Azure HSM RP. Package tag package-2021-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Other Changes
+- Release for Azure Resource Manager Hardware Security Modules client library for Java.
+
## 1.0.0-beta.3 (2024-11-27)
- Azure Resource Manager Hardware Security Modules client library for Java. This package contains Microsoft Azure SDK for Hardware Security Modules Management SDK. The Azure management API provides a RESTful set of web services that interact with Azure HSM RP. Package tag package-preview-2024-06. 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/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/README.md b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/README.md
index 4ce1a99dbdaeb..cc81d86a86bf5 100644
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/README.md
+++ b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager Hardware Security Modules client library for Java.
-This package contains Microsoft Azure SDK for Hardware Security Modules Management SDK. The Azure management API provides a RESTful set of web services that interact with Azure HSM RP. Package tag package-preview-2024-06. 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 Hardware Security Modules Management SDK. The Azure management API provides a RESTful set of web services that interact with Azure HSM RP. Package tag package-2021-11. 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-hardwaresecuritymodules
- 1.0.0-beta.3
+ 1.0.0
```
[//]: # ({x-version-update-end})
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/SAMPLE.md b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/SAMPLE.md
index 2b33e5d35f554..f134a0a01c884 100644
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/SAMPLE.md
+++ b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/SAMPLE.md
@@ -1,37 +1,6 @@
# Code snippets and samples
-## CloudHsmClusterBackupStatus
-
-- [Get](#cloudhsmclusterbackupstatus_get)
-
-## CloudHsmClusterPrivateEndpointConnections
-
-- [Create](#cloudhsmclusterprivateendpointconnections_create)
-- [Delete](#cloudhsmclusterprivateendpointconnections_delete)
-- [Get](#cloudhsmclusterprivateendpointconnections_get)
-
-## CloudHsmClusterPrivateLinkResources
-
-- [ListByCloudHsmCluster](#cloudhsmclusterprivatelinkresources_listbycloudhsmcluster)
-
-## CloudHsmClusterRestoreStatus
-
-- [Get](#cloudhsmclusterrestorestatus_get)
-
-## CloudHsmClusters
-
-- [Backup](#cloudhsmclusters_backup)
-- [CreateOrUpdate](#cloudhsmclusters_createorupdate)
-- [Delete](#cloudhsmclusters_delete)
-- [GetByResourceGroup](#cloudhsmclusters_getbyresourcegroup)
-- [List](#cloudhsmclusters_list)
-- [ListByResourceGroup](#cloudhsmclusters_listbyresourcegroup)
-- [Restore](#cloudhsmclusters_restore)
-- [Update](#cloudhsmclusters_update)
-- [ValidateBackupProperties](#cloudhsmclusters_validatebackupproperties)
-- [ValidateRestoreProperties](#cloudhsmclusters_validaterestoreproperties)
-
## DedicatedHsm
- [CreateOrUpdate](#dedicatedhsm_createorupdate)
@@ -45,507 +14,6 @@
## Operations
- [List](#operations_list)
-
-## PrivateEndpointConnections
-
-- [ListByCloudHsmCluster](#privateendpointconnections_listbycloudhsmcluster)
-### CloudHsmClusterBackupStatus_Get
-
-```java
-/**
- * Samples for CloudHsmClusterBackupStatus Get.
- */
-public final class CloudHsmClusterBackupStatusGetSamples {
- /*
- * x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/CloudHsmCluster_Backup_Pending_MaximumSet_Gen.json
- */
- /**
- * Sample code: CloudHsmCluster_Get_Backup_Status_MaximumSet_Gen.
- *
- * @param manager Entry point to HardwareSecurityModulesManager.
- */
- public static void cloudHsmClusterGetBackupStatusMaximumSetGen(
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
- manager.cloudHsmClusterBackupStatus()
- .getWithResponse("rgcloudhsm", "chsm1", "572a45927fc240e1ac075de27371680b",
- com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### CloudHsmClusterPrivateEndpointConnections_Create
-
-```java
-import com.azure.resourcemanager.hardwaresecuritymodules.models.PrivateEndpointConnectionProperties;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.PrivateEndpointServiceConnectionStatus;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.PrivateLinkServiceConnectionState;
-
-/**
- * Samples for CloudHsmClusterPrivateEndpointConnections Create.
- */
-public final class CloudHsmClusterPrivateEndpointConnectionsCreateSamples {
- /*
- * x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/CloudHsmClusterPrivateEndpointConnection_Create_MaximumSet_Gen.json
- */
- /**
- * Sample code: CloudHsmClusterPrivateEndpointConnection_Create_MaximumSet_Gen.
- *
- * @param manager Entry point to HardwareSecurityModulesManager.
- */
- public static void cloudHsmClusterPrivateEndpointConnectionCreateMaximumSetGen(
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
- manager.cloudHsmClusterPrivateEndpointConnections()
- .define("sample-pec")
- .withExistingCloudHsmCluster("rgcloudhsm", "chsm1")
- .withProperties(new PrivateEndpointConnectionProperties().withPrivateLinkServiceConnectionState(
- new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED)
- .withDescription("My name is Joe and I'm approving this.")))
- .create();
- }
-}
-```
-
-### CloudHsmClusterPrivateEndpointConnections_Delete
-
-```java
-/**
- * Samples for CloudHsmClusterPrivateEndpointConnections Delete.
- */
-public final class CloudHsmClusterPrivateEndpointConnectionsDeleteSamples {
- /*
- * x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/CloudHsmClusterPrivateEndpointConnection_Delete_MaximumSet_Gen.json
- */
- /**
- * Sample code: CloudHsmClusterPrivateEndpointConnection_Delete_MaximumSet_Gen.
- *
- * @param manager Entry point to HardwareSecurityModulesManager.
- */
- public static void cloudHsmClusterPrivateEndpointConnectionDeleteMaximumSetGen(
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
- manager.cloudHsmClusterPrivateEndpointConnections()
- .delete("rgcloudhsm", "chsm1", "sample-pec", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### CloudHsmClusterPrivateEndpointConnections_Get
-
-```java
-/**
- * Samples for CloudHsmClusterPrivateEndpointConnections Get.
- */
-public final class CloudHsmClusterPrivateEndpointConnectionsGetSamples {
- /*
- * x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/CloudHsmClusterPrivateEndpointConnection_Get_MaximumSet_Gen.json
- */
- /**
- * Sample code: CloudHsmClusterPrivateEndpointConnection_Get_MaximumSet_Gen.
- *
- * @param manager Entry point to HardwareSecurityModulesManager.
- */
- public static void cloudHsmClusterPrivateEndpointConnectionGetMaximumSetGen(
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
- manager.cloudHsmClusterPrivateEndpointConnections()
- .getWithResponse("rgcloudhsm", "chsm1", "sample-pec", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### CloudHsmClusterPrivateLinkResources_ListByCloudHsmCluster
-
-```java
-/**
- * Samples for CloudHsmClusterPrivateLinkResources ListByCloudHsmCluster.
- */
-public final class CloudHsmClusterPrivateLinkResourcesListByCloudHsmClusterSamples {
- /*
- * x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/CloudHsmClusterPrivateLinkResource_ListByCloudHsmCluster_MaximumSet_Gen.json
- */
- /**
- * Sample code: CloudHsmClusterPrivateLinkResources_ListByResource_MaximumSet_Gen.
- *
- * @param manager Entry point to HardwareSecurityModulesManager.
- */
- public static void cloudHsmClusterPrivateLinkResourcesListByResourceMaximumSetGen(
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
- manager.cloudHsmClusterPrivateLinkResources()
- .listByCloudHsmCluster("rgcloudhsm", "chsm1", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### CloudHsmClusterRestoreStatus_Get
-
-```java
-/**
- * Samples for CloudHsmClusterRestoreStatus Get.
- */
-public final class CloudHsmClusterRestoreStatusGetSamples {
- /*
- * x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/CloudHsmCluster_Restore_Pending_MaximumSet_Gen.json
- */
- /**
- * Sample code: CloudHsmCluster_Get_Restore_Status_MaximumSet_Gen.
- *
- * @param manager Entry point to HardwareSecurityModulesManager.
- */
- public static void cloudHsmClusterGetRestoreStatusMaximumSetGen(
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
- manager.cloudHsmClusterRestoreStatus()
- .getWithResponse("rgcloudhsm", "chsm1", "572a45927fc240e1ac075de27371680b",
- com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### CloudHsmClusters_Backup
-
-```java
-import com.azure.resourcemanager.hardwaresecuritymodules.models.BackupRequestProperties;
-
-/**
- * Samples for CloudHsmClusters Backup.
- */
-public final class CloudHsmClustersBackupSamples {
- /*
- * x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/CloudHsmCluster_CreateOrValidate_Backup_MaximumSet_Gen.json
- */
- /**
- * Sample code: CloudHsmCluster_Create_Backup_MaximumSet_Gen.
- *
- * @param manager Entry point to HardwareSecurityModulesManager.
- */
- public static void cloudHsmClusterCreateBackupMaximumSetGen(
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
- manager.cloudHsmClusters()
- .backup("rgcloudhsm", "chsm1",
- new BackupRequestProperties()
- .withAzureStorageBlobContainerUri(
- "https://myaccount.blob.core.windows.net/sascontainer/sasContainer")
- .withToken("fakeTokenPlaceholder"),
- com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### CloudHsmClusters_CreateOrUpdate
-
-```java
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterProperties;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterSku;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterSkuFamily;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterSkuName;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.ManagedServiceIdentity;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.ManagedServiceIdentityType;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.PublicNetworkAccess;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.UserAssignedIdentity;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for CloudHsmClusters CreateOrUpdate.
- */
-public final class CloudHsmClustersCreateOrUpdateSamples {
- /*
- * x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/CloudHsmCluster_CreateOrUpdate_MaximumSet_Gen.json
- */
- /**
- * Sample code: CloudHsmCluster_CreateOrUpdate_MaximumSet_Gen.
- *
- * @param manager Entry point to HardwareSecurityModulesManager.
- */
- public static void cloudHsmClusterCreateOrUpdateMaximumSetGen(
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
- manager.cloudHsmClusters()
- .define("chsm1")
- .withRegion("eastus2")
- .withExistingResourceGroup("rgcloudhsm")
- .withTags(mapOf("Dept", "hsm", "Environment", "dogfood"))
- .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED)
- .withUserAssignedIdentities(mapOf(
- "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-1",
- new UserAssignedIdentity())))
- .withSku(new CloudHsmClusterSku().withFamily(CloudHsmClusterSkuFamily.B)
- .withName(CloudHsmClusterSkuName.STANDARD_B1))
- .withProperties(new CloudHsmClusterProperties().withPublicNetworkAccess(PublicNetworkAccess.DISABLED))
- .create();
- }
-
- // 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;
- }
-}
-```
-
-### CloudHsmClusters_Delete
-
-```java
-/**
- * Samples for CloudHsmClusters Delete.
- */
-public final class CloudHsmClustersDeleteSamples {
- /*
- * x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/CloudHsmCluster_Delete_MaximumSet_Gen.json
- */
- /**
- * Sample code: CloudHsmCluster_Delete_MaximumSet_Gen.
- *
- * @param manager Entry point to HardwareSecurityModulesManager.
- */
- public static void cloudHsmClusterDeleteMaximumSetGen(
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
- manager.cloudHsmClusters().delete("rgcloudhsm", "chsm1", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### CloudHsmClusters_GetByResourceGroup
-
-```java
-/**
- * Samples for CloudHsmClusters GetByResourceGroup.
- */
-public final class CloudHsmClustersGetByResourceGroupSamples {
- /*
- * x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/CloudHsmCluster_Get_MaximumSet_Gen.json
- */
- /**
- * Sample code: CloudHsmCluster_Get_MaximumSet_Gen.
- *
- * @param manager Entry point to HardwareSecurityModulesManager.
- */
- public static void cloudHsmClusterGetMaximumSetGen(
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
- manager.cloudHsmClusters()
- .getByResourceGroupWithResponse("rgcloudhsm", "chsm1", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### CloudHsmClusters_List
-
-```java
-/**
- * Samples for CloudHsmClusters List.
- */
-public final class CloudHsmClustersListSamples {
- /*
- * x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/CloudHsmCluster_ListBySubscription_MaximumSet_Gen.json
- */
- /**
- * Sample code: CloudHsmCluster_ListBySubscription_MaximumSet_Gen.
- *
- * @param manager Entry point to HardwareSecurityModulesManager.
- */
- public static void cloudHsmClusterListBySubscriptionMaximumSetGen(
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
- manager.cloudHsmClusters().list(null, com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### CloudHsmClusters_ListByResourceGroup
-
-```java
-/**
- * Samples for CloudHsmClusters ListByResourceGroup.
- */
-public final class CloudHsmClustersListByResourceGroupSamples {
- /*
- * x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/CloudHsmCluster_ListByResourceGroup_MaximumSet_Gen.json
- */
- /**
- * Sample code: CloudHsmCluster_ListByResourceGroup_MaximumSet_Gen.
- *
- * @param manager Entry point to HardwareSecurityModulesManager.
- */
- public static void cloudHsmClusterListByResourceGroupMaximumSetGen(
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
- manager.cloudHsmClusters().listByResourceGroup("rgcloudhsm", null, com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### CloudHsmClusters_Restore
-
-```java
-import com.azure.resourcemanager.hardwaresecuritymodules.models.RestoreRequestProperties;
-
-/**
- * Samples for CloudHsmClusters Restore.
- */
-public final class CloudHsmClustersRestoreSamples {
- /*
- * x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/CloudHsmCluster_RequestOrValidate_Restore_MaximumSet_Gen.json
- */
- /**
- * Sample code: CloudHsmCluster_Restore_MaximumSet_Gen.
- *
- * @param manager Entry point to HardwareSecurityModulesManager.
- */
- public static void cloudHsmClusterRestoreMaximumSetGen(
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
- manager.cloudHsmClusters()
- .restore("rgcloudhsm", "chsm1",
- new RestoreRequestProperties()
- .withAzureStorageBlobContainerUri(
- "https://myaccount.blob.core.windows.net/sascontainer/sasContainer")
- .withBackupId("backupId"),
- com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### CloudHsmClusters_Update
-
-```java
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmCluster;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.ManagedServiceIdentity;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.ManagedServiceIdentityType;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.UserAssignedIdentity;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for CloudHsmClusters Update.
- */
-public final class CloudHsmClustersUpdateSamples {
- /*
- * x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/CloudHsmCluster_Update_MaximumSet_Gen.json
- */
- /**
- * Sample code: CloudHsmCluster_Update_MaximumSet_Gen.
- *
- * @param manager Entry point to HardwareSecurityModulesManager.
- */
- public static void cloudHsmClusterUpdateMaximumSetGen(
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
- CloudHsmCluster resource = manager.cloudHsmClusters()
- .getByResourceGroupWithResponse("rgcloudhsm", "chsm1", com.azure.core.util.Context.NONE)
- .getValue();
- resource.update()
- .withTags(mapOf("Dept", "hsm", "Environment", "dogfood", "Slice", "A"))
- .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED)
- .withUserAssignedIdentities(mapOf(
- "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-1",
- new UserAssignedIdentity())))
- .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;
- }
-}
-```
-
-### CloudHsmClusters_ValidateBackupProperties
-
-```java
-import com.azure.resourcemanager.hardwaresecuritymodules.models.BackupRequestProperties;
-
-/**
- * Samples for CloudHsmClusters ValidateBackupProperties.
- */
-public final class CloudHsmClustersValidateBackupPropertiesSamples {
- /*
- * x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/CloudHsmCluster_CreateOrValidate_Backup_MaximumSet_Gen.json
- */
- /**
- * Sample code: CloudHsmCluster_ValidateBackup_Validation_MaximumSet_Gen.
- *
- * @param manager Entry point to HardwareSecurityModulesManager.
- */
- public static void cloudHsmClusterValidateBackupValidationMaximumSetGen(
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
- manager.cloudHsmClusters()
- .validateBackupProperties("rgcloudhsm", "chsm1",
- new BackupRequestProperties()
- .withAzureStorageBlobContainerUri(
- "https://myaccount.blob.core.windows.net/sascontainer/sasContainer")
- .withToken("fakeTokenPlaceholder"),
- com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### CloudHsmClusters_ValidateRestoreProperties
-
-```java
-import com.azure.resourcemanager.hardwaresecuritymodules.models.RestoreRequestProperties;
-
-/**
- * Samples for CloudHsmClusters ValidateRestoreProperties.
- */
-public final class CloudHsmClustersValidateRestorePropertiesSamples {
- /*
- * x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/CloudHsmCluster_RequestOrValidate_Restore_MaximumSet_Gen.json
- */
- /**
- * Sample code: CloudHsmCluster_ValidateRestore_MaximumSet_Gen.
- *
- * @param manager Entry point to HardwareSecurityModulesManager.
- */
- public static void cloudHsmClusterValidateRestoreMaximumSetGen(
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
- manager.cloudHsmClusters()
- .validateRestoreProperties("rgcloudhsm", "chsm1",
- new RestoreRequestProperties()
- .withAzureStorageBlobContainerUri(
- "https://myaccount.blob.core.windows.net/sascontainer/sasContainer")
- .withBackupId("backupId"),
- com.azure.core.util.Context.NONE);
- }
-}
-```
-
### DedicatedHsm_CreateOrUpdate
```java
@@ -565,8 +33,8 @@ import java.util.Map;
public final class DedicatedHsmCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/PaymentHsm_CreateOrUpdate_WithManagementProfile.json
+ * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/
+ * examples/PaymentHsm_CreateOrUpdate_WithManagementProfile.json
*/
/**
* Sample code: Create a new or update an existing payment HSM with management profile.
@@ -579,23 +47,23 @@ public final class DedicatedHsmCreateOrUpdateSamples {
.define("hsm1")
.withRegion("westus")
.withExistingResourceGroup("hsm-group")
- .withSku(new Sku().withName(SkuName.PAY_SHIELD10K_LMK1_CPS60))
.withProperties(new DedicatedHsmProperties()
- .withNetworkProfile(new NetworkProfile().withSubnet(new ApiEntityReference().withResourceId(
+ .withNetworkProfile(new NetworkProfile().withSubnet(new ApiEntityReference().withId(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"))
.withNetworkInterfaces(Arrays.asList(new NetworkInterface().withPrivateIpAddress("1.0.0.1"))))
- .withManagementNetworkProfile(new NetworkProfile().withSubnet(new ApiEntityReference().withResourceId(
+ .withManagementNetworkProfile(new NetworkProfile().withSubnet(new ApiEntityReference().withId(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"))
.withNetworkInterfaces(Arrays.asList(new NetworkInterface().withPrivateIpAddress("1.0.0.2"))))
.withStampId("stamp01"))
.withTags(mapOf("Dept", "hsm", "Environment", "dogfood"))
+ .withSku(new Sku().withName(SkuName.PAY_SHIELD10K_LMK1_CPS60))
.create();
}
/*
* x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/DedicatedHsm_CreateOrUpdate.json
+ * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/
+ * examples/DedicatedHsm_CreateOrUpdate.json
*/
/**
* Sample code: Create a new or update an existing dedicated HSM.
@@ -608,20 +76,20 @@ public final class DedicatedHsmCreateOrUpdateSamples {
.define("hsm1")
.withRegion("westus")
.withExistingResourceGroup("hsm-group")
- .withSku(new Sku().withName(SkuName.SAFE_NET_LUNA_NETWORK_HSM_A790))
.withProperties(new DedicatedHsmProperties()
- .withNetworkProfile(new NetworkProfile().withSubnet(new ApiEntityReference().withResourceId(
+ .withNetworkProfile(new NetworkProfile().withSubnet(new ApiEntityReference().withId(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"))
.withNetworkInterfaces(Arrays.asList(new NetworkInterface().withPrivateIpAddress("1.0.0.1"))))
.withStampId("stamp01"))
.withTags(mapOf("Dept", "hsm", "Environment", "dogfood"))
+ .withSku(new Sku().withName(SkuName.SAFE_NET_LUNA_NETWORK_HSM_A790))
.create();
}
/*
* x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/PaymentHsm_CreateOrUpdate.json
+ * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/
+ * examples/PaymentHsm_CreateOrUpdate.json
*/
/**
* Sample code: Create a new or update an existing payment HSM.
@@ -634,13 +102,13 @@ public final class DedicatedHsmCreateOrUpdateSamples {
.define("hsm1")
.withRegion("westus")
.withExistingResourceGroup("hsm-group")
- .withSku(new Sku().withName(SkuName.PAY_SHIELD10K_LMK1_CPS60))
.withProperties(new DedicatedHsmProperties()
- .withNetworkProfile(new NetworkProfile().withSubnet(new ApiEntityReference().withResourceId(
+ .withNetworkProfile(new NetworkProfile().withSubnet(new ApiEntityReference().withId(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"))
.withNetworkInterfaces(Arrays.asList(new NetworkInterface().withPrivateIpAddress("1.0.0.1"))))
.withStampId("stamp01"))
.withTags(mapOf("Dept", "hsm", "Environment", "dogfood"))
+ .withSku(new Sku().withName(SkuName.PAY_SHIELD10K_LMK1_CPS60))
.create();
}
@@ -667,8 +135,8 @@ public final class DedicatedHsmCreateOrUpdateSamples {
public final class DedicatedHsmDeleteSamples {
/*
* x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/DedicatedHsm_Delete.json
+ * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/
+ * examples/DedicatedHsm_Delete.json
*/
/**
* Sample code: Delete a dedicated HSM.
@@ -691,8 +159,8 @@ public final class DedicatedHsmDeleteSamples {
public final class DedicatedHsmGetByResourceGroupSamples {
/*
* x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/PaymentHsm_Get.json
+ * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/
+ * examples/PaymentHsm_Get.json
*/
/**
* Sample code: Get a payment HSM.
@@ -706,8 +174,8 @@ public final class DedicatedHsmGetByResourceGroupSamples {
/*
* x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/PaymentHsm_Get_With_2018-10-31Preview_Version.json
+ * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/
+ * examples/PaymentHsm_Get_With_2018-10-31Preview_Version.json
*/
/**
* Sample code: Get a payment HSM with 2018-10-31Preview api version.
@@ -721,8 +189,8 @@ public final class DedicatedHsmGetByResourceGroupSamples {
/*
* x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/DedicatedHsm_Get.json
+ * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/
+ * examples/DedicatedHsm_Get.json
*/
/**
* Sample code: Get a dedicated HSM.
@@ -745,8 +213,8 @@ public final class DedicatedHsmGetByResourceGroupSamples {
public final class DedicatedHsmListSamples {
/*
* x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/PaymentHsm_ListBySubscription.json
+ * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/
+ * examples/PaymentHsm_ListBySubscription.json
*/
/**
* Sample code: List dedicated HSM devices in a subscription including payment HSM.
@@ -760,8 +228,8 @@ public final class DedicatedHsmListSamples {
/*
* x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/DedicatedHsm_ListBySubscription.json
+ * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/
+ * examples/DedicatedHsm_ListBySubscription.json
*/
/**
* Sample code: List dedicated HSM devices in a subscription.
@@ -784,8 +252,8 @@ public final class DedicatedHsmListSamples {
public final class DedicatedHsmListByResourceGroupSamples {
/*
* x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/DedicatedHsm_ListByResourceGroup.json
+ * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/
+ * examples/DedicatedHsm_ListByResourceGroup.json
*/
/**
* Sample code: List dedicated HSM devices in a resource group.
@@ -799,8 +267,8 @@ public final class DedicatedHsmListByResourceGroupSamples {
/*
* x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/PaymentHsm_ListByResourceGroup.json
+ * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/
+ * examples/PaymentHsm_ListByResourceGroup.json
*/
/**
* Sample code: List dedicated HSM devices in a resource group including payment HSM.
@@ -823,8 +291,8 @@ public final class DedicatedHsmListByResourceGroupSamples {
public final class DedicatedHsmListOutboundNetworkDependenciesEndpointsSamples {
/*
* x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/GetOutboundNetworkDependenciesEndpointsList.json
+ * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/
+ * examples/GetOutboundNetworkDependenciesEndpointsList.json
*/
/**
* Sample code: List OutboundNetworkDependenciesEndpoints by Managed Cluster.
@@ -852,8 +320,8 @@ import java.util.Map;
public final class DedicatedHsmUpdateSamples {
/*
* x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/DedicatedHsm_Update.json
+ * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/
+ * examples/DedicatedHsm_Update.json
*/
/**
* Sample code: Update an existing dedicated HSM.
@@ -870,8 +338,8 @@ public final class DedicatedHsmUpdateSamples {
/*
* x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/PaymentHsm_Update.json
+ * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/
+ * examples/PaymentHsm_Update.json
*/
/**
* Sample code: Update an existing payment HSM.
@@ -909,8 +377,8 @@ public final class DedicatedHsmUpdateSamples {
public final class OperationsListSamples {
/*
* x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/OperationsList.json
+ * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/
+ * examples/PaymentHsm_OperationsList.json
*/
/**
* Sample code: Get a list of Payment HSM operations.
@@ -924,8 +392,8 @@ public final class OperationsListSamples {
/*
* x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/OperationsList.json
+ * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/
+ * examples/DedicatedHsm_OperationsList.json
*/
/**
* Sample code: Get a list of Dedicated HSM operations.
@@ -939,28 +407,3 @@ public final class OperationsListSamples {
}
```
-### PrivateEndpointConnections_ListByCloudHsmCluster
-
-```java
-/**
- * Samples for PrivateEndpointConnections ListByCloudHsmCluster.
- */
-public final class PrivateEndpointConnectionsListByCloudHsmClusterSamples {
- /*
- * x-ms-original-file:
- * specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2024-06-30-
- * preview/examples/CloudHsmClusterPrivateEndpointConnection_ListByCloudHsmCluster_MaximumSet_Gen.json
- */
- /**
- * Sample code: CloudHsmClusterPrivateEndpointConnection_ListByResource_MaximumSet_Gen.
- *
- * @param manager Entry point to HardwareSecurityModulesManager.
- */
- public static void cloudHsmClusterPrivateEndpointConnectionListByResourceMaximumSetGen(
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
- manager.privateEndpointConnections()
- .listByCloudHsmCluster("rgcloudhsm", "chsm1", com.azure.core.util.Context.NONE);
- }
-}
-```
-
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/pom.xml b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/pom.xml
index 6be548f73ee8f..b4ccb1d191ee7 100644
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/pom.xml
+++ b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/pom.xml
@@ -14,11 +14,11 @@
com.azure.resourcemanager
azure-resourcemanager-hardwaresecuritymodules
- 1.0.0-beta.4
+ 1.0.0
jar
Microsoft Azure SDK for Hardware Security Modules Management
- This package contains Microsoft Azure SDK for Hardware Security Modules Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Azure management API provides a RESTful set of web services that interact with Azure HSM RP. Package tag package-preview-2024-06.
+ This package contains Microsoft Azure SDK for Hardware Security Modules Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Azure management API provides a RESTful set of web services that interact with Azure HSM RP. Package tag package-2021-11.
https://github.com/Azure/azure-sdk-for-java
@@ -45,7 +45,6 @@
UTF-8
0
0
- true
false
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/HardwareSecurityModulesManager.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/HardwareSecurityModulesManager.java
index fbccea7bdc71a..f8df0259a194c 100644
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/HardwareSecurityModulesManager.java
+++ b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/HardwareSecurityModulesManager.java
@@ -25,22 +25,10 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.hardwaresecuritymodules.fluent.AzureHsmResourceProvider;
import com.azure.resourcemanager.hardwaresecuritymodules.implementation.AzureHsmResourceProviderBuilder;
-import com.azure.resourcemanager.hardwaresecuritymodules.implementation.CloudHsmClusterBackupStatusImpl;
-import com.azure.resourcemanager.hardwaresecuritymodules.implementation.CloudHsmClusterPrivateEndpointConnectionsImpl;
-import com.azure.resourcemanager.hardwaresecuritymodules.implementation.CloudHsmClusterPrivateLinkResourcesImpl;
-import com.azure.resourcemanager.hardwaresecuritymodules.implementation.CloudHsmClusterRestoreStatusImpl;
-import com.azure.resourcemanager.hardwaresecuritymodules.implementation.CloudHsmClustersImpl;
import com.azure.resourcemanager.hardwaresecuritymodules.implementation.DedicatedHsmsImpl;
import com.azure.resourcemanager.hardwaresecuritymodules.implementation.OperationsImpl;
-import com.azure.resourcemanager.hardwaresecuritymodules.implementation.PrivateEndpointConnectionsImpl;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterBackupStatus;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterPrivateEndpointConnections;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterPrivateLinkResources;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterRestoreStatus;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusters;
import com.azure.resourcemanager.hardwaresecuritymodules.models.DedicatedHsms;
import com.azure.resourcemanager.hardwaresecuritymodules.models.Operations;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.PrivateEndpointConnections;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
@@ -53,22 +41,10 @@
* The Azure management API provides a RESTful set of web services that interact with Azure HSM RP.
*/
public final class HardwareSecurityModulesManager {
- private CloudHsmClusters cloudHsmClusters;
-
- private CloudHsmClusterPrivateLinkResources cloudHsmClusterPrivateLinkResources;
-
- private CloudHsmClusterPrivateEndpointConnections cloudHsmClusterPrivateEndpointConnections;
-
- private PrivateEndpointConnections privateEndpointConnections;
-
- private CloudHsmClusterBackupStatus cloudHsmClusterBackupStatus;
-
- private CloudHsmClusterRestoreStatus cloudHsmClusterRestoreStatus;
+ private Operations operations;
private DedicatedHsms dedicatedHsms;
- private Operations operations;
-
private final AzureHsmResourceProvider clientObject;
private HardwareSecurityModulesManager(HttpPipeline httpPipeline, AzureProfile profile,
@@ -235,7 +211,7 @@ public HardwareSecurityModulesManager authenticate(TokenCredential credential, A
.append("-")
.append("com.azure.resourcemanager.hardwaresecuritymodules")
.append("/")
- .append("1.0.0-beta.3");
+ .append("1.0.0");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
@@ -282,81 +258,15 @@ public HardwareSecurityModulesManager authenticate(TokenCredential credential, A
}
/**
- * Gets the resource collection API of CloudHsmClusters. It manages CloudHsmCluster.
- *
- * @return Resource collection API of CloudHsmClusters.
- */
- public CloudHsmClusters cloudHsmClusters() {
- if (this.cloudHsmClusters == null) {
- this.cloudHsmClusters = new CloudHsmClustersImpl(clientObject.getCloudHsmClusters(), this);
- }
- return cloudHsmClusters;
- }
-
- /**
- * Gets the resource collection API of CloudHsmClusterPrivateLinkResources.
- *
- * @return Resource collection API of CloudHsmClusterPrivateLinkResources.
- */
- public CloudHsmClusterPrivateLinkResources cloudHsmClusterPrivateLinkResources() {
- if (this.cloudHsmClusterPrivateLinkResources == null) {
- this.cloudHsmClusterPrivateLinkResources = new CloudHsmClusterPrivateLinkResourcesImpl(
- clientObject.getCloudHsmClusterPrivateLinkResources(), this);
- }
- return cloudHsmClusterPrivateLinkResources;
- }
-
- /**
- * Gets the resource collection API of CloudHsmClusterPrivateEndpointConnections. It manages
- * PrivateEndpointConnection.
- *
- * @return Resource collection API of CloudHsmClusterPrivateEndpointConnections.
- */
- public CloudHsmClusterPrivateEndpointConnections cloudHsmClusterPrivateEndpointConnections() {
- if (this.cloudHsmClusterPrivateEndpointConnections == null) {
- this.cloudHsmClusterPrivateEndpointConnections = new CloudHsmClusterPrivateEndpointConnectionsImpl(
- clientObject.getCloudHsmClusterPrivateEndpointConnections(), this);
- }
- return cloudHsmClusterPrivateEndpointConnections;
- }
-
- /**
- * Gets the resource collection API of PrivateEndpointConnections.
- *
- * @return Resource collection API of PrivateEndpointConnections.
- */
- public PrivateEndpointConnections privateEndpointConnections() {
- if (this.privateEndpointConnections == null) {
- this.privateEndpointConnections
- = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this);
- }
- return privateEndpointConnections;
- }
-
- /**
- * Gets the resource collection API of CloudHsmClusterBackupStatus.
- *
- * @return Resource collection API of CloudHsmClusterBackupStatus.
- */
- public CloudHsmClusterBackupStatus cloudHsmClusterBackupStatus() {
- if (this.cloudHsmClusterBackupStatus == null) {
- this.cloudHsmClusterBackupStatus
- = new CloudHsmClusterBackupStatusImpl(clientObject.getCloudHsmClusterBackupStatus(), this);
- }
- return cloudHsmClusterBackupStatus;
- }
-
- /**
- * Gets the resource collection API of CloudHsmClusterRestoreStatus.
+ * Gets the resource collection API of Operations.
*
- * @return Resource collection API of CloudHsmClusterRestoreStatus.
+ * @return Resource collection API of Operations.
*/
- public CloudHsmClusterRestoreStatus cloudHsmClusterRestoreStatus() {
- if (this.cloudHsmClusterRestoreStatus == null) {
- this.cloudHsmClusterRestoreStatus
- = new CloudHsmClusterRestoreStatusImpl(clientObject.getCloudHsmClusterRestoreStatus(), this);
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
}
- return cloudHsmClusterRestoreStatus;
+ return operations;
}
/**
@@ -371,18 +281,6 @@ public DedicatedHsms dedicatedHsms() {
return dedicatedHsms;
}
- /**
- * Gets the resource collection API of Operations.
- *
- * @return Resource collection API of Operations.
- */
- public Operations operations() {
- if (this.operations == null) {
- this.operations = new OperationsImpl(clientObject.getOperations(), this);
- }
- return operations;
- }
-
/**
* Gets wrapped service client AzureHsmResourceProvider providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/AzureHsmResourceProvider.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/AzureHsmResourceProvider.java
index 9df5d59c7e457..0d4466715200c 100644
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/AzureHsmResourceProvider.java
+++ b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/AzureHsmResourceProvider.java
@@ -12,7 +12,7 @@
*/
public interface AzureHsmResourceProvider {
/**
- * Gets The ID of the target subscription. The value must be an UUID.
+ * Gets The ID of the target subscription.
*
* @return the subscriptionId value.
*/
@@ -47,46 +47,11 @@ public interface AzureHsmResourceProvider {
Duration getDefaultPollInterval();
/**
- * Gets the CloudHsmClustersClient object to access its operations.
- *
- * @return the CloudHsmClustersClient object.
- */
- CloudHsmClustersClient getCloudHsmClusters();
-
- /**
- * Gets the CloudHsmClusterPrivateLinkResourcesClient object to access its operations.
- *
- * @return the CloudHsmClusterPrivateLinkResourcesClient object.
- */
- CloudHsmClusterPrivateLinkResourcesClient getCloudHsmClusterPrivateLinkResources();
-
- /**
- * Gets the CloudHsmClusterPrivateEndpointConnectionsClient object to access its operations.
- *
- * @return the CloudHsmClusterPrivateEndpointConnectionsClient object.
- */
- CloudHsmClusterPrivateEndpointConnectionsClient getCloudHsmClusterPrivateEndpointConnections();
-
- /**
- * Gets the PrivateEndpointConnectionsClient object to access its operations.
- *
- * @return the PrivateEndpointConnectionsClient object.
- */
- PrivateEndpointConnectionsClient getPrivateEndpointConnections();
-
- /**
- * Gets the CloudHsmClusterBackupStatusClient object to access its operations.
- *
- * @return the CloudHsmClusterBackupStatusClient object.
- */
- CloudHsmClusterBackupStatusClient getCloudHsmClusterBackupStatus();
-
- /**
- * Gets the CloudHsmClusterRestoreStatusClient object to access its operations.
+ * Gets the OperationsClient object to access its operations.
*
- * @return the CloudHsmClusterRestoreStatusClient object.
+ * @return the OperationsClient object.
*/
- CloudHsmClusterRestoreStatusClient getCloudHsmClusterRestoreStatus();
+ OperationsClient getOperations();
/**
* Gets the DedicatedHsmsClient object to access its operations.
@@ -94,11 +59,4 @@ public interface AzureHsmResourceProvider {
* @return the DedicatedHsmsClient object.
*/
DedicatedHsmsClient getDedicatedHsms();
-
- /**
- * Gets the OperationsClient object to access its operations.
- *
- * @return the OperationsClient object.
- */
- OperationsClient getOperations();
}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/CloudHsmClusterBackupStatusClient.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/CloudHsmClusterBackupStatusClient.java
deleted file mode 100644
index a972254e8f418..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/CloudHsmClusterBackupStatusClient.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.fluent;
-
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.BackupResultInner;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterBackupStatusGetResponse;
-
-/**
- * An instance of this class provides access to all the operations defined in CloudHsmClusterBackupStatusClient.
- */
-public interface CloudHsmClusterBackupStatusClient {
- /**
- * Gets the backup operation status of the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param jobId The id returned as part of the backup request.
- * @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 backup operation status of the specified Cloud HSM Cluster.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- CloudHsmClusterBackupStatusGetResponse getWithResponse(String resourceGroupName, String cloudHsmClusterName,
- String jobId, Context context);
-
- /**
- * Gets the backup operation status of the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param jobId The id returned as part of the backup request.
- * @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 backup operation status of the specified Cloud HSM Cluster.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- BackupResultInner get(String resourceGroupName, String cloudHsmClusterName, String jobId);
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/CloudHsmClusterPrivateEndpointConnectionsClient.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/CloudHsmClusterPrivateEndpointConnectionsClient.java
deleted file mode 100644
index 3871a5e8af963..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/CloudHsmClusterPrivateEndpointConnectionsClient.java
+++ /dev/null
@@ -1,148 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.fluent;
-
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceMethod;
-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.hardwaresecuritymodules.fluent.models.PrivateEndpointConnectionInner;
-
-/**
- * An instance of this class provides access to all the operations defined in
- * CloudHsmClusterPrivateEndpointConnectionsClient.
- */
-public interface CloudHsmClusterPrivateEndpointConnectionsClient {
- /**
- * Creates or updates the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @param properties Parameters of the PrivateEndpointConnection.
- * @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 private endpoint connection resource along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response createWithResponse(String resourceGroupName, String cloudHsmClusterName,
- String peConnectionName, PrivateEndpointConnectionInner properties, Context context);
-
- /**
- * Creates or updates the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @param properties Parameters of the PrivateEndpointConnection.
- * @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 private endpoint connection resource.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- PrivateEndpointConnectionInner create(String resourceGroupName, String cloudHsmClusterName, String peConnectionName,
- PrivateEndpointConnectionInner properties);
-
- /**
- * Deletes the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @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, Void> beginDelete(String resourceGroupName, String cloudHsmClusterName,
- String peConnectionName);
-
- /**
- * Deletes the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @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, Void> beginDelete(String resourceGroupName, String cloudHsmClusterName,
- String peConnectionName, Context context);
-
- /**
- * Deletes the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String cloudHsmClusterName, String peConnectionName);
-
- /**
- * Deletes the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String cloudHsmClusterName, String peConnectionName, Context context);
-
- /**
- * Gets the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @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 private endpoint connection for the Cloud Hsm Cluster along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String resourceGroupName, String cloudHsmClusterName,
- String peConnectionName, Context context);
-
- /**
- * Gets the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @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 private endpoint connection for the Cloud Hsm Cluster.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- PrivateEndpointConnectionInner get(String resourceGroupName, String cloudHsmClusterName, String peConnectionName);
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/CloudHsmClusterPrivateLinkResourcesClient.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/CloudHsmClusterPrivateLinkResourcesClient.java
deleted file mode 100644
index e2a91915c0fc6..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/CloudHsmClusterPrivateLinkResourcesClient.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.fluent;
-
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.PrivateLinkResourceInner;
-
-/**
- * An instance of this class provides access to all the operations defined in CloudHsmClusterPrivateLinkResourcesClient.
- */
-public interface CloudHsmClusterPrivateLinkResourcesClient {
- /**
- * Gets the private link resources supported for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 private link resources supported for the Cloud Hsm Cluster as paginated response with
- * {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByCloudHsmCluster(String resourceGroupName, String cloudHsmClusterName);
-
- /**
- * Gets the private link resources supported for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 private link resources supported for the Cloud Hsm Cluster as paginated response with
- * {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByCloudHsmCluster(String resourceGroupName, String cloudHsmClusterName,
- Context context);
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/CloudHsmClusterRestoreStatusClient.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/CloudHsmClusterRestoreStatusClient.java
deleted file mode 100644
index 1d13e6ed369e7..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/CloudHsmClusterRestoreStatusClient.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.fluent;
-
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.RestoreResultInner;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterRestoreStatusGetResponse;
-
-/**
- * An instance of this class provides access to all the operations defined in CloudHsmClusterRestoreStatusClient.
- */
-public interface CloudHsmClusterRestoreStatusClient {
- /**
- * Gets the restore operation status of the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param jobId The id returned as part of the backup request.
- * @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 restore operation status of the specified Cloud HSM Cluster.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- CloudHsmClusterRestoreStatusGetResponse getWithResponse(String resourceGroupName, String cloudHsmClusterName,
- String jobId, Context context);
-
- /**
- * Gets the restore operation status of the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param jobId The id returned as part of the backup request.
- * @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 restore operation status of the specified Cloud HSM Cluster.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- RestoreResultInner get(String resourceGroupName, String cloudHsmClusterName, String jobId);
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/CloudHsmClustersClient.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/CloudHsmClustersClient.java
deleted file mode 100644
index fd5f3571a52a5..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/CloudHsmClustersClient.java
+++ /dev/null
@@ -1,555 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.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.hardwaresecuritymodules.fluent.models.BackupResultInner;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.CloudHsmClusterInner;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.RestoreResultInner;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.BackupRequestProperties;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterPatchParameters;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.RestoreRequestProperties;
-
-/**
- * An instance of this class provides access to all the operations defined in CloudHsmClustersClient.
- */
-public interface CloudHsmClustersClient {
- /**
- * Create or Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, CloudHsmClusterInner> beginCreateOrUpdate(String resourceGroupName,
- String cloudHsmClusterName, CloudHsmClusterInner body);
-
- /**
- * Create or Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, CloudHsmClusterInner> beginCreateOrUpdate(String resourceGroupName,
- String cloudHsmClusterName, CloudHsmClusterInner body, Context context);
-
- /**
- * Create or Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- CloudHsmClusterInner createOrUpdate(String resourceGroupName, String cloudHsmClusterName,
- CloudHsmClusterInner body);
-
- /**
- * Create or Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- CloudHsmClusterInner createOrUpdate(String resourceGroupName, String cloudHsmClusterName, CloudHsmClusterInner body,
- Context context);
-
- /**
- * Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, CloudHsmClusterInner> beginUpdate(String resourceGroupName,
- String cloudHsmClusterName, CloudHsmClusterPatchParameters body);
-
- /**
- * Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, CloudHsmClusterInner> beginUpdate(String resourceGroupName,
- String cloudHsmClusterName, CloudHsmClusterPatchParameters body, Context context);
-
- /**
- * Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- CloudHsmClusterInner update(String resourceGroupName, String cloudHsmClusterName,
- CloudHsmClusterPatchParameters body);
-
- /**
- * Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- CloudHsmClusterInner update(String resourceGroupName, String cloudHsmClusterName,
- CloudHsmClusterPatchParameters body, Context context);
-
- /**
- * Gets the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 specified Cloud HSM Cluster along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(String resourceGroupName, String cloudHsmClusterName,
- Context context);
-
- /**
- * Gets the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 specified Cloud HSM Cluster.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- CloudHsmClusterInner getByResourceGroup(String resourceGroupName, String cloudHsmClusterName);
-
- /**
- * Deletes the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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, Void> beginDelete(String resourceGroupName, String cloudHsmClusterName);
-
- /**
- * Deletes the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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, Void> beginDelete(String resourceGroupName, String cloudHsmClusterName,
- Context context);
-
- /**
- * Deletes the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String cloudHsmClusterName);
-
- /**
- * Deletes the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String cloudHsmClusterName, Context context);
-
- /**
- * The List operation gets information about the Cloud HSM Clusters associated with the subscription and within the
- * specified resource group.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of Cloud HSM Clusters as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName);
-
- /**
- * The List operation gets information about the Cloud HSM Clusters associated with the subscription and within the
- * specified resource group.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param skiptoken The page-continuation token to use with a paged version of this API.
- * @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 list of Cloud HSM Clusters as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName, String skiptoken,
- Context context);
-
- /**
- * The List operation gets information about the Cloud HSM Clusters associated with the subscription.
- *
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of Cloud HSM Clusters as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list();
-
- /**
- * The List operation gets information about the Cloud HSM Clusters associated with the subscription.
- *
- * @param skiptoken The page-continuation token to use with a paged version of this API.
- * @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 list of Cloud HSM Clusters as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String skiptoken, Context context);
-
- /**
- * Pre Backup operation to validate whether the customer can perform a backup on the Cloud HSM Cluster resource in
- * the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 backup operation Result.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, BackupResultInner> beginValidateBackupProperties(String resourceGroupName,
- String cloudHsmClusterName);
-
- /**
- * Pre Backup operation to validate whether the customer can perform a backup on the Cloud HSM Cluster resource in
- * the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param backupRequestProperties Backup Operation Required properties.
- * @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 backup operation Result.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, BackupResultInner> beginValidateBackupProperties(String resourceGroupName,
- String cloudHsmClusterName, BackupRequestProperties backupRequestProperties, Context context);
-
- /**
- * Pre Backup operation to validate whether the customer can perform a backup on the Cloud HSM Cluster resource in
- * the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 backup operation Result.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- BackupResultInner validateBackupProperties(String resourceGroupName, String cloudHsmClusterName);
-
- /**
- * Pre Backup operation to validate whether the customer can perform a backup on the Cloud HSM Cluster resource in
- * the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param backupRequestProperties Backup Operation Required properties.
- * @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 backup operation Result.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- BackupResultInner validateBackupProperties(String resourceGroupName, String cloudHsmClusterName,
- BackupRequestProperties backupRequestProperties, Context context);
-
- /**
- * Create a backup of the Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 backup operation Result.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, BackupResultInner> beginBackup(String resourceGroupName,
- String cloudHsmClusterName);
-
- /**
- * Create a backup of the Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param backupRequestProperties Azure storage Resource Uri.
- * @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 backup operation Result.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, BackupResultInner> beginBackup(String resourceGroupName,
- String cloudHsmClusterName, BackupRequestProperties backupRequestProperties, Context context);
-
- /**
- * Create a backup of the Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 backup operation Result.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- BackupResultInner backup(String resourceGroupName, String cloudHsmClusterName);
-
- /**
- * Create a backup of the Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param backupRequestProperties Azure storage Resource Uri.
- * @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 backup operation Result.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- BackupResultInner backup(String resourceGroupName, String cloudHsmClusterName,
- BackupRequestProperties backupRequestProperties, Context context);
-
- /**
- * Queued validating pre restore operation.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 restore operation properties.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, RestoreResultInner>
- beginValidateRestoreProperties(String resourceGroupName, String cloudHsmClusterName);
-
- /**
- * Queued validating pre restore operation.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Optional Parameters to validate prior performing a restore operation.
- * @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 restore operation properties.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, RestoreResultInner> beginValidateRestoreProperties(
- String resourceGroupName, String cloudHsmClusterName, RestoreRequestProperties restoreRequestProperties,
- Context context);
-
- /**
- * Queued validating pre restore operation.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 restore operation properties.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- RestoreResultInner validateRestoreProperties(String resourceGroupName, String cloudHsmClusterName);
-
- /**
- * Queued validating pre restore operation.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Optional Parameters to validate prior performing a restore operation.
- * @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 restore operation properties.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- RestoreResultInner validateRestoreProperties(String resourceGroupName, String cloudHsmClusterName,
- RestoreRequestProperties restoreRequestProperties, Context context);
-
- /**
- * Restores all key materials of a specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Restore Operation Required properties.
- * @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 restore operation properties.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, RestoreResultInner> beginRestore(String resourceGroupName,
- String cloudHsmClusterName, RestoreRequestProperties restoreRequestProperties);
-
- /**
- * Restores all key materials of a specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Restore Operation Required properties.
- * @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 restore operation properties.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, RestoreResultInner> beginRestore(String resourceGroupName,
- String cloudHsmClusterName, RestoreRequestProperties restoreRequestProperties, Context context);
-
- /**
- * Restores all key materials of a specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Restore Operation Required properties.
- * @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 restore operation properties.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- RestoreResultInner restore(String resourceGroupName, String cloudHsmClusterName,
- RestoreRequestProperties restoreRequestProperties);
-
- /**
- * Restores all key materials of a specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Restore Operation Required properties.
- * @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 restore operation properties.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- RestoreResultInner restore(String resourceGroupName, String cloudHsmClusterName,
- RestoreRequestProperties restoreRequestProperties, Context context);
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/DedicatedHsmsClient.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/DedicatedHsmsClient.java
index 22925598be752..d183682ecdeb2 100644
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/DedicatedHsmsClient.java
+++ b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/DedicatedHsmsClient.java
@@ -22,7 +22,7 @@ public interface DedicatedHsmsClient {
/**
* Create or Update a dedicated HSM in the specified subscription.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceGroupName The name of the Resource Group to which the resource belongs.
* @param name Name of the dedicated Hsm.
* @param parameters Parameters to create or update the dedicated hsm.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -38,7 +38,7 @@ SyncPoller, DedicatedHsmInner> beginCreateOrUpdate
/**
* Create or Update a dedicated HSM in the specified subscription.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceGroupName The name of the Resource Group to which the resource belongs.
* @param name Name of the dedicated Hsm.
* @param parameters Parameters to create or update the dedicated hsm.
* @param context The context to associate with this operation.
@@ -55,7 +55,7 @@ SyncPoller, DedicatedHsmInner> beginCreateOrUpdate
/**
* Create or Update a dedicated HSM in the specified subscription.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceGroupName The name of the Resource Group to which the resource belongs.
* @param name Name of the dedicated Hsm.
* @param parameters Parameters to create or update the dedicated hsm.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -70,7 +70,7 @@ SyncPoller, DedicatedHsmInner> beginCreateOrUpdate
/**
* Create or Update a dedicated HSM in the specified subscription.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceGroupName The name of the Resource Group to which the resource belongs.
* @param name Name of the dedicated Hsm.
* @param parameters Parameters to create or update the dedicated hsm.
* @param context The context to associate with this operation.
@@ -87,8 +87,8 @@ DedicatedHsmInner createOrUpdate(String resourceGroupName, String name, Dedicate
/**
* Update a dedicated HSM in the specified subscription.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of the dedicated Hsm.
+ * @param resourceGroupName The name of the Resource Group to which the server belongs.
+ * @param name Name of the dedicated HSM.
* @param parameters Parameters to patch the dedicated HSM.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.hardwaresecuritymodules.models.ErrorException thrown if the request is rejected
@@ -103,8 +103,8 @@ SyncPoller, DedicatedHsmInner> beginUpdate(String
/**
* Update a dedicated HSM in the specified subscription.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of the dedicated Hsm.
+ * @param resourceGroupName The name of the Resource Group to which the server belongs.
+ * @param name Name of the dedicated HSM.
* @param parameters Parameters to patch the dedicated HSM.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -120,8 +120,8 @@ SyncPoller, DedicatedHsmInner> beginUpdate(String
/**
* Update a dedicated HSM in the specified subscription.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of the dedicated Hsm.
+ * @param resourceGroupName The name of the Resource Group to which the server belongs.
+ * @param name Name of the dedicated HSM.
* @param parameters Parameters to patch the dedicated HSM.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.hardwaresecuritymodules.models.ErrorException thrown if the request is rejected
@@ -135,8 +135,8 @@ SyncPoller, DedicatedHsmInner> beginUpdate(String
/**
* Update a dedicated HSM in the specified subscription.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of the dedicated Hsm.
+ * @param resourceGroupName The name of the Resource Group to which the server belongs.
+ * @param name Name of the dedicated HSM.
* @param parameters Parameters to patch the dedicated HSM.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -152,8 +152,8 @@ DedicatedHsmInner update(String resourceGroupName, String name, DedicatedHsmPatc
/**
* Deletes the specified Azure Dedicated HSM.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of the dedicated Hsm.
+ * @param resourceGroupName The name of the Resource Group to which the dedicated HSM belongs.
+ * @param name The name of the dedicated HSM to delete.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.hardwaresecuritymodules.models.ErrorException thrown if the request is rejected
* by server.
@@ -166,8 +166,8 @@ DedicatedHsmInner update(String resourceGroupName, String name, DedicatedHsmPatc
/**
* Deletes the specified Azure Dedicated HSM.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of the dedicated Hsm.
+ * @param resourceGroupName The name of the Resource Group to which the dedicated HSM belongs.
+ * @param name The name of the dedicated HSM to delete.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.hardwaresecuritymodules.models.ErrorException thrown if the request is rejected
@@ -181,8 +181,8 @@ DedicatedHsmInner update(String resourceGroupName, String name, DedicatedHsmPatc
/**
* Deletes the specified Azure Dedicated HSM.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of the dedicated Hsm.
+ * @param resourceGroupName The name of the Resource Group to which the dedicated HSM belongs.
+ * @param name The name of the dedicated HSM to delete.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.hardwaresecuritymodules.models.ErrorException thrown if the request is rejected
* by server.
@@ -194,8 +194,8 @@ DedicatedHsmInner update(String resourceGroupName, String name, DedicatedHsmPatc
/**
* Deletes the specified Azure Dedicated HSM.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of the dedicated Hsm.
+ * @param resourceGroupName The name of the Resource Group to which the dedicated HSM belongs.
+ * @param name The name of the dedicated HSM to delete.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.hardwaresecuritymodules.models.ErrorException thrown if the request is rejected
@@ -208,8 +208,8 @@ DedicatedHsmInner update(String resourceGroupName, String name, DedicatedHsmPatc
/**
* Gets the specified Azure dedicated HSM.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of the dedicated Hsm.
+ * @param resourceGroupName The name of the Resource Group to which the dedicated hsm belongs.
+ * @param name The name of the dedicated HSM.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.hardwaresecuritymodules.models.ErrorException thrown if the request is rejected
@@ -223,8 +223,8 @@ DedicatedHsmInner update(String resourceGroupName, String name, DedicatedHsmPatc
/**
* Gets the specified Azure dedicated HSM.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of the dedicated Hsm.
+ * @param resourceGroupName The name of the Resource Group to which the dedicated hsm belongs.
+ * @param name The name of the dedicated HSM.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.hardwaresecuritymodules.models.ErrorException thrown if the request is rejected
* by server.
@@ -238,7 +238,7 @@ DedicatedHsmInner update(String resourceGroupName, String name, DedicatedHsmPatc
* The List operation gets information about the dedicated hsms associated with the subscription and within the
* specified resource group.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceGroupName The name of the Resource Group to which the dedicated HSM belongs.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.hardwaresecuritymodules.models.ErrorException thrown if the request is rejected
* by server.
@@ -252,7 +252,7 @@ DedicatedHsmInner update(String resourceGroupName, String name, DedicatedHsmPatc
* The List operation gets information about the dedicated hsms associated with the subscription and within the
* specified resource group.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceGroupName The name of the Resource Group to which the dedicated HSM belongs.
* @param top Maximum number of results to return.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -296,8 +296,8 @@ DedicatedHsmInner update(String resourceGroupName, String name, DedicatedHsmPatc
* Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified dedicated hsm
* resource. The operation returns properties of each egress endpoint.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of the dedicated Hsm.
+ * @param resourceGroupName The name of the Resource Group to which the dedicated hsm belongs.
+ * @param name The name of the dedicated HSM.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.hardwaresecuritymodules.models.ErrorException thrown if the request is rejected
* by server.
@@ -316,8 +316,8 @@ PagedIterable listOutboundNetworkDependenciesE
* Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified dedicated hsm
* resource. The operation returns properties of each egress endpoint.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param name Name of the dedicated Hsm.
+ * @param resourceGroupName The name of the Resource Group to which the dedicated hsm belongs.
+ * @param name The name of the dedicated HSM.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.hardwaresecuritymodules.models.ErrorException thrown if the request is rejected
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/OperationsClient.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/OperationsClient.java
index 332478729f32d..79d782a25a914 100644
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/OperationsClient.java
+++ b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/OperationsClient.java
@@ -8,31 +8,33 @@
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.OperationInner;
+import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.DedicatedHsmOperationInner;
/**
* An instance of this class provides access to all the operations defined in OperationsClient.
*/
public interface OperationsClient {
/**
- * Get a list of Hardware Security Modules operations.
+ * Get a list of Dedicated HSM operations.
*
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws com.azure.resourcemanager.hardwaresecuritymodules.models.ErrorException thrown if the request is rejected
+ * by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of Hardware Security Modules operations as paginated response with {@link PagedIterable}.
+ * @return a list of Dedicated HSM operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list();
+ PagedIterable list();
/**
- * Get a list of Hardware Security Modules operations.
+ * Get a list of Dedicated HSM operations.
*
* @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 com.azure.resourcemanager.hardwaresecuritymodules.models.ErrorException thrown if the request is rejected
+ * by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of Hardware Security Modules operations as paginated response with {@link PagedIterable}.
+ * @return a list of Dedicated HSM operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(Context context);
+ PagedIterable list(Context context);
}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/PrivateEndpointConnectionsClient.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/PrivateEndpointConnectionsClient.java
deleted file mode 100644
index 0d485423766a8..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/PrivateEndpointConnectionsClient.java
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.fluent;
-
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.PrivateEndpointConnectionInner;
-
-/**
- * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient.
- */
-public interface PrivateEndpointConnectionsClient {
- /**
- * The List operation gets information about the private endpoint connections associated with the Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 list of private endpoint connections associated with the specified resource as paginated response with
- * {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByCloudHsmCluster(String resourceGroupName,
- String cloudHsmClusterName);
-
- /**
- * The List operation gets information about the private endpoint connections associated with the Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 list of private endpoint connections associated with the specified resource as paginated response with
- * {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByCloudHsmCluster(String resourceGroupName,
- String cloudHsmClusterName, Context context);
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/BackupResultInner.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/BackupResultInner.java
deleted file mode 100644
index 740d3ccf06d1d..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/BackupResultInner.java
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonSerializable;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.BackupResultProperties;
-import java.io.IOException;
-
-/**
- * Backup operation Result.
- */
-@Fluent
-public final class BackupResultInner implements JsonSerializable {
- /*
- * Properties of the Cloud HSM Cluster
- */
- private BackupResultProperties properties;
-
- /**
- * Creates an instance of BackupResultInner class.
- */
- public BackupResultInner() {
- }
-
- /**
- * Get the properties property: Properties of the Cloud HSM Cluster.
- *
- * @return the properties value.
- */
- public BackupResultProperties properties() {
- return this.properties;
- }
-
- /**
- * Set the properties property: Properties of the Cloud HSM Cluster.
- *
- * @param properties the properties value to set.
- * @return the BackupResultInner object itself.
- */
- public BackupResultInner withProperties(BackupResultProperties properties) {
- this.properties = properties;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (properties() != null) {
- properties().validate();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeJsonField("properties", this.properties);
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of BackupResultInner from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of BackupResultInner 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 BackupResultInner.
- */
- public static BackupResultInner fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- BackupResultInner deserializedBackupResultInner = new BackupResultInner();
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
-
- if ("properties".equals(fieldName)) {
- deserializedBackupResultInner.properties = BackupResultProperties.fromJson(reader);
- } else {
- reader.skipChildren();
- }
- }
-
- return deserializedBackupResultInner;
- });
- }
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/CloudHsmClusterInner.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/CloudHsmClusterInner.java
deleted file mode 100644
index c718aed2e5544..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/CloudHsmClusterInner.java
+++ /dev/null
@@ -1,226 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-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.hardwaresecuritymodules.models.CloudHsmClusterProperties;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterResource;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterSku;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.ManagedServiceIdentity;
-import java.io.IOException;
-import java.util.Map;
-
-/**
- * Resource information with extended details.
- */
-@Fluent
-public final class CloudHsmClusterInner extends CloudHsmClusterResource {
- /*
- * Properties of the Cloud HSM Cluster
- */
- private CloudHsmClusterProperties 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 CloudHsmClusterInner class.
- */
- public CloudHsmClusterInner() {
- }
-
- /**
- * Get the properties property: Properties of the Cloud HSM Cluster.
- *
- * @return the properties value.
- */
- public CloudHsmClusterProperties properties() {
- return this.properties;
- }
-
- /**
- * Set the properties property: Properties of the Cloud HSM Cluster.
- *
- * @param properties the properties value to set.
- * @return the CloudHsmClusterInner object itself.
- */
- public CloudHsmClusterInner withProperties(CloudHsmClusterProperties properties) {
- this.properties = properties;
- return this;
- }
-
- /**
- * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
- *
- * @return the systemData value.
- */
- @Override
- 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 CloudHsmClusterInner withIdentity(ManagedServiceIdentity identity) {
- super.withIdentity(identity);
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public CloudHsmClusterInner withSku(CloudHsmClusterSku sku) {
- super.withSku(sku);
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public CloudHsmClusterInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public CloudHsmClusterInner withTags(Map tags) {
- super.withTags(tags);
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- if (properties() != null) {
- properties().validate();
- }
- if (identity() != null) {
- identity().validate();
- }
- if (sku() != null) {
- sku().validate();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeStringField("location", location());
- jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
- jsonWriter.writeJsonField("identity", identity());
- jsonWriter.writeJsonField("sku", sku());
- jsonWriter.writeJsonField("properties", this.properties);
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of CloudHsmClusterInner from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of CloudHsmClusterInner 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 CloudHsmClusterInner.
- */
- public static CloudHsmClusterInner fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- CloudHsmClusterInner deserializedCloudHsmClusterInner = new CloudHsmClusterInner();
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
-
- if ("id".equals(fieldName)) {
- deserializedCloudHsmClusterInner.id = reader.getString();
- } else if ("name".equals(fieldName)) {
- deserializedCloudHsmClusterInner.name = reader.getString();
- } else if ("type".equals(fieldName)) {
- deserializedCloudHsmClusterInner.type = reader.getString();
- } else if ("location".equals(fieldName)) {
- deserializedCloudHsmClusterInner.withLocation(reader.getString());
- } else if ("tags".equals(fieldName)) {
- Map tags = reader.readMap(reader1 -> reader1.getString());
- deserializedCloudHsmClusterInner.withTags(tags);
- } else if ("identity".equals(fieldName)) {
- deserializedCloudHsmClusterInner.withIdentity(ManagedServiceIdentity.fromJson(reader));
- } else if ("sku".equals(fieldName)) {
- deserializedCloudHsmClusterInner.withSku(CloudHsmClusterSku.fromJson(reader));
- } else if ("systemData".equals(fieldName)) {
- deserializedCloudHsmClusterInner.systemData = SystemData.fromJson(reader);
- } else if ("properties".equals(fieldName)) {
- deserializedCloudHsmClusterInner.properties = CloudHsmClusterProperties.fromJson(reader);
- } else {
- reader.skipChildren();
- }
- }
-
- return deserializedCloudHsmClusterInner;
- });
- }
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/DedicatedHsmInner.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/DedicatedHsmInner.java
index 790b84b72c895..c157dc5e3c36c 100644
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/DedicatedHsmInner.java
+++ b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/DedicatedHsmInner.java
@@ -5,13 +5,13 @@
package com.azure.resourcemanager.hardwaresecuritymodules.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.hardwaresecuritymodules.models.DedicatedHsmProperties;
+import com.azure.resourcemanager.hardwaresecuritymodules.models.DedicatedHsmResource;
import com.azure.resourcemanager.hardwaresecuritymodules.models.Sku;
import java.io.IOException;
import java.util.List;
@@ -21,27 +21,17 @@
* Resource information with extended details.
*/
@Fluent
-public final class DedicatedHsmInner extends Resource {
+public final class DedicatedHsmInner extends DedicatedHsmResource {
/*
- * SKU details
+ * Metadata pertaining to creation and last modification of the resource
*/
- private Sku sku;
-
- /*
- * The Dedicated Hsm zones.
- */
- private List zones;
+ private SystemData systemData;
/*
* Properties of the dedicated HSM
*/
private DedicatedHsmProperties properties;
- /*
- * Azure Resource Manager metadata containing createdBy and modifiedBy information.
- */
- private SystemData systemData;
-
/*
* The type of the resource.
*/
@@ -64,43 +54,12 @@ public DedicatedHsmInner() {
}
/**
- * Get the sku property: SKU details.
- *
- * @return the sku value.
- */
- public Sku sku() {
- return this.sku;
- }
-
- /**
- * Set the sku property: SKU details.
- *
- * @param sku the sku value to set.
- * @return the DedicatedHsmInner object itself.
- */
- public DedicatedHsmInner withSku(Sku sku) {
- this.sku = sku;
- return this;
- }
-
- /**
- * Get the zones property: The Dedicated Hsm zones.
- *
- * @return the zones value.
- */
- public List zones() {
- return this.zones;
- }
-
- /**
- * Set the zones property: The Dedicated Hsm zones.
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
*
- * @param zones the zones value to set.
- * @return the DedicatedHsmInner object itself.
+ * @return the systemData value.
*/
- public DedicatedHsmInner withZones(List zones) {
- this.zones = zones;
- return this;
+ public SystemData systemData() {
+ return this.systemData;
}
/**
@@ -123,15 +82,6 @@ public DedicatedHsmInner withProperties(DedicatedHsmProperties properties) {
return this;
}
- /**
- * 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.
*
@@ -162,6 +112,24 @@ public String id() {
return this.id;
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public DedicatedHsmInner withSku(Sku sku) {
+ super.withSku(sku);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public DedicatedHsmInner withZones(List zones) {
+ super.withZones(zones);
+ return this;
+ }
+
/**
* {@inheritDoc}
*/
@@ -185,19 +153,17 @@ public DedicatedHsmInner withTags(Map tags) {
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
+ @Override
public void validate() {
- if (sku() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Missing required property sku in model DedicatedHsmInner"));
- } else {
- sku().validate();
- }
if (properties() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException("Missing required property properties in model DedicatedHsmInner"));
} else {
properties().validate();
}
+ if (sku() != null) {
+ sku().validate();
+ }
}
private static final ClientLogger LOGGER = new ClientLogger(DedicatedHsmInner.class);
@@ -210,9 +176,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("location", location());
jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
- jsonWriter.writeJsonField("sku", this.sku);
+ jsonWriter.writeJsonField("sku", sku());
+ jsonWriter.writeArrayField("zones", zones(), (writer, element) -> writer.writeString(element));
jsonWriter.writeJsonField("properties", this.properties);
- jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element));
return jsonWriter.writeEndObject();
}
@@ -244,12 +210,12 @@ public static DedicatedHsmInner fromJson(JsonReader jsonReader) throws IOExcepti
Map tags = reader.readMap(reader1 -> reader1.getString());
deserializedDedicatedHsmInner.withTags(tags);
} else if ("sku".equals(fieldName)) {
- deserializedDedicatedHsmInner.sku = Sku.fromJson(reader);
- } else if ("properties".equals(fieldName)) {
- deserializedDedicatedHsmInner.properties = DedicatedHsmProperties.fromJson(reader);
+ deserializedDedicatedHsmInner.withSku(Sku.fromJson(reader));
} else if ("zones".equals(fieldName)) {
List zones = reader.readArray(reader1 -> reader1.getString());
- deserializedDedicatedHsmInner.zones = zones;
+ deserializedDedicatedHsmInner.withZones(zones);
+ } else if ("properties".equals(fieldName)) {
+ deserializedDedicatedHsmInner.properties = DedicatedHsmProperties.fromJson(reader);
} else if ("systemData".equals(fieldName)) {
deserializedDedicatedHsmInner.systemData = SystemData.fromJson(reader);
} else {
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/DedicatedHsmOperationInner.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/DedicatedHsmOperationInner.java
new file mode 100644
index 0000000000000..817e6fb51ed0f
--- /dev/null
+++ b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/DedicatedHsmOperationInner.java
@@ -0,0 +1,169 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hardwaresecuritymodules.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.hardwaresecuritymodules.models.DedicatedHsmOperationDisplay;
+import java.io.IOException;
+
+/**
+ * REST API operation.
+ */
+@Fluent
+public final class DedicatedHsmOperationInner implements JsonSerializable {
+ /*
+ * The name of the Dedicated HSM Resource Provider Operation.
+ */
+ private String name;
+
+ /*
+ * Gets or sets a value indicating whether it is a data plane action
+ */
+ private Boolean isDataAction;
+
+ /*
+ * The origin of the operation
+ */
+ private String origin;
+
+ /*
+ * The display string.
+ */
+ private DedicatedHsmOperationDisplay display;
+
+ /**
+ * Creates an instance of DedicatedHsmOperationInner class.
+ */
+ public DedicatedHsmOperationInner() {
+ }
+
+ /**
+ * Get the name property: The name of the Dedicated HSM Resource Provider Operation.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: The name of the Dedicated HSM Resource Provider Operation.
+ *
+ * @param name the name value to set.
+ * @return the DedicatedHsmOperationInner object itself.
+ */
+ public DedicatedHsmOperationInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the isDataAction property: Gets or sets a value indicating whether it is a data plane action.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Get the origin property: The origin of the operation.
+ *
+ * @return the origin value.
+ */
+ public String origin() {
+ return this.origin;
+ }
+
+ /**
+ * Set the origin property: The origin of the operation.
+ *
+ * @param origin the origin value to set.
+ * @return the DedicatedHsmOperationInner object itself.
+ */
+ public DedicatedHsmOperationInner withOrigin(String origin) {
+ this.origin = origin;
+ return this;
+ }
+
+ /**
+ * Get the display property: The display string.
+ *
+ * @return the display value.
+ */
+ public DedicatedHsmOperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: The display string.
+ *
+ * @param display the display value to set.
+ * @return the DedicatedHsmOperationInner object itself.
+ */
+ public DedicatedHsmOperationInner withDisplay(DedicatedHsmOperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("name", this.name);
+ jsonWriter.writeStringField("origin", this.origin);
+ jsonWriter.writeJsonField("display", this.display);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DedicatedHsmOperationInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DedicatedHsmOperationInner 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 DedicatedHsmOperationInner.
+ */
+ public static DedicatedHsmOperationInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DedicatedHsmOperationInner deserializedDedicatedHsmOperationInner = new DedicatedHsmOperationInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedDedicatedHsmOperationInner.name = reader.getString();
+ } else if ("isDataAction".equals(fieldName)) {
+ deserializedDedicatedHsmOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean);
+ } else if ("origin".equals(fieldName)) {
+ deserializedDedicatedHsmOperationInner.origin = reader.getString();
+ } else if ("display".equals(fieldName)) {
+ deserializedDedicatedHsmOperationInner.display = DedicatedHsmOperationDisplay.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDedicatedHsmOperationInner;
+ });
+ }
+}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/OperationInner.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/OperationInner.java
deleted file mode 100644
index 6650c4c33ab1f..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/OperationInner.java
+++ /dev/null
@@ -1,172 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonSerializable;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.ActionType;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.OperationDisplay;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.Origin;
-import java.io.IOException;
-
-/**
- * REST API Operation
- *
- * Details of a REST API operation, returned from the Resource Provider Operations API.
- */
-@Fluent
-public final class OperationInner implements JsonSerializable {
- /*
- * The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
- * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
- */
- private String name;
-
- /*
- * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for
- * ARM/control-plane operations.
- */
- private Boolean isDataAction;
-
- /*
- * Localized display information for this particular operation.
- */
- private OperationDisplay display;
-
- /*
- * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
- * value is "user,system"
- */
- private Origin origin;
-
- /*
- * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
- */
- private ActionType actionType;
-
- /**
- * Creates an instance of OperationInner class.
- */
- public OperationInner() {
- }
-
- /**
- * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
- * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
- *
- * @return the name value.
- */
- public String name() {
- return this.name;
- }
-
- /**
- * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
- * operations and "false" for ARM/control-plane operations.
- *
- * @return the isDataAction value.
- */
- public Boolean isDataAction() {
- return this.isDataAction;
- }
-
- /**
- * Get the display property: Localized display information for this particular operation.
- *
- * @return the display value.
- */
- public OperationDisplay display() {
- return this.display;
- }
-
- /**
- * Set the display property: Localized display information for this particular operation.
- *
- * @param display the display value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withDisplay(OperationDisplay display) {
- this.display = display;
- return this;
- }
-
- /**
- * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
- * audit logs UX. Default value is "user,system".
- *
- * @return the origin value.
- */
- public Origin origin() {
- return this.origin;
- }
-
- /**
- * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
- * only APIs.
- *
- * @return the actionType value.
- */
- public ActionType actionType() {
- return this.actionType;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (display() != null) {
- display().validate();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeJsonField("display", this.display);
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of OperationInner from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of OperationInner 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 OperationInner.
- */
- public static OperationInner fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- OperationInner deserializedOperationInner = new OperationInner();
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
-
- if ("name".equals(fieldName)) {
- deserializedOperationInner.name = reader.getString();
- } else if ("isDataAction".equals(fieldName)) {
- deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean);
- } else if ("display".equals(fieldName)) {
- deserializedOperationInner.display = OperationDisplay.fromJson(reader);
- } else if ("origin".equals(fieldName)) {
- deserializedOperationInner.origin = Origin.fromString(reader.getString());
- } else if ("actionType".equals(fieldName)) {
- deserializedOperationInner.actionType = ActionType.fromString(reader.getString());
- } else {
- reader.skipChildren();
- }
- }
-
- return deserializedOperationInner;
- });
- }
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/PrivateEndpointConnectionInner.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/PrivateEndpointConnectionInner.java
deleted file mode 100644
index 5db903d587779..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/PrivateEndpointConnectionInner.java
+++ /dev/null
@@ -1,196 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-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.hardwaresecuritymodules.models.PrivateEndpointConnectionProperties;
-import java.io.IOException;
-
-/**
- * The private endpoint connection resource.
- */
-@Fluent
-public final class PrivateEndpointConnectionInner extends ProxyResource {
- /*
- * Resource properties.
- */
- private PrivateEndpointConnectionProperties properties;
-
- /*
- * Modified whenever there is a change in the state of private endpoint connection.
- */
- private String etag;
-
- /*
- * 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 PrivateEndpointConnectionInner class.
- */
- public PrivateEndpointConnectionInner() {
- }
-
- /**
- * Get the properties property: Resource properties.
- *
- * @return the properties value.
- */
- public PrivateEndpointConnectionProperties properties() {
- return this.properties;
- }
-
- /**
- * Set the properties property: Resource properties.
- *
- * @param properties the properties value to set.
- * @return the PrivateEndpointConnectionInner object itself.
- */
- public PrivateEndpointConnectionInner withProperties(PrivateEndpointConnectionProperties properties) {
- this.properties = properties;
- return this;
- }
-
- /**
- * Get the etag property: Modified whenever there is a change in the state of private endpoint connection.
- *
- * @return the etag value.
- */
- public String etag() {
- return this.etag;
- }
-
- /**
- * Set the etag property: Modified whenever there is a change in the state of private endpoint connection.
- *
- * @param etag the etag value to set.
- * @return the PrivateEndpointConnectionInner object itself.
- */
- public PrivateEndpointConnectionInner withEtag(String etag) {
- this.etag = etag;
- return this;
- }
-
- /**
- * 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;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (properties() != null) {
- properties().validate();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeJsonField("properties", this.properties);
- jsonWriter.writeStringField("etag", this.etag);
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of PrivateEndpointConnectionInner from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of PrivateEndpointConnectionInner 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 PrivateEndpointConnectionInner.
- */
- public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- PrivateEndpointConnectionInner deserializedPrivateEndpointConnectionInner
- = new PrivateEndpointConnectionInner();
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
-
- if ("id".equals(fieldName)) {
- deserializedPrivateEndpointConnectionInner.id = reader.getString();
- } else if ("name".equals(fieldName)) {
- deserializedPrivateEndpointConnectionInner.name = reader.getString();
- } else if ("type".equals(fieldName)) {
- deserializedPrivateEndpointConnectionInner.type = reader.getString();
- } else if ("properties".equals(fieldName)) {
- deserializedPrivateEndpointConnectionInner.properties
- = PrivateEndpointConnectionProperties.fromJson(reader);
- } else if ("etag".equals(fieldName)) {
- deserializedPrivateEndpointConnectionInner.etag = reader.getString();
- } else if ("systemData".equals(fieldName)) {
- deserializedPrivateEndpointConnectionInner.systemData = SystemData.fromJson(reader);
- } else {
- reader.skipChildren();
- }
- }
-
- return deserializedPrivateEndpointConnectionInner;
- });
- }
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/PrivateLinkResourceInner.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/PrivateLinkResourceInner.java
deleted file mode 100644
index e480642b2f213..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/PrivateLinkResourceInner.java
+++ /dev/null
@@ -1,166 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-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.hardwaresecuritymodules.models.PrivateLinkResourceProperties;
-import java.io.IOException;
-
-/**
- * A private link resource.
- */
-@Fluent
-public final class PrivateLinkResourceInner extends ProxyResource {
- /*
- * Resource properties.
- */
- private PrivateLinkResourceProperties 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 PrivateLinkResourceInner class.
- */
- public PrivateLinkResourceInner() {
- }
-
- /**
- * Get the properties property: Resource properties.
- *
- * @return the properties value.
- */
- public PrivateLinkResourceProperties properties() {
- return this.properties;
- }
-
- /**
- * Set the properties property: Resource properties.
- *
- * @param properties the properties value to set.
- * @return the PrivateLinkResourceInner object itself.
- */
- public PrivateLinkResourceInner withProperties(PrivateLinkResourceProperties properties) {
- this.properties = properties;
- return this;
- }
-
- /**
- * 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;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (properties() != null) {
- properties().validate();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeJsonField("properties", this.properties);
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of PrivateLinkResourceInner from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of PrivateLinkResourceInner 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 PrivateLinkResourceInner.
- */
- public static PrivateLinkResourceInner fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- PrivateLinkResourceInner deserializedPrivateLinkResourceInner = new PrivateLinkResourceInner();
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
-
- if ("id".equals(fieldName)) {
- deserializedPrivateLinkResourceInner.id = reader.getString();
- } else if ("name".equals(fieldName)) {
- deserializedPrivateLinkResourceInner.name = reader.getString();
- } else if ("type".equals(fieldName)) {
- deserializedPrivateLinkResourceInner.type = reader.getString();
- } else if ("properties".equals(fieldName)) {
- deserializedPrivateLinkResourceInner.properties = PrivateLinkResourceProperties.fromJson(reader);
- } else if ("systemData".equals(fieldName)) {
- deserializedPrivateLinkResourceInner.systemData = SystemData.fromJson(reader);
- } else {
- reader.skipChildren();
- }
- }
-
- return deserializedPrivateLinkResourceInner;
- });
- }
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/RestoreResultInner.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/RestoreResultInner.java
deleted file mode 100644
index 8101c07165f06..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/fluent/models/RestoreResultInner.java
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonSerializable;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.BackupRestoreBaseResultProperties;
-import java.io.IOException;
-
-/**
- * Restore operation properties.
- */
-@Fluent
-public final class RestoreResultInner implements JsonSerializable {
- /*
- * Backup and Restore operation common properties
- */
- private BackupRestoreBaseResultProperties properties;
-
- /**
- * Creates an instance of RestoreResultInner class.
- */
- public RestoreResultInner() {
- }
-
- /**
- * Get the properties property: Backup and Restore operation common properties.
- *
- * @return the properties value.
- */
- public BackupRestoreBaseResultProperties properties() {
- return this.properties;
- }
-
- /**
- * Set the properties property: Backup and Restore operation common properties.
- *
- * @param properties the properties value to set.
- * @return the RestoreResultInner object itself.
- */
- public RestoreResultInner withProperties(BackupRestoreBaseResultProperties properties) {
- this.properties = properties;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (properties() != null) {
- properties().validate();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeJsonField("properties", this.properties);
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of RestoreResultInner from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of RestoreResultInner 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 RestoreResultInner.
- */
- public static RestoreResultInner fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- RestoreResultInner deserializedRestoreResultInner = new RestoreResultInner();
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
-
- if ("properties".equals(fieldName)) {
- deserializedRestoreResultInner.properties = BackupRestoreBaseResultProperties.fromJson(reader);
- } else {
- reader.skipChildren();
- }
- }
-
- return deserializedRestoreResultInner;
- });
- }
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/AzureHsmResourceProviderBuilder.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/AzureHsmResourceProviderBuilder.java
index c1dc1f47a7e9b..b85c3c845e0c4 100644
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/AzureHsmResourceProviderBuilder.java
+++ b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/AzureHsmResourceProviderBuilder.java
@@ -20,12 +20,12 @@
@ServiceClientBuilder(serviceClients = { AzureHsmResourceProviderImpl.class })
public final class AzureHsmResourceProviderBuilder {
/*
- * The ID of the target subscription. The value must be an UUID.
+ * The ID of the target subscription.
*/
private String subscriptionId;
/**
- * Sets The ID of the target subscription. The value must be an UUID.
+ * Sets The ID of the target subscription.
*
* @param subscriptionId the subscriptionId value.
* @return the AzureHsmResourceProviderBuilder.
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/AzureHsmResourceProviderImpl.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/AzureHsmResourceProviderImpl.java
index 2a7da9c0da3ed..7547544257421 100644
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/AzureHsmResourceProviderImpl.java
+++ b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/AzureHsmResourceProviderImpl.java
@@ -24,14 +24,8 @@
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.hardwaresecuritymodules.fluent.AzureHsmResourceProvider;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.CloudHsmClusterBackupStatusClient;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.CloudHsmClusterPrivateEndpointConnectionsClient;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.CloudHsmClusterPrivateLinkResourcesClient;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.CloudHsmClusterRestoreStatusClient;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.CloudHsmClustersClient;
import com.azure.resourcemanager.hardwaresecuritymodules.fluent.DedicatedHsmsClient;
import com.azure.resourcemanager.hardwaresecuritymodules.fluent.OperationsClient;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.PrivateEndpointConnectionsClient;
import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.ByteBuffer;
@@ -47,12 +41,12 @@
@ServiceClient(builder = AzureHsmResourceProviderBuilder.class)
public final class AzureHsmResourceProviderImpl implements AzureHsmResourceProvider {
/**
- * The ID of the target subscription. The value must be an UUID.
+ * The ID of the target subscription.
*/
private final String subscriptionId;
/**
- * Gets The ID of the target subscription. The value must be an UUID.
+ * Gets The ID of the target subscription.
*
* @return the subscriptionId value.
*/
@@ -131,87 +125,17 @@ public Duration getDefaultPollInterval() {
}
/**
- * The CloudHsmClustersClient object to access its operations.
- */
- private final CloudHsmClustersClient cloudHsmClusters;
-
- /**
- * Gets the CloudHsmClustersClient object to access its operations.
- *
- * @return the CloudHsmClustersClient object.
- */
- public CloudHsmClustersClient getCloudHsmClusters() {
- return this.cloudHsmClusters;
- }
-
- /**
- * The CloudHsmClusterPrivateLinkResourcesClient object to access its operations.
- */
- private final CloudHsmClusterPrivateLinkResourcesClient cloudHsmClusterPrivateLinkResources;
-
- /**
- * Gets the CloudHsmClusterPrivateLinkResourcesClient object to access its operations.
- *
- * @return the CloudHsmClusterPrivateLinkResourcesClient object.
- */
- public CloudHsmClusterPrivateLinkResourcesClient getCloudHsmClusterPrivateLinkResources() {
- return this.cloudHsmClusterPrivateLinkResources;
- }
-
- /**
- * The CloudHsmClusterPrivateEndpointConnectionsClient object to access its operations.
- */
- private final CloudHsmClusterPrivateEndpointConnectionsClient cloudHsmClusterPrivateEndpointConnections;
-
- /**
- * Gets the CloudHsmClusterPrivateEndpointConnectionsClient object to access its operations.
- *
- * @return the CloudHsmClusterPrivateEndpointConnectionsClient object.
- */
- public CloudHsmClusterPrivateEndpointConnectionsClient getCloudHsmClusterPrivateEndpointConnections() {
- return this.cloudHsmClusterPrivateEndpointConnections;
- }
-
- /**
- * The PrivateEndpointConnectionsClient object to access its operations.
- */
- private final PrivateEndpointConnectionsClient privateEndpointConnections;
-
- /**
- * Gets the PrivateEndpointConnectionsClient object to access its operations.
- *
- * @return the PrivateEndpointConnectionsClient object.
- */
- public PrivateEndpointConnectionsClient getPrivateEndpointConnections() {
- return this.privateEndpointConnections;
- }
-
- /**
- * The CloudHsmClusterBackupStatusClient object to access its operations.
- */
- private final CloudHsmClusterBackupStatusClient cloudHsmClusterBackupStatus;
-
- /**
- * Gets the CloudHsmClusterBackupStatusClient object to access its operations.
- *
- * @return the CloudHsmClusterBackupStatusClient object.
- */
- public CloudHsmClusterBackupStatusClient getCloudHsmClusterBackupStatus() {
- return this.cloudHsmClusterBackupStatus;
- }
-
- /**
- * The CloudHsmClusterRestoreStatusClient object to access its operations.
+ * The OperationsClient object to access its operations.
*/
- private final CloudHsmClusterRestoreStatusClient cloudHsmClusterRestoreStatus;
+ private final OperationsClient operations;
/**
- * Gets the CloudHsmClusterRestoreStatusClient object to access its operations.
+ * Gets the OperationsClient object to access its operations.
*
- * @return the CloudHsmClusterRestoreStatusClient object.
+ * @return the OperationsClient object.
*/
- public CloudHsmClusterRestoreStatusClient getCloudHsmClusterRestoreStatus() {
- return this.cloudHsmClusterRestoreStatus;
+ public OperationsClient getOperations() {
+ return this.operations;
}
/**
@@ -228,20 +152,6 @@ public DedicatedHsmsClient getDedicatedHsms() {
return this.dedicatedHsms;
}
- /**
- * The OperationsClient object to access its operations.
- */
- private final OperationsClient operations;
-
- /**
- * Gets the OperationsClient object to access its operations.
- *
- * @return the OperationsClient object.
- */
- public OperationsClient getOperations() {
- return this.operations;
- }
-
/**
* Initializes an instance of AzureHsmResourceProvider client.
*
@@ -249,7 +159,7 @@ public OperationsClient getOperations() {
* @param serializerAdapter The serializer to serialize an object into a string.
* @param defaultPollInterval The default poll interval for long-running operation.
* @param environment The Azure environment.
- * @param subscriptionId The ID of the target subscription. The value must be an UUID.
+ * @param subscriptionId The ID of the target subscription.
* @param endpoint server parameter.
*/
AzureHsmResourceProviderImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
@@ -259,15 +169,9 @@ public OperationsClient getOperations() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2024-06-30-preview";
- this.cloudHsmClusters = new CloudHsmClustersClientImpl(this);
- this.cloudHsmClusterPrivateLinkResources = new CloudHsmClusterPrivateLinkResourcesClientImpl(this);
- this.cloudHsmClusterPrivateEndpointConnections = new CloudHsmClusterPrivateEndpointConnectionsClientImpl(this);
- this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this);
- this.cloudHsmClusterBackupStatus = new CloudHsmClusterBackupStatusClientImpl(this);
- this.cloudHsmClusterRestoreStatus = new CloudHsmClusterRestoreStatusClientImpl(this);
- this.dedicatedHsms = new DedicatedHsmsClientImpl(this);
+ this.apiVersion = "2021-11-30";
this.operations = new OperationsClientImpl(this);
+ this.dedicatedHsms = new DedicatedHsmsClientImpl(this);
}
/**
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/BackupResultImpl.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/BackupResultImpl.java
deleted file mode 100644
index bcb6071fe0792..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/BackupResultImpl.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.implementation;
-
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.BackupResultInner;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.BackupResult;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.BackupResultProperties;
-
-public final class BackupResultImpl implements BackupResult {
- private BackupResultInner innerObject;
-
- private final com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager serviceManager;
-
- BackupResultImpl(BackupResultInner innerObject,
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- }
-
- public BackupResultProperties properties() {
- return this.innerModel().properties();
- }
-
- public BackupResultInner innerModel() {
- return this.innerObject;
- }
-
- private com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager() {
- return this.serviceManager;
- }
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterBackupStatusClientImpl.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterBackupStatusClientImpl.java
deleted file mode 100644
index 087d2c3798c7e..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterBackupStatusClientImpl.java
+++ /dev/null
@@ -1,206 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.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.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.RestProxy;
-import com.azure.core.management.exception.ManagementException;
-import com.azure.core.util.Context;
-import com.azure.core.util.FluxUtil;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.CloudHsmClusterBackupStatusClient;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.BackupResultInner;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterBackupStatusGetResponse;
-import reactor.core.publisher.Mono;
-
-/**
- * An instance of this class provides access to all the operations defined in CloudHsmClusterBackupStatusClient.
- */
-public final class CloudHsmClusterBackupStatusClientImpl implements CloudHsmClusterBackupStatusClient {
- /**
- * The proxy service used to perform REST calls.
- */
- private final CloudHsmClusterBackupStatusService service;
-
- /**
- * The service client containing this operation class.
- */
- private final AzureHsmResourceProviderImpl client;
-
- /**
- * Initializes an instance of CloudHsmClusterBackupStatusClientImpl.
- *
- * @param client the instance of the service client containing this operation class.
- */
- CloudHsmClusterBackupStatusClientImpl(AzureHsmResourceProviderImpl client) {
- this.service = RestProxy.create(CloudHsmClusterBackupStatusService.class, client.getHttpPipeline(),
- client.getSerializerAdapter());
- this.client = client;
- }
-
- /**
- * The interface defining all the services for AzureHsmResourceProviderCloudHsmClusterBackupStatus to be used by the
- * proxy service to perform REST calls.
- */
- @Host("{$host}")
- @ServiceInterface(name = "AzureHsmResourceProv")
- public interface CloudHsmClusterBackupStatusService {
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/backupOperationStatus/{jobId}")
- @ExpectedResponses({ 200, 202 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono get(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("cloudHsmClusterName") String cloudHsmClusterName, @QueryParam("api-version") String apiVersion,
- @PathParam("jobId") String jobId, @HeaderParam("Accept") String accept, Context context);
- }
-
- /**
- * Gets the backup operation status of the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param jobId The id returned as part of the backup request.
- * @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 backup operation status of the specified Cloud HSM Cluster on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, String jobId) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- if (jobId == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobId is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, cloudHsmClusterName, this.client.getApiVersion(), jobId, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Gets the backup operation status of the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param jobId The id returned as part of the backup request.
- * @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 backup operation status of the specified Cloud HSM Cluster on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, String jobId, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- if (jobId == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobId is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- cloudHsmClusterName, this.client.getApiVersion(), jobId, accept, context);
- }
-
- /**
- * Gets the backup operation status of the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param jobId The id returned as part of the backup request.
- * @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 backup operation status of the specified Cloud HSM Cluster on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getAsync(String resourceGroupName, String cloudHsmClusterName, String jobId) {
- return getWithResponseAsync(resourceGroupName, cloudHsmClusterName, jobId)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Gets the backup operation status of the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param jobId The id returned as part of the backup request.
- * @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 backup operation status of the specified Cloud HSM Cluster.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public CloudHsmClusterBackupStatusGetResponse getWithResponse(String resourceGroupName, String cloudHsmClusterName,
- String jobId, Context context) {
- return getWithResponseAsync(resourceGroupName, cloudHsmClusterName, jobId, context).block();
- }
-
- /**
- * Gets the backup operation status of the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param jobId The id returned as part of the backup request.
- * @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 backup operation status of the specified Cloud HSM Cluster.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public BackupResultInner get(String resourceGroupName, String cloudHsmClusterName, String jobId) {
- return getWithResponse(resourceGroupName, cloudHsmClusterName, jobId, Context.NONE).getValue();
- }
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterBackupStatusImpl.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterBackupStatusImpl.java
deleted file mode 100644
index 57c18645c134c..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterBackupStatusImpl.java
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.implementation;
-
-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.hardwaresecuritymodules.fluent.CloudHsmClusterBackupStatusClient;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.BackupResultInner;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.BackupResult;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterBackupStatus;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterBackupStatusGetResponse;
-
-public final class CloudHsmClusterBackupStatusImpl implements CloudHsmClusterBackupStatus {
- private static final ClientLogger LOGGER = new ClientLogger(CloudHsmClusterBackupStatusImpl.class);
-
- private final CloudHsmClusterBackupStatusClient innerClient;
-
- private final com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager serviceManager;
-
- public CloudHsmClusterBackupStatusImpl(CloudHsmClusterBackupStatusClient innerClient,
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager serviceManager) {
- this.innerClient = innerClient;
- this.serviceManager = serviceManager;
- }
-
- public Response getWithResponse(String resourceGroupName, String cloudHsmClusterName, String jobId,
- Context context) {
- CloudHsmClusterBackupStatusGetResponse inner
- = this.serviceClient().getWithResponse(resourceGroupName, cloudHsmClusterName, jobId, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- new BackupResultImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
- }
-
- public BackupResult get(String resourceGroupName, String cloudHsmClusterName, String jobId) {
- BackupResultInner inner = this.serviceClient().get(resourceGroupName, cloudHsmClusterName, jobId);
- if (inner != null) {
- return new BackupResultImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
- private CloudHsmClusterBackupStatusClient serviceClient() {
- return this.innerClient;
- }
-
- private com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager() {
- return this.serviceManager;
- }
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterImpl.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterImpl.java
deleted file mode 100644
index e789beddfcb52..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterImpl.java
+++ /dev/null
@@ -1,244 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.implementation;
-
-import com.azure.core.management.Region;
-import com.azure.core.management.SystemData;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.CloudHsmClusterInner;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.BackupRequestProperties;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.BackupResult;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmCluster;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterPatchParameters;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterProperties;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterSku;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.ManagedServiceIdentity;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.RestoreRequestProperties;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.RestoreResult;
-import java.util.Collections;
-import java.util.Map;
-
-public final class CloudHsmClusterImpl implements CloudHsmCluster, CloudHsmCluster.Definition, CloudHsmCluster.Update {
- private CloudHsmClusterInner innerObject;
-
- private final com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager serviceManager;
-
- public String id() {
- return this.innerModel().id();
- }
-
- public String name() {
- return this.innerModel().name();
- }
-
- public String type() {
- return this.innerModel().type();
- }
-
- public String location() {
- return this.innerModel().location();
- }
-
- public Map tags() {
- Map inner = this.innerModel().tags();
- if (inner != null) {
- return Collections.unmodifiableMap(inner);
- } else {
- return Collections.emptyMap();
- }
- }
-
- public ManagedServiceIdentity identity() {
- return this.innerModel().identity();
- }
-
- public CloudHsmClusterSku sku() {
- return this.innerModel().sku();
- }
-
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
- public CloudHsmClusterProperties properties() {
- return this.innerModel().properties();
- }
-
- public Region region() {
- return Region.fromName(this.regionName());
- }
-
- public String regionName() {
- return this.location();
- }
-
- public String resourceGroupName() {
- return resourceGroupName;
- }
-
- public CloudHsmClusterInner innerModel() {
- return this.innerObject;
- }
-
- private com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager() {
- return this.serviceManager;
- }
-
- private String resourceGroupName;
-
- private String cloudHsmClusterName;
-
- private CloudHsmClusterPatchParameters updateBody;
-
- public CloudHsmClusterImpl withExistingResourceGroup(String resourceGroupName) {
- this.resourceGroupName = resourceGroupName;
- return this;
- }
-
- public CloudHsmCluster create() {
- this.innerObject = serviceManager.serviceClient()
- .getCloudHsmClusters()
- .createOrUpdate(resourceGroupName, cloudHsmClusterName, this.innerModel(), Context.NONE);
- return this;
- }
-
- public CloudHsmCluster create(Context context) {
- this.innerObject = serviceManager.serviceClient()
- .getCloudHsmClusters()
- .createOrUpdate(resourceGroupName, cloudHsmClusterName, this.innerModel(), context);
- return this;
- }
-
- CloudHsmClusterImpl(String name,
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager serviceManager) {
- this.innerObject = new CloudHsmClusterInner();
- this.serviceManager = serviceManager;
- this.cloudHsmClusterName = name;
- }
-
- public CloudHsmClusterImpl update() {
- this.updateBody = new CloudHsmClusterPatchParameters();
- return this;
- }
-
- public CloudHsmCluster apply() {
- this.innerObject = serviceManager.serviceClient()
- .getCloudHsmClusters()
- .update(resourceGroupName, cloudHsmClusterName, updateBody, Context.NONE);
- return this;
- }
-
- public CloudHsmCluster apply(Context context) {
- this.innerObject = serviceManager.serviceClient()
- .getCloudHsmClusters()
- .update(resourceGroupName, cloudHsmClusterName, updateBody, context);
- return this;
- }
-
- CloudHsmClusterImpl(CloudHsmClusterInner innerObject,
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.cloudHsmClusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "cloudHsmClusters");
- }
-
- public CloudHsmCluster refresh() {
- this.innerObject = serviceManager.serviceClient()
- .getCloudHsmClusters()
- .getByResourceGroupWithResponse(resourceGroupName, cloudHsmClusterName, Context.NONE)
- .getValue();
- return this;
- }
-
- public CloudHsmCluster refresh(Context context) {
- this.innerObject = serviceManager.serviceClient()
- .getCloudHsmClusters()
- .getByResourceGroupWithResponse(resourceGroupName, cloudHsmClusterName, context)
- .getValue();
- return this;
- }
-
- public BackupResult validateBackupProperties() {
- return serviceManager.cloudHsmClusters().validateBackupProperties(resourceGroupName, cloudHsmClusterName);
- }
-
- public BackupResult validateBackupProperties(BackupRequestProperties backupRequestProperties, Context context) {
- return serviceManager.cloudHsmClusters()
- .validateBackupProperties(resourceGroupName, cloudHsmClusterName, backupRequestProperties, context);
- }
-
- public BackupResult backup() {
- return serviceManager.cloudHsmClusters().backup(resourceGroupName, cloudHsmClusterName);
- }
-
- public BackupResult backup(BackupRequestProperties backupRequestProperties, Context context) {
- return serviceManager.cloudHsmClusters()
- .backup(resourceGroupName, cloudHsmClusterName, backupRequestProperties, context);
- }
-
- public RestoreResult validateRestoreProperties() {
- return serviceManager.cloudHsmClusters().validateRestoreProperties(resourceGroupName, cloudHsmClusterName);
- }
-
- public RestoreResult validateRestoreProperties(RestoreRequestProperties restoreRequestProperties, Context context) {
- return serviceManager.cloudHsmClusters()
- .validateRestoreProperties(resourceGroupName, cloudHsmClusterName, restoreRequestProperties, context);
- }
-
- public RestoreResult restore(RestoreRequestProperties restoreRequestProperties) {
- return serviceManager.cloudHsmClusters()
- .restore(resourceGroupName, cloudHsmClusterName, restoreRequestProperties);
- }
-
- public RestoreResult restore(RestoreRequestProperties restoreRequestProperties, Context context) {
- return serviceManager.cloudHsmClusters()
- .restore(resourceGroupName, cloudHsmClusterName, restoreRequestProperties, context);
- }
-
- public CloudHsmClusterImpl withRegion(Region location) {
- this.innerModel().withLocation(location.toString());
- return this;
- }
-
- public CloudHsmClusterImpl withRegion(String location) {
- this.innerModel().withLocation(location);
- return this;
- }
-
- public CloudHsmClusterImpl withTags(Map tags) {
- if (isInCreateMode()) {
- this.innerModel().withTags(tags);
- return this;
- } else {
- this.updateBody.withTags(tags);
- return this;
- }
- }
-
- public CloudHsmClusterImpl withIdentity(ManagedServiceIdentity identity) {
- if (isInCreateMode()) {
- this.innerModel().withIdentity(identity);
- return this;
- } else {
- this.updateBody.withIdentity(identity);
- return this;
- }
- }
-
- public CloudHsmClusterImpl withSku(CloudHsmClusterSku sku) {
- this.innerModel().withSku(sku);
- return this;
- }
-
- public CloudHsmClusterImpl withProperties(CloudHsmClusterProperties properties) {
- this.innerModel().withProperties(properties);
- return this;
- }
-
- private boolean isInCreateMode() {
- return this.innerModel().id() == null;
- }
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterPrivateEndpointConnectionsClientImpl.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterPrivateEndpointConnectionsClientImpl.java
deleted file mode 100644
index 07e72e533c46e..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterPrivateEndpointConnectionsClientImpl.java
+++ /dev/null
@@ -1,644 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.implementation;
-
-import com.azure.core.annotation.BodyParam;
-import com.azure.core.annotation.Delete;
-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.Put;
-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.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.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.hardwaresecuritymodules.fluent.CloudHsmClusterPrivateEndpointConnectionsClient;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.PrivateEndpointConnectionInner;
-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
- * CloudHsmClusterPrivateEndpointConnectionsClient.
- */
-public final class CloudHsmClusterPrivateEndpointConnectionsClientImpl
- implements CloudHsmClusterPrivateEndpointConnectionsClient {
- /**
- * The proxy service used to perform REST calls.
- */
- private final CloudHsmClusterPrivateEndpointConnectionsService service;
-
- /**
- * The service client containing this operation class.
- */
- private final AzureHsmResourceProviderImpl client;
-
- /**
- * Initializes an instance of CloudHsmClusterPrivateEndpointConnectionsClientImpl.
- *
- * @param client the instance of the service client containing this operation class.
- */
- CloudHsmClusterPrivateEndpointConnectionsClientImpl(AzureHsmResourceProviderImpl client) {
- this.service = RestProxy.create(CloudHsmClusterPrivateEndpointConnectionsService.class,
- client.getHttpPipeline(), client.getSerializerAdapter());
- this.client = client;
- }
-
- /**
- * The interface defining all the services for AzureHsmResourceProviderCloudHsmClusterPrivateEndpointConnections to
- * be used by the proxy service to perform REST calls.
- */
- @Host("{$host}")
- @ServiceInterface(name = "AzureHsmResourceProv")
- public interface CloudHsmClusterPrivateEndpointConnectionsService {
- @Headers({ "Content-Type: application/json" })
- @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/privateEndpointConnections/{peConnectionName}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> create(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("cloudHsmClusterName") String cloudHsmClusterName, @QueryParam("api-version") String apiVersion,
- @PathParam("peConnectionName") String peConnectionName,
- @BodyParam("application/json") PrivateEndpointConnectionInner properties,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/privateEndpointConnections/{peConnectionName}")
- @ExpectedResponses({ 202, 204 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> delete(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("cloudHsmClusterName") String cloudHsmClusterName, @QueryParam("api-version") String apiVersion,
- @PathParam("peConnectionName") String peConnectionName, @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/privateEndpointConnections/{peConnectionName}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> get(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("cloudHsmClusterName") String cloudHsmClusterName, @QueryParam("api-version") String apiVersion,
- @PathParam("peConnectionName") String peConnectionName, @HeaderParam("Accept") String accept,
- Context context);
- }
-
- /**
- * Creates or updates the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @param properties Parameters of the PrivateEndpointConnection.
- * @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 private endpoint connection resource along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, String peConnectionName, PrivateEndpointConnectionInner properties) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- if (peConnectionName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter peConnectionName is required and cannot be null."));
- }
- if (properties == null) {
- return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
- } else {
- properties.validate();
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- cloudHsmClusterName, this.client.getApiVersion(), peConnectionName, properties, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Creates or updates the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @param properties Parameters of the PrivateEndpointConnection.
- * @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 private endpoint connection resource along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, String peConnectionName, PrivateEndpointConnectionInner properties,
- Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- if (peConnectionName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter peConnectionName is required and cannot be null."));
- }
- if (properties == null) {
- return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
- } else {
- properties.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- cloudHsmClusterName, this.client.getApiVersion(), peConnectionName, properties, accept, context);
- }
-
- /**
- * Creates or updates the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @param properties Parameters of the PrivateEndpointConnection.
- * @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 private endpoint connection resource on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createAsync(String resourceGroupName, String cloudHsmClusterName,
- String peConnectionName, PrivateEndpointConnectionInner properties) {
- return createWithResponseAsync(resourceGroupName, cloudHsmClusterName, peConnectionName, properties)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Creates or updates the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @param properties Parameters of the PrivateEndpointConnection.
- * @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 private endpoint connection resource along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response createWithResponse(String resourceGroupName,
- String cloudHsmClusterName, String peConnectionName, PrivateEndpointConnectionInner properties,
- Context context) {
- return createWithResponseAsync(resourceGroupName, cloudHsmClusterName, peConnectionName, properties, context)
- .block();
- }
-
- /**
- * Creates or updates the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @param properties Parameters of the PrivateEndpointConnection.
- * @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 private endpoint connection resource.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public PrivateEndpointConnectionInner create(String resourceGroupName, String cloudHsmClusterName,
- String peConnectionName, PrivateEndpointConnectionInner properties) {
- return createWithResponse(resourceGroupName, cloudHsmClusterName, peConnectionName, properties, Context.NONE)
- .getValue();
- }
-
- /**
- * Deletes the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, String peConnectionName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- if (peConnectionName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter peConnectionName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, cloudHsmClusterName, this.client.getApiVersion(), peConnectionName, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Deletes the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, String peConnectionName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- if (peConnectionName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter peConnectionName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- cloudHsmClusterName, this.client.getApiVersion(), peConnectionName, accept, context);
- }
-
- /**
- * Deletes the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String cloudHsmClusterName,
- String peConnectionName) {
- Mono>> mono
- = deleteWithResponseAsync(resourceGroupName, cloudHsmClusterName, peConnectionName);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- this.client.getContext());
- }
-
- /**
- * Deletes the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String cloudHsmClusterName,
- String peConnectionName, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono
- = deleteWithResponseAsync(resourceGroupName, cloudHsmClusterName, peConnectionName, context);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- context);
- }
-
- /**
- * Deletes the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link SyncPoller} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, Void> beginDelete(String resourceGroupName, String cloudHsmClusterName,
- String peConnectionName) {
- return this.beginDeleteAsync(resourceGroupName, cloudHsmClusterName, peConnectionName).getSyncPoller();
- }
-
- /**
- * Deletes the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @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, Void> beginDelete(String resourceGroupName, String cloudHsmClusterName,
- String peConnectionName, Context context) {
- return this.beginDeleteAsync(resourceGroupName, cloudHsmClusterName, peConnectionName, context).getSyncPoller();
- }
-
- /**
- * Deletes the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return A {@link Mono} that completes when a successful response is received.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String cloudHsmClusterName, String peConnectionName) {
- return beginDeleteAsync(resourceGroupName, cloudHsmClusterName, peConnectionName).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Deletes the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return A {@link Mono} that completes when a successful response is received.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String cloudHsmClusterName, String peConnectionName,
- Context context) {
- return beginDeleteAsync(resourceGroupName, cloudHsmClusterName, peConnectionName, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Deletes the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceGroupName, String cloudHsmClusterName, String peConnectionName) {
- deleteAsync(resourceGroupName, cloudHsmClusterName, peConnectionName).block();
- }
-
- /**
- * Deletes the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceGroupName, String cloudHsmClusterName, String peConnectionName, Context context) {
- deleteAsync(resourceGroupName, cloudHsmClusterName, peConnectionName, context).block();
- }
-
- /**
- * Gets the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @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 private endpoint connection for the Cloud Hsm Cluster along with {@link Response} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, String peConnectionName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- if (peConnectionName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter peConnectionName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, cloudHsmClusterName, this.client.getApiVersion(), peConnectionName, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Gets the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @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 private endpoint connection for the Cloud Hsm Cluster along with {@link Response} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, String peConnectionName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- if (peConnectionName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter peConnectionName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- cloudHsmClusterName, this.client.getApiVersion(), peConnectionName, accept, context);
- }
-
- /**
- * Gets the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @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 private endpoint connection for the Cloud Hsm Cluster on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getAsync(String resourceGroupName, String cloudHsmClusterName,
- String peConnectionName) {
- return getWithResponseAsync(resourceGroupName, cloudHsmClusterName, peConnectionName)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Gets the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @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 private endpoint connection for the Cloud Hsm Cluster along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response getWithResponse(String resourceGroupName,
- String cloudHsmClusterName, String peConnectionName, Context context) {
- return getWithResponseAsync(resourceGroupName, cloudHsmClusterName, peConnectionName, context).block();
- }
-
- /**
- * Gets the private endpoint connection for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM Cluster.
- * @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 private endpoint connection for the Cloud Hsm Cluster.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public PrivateEndpointConnectionInner get(String resourceGroupName, String cloudHsmClusterName,
- String peConnectionName) {
- return getWithResponse(resourceGroupName, cloudHsmClusterName, peConnectionName, Context.NONE).getValue();
- }
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterPrivateEndpointConnectionsImpl.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterPrivateEndpointConnectionsImpl.java
deleted file mode 100644
index 437088e6c8c1a..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterPrivateEndpointConnectionsImpl.java
+++ /dev/null
@@ -1,147 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.implementation;
-
-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.hardwaresecuritymodules.fluent.CloudHsmClusterPrivateEndpointConnectionsClient;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.PrivateEndpointConnectionInner;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterPrivateEndpointConnections;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.PrivateEndpointConnection;
-
-public final class CloudHsmClusterPrivateEndpointConnectionsImpl implements CloudHsmClusterPrivateEndpointConnections {
- private static final ClientLogger LOGGER = new ClientLogger(CloudHsmClusterPrivateEndpointConnectionsImpl.class);
-
- private final CloudHsmClusterPrivateEndpointConnectionsClient innerClient;
-
- private final com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager serviceManager;
-
- public CloudHsmClusterPrivateEndpointConnectionsImpl(CloudHsmClusterPrivateEndpointConnectionsClient innerClient,
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager serviceManager) {
- this.innerClient = innerClient;
- this.serviceManager = serviceManager;
- }
-
- public void delete(String resourceGroupName, String cloudHsmClusterName, String peConnectionName) {
- this.serviceClient().delete(resourceGroupName, cloudHsmClusterName, peConnectionName);
- }
-
- public void delete(String resourceGroupName, String cloudHsmClusterName, String peConnectionName, Context context) {
- this.serviceClient().delete(resourceGroupName, cloudHsmClusterName, peConnectionName, context);
- }
-
- public Response getWithResponse(String resourceGroupName, String cloudHsmClusterName,
- String peConnectionName, Context context) {
- Response inner
- = this.serviceClient().getWithResponse(resourceGroupName, cloudHsmClusterName, peConnectionName, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- new PrivateEndpointConnectionImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
- }
-
- public PrivateEndpointConnection get(String resourceGroupName, String cloudHsmClusterName,
- String peConnectionName) {
- PrivateEndpointConnectionInner inner
- = this.serviceClient().get(resourceGroupName, cloudHsmClusterName, peConnectionName);
- if (inner != null) {
- return new PrivateEndpointConnectionImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
- public PrivateEndpointConnection getById(String id) {
- String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
- if (resourceGroupName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
- }
- String cloudHsmClusterName = ResourceManagerUtils.getValueFromIdByName(id, "cloudHsmClusters");
- if (cloudHsmClusterName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'cloudHsmClusters'.", id)));
- }
- String peConnectionName = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections");
- if (peConnectionName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(String
- .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id)));
- }
- return this.getWithResponse(resourceGroupName, cloudHsmClusterName, peConnectionName, Context.NONE).getValue();
- }
-
- public Response getByIdWithResponse(String id, Context context) {
- String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
- if (resourceGroupName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
- }
- String cloudHsmClusterName = ResourceManagerUtils.getValueFromIdByName(id, "cloudHsmClusters");
- if (cloudHsmClusterName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'cloudHsmClusters'.", id)));
- }
- String peConnectionName = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections");
- if (peConnectionName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(String
- .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id)));
- }
- return this.getWithResponse(resourceGroupName, cloudHsmClusterName, peConnectionName, context);
- }
-
- public void deleteById(String id) {
- String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
- if (resourceGroupName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
- }
- String cloudHsmClusterName = ResourceManagerUtils.getValueFromIdByName(id, "cloudHsmClusters");
- if (cloudHsmClusterName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'cloudHsmClusters'.", id)));
- }
- String peConnectionName = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections");
- if (peConnectionName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(String
- .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id)));
- }
- this.delete(resourceGroupName, cloudHsmClusterName, peConnectionName, Context.NONE);
- }
-
- public void deleteByIdWithResponse(String id, Context context) {
- String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
- if (resourceGroupName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
- }
- String cloudHsmClusterName = ResourceManagerUtils.getValueFromIdByName(id, "cloudHsmClusters");
- if (cloudHsmClusterName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'cloudHsmClusters'.", id)));
- }
- String peConnectionName = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections");
- if (peConnectionName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(String
- .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id)));
- }
- this.delete(resourceGroupName, cloudHsmClusterName, peConnectionName, context);
- }
-
- private CloudHsmClusterPrivateEndpointConnectionsClient serviceClient() {
- return this.innerClient;
- }
-
- private com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager() {
- return this.serviceManager;
- }
-
- public PrivateEndpointConnectionImpl define(String name) {
- return new PrivateEndpointConnectionImpl(name, this.manager());
- }
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterPrivateLinkResourcesClientImpl.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterPrivateLinkResourcesClientImpl.java
deleted file mode 100644
index 15f561e72f51d..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterPrivateLinkResourcesClientImpl.java
+++ /dev/null
@@ -1,298 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.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.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.util.Context;
-import com.azure.core.util.FluxUtil;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.CloudHsmClusterPrivateLinkResourcesClient;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.PrivateLinkResourceInner;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.PrivateLinkResourceListResult;
-import reactor.core.publisher.Mono;
-
-/**
- * An instance of this class provides access to all the operations defined in CloudHsmClusterPrivateLinkResourcesClient.
- */
-public final class CloudHsmClusterPrivateLinkResourcesClientImpl implements CloudHsmClusterPrivateLinkResourcesClient {
- /**
- * The proxy service used to perform REST calls.
- */
- private final CloudHsmClusterPrivateLinkResourcesService service;
-
- /**
- * The service client containing this operation class.
- */
- private final AzureHsmResourceProviderImpl client;
-
- /**
- * Initializes an instance of CloudHsmClusterPrivateLinkResourcesClientImpl.
- *
- * @param client the instance of the service client containing this operation class.
- */
- CloudHsmClusterPrivateLinkResourcesClientImpl(AzureHsmResourceProviderImpl client) {
- this.service = RestProxy.create(CloudHsmClusterPrivateLinkResourcesService.class, client.getHttpPipeline(),
- client.getSerializerAdapter());
- this.client = client;
- }
-
- /**
- * The interface defining all the services for AzureHsmResourceProviderCloudHsmClusterPrivateLinkResources to be
- * used by the proxy service to perform REST calls.
- */
- @Host("{$host}")
- @ServiceInterface(name = "AzureHsmResourceProv")
- public interface CloudHsmClusterPrivateLinkResourcesService {
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/privateLinkResources")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByCloudHsmCluster(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("cloudHsmClusterName") String cloudHsmClusterName, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("{nextLink}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByCloudHsmClusterNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept, Context context);
- }
-
- /**
- * Gets the private link resources supported for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 private link resources supported for the Cloud Hsm Cluster along with {@link PagedResponse} on
- * successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByCloudHsmClusterSinglePageAsync(String resourceGroupName,
- String cloudHsmClusterName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.listByCloudHsmCluster(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, cloudHsmClusterName, this.client.getApiVersion(), 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()));
- }
-
- /**
- * Gets the private link resources supported for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 private link resources supported for the Cloud Hsm Cluster along with {@link PagedResponse} on
- * successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByCloudHsmClusterSinglePageAsync(String resourceGroupName,
- String cloudHsmClusterName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .listByCloudHsmCluster(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- cloudHsmClusterName, this.client.getApiVersion(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
- /**
- * Gets the private link resources supported for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 private link resources supported for the Cloud Hsm Cluster as paginated response with
- * {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByCloudHsmClusterAsync(String resourceGroupName,
- String cloudHsmClusterName) {
- return new PagedFlux<>(() -> listByCloudHsmClusterSinglePageAsync(resourceGroupName, cloudHsmClusterName),
- nextLink -> listByCloudHsmClusterNextSinglePageAsync(nextLink));
- }
-
- /**
- * Gets the private link resources supported for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 private link resources supported for the Cloud Hsm Cluster as paginated response with
- * {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByCloudHsmClusterAsync(String resourceGroupName,
- String cloudHsmClusterName, Context context) {
- return new PagedFlux<>(
- () -> listByCloudHsmClusterSinglePageAsync(resourceGroupName, cloudHsmClusterName, context),
- nextLink -> listByCloudHsmClusterNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * Gets the private link resources supported for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 private link resources supported for the Cloud Hsm Cluster as paginated response with
- * {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByCloudHsmCluster(String resourceGroupName,
- String cloudHsmClusterName) {
- return new PagedIterable<>(listByCloudHsmClusterAsync(resourceGroupName, cloudHsmClusterName));
- }
-
- /**
- * Gets the private link resources supported for the Cloud Hsm Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 private link resources supported for the Cloud Hsm Cluster as paginated response with
- * {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByCloudHsmCluster(String resourceGroupName,
- String cloudHsmClusterName, Context context) {
- return new PagedIterable<>(listByCloudHsmClusterAsync(resourceGroupName, cloudHsmClusterName, context));
- }
-
- /**
- * Get the next page of items.
- *
- * @param nextLink The URL to get the next list of items.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of private link resources along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByCloudHsmClusterNextSinglePageAsync(String nextLink) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.listByCloudHsmClusterNext(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.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of private link resources along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByCloudHsmClusterNextSinglePageAsync(String nextLink,
- Context context) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listByCloudHsmClusterNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterPrivateLinkResourcesImpl.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterPrivateLinkResourcesImpl.java
deleted file mode 100644
index 08f47c3b661cd..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterPrivateLinkResourcesImpl.java
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.implementation;
-
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.util.Context;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.CloudHsmClusterPrivateLinkResourcesClient;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.PrivateLinkResourceInner;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterPrivateLinkResources;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.PrivateLinkResource;
-
-public final class CloudHsmClusterPrivateLinkResourcesImpl implements CloudHsmClusterPrivateLinkResources {
- private static final ClientLogger LOGGER = new ClientLogger(CloudHsmClusterPrivateLinkResourcesImpl.class);
-
- private final CloudHsmClusterPrivateLinkResourcesClient innerClient;
-
- private final com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager serviceManager;
-
- public CloudHsmClusterPrivateLinkResourcesImpl(CloudHsmClusterPrivateLinkResourcesClient innerClient,
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager serviceManager) {
- this.innerClient = innerClient;
- this.serviceManager = serviceManager;
- }
-
- public PagedIterable listByCloudHsmCluster(String resourceGroupName,
- String cloudHsmClusterName) {
- PagedIterable inner
- = this.serviceClient().listByCloudHsmCluster(resourceGroupName, cloudHsmClusterName);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager()));
- }
-
- public PagedIterable listByCloudHsmCluster(String resourceGroupName,
- String cloudHsmClusterName, Context context) {
- PagedIterable inner
- = this.serviceClient().listByCloudHsmCluster(resourceGroupName, cloudHsmClusterName, context);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager()));
- }
-
- private CloudHsmClusterPrivateLinkResourcesClient serviceClient() {
- return this.innerClient;
- }
-
- private com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager() {
- return this.serviceManager;
- }
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterRestoreStatusClientImpl.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterRestoreStatusClientImpl.java
deleted file mode 100644
index 3b6d9806bc56a..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterRestoreStatusClientImpl.java
+++ /dev/null
@@ -1,206 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.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.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.RestProxy;
-import com.azure.core.management.exception.ManagementException;
-import com.azure.core.util.Context;
-import com.azure.core.util.FluxUtil;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.CloudHsmClusterRestoreStatusClient;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.RestoreResultInner;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterRestoreStatusGetResponse;
-import reactor.core.publisher.Mono;
-
-/**
- * An instance of this class provides access to all the operations defined in CloudHsmClusterRestoreStatusClient.
- */
-public final class CloudHsmClusterRestoreStatusClientImpl implements CloudHsmClusterRestoreStatusClient {
- /**
- * The proxy service used to perform REST calls.
- */
- private final CloudHsmClusterRestoreStatusService service;
-
- /**
- * The service client containing this operation class.
- */
- private final AzureHsmResourceProviderImpl client;
-
- /**
- * Initializes an instance of CloudHsmClusterRestoreStatusClientImpl.
- *
- * @param client the instance of the service client containing this operation class.
- */
- CloudHsmClusterRestoreStatusClientImpl(AzureHsmResourceProviderImpl client) {
- this.service = RestProxy.create(CloudHsmClusterRestoreStatusService.class, client.getHttpPipeline(),
- client.getSerializerAdapter());
- this.client = client;
- }
-
- /**
- * The interface defining all the services for AzureHsmResourceProviderCloudHsmClusterRestoreStatus to be used by
- * the proxy service to perform REST calls.
- */
- @Host("{$host}")
- @ServiceInterface(name = "AzureHsmResourceProv")
- public interface CloudHsmClusterRestoreStatusService {
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/restoreOperationStatus/{jobId}")
- @ExpectedResponses({ 200, 202 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono get(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("cloudHsmClusterName") String cloudHsmClusterName, @QueryParam("api-version") String apiVersion,
- @PathParam("jobId") String jobId, @HeaderParam("Accept") String accept, Context context);
- }
-
- /**
- * Gets the restore operation status of the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param jobId The id returned as part of the backup request.
- * @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 restore operation status of the specified Cloud HSM Cluster on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, String jobId) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- if (jobId == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobId is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, cloudHsmClusterName, this.client.getApiVersion(), jobId, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Gets the restore operation status of the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param jobId The id returned as part of the backup request.
- * @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 restore operation status of the specified Cloud HSM Cluster on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, String jobId, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- if (jobId == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobId is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- cloudHsmClusterName, this.client.getApiVersion(), jobId, accept, context);
- }
-
- /**
- * Gets the restore operation status of the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param jobId The id returned as part of the backup request.
- * @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 restore operation status of the specified Cloud HSM Cluster on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getAsync(String resourceGroupName, String cloudHsmClusterName, String jobId) {
- return getWithResponseAsync(resourceGroupName, cloudHsmClusterName, jobId)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Gets the restore operation status of the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param jobId The id returned as part of the backup request.
- * @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 restore operation status of the specified Cloud HSM Cluster.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public CloudHsmClusterRestoreStatusGetResponse getWithResponse(String resourceGroupName, String cloudHsmClusterName,
- String jobId, Context context) {
- return getWithResponseAsync(resourceGroupName, cloudHsmClusterName, jobId, context).block();
- }
-
- /**
- * Gets the restore operation status of the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param jobId The id returned as part of the backup request.
- * @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 restore operation status of the specified Cloud HSM Cluster.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public RestoreResultInner get(String resourceGroupName, String cloudHsmClusterName, String jobId) {
- return getWithResponse(resourceGroupName, cloudHsmClusterName, jobId, Context.NONE).getValue();
- }
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterRestoreStatusImpl.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterRestoreStatusImpl.java
deleted file mode 100644
index 681b37cce34b3..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClusterRestoreStatusImpl.java
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.implementation;
-
-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.hardwaresecuritymodules.fluent.CloudHsmClusterRestoreStatusClient;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.RestoreResultInner;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterRestoreStatus;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterRestoreStatusGetResponse;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.RestoreResult;
-
-public final class CloudHsmClusterRestoreStatusImpl implements CloudHsmClusterRestoreStatus {
- private static final ClientLogger LOGGER = new ClientLogger(CloudHsmClusterRestoreStatusImpl.class);
-
- private final CloudHsmClusterRestoreStatusClient innerClient;
-
- private final com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager serviceManager;
-
- public CloudHsmClusterRestoreStatusImpl(CloudHsmClusterRestoreStatusClient innerClient,
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager serviceManager) {
- this.innerClient = innerClient;
- this.serviceManager = serviceManager;
- }
-
- public Response getWithResponse(String resourceGroupName, String cloudHsmClusterName, String jobId,
- Context context) {
- CloudHsmClusterRestoreStatusGetResponse inner
- = this.serviceClient().getWithResponse(resourceGroupName, cloudHsmClusterName, jobId, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- new RestoreResultImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
- }
-
- public RestoreResult get(String resourceGroupName, String cloudHsmClusterName, String jobId) {
- RestoreResultInner inner = this.serviceClient().get(resourceGroupName, cloudHsmClusterName, jobId);
- if (inner != null) {
- return new RestoreResultImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
- private CloudHsmClusterRestoreStatusClient serviceClient() {
- return this.innerClient;
- }
-
- private com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager() {
- return this.serviceManager;
- }
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClustersClientImpl.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClustersClientImpl.java
deleted file mode 100644
index 7aa88deffc13a..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClustersClientImpl.java
+++ /dev/null
@@ -1,2542 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.implementation;
-
-import com.azure.core.annotation.BodyParam;
-import com.azure.core.annotation.Delete;
-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.Patch;
-import com.azure.core.annotation.PathParam;
-import com.azure.core.annotation.Post;
-import com.azure.core.annotation.Put;
-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.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.hardwaresecuritymodules.fluent.CloudHsmClustersClient;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.BackupResultInner;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.CloudHsmClusterInner;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.RestoreResultInner;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.BackupRequestProperties;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterListResult;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusterPatchParameters;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.RestoreRequestProperties;
-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 CloudHsmClustersClient.
- */
-public final class CloudHsmClustersClientImpl implements CloudHsmClustersClient {
- /**
- * The proxy service used to perform REST calls.
- */
- private final CloudHsmClustersService service;
-
- /**
- * The service client containing this operation class.
- */
- private final AzureHsmResourceProviderImpl client;
-
- /**
- * Initializes an instance of CloudHsmClustersClientImpl.
- *
- * @param client the instance of the service client containing this operation class.
- */
- CloudHsmClustersClientImpl(AzureHsmResourceProviderImpl client) {
- this.service
- = RestProxy.create(CloudHsmClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
- this.client = client;
- }
-
- /**
- * The interface defining all the services for AzureHsmResourceProviderCloudHsmClusters to be used by the proxy
- * service to perform REST calls.
- */
- @Host("{$host}")
- @ServiceInterface(name = "AzureHsmResourceProv")
- public interface CloudHsmClustersService {
- @Headers({ "Content-Type: application/json" })
- @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}")
- @ExpectedResponses({ 200, 201 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> createOrUpdate(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("cloudHsmClusterName") String cloudHsmClusterName, @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") CloudHsmClusterInner body, @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}")
- @ExpectedResponses({ 200, 202 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> update(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("cloudHsmClusterName") String cloudHsmClusterName, @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") CloudHsmClusterPatchParameters body, @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> getByResourceGroup(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("cloudHsmClusterName") String cloudHsmClusterName, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}")
- @ExpectedResponses({ 202, 204 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> delete(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("cloudHsmClusterName") String cloudHsmClusterName, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByResourceGroup(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$skiptoken") String skiptoken,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId, @QueryParam("$skiptoken") String skiptoken,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/validateBackupProperties")
- @ExpectedResponses({ 200, 202 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> validateBackupProperties(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("cloudHsmClusterName") String cloudHsmClusterName, @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") BackupRequestProperties backupRequestProperties,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/backup")
- @ExpectedResponses({ 200, 202 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> backup(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("cloudHsmClusterName") String cloudHsmClusterName, @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") BackupRequestProperties backupRequestProperties,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/validateRestoreProperties")
- @ExpectedResponses({ 200, 202 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> validateRestoreProperties(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("cloudHsmClusterName") String cloudHsmClusterName, @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") RestoreRequestProperties restoreRequestProperties,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/restore")
- @ExpectedResponses({ 200, 202 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> restore(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("cloudHsmClusterName") String cloudHsmClusterName, @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") RestoreRequestProperties restoreRequestProperties,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("{nextLink}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByResourceGroupNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("{nextLink}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listBySubscriptionNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept, Context context);
- }
-
- /**
- * Create or Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, CloudHsmClusterInner body) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- if (body == null) {
- return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
- } else {
- body.validate();
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, cloudHsmClusterName, this.client.getApiVersion(), body, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Create or Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, CloudHsmClusterInner body, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- if (body == null) {
- return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
- } else {
- body.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- cloudHsmClusterName, this.client.getApiVersion(), body, accept, context);
- }
-
- /**
- * Create or Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, CloudHsmClusterInner>
- beginCreateOrUpdateAsync(String resourceGroupName, String cloudHsmClusterName, CloudHsmClusterInner body) {
- Mono>> mono
- = createOrUpdateWithResponseAsync(resourceGroupName, cloudHsmClusterName, body);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- CloudHsmClusterInner.class, CloudHsmClusterInner.class, this.client.getContext());
- }
-
- /**
- * Create or Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of resource information with extended details.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, CloudHsmClusterInner> beginCreateOrUpdateAsync(
- String resourceGroupName, String cloudHsmClusterName, CloudHsmClusterInner body, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono
- = createOrUpdateWithResponseAsync(resourceGroupName, cloudHsmClusterName, body, context);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- CloudHsmClusterInner.class, CloudHsmClusterInner.class, context);
- }
-
- /**
- * Create or Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, CloudHsmClusterInner>
- beginCreateOrUpdate(String resourceGroupName, String cloudHsmClusterName, CloudHsmClusterInner body) {
- return this.beginCreateOrUpdateAsync(resourceGroupName, cloudHsmClusterName, body).getSyncPoller();
- }
-
- /**
- * Create or Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, CloudHsmClusterInner> beginCreateOrUpdate(
- String resourceGroupName, String cloudHsmClusterName, CloudHsmClusterInner body, Context context) {
- return this.beginCreateOrUpdateAsync(resourceGroupName, cloudHsmClusterName, body, context).getSyncPoller();
- }
-
- /**
- * Create or Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createOrUpdateAsync(String resourceGroupName, String cloudHsmClusterName,
- CloudHsmClusterInner body) {
- return beginCreateOrUpdateAsync(resourceGroupName, cloudHsmClusterName, body).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Create or Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createOrUpdateAsync(String resourceGroupName, String cloudHsmClusterName,
- CloudHsmClusterInner body, Context context) {
- return beginCreateOrUpdateAsync(resourceGroupName, cloudHsmClusterName, body, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Create or Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public CloudHsmClusterInner createOrUpdate(String resourceGroupName, String cloudHsmClusterName,
- CloudHsmClusterInner body) {
- return createOrUpdateAsync(resourceGroupName, cloudHsmClusterName, body).block();
- }
-
- /**
- * Create or Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public CloudHsmClusterInner createOrUpdate(String resourceGroupName, String cloudHsmClusterName,
- CloudHsmClusterInner body, Context context) {
- return createOrUpdateAsync(resourceGroupName, cloudHsmClusterName, body, context).block();
- }
-
- /**
- * Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> updateWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, CloudHsmClusterPatchParameters body) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- if (body == null) {
- return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
- } else {
- body.validate();
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, cloudHsmClusterName, this.client.getApiVersion(), body, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> updateWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, CloudHsmClusterPatchParameters body, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- if (body == null) {
- return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
- } else {
- body.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- cloudHsmClusterName, this.client.getApiVersion(), body, accept, context);
- }
-
- /**
- * Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, CloudHsmClusterInner>
- beginUpdateAsync(String resourceGroupName, String cloudHsmClusterName, CloudHsmClusterPatchParameters body) {
- Mono>> mono = updateWithResponseAsync(resourceGroupName, cloudHsmClusterName, body);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- CloudHsmClusterInner.class, CloudHsmClusterInner.class, this.client.getContext());
- }
-
- /**
- * Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of resource information with extended details.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, CloudHsmClusterInner> beginUpdateAsync(
- String resourceGroupName, String cloudHsmClusterName, CloudHsmClusterPatchParameters body, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono
- = updateWithResponseAsync(resourceGroupName, cloudHsmClusterName, body, context);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- CloudHsmClusterInner.class, CloudHsmClusterInner.class, context);
- }
-
- /**
- * Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, CloudHsmClusterInner> beginUpdate(String resourceGroupName,
- String cloudHsmClusterName, CloudHsmClusterPatchParameters body) {
- return this.beginUpdateAsync(resourceGroupName, cloudHsmClusterName, body).getSyncPoller();
- }
-
- /**
- * Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, CloudHsmClusterInner> beginUpdate(String resourceGroupName,
- String cloudHsmClusterName, CloudHsmClusterPatchParameters body, Context context) {
- return this.beginUpdateAsync(resourceGroupName, cloudHsmClusterName, body, context).getSyncPoller();
- }
-
- /**
- * Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono updateAsync(String resourceGroupName, String cloudHsmClusterName,
- CloudHsmClusterPatchParameters body) {
- return beginUpdateAsync(resourceGroupName, cloudHsmClusterName, body).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono updateAsync(String resourceGroupName, String cloudHsmClusterName,
- CloudHsmClusterPatchParameters body, Context context) {
- return beginUpdateAsync(resourceGroupName, cloudHsmClusterName, body, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public CloudHsmClusterInner update(String resourceGroupName, String cloudHsmClusterName,
- CloudHsmClusterPatchParameters body) {
- return updateAsync(resourceGroupName, cloudHsmClusterName, body).block();
- }
-
- /**
- * Update a Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param body Parameters to create Cloud HSM Cluster.
- * @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 resource information with extended details.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public CloudHsmClusterInner update(String resourceGroupName, String cloudHsmClusterName,
- CloudHsmClusterPatchParameters body, Context context) {
- return updateAsync(resourceGroupName, cloudHsmClusterName, body, context).block();
- }
-
- /**
- * Gets the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 specified Cloud HSM Cluster along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, cloudHsmClusterName, this.client.getApiVersion(), accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Gets the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 specified Cloud HSM Cluster along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- cloudHsmClusterName, this.client.getApiVersion(), accept, context);
- }
-
- /**
- * Gets the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 specified Cloud HSM Cluster on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getByResourceGroupAsync(String resourceGroupName, String cloudHsmClusterName) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, cloudHsmClusterName)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Gets the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 specified Cloud HSM Cluster along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response getByResourceGroupWithResponse(String resourceGroupName,
- String cloudHsmClusterName, Context context) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, cloudHsmClusterName, context).block();
- }
-
- /**
- * Gets the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 specified Cloud HSM Cluster.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public CloudHsmClusterInner getByResourceGroup(String resourceGroupName, String cloudHsmClusterName) {
- return getByResourceGroupWithResponse(resourceGroupName, cloudHsmClusterName, Context.NONE).getValue();
- }
-
- /**
- * Deletes the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, cloudHsmClusterName, this.client.getApiVersion(), accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Deletes the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- cloudHsmClusterName, this.client.getApiVersion(), accept, context);
- }
-
- /**
- * Deletes the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String cloudHsmClusterName) {
- Mono>> mono = deleteWithResponseAsync(resourceGroupName, cloudHsmClusterName);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- this.client.getContext());
- }
-
- /**
- * Deletes the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String cloudHsmClusterName,
- Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono
- = deleteWithResponseAsync(resourceGroupName, cloudHsmClusterName, context);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- context);
- }
-
- /**
- * Deletes the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link SyncPoller} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, Void> beginDelete(String resourceGroupName, String cloudHsmClusterName) {
- return this.beginDeleteAsync(resourceGroupName, cloudHsmClusterName).getSyncPoller();
- }
-
- /**
- * Deletes the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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, Void> beginDelete(String resourceGroupName, String cloudHsmClusterName,
- Context context) {
- return this.beginDeleteAsync(resourceGroupName, cloudHsmClusterName, context).getSyncPoller();
- }
-
- /**
- * Deletes the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return A {@link Mono} that completes when a successful response is received.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String cloudHsmClusterName) {
- return beginDeleteAsync(resourceGroupName, cloudHsmClusterName).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Deletes the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return A {@link Mono} that completes when a successful response is received.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String cloudHsmClusterName, Context context) {
- return beginDeleteAsync(resourceGroupName, cloudHsmClusterName, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Deletes the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceGroupName, String cloudHsmClusterName) {
- deleteAsync(resourceGroupName, cloudHsmClusterName).block();
- }
-
- /**
- * Deletes the specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceGroupName, String cloudHsmClusterName, Context context) {
- deleteAsync(resourceGroupName, cloudHsmClusterName, context).block();
- }
-
- /**
- * The List operation gets information about the Cloud HSM Clusters associated with the subscription and within the
- * specified resource group.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param skiptoken The page-continuation token to use with a paged version of this API.
- * @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 list of Cloud HSM Clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName,
- String skiptoken) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, skiptoken, this.client.getApiVersion(), 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()));
- }
-
- /**
- * The List operation gets information about the Cloud HSM Clusters associated with the subscription and within the
- * specified resource group.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param skiptoken The page-continuation token to use with a paged version of this API.
- * @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 list of Cloud HSM Clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName,
- String skiptoken, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- skiptoken, this.client.getApiVersion(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
- /**
- * The List operation gets information about the Cloud HSM Clusters associated with the subscription and within the
- * specified resource group.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param skiptoken The page-continuation token to use with a paged version of this API.
- * @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 list of Cloud HSM Clusters as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skiptoken) {
- return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
- }
-
- /**
- * The List operation gets information about the Cloud HSM Clusters associated with the subscription and within the
- * specified resource group.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of Cloud HSM Clusters as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
- final String skiptoken = null;
- return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
- }
-
- /**
- * The List operation gets information about the Cloud HSM Clusters associated with the subscription and within the
- * specified resource group.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param skiptoken The page-continuation token to use with a paged version of this API.
- * @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 list of Cloud HSM Clusters as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skiptoken,
- Context context) {
- return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skiptoken, context),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * The List operation gets information about the Cloud HSM Clusters associated with the subscription and within the
- * specified resource group.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of Cloud HSM Clusters as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByResourceGroup(String resourceGroupName) {
- final String skiptoken = null;
- return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skiptoken));
- }
-
- /**
- * The List operation gets information about the Cloud HSM Clusters associated with the subscription and within the
- * specified resource group.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param skiptoken The page-continuation token to use with a paged version of this API.
- * @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 list of Cloud HSM Clusters as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByResourceGroup(String resourceGroupName, String skiptoken,
- Context context) {
- return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skiptoken, context));
- }
-
- /**
- * The List operation gets information about the Cloud HSM Clusters associated with the subscription.
- *
- * @param skiptoken The page-continuation token to use with a paged version of this API.
- * @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 list of Cloud HSM Clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String skiptoken) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), skiptoken,
- this.client.getApiVersion(), 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()));
- }
-
- /**
- * The List operation gets information about the Cloud HSM Clusters associated with the subscription.
- *
- * @param skiptoken The page-continuation token to use with a paged version of this API.
- * @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 list of Cloud HSM Clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String skiptoken, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), this.client.getSubscriptionId(), skiptoken, this.client.getApiVersion(),
- accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
- /**
- * The List operation gets information about the Cloud HSM Clusters associated with the subscription.
- *
- * @param skiptoken The page-continuation token to use with a paged version of this API.
- * @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 list of Cloud HSM Clusters as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String skiptoken) {
- return new PagedFlux<>(() -> listSinglePageAsync(skiptoken),
- nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
- }
-
- /**
- * The List operation gets information about the Cloud HSM Clusters associated with the subscription.
- *
- * @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 list of Cloud HSM Clusters as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync() {
- final String skiptoken = null;
- return new PagedFlux<>(() -> listSinglePageAsync(skiptoken),
- nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
- }
-
- /**
- * The List operation gets information about the Cloud HSM Clusters associated with the subscription.
- *
- * @param skiptoken The page-continuation token to use with a paged version of this API.
- * @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 list of Cloud HSM Clusters as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String skiptoken, Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(skiptoken, context),
- nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * The List operation gets information about the Cloud HSM Clusters associated with the subscription.
- *
- * @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 list of Cloud HSM Clusters as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list() {
- final String skiptoken = null;
- return new PagedIterable<>(listAsync(skiptoken));
- }
-
- /**
- * The List operation gets information about the Cloud HSM Clusters associated with the subscription.
- *
- * @param skiptoken The page-continuation token to use with a paged version of this API.
- * @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 list of Cloud HSM Clusters as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String skiptoken, Context context) {
- return new PagedIterable<>(listAsync(skiptoken, context));
- }
-
- /**
- * Pre Backup operation to validate whether the customer can perform a backup on the Cloud HSM Cluster resource in
- * the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param backupRequestProperties Backup Operation Required properties.
- * @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 backup operation Result along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> validateBackupPropertiesWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, BackupRequestProperties backupRequestProperties) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- if (backupRequestProperties != null) {
- backupRequestProperties.validate();
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.validateBackupProperties(this.client.getEndpoint(),
- this.client.getSubscriptionId(), resourceGroupName, cloudHsmClusterName, this.client.getApiVersion(),
- backupRequestProperties, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Pre Backup operation to validate whether the customer can perform a backup on the Cloud HSM Cluster resource in
- * the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param backupRequestProperties Backup Operation Required properties.
- * @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 backup operation Result along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> validateBackupPropertiesWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, BackupRequestProperties backupRequestProperties, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- if (backupRequestProperties != null) {
- backupRequestProperties.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.validateBackupProperties(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, cloudHsmClusterName, this.client.getApiVersion(), backupRequestProperties, accept,
- context);
- }
-
- /**
- * Pre Backup operation to validate whether the customer can perform a backup on the Cloud HSM Cluster resource in
- * the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param backupRequestProperties Backup Operation Required properties.
- * @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 backup operation Result.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, BackupResultInner> beginValidateBackupPropertiesAsync(
- String resourceGroupName, String cloudHsmClusterName, BackupRequestProperties backupRequestProperties) {
- Mono>> mono = validateBackupPropertiesWithResponseAsync(resourceGroupName,
- cloudHsmClusterName, backupRequestProperties);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- BackupResultInner.class, BackupResultInner.class, this.client.getContext());
- }
-
- /**
- * Pre Backup operation to validate whether the customer can perform a backup on the Cloud HSM Cluster resource in
- * the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 backup operation Result.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, BackupResultInner>
- beginValidateBackupPropertiesAsync(String resourceGroupName, String cloudHsmClusterName) {
- final BackupRequestProperties backupRequestProperties = null;
- Mono>> mono = validateBackupPropertiesWithResponseAsync(resourceGroupName,
- cloudHsmClusterName, backupRequestProperties);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- BackupResultInner.class, BackupResultInner.class, this.client.getContext());
- }
-
- /**
- * Pre Backup operation to validate whether the customer can perform a backup on the Cloud HSM Cluster resource in
- * the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param backupRequestProperties Backup Operation Required properties.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of backup operation Result.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, BackupResultInner> beginValidateBackupPropertiesAsync(
- String resourceGroupName, String cloudHsmClusterName, BackupRequestProperties backupRequestProperties,
- Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono = validateBackupPropertiesWithResponseAsync(resourceGroupName,
- cloudHsmClusterName, backupRequestProperties, context);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- BackupResultInner.class, BackupResultInner.class, context);
- }
-
- /**
- * Pre Backup operation to validate whether the customer can perform a backup on the Cloud HSM Cluster resource in
- * the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 backup operation Result.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, BackupResultInner>
- beginValidateBackupProperties(String resourceGroupName, String cloudHsmClusterName) {
- final BackupRequestProperties backupRequestProperties = null;
- return this.beginValidateBackupPropertiesAsync(resourceGroupName, cloudHsmClusterName, backupRequestProperties)
- .getSyncPoller();
- }
-
- /**
- * Pre Backup operation to validate whether the customer can perform a backup on the Cloud HSM Cluster resource in
- * the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param backupRequestProperties Backup Operation Required properties.
- * @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 backup operation Result.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, BackupResultInner> beginValidateBackupProperties(
- String resourceGroupName, String cloudHsmClusterName, BackupRequestProperties backupRequestProperties,
- Context context) {
- return this
- .beginValidateBackupPropertiesAsync(resourceGroupName, cloudHsmClusterName, backupRequestProperties,
- context)
- .getSyncPoller();
- }
-
- /**
- * Pre Backup operation to validate whether the customer can perform a backup on the Cloud HSM Cluster resource in
- * the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param backupRequestProperties Backup Operation Required properties.
- * @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 backup operation Result on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono validateBackupPropertiesAsync(String resourceGroupName, String cloudHsmClusterName,
- BackupRequestProperties backupRequestProperties) {
- return beginValidateBackupPropertiesAsync(resourceGroupName, cloudHsmClusterName, backupRequestProperties)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Pre Backup operation to validate whether the customer can perform a backup on the Cloud HSM Cluster resource in
- * the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 backup operation Result on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono validateBackupPropertiesAsync(String resourceGroupName,
- String cloudHsmClusterName) {
- final BackupRequestProperties backupRequestProperties = null;
- return beginValidateBackupPropertiesAsync(resourceGroupName, cloudHsmClusterName, backupRequestProperties)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Pre Backup operation to validate whether the customer can perform a backup on the Cloud HSM Cluster resource in
- * the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param backupRequestProperties Backup Operation Required properties.
- * @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 backup operation Result on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono validateBackupPropertiesAsync(String resourceGroupName, String cloudHsmClusterName,
- BackupRequestProperties backupRequestProperties, Context context) {
- return beginValidateBackupPropertiesAsync(resourceGroupName, cloudHsmClusterName, backupRequestProperties,
- context).last().flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Pre Backup operation to validate whether the customer can perform a backup on the Cloud HSM Cluster resource in
- * the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 backup operation Result.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public BackupResultInner validateBackupProperties(String resourceGroupName, String cloudHsmClusterName) {
- final BackupRequestProperties backupRequestProperties = null;
- return validateBackupPropertiesAsync(resourceGroupName, cloudHsmClusterName, backupRequestProperties).block();
- }
-
- /**
- * Pre Backup operation to validate whether the customer can perform a backup on the Cloud HSM Cluster resource in
- * the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param backupRequestProperties Backup Operation Required properties.
- * @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 backup operation Result.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public BackupResultInner validateBackupProperties(String resourceGroupName, String cloudHsmClusterName,
- BackupRequestProperties backupRequestProperties, Context context) {
- return validateBackupPropertiesAsync(resourceGroupName, cloudHsmClusterName, backupRequestProperties, context)
- .block();
- }
-
- /**
- * Create a backup of the Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param backupRequestProperties Azure storage Resource Uri.
- * @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 backup operation Result along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> backupWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, BackupRequestProperties backupRequestProperties) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- if (backupRequestProperties != null) {
- backupRequestProperties.validate();
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.backup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- cloudHsmClusterName, this.client.getApiVersion(), backupRequestProperties, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Create a backup of the Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param backupRequestProperties Azure storage Resource Uri.
- * @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 backup operation Result along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> backupWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, BackupRequestProperties backupRequestProperties, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- if (backupRequestProperties != null) {
- backupRequestProperties.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.backup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- cloudHsmClusterName, this.client.getApiVersion(), backupRequestProperties, accept, context);
- }
-
- /**
- * Create a backup of the Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param backupRequestProperties Azure storage Resource Uri.
- * @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 backup operation Result.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, BackupResultInner> beginBackupAsync(String resourceGroupName,
- String cloudHsmClusterName, BackupRequestProperties backupRequestProperties) {
- Mono>> mono
- = backupWithResponseAsync(resourceGroupName, cloudHsmClusterName, backupRequestProperties);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- BackupResultInner.class, BackupResultInner.class, this.client.getContext());
- }
-
- /**
- * Create a backup of the Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 backup operation Result.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, BackupResultInner> beginBackupAsync(String resourceGroupName,
- String cloudHsmClusterName) {
- final BackupRequestProperties backupRequestProperties = null;
- Mono>> mono
- = backupWithResponseAsync(resourceGroupName, cloudHsmClusterName, backupRequestProperties);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- BackupResultInner.class, BackupResultInner.class, this.client.getContext());
- }
-
- /**
- * Create a backup of the Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param backupRequestProperties Azure storage Resource Uri.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of backup operation Result.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, BackupResultInner> beginBackupAsync(String resourceGroupName,
- String cloudHsmClusterName, BackupRequestProperties backupRequestProperties, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono
- = backupWithResponseAsync(resourceGroupName, cloudHsmClusterName, backupRequestProperties, context);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- BackupResultInner.class, BackupResultInner.class, context);
- }
-
- /**
- * Create a backup of the Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 backup operation Result.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, BackupResultInner> beginBackup(String resourceGroupName,
- String cloudHsmClusterName) {
- final BackupRequestProperties backupRequestProperties = null;
- return this.beginBackupAsync(resourceGroupName, cloudHsmClusterName, backupRequestProperties).getSyncPoller();
- }
-
- /**
- * Create a backup of the Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param backupRequestProperties Azure storage Resource Uri.
- * @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 backup operation Result.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, BackupResultInner> beginBackup(String resourceGroupName,
- String cloudHsmClusterName, BackupRequestProperties backupRequestProperties, Context context) {
- return this.beginBackupAsync(resourceGroupName, cloudHsmClusterName, backupRequestProperties, context)
- .getSyncPoller();
- }
-
- /**
- * Create a backup of the Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param backupRequestProperties Azure storage Resource Uri.
- * @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 backup operation Result on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono backupAsync(String resourceGroupName, String cloudHsmClusterName,
- BackupRequestProperties backupRequestProperties) {
- return beginBackupAsync(resourceGroupName, cloudHsmClusterName, backupRequestProperties).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Create a backup of the Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 backup operation Result on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono backupAsync(String resourceGroupName, String cloudHsmClusterName) {
- final BackupRequestProperties backupRequestProperties = null;
- return beginBackupAsync(resourceGroupName, cloudHsmClusterName, backupRequestProperties).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Create a backup of the Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param backupRequestProperties Azure storage Resource Uri.
- * @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 backup operation Result on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono backupAsync(String resourceGroupName, String cloudHsmClusterName,
- BackupRequestProperties backupRequestProperties, Context context) {
- return beginBackupAsync(resourceGroupName, cloudHsmClusterName, backupRequestProperties, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Create a backup of the Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 backup operation Result.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public BackupResultInner backup(String resourceGroupName, String cloudHsmClusterName) {
- final BackupRequestProperties backupRequestProperties = null;
- return backupAsync(resourceGroupName, cloudHsmClusterName, backupRequestProperties).block();
- }
-
- /**
- * Create a backup of the Cloud HSM Cluster in the specified subscription.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param backupRequestProperties Azure storage Resource Uri.
- * @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 backup operation Result.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public BackupResultInner backup(String resourceGroupName, String cloudHsmClusterName,
- BackupRequestProperties backupRequestProperties, Context context) {
- return backupAsync(resourceGroupName, cloudHsmClusterName, backupRequestProperties, context).block();
- }
-
- /**
- * Queued validating pre restore operation.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Optional Parameters to validate prior performing a restore 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 restore operation properties along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> validateRestorePropertiesWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, RestoreRequestProperties restoreRequestProperties) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- if (restoreRequestProperties != null) {
- restoreRequestProperties.validate();
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.validateRestoreProperties(this.client.getEndpoint(),
- this.client.getSubscriptionId(), resourceGroupName, cloudHsmClusterName, this.client.getApiVersion(),
- restoreRequestProperties, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Queued validating pre restore operation.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Optional Parameters to validate prior performing a restore operation.
- * @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 restore operation properties along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> validateRestorePropertiesWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, RestoreRequestProperties restoreRequestProperties, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- if (restoreRequestProperties != null) {
- restoreRequestProperties.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.validateRestoreProperties(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, cloudHsmClusterName, this.client.getApiVersion(), restoreRequestProperties, accept,
- context);
- }
-
- /**
- * Queued validating pre restore operation.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Optional Parameters to validate prior performing a restore operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of restore operation properties.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, RestoreResultInner> beginValidateRestorePropertiesAsync(
- String resourceGroupName, String cloudHsmClusterName, RestoreRequestProperties restoreRequestProperties) {
- Mono>> mono = validateRestorePropertiesWithResponseAsync(resourceGroupName,
- cloudHsmClusterName, restoreRequestProperties);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- RestoreResultInner.class, RestoreResultInner.class, this.client.getContext());
- }
-
- /**
- * Queued validating pre restore operation.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 restore operation properties.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, RestoreResultInner>
- beginValidateRestorePropertiesAsync(String resourceGroupName, String cloudHsmClusterName) {
- final RestoreRequestProperties restoreRequestProperties = null;
- Mono>> mono = validateRestorePropertiesWithResponseAsync(resourceGroupName,
- cloudHsmClusterName, restoreRequestProperties);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- RestoreResultInner.class, RestoreResultInner.class, this.client.getContext());
- }
-
- /**
- * Queued validating pre restore operation.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Optional Parameters to validate prior performing a restore operation.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of restore operation properties.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, RestoreResultInner> beginValidateRestorePropertiesAsync(
- String resourceGroupName, String cloudHsmClusterName, RestoreRequestProperties restoreRequestProperties,
- Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono = validateRestorePropertiesWithResponseAsync(resourceGroupName,
- cloudHsmClusterName, restoreRequestProperties, context);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- RestoreResultInner.class, RestoreResultInner.class, context);
- }
-
- /**
- * Queued validating pre restore operation.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 restore operation properties.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, RestoreResultInner>
- beginValidateRestoreProperties(String resourceGroupName, String cloudHsmClusterName) {
- final RestoreRequestProperties restoreRequestProperties = null;
- return this
- .beginValidateRestorePropertiesAsync(resourceGroupName, cloudHsmClusterName, restoreRequestProperties)
- .getSyncPoller();
- }
-
- /**
- * Queued validating pre restore operation.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Optional Parameters to validate prior performing a restore operation.
- * @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 restore operation properties.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, RestoreResultInner> beginValidateRestoreProperties(
- String resourceGroupName, String cloudHsmClusterName, RestoreRequestProperties restoreRequestProperties,
- Context context) {
- return this
- .beginValidateRestorePropertiesAsync(resourceGroupName, cloudHsmClusterName, restoreRequestProperties,
- context)
- .getSyncPoller();
- }
-
- /**
- * Queued validating pre restore operation.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Optional Parameters to validate prior performing a restore 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 restore operation properties on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono validateRestorePropertiesAsync(String resourceGroupName,
- String cloudHsmClusterName, RestoreRequestProperties restoreRequestProperties) {
- return beginValidateRestorePropertiesAsync(resourceGroupName, cloudHsmClusterName, restoreRequestProperties)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Queued validating pre restore operation.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 restore operation properties on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono validateRestorePropertiesAsync(String resourceGroupName,
- String cloudHsmClusterName) {
- final RestoreRequestProperties restoreRequestProperties = null;
- return beginValidateRestorePropertiesAsync(resourceGroupName, cloudHsmClusterName, restoreRequestProperties)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Queued validating pre restore operation.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Optional Parameters to validate prior performing a restore operation.
- * @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 restore operation properties on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono validateRestorePropertiesAsync(String resourceGroupName,
- String cloudHsmClusterName, RestoreRequestProperties restoreRequestProperties, Context context) {
- return beginValidateRestorePropertiesAsync(resourceGroupName, cloudHsmClusterName, restoreRequestProperties,
- context).last().flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Queued validating pre restore operation.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @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 restore operation properties.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public RestoreResultInner validateRestoreProperties(String resourceGroupName, String cloudHsmClusterName) {
- final RestoreRequestProperties restoreRequestProperties = null;
- return validateRestorePropertiesAsync(resourceGroupName, cloudHsmClusterName, restoreRequestProperties).block();
- }
-
- /**
- * Queued validating pre restore operation.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Optional Parameters to validate prior performing a restore operation.
- * @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 restore operation properties.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public RestoreResultInner validateRestoreProperties(String resourceGroupName, String cloudHsmClusterName,
- RestoreRequestProperties restoreRequestProperties, Context context) {
- return validateRestorePropertiesAsync(resourceGroupName, cloudHsmClusterName, restoreRequestProperties, context)
- .block();
- }
-
- /**
- * Restores all key materials of a specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Restore Operation Required properties.
- * @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 restore operation properties along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> restoreWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, RestoreRequestProperties restoreRequestProperties) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- if (restoreRequestProperties == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter restoreRequestProperties is required and cannot be null."));
- } else {
- restoreRequestProperties.validate();
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.restore(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, cloudHsmClusterName, this.client.getApiVersion(), restoreRequestProperties, accept,
- context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Restores all key materials of a specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Restore Operation Required properties.
- * @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 restore operation properties along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> restoreWithResponseAsync(String resourceGroupName,
- String cloudHsmClusterName, RestoreRequestProperties restoreRequestProperties, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (cloudHsmClusterName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cloudHsmClusterName is required and cannot be null."));
- }
- if (restoreRequestProperties == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter restoreRequestProperties is required and cannot be null."));
- } else {
- restoreRequestProperties.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.restore(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- cloudHsmClusterName, this.client.getApiVersion(), restoreRequestProperties, accept, context);
- }
-
- /**
- * Restores all key materials of a specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Restore Operation Required properties.
- * @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 restore operation properties.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, RestoreResultInner> beginRestoreAsync(String resourceGroupName,
- String cloudHsmClusterName, RestoreRequestProperties restoreRequestProperties) {
- Mono>> mono
- = restoreWithResponseAsync(resourceGroupName, cloudHsmClusterName, restoreRequestProperties);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- RestoreResultInner.class, RestoreResultInner.class, this.client.getContext());
- }
-
- /**
- * Restores all key materials of a specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Restore Operation Required properties.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of restore operation properties.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, RestoreResultInner> beginRestoreAsync(String resourceGroupName,
- String cloudHsmClusterName, RestoreRequestProperties restoreRequestProperties, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono
- = restoreWithResponseAsync(resourceGroupName, cloudHsmClusterName, restoreRequestProperties, context);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- RestoreResultInner.class, RestoreResultInner.class, context);
- }
-
- /**
- * Restores all key materials of a specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Restore Operation Required properties.
- * @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 restore operation properties.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, RestoreResultInner> beginRestore(String resourceGroupName,
- String cloudHsmClusterName, RestoreRequestProperties restoreRequestProperties) {
- return this.beginRestoreAsync(resourceGroupName, cloudHsmClusterName, restoreRequestProperties).getSyncPoller();
- }
-
- /**
- * Restores all key materials of a specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Restore Operation Required properties.
- * @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 restore operation properties.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, RestoreResultInner> beginRestore(String resourceGroupName,
- String cloudHsmClusterName, RestoreRequestProperties restoreRequestProperties, Context context) {
- return this.beginRestoreAsync(resourceGroupName, cloudHsmClusterName, restoreRequestProperties, context)
- .getSyncPoller();
- }
-
- /**
- * Restores all key materials of a specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Restore Operation Required properties.
- * @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 restore operation properties on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono restoreAsync(String resourceGroupName, String cloudHsmClusterName,
- RestoreRequestProperties restoreRequestProperties) {
- return beginRestoreAsync(resourceGroupName, cloudHsmClusterName, restoreRequestProperties).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Restores all key materials of a specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Restore Operation Required properties.
- * @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 restore operation properties on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono restoreAsync(String resourceGroupName, String cloudHsmClusterName,
- RestoreRequestProperties restoreRequestProperties, Context context) {
- return beginRestoreAsync(resourceGroupName, cloudHsmClusterName, restoreRequestProperties, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Restores all key materials of a specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Restore Operation Required properties.
- * @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 restore operation properties.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public RestoreResultInner restore(String resourceGroupName, String cloudHsmClusterName,
- RestoreRequestProperties restoreRequestProperties) {
- return restoreAsync(resourceGroupName, cloudHsmClusterName, restoreRequestProperties).block();
- }
-
- /**
- * Restores all key materials of a specified Cloud HSM Cluster.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM
- * Cluster names must be between 3 and 23 characters in length.
- * @param restoreRequestProperties Restore Operation Required properties.
- * @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 restore operation properties.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public RestoreResultInner restore(String resourceGroupName, String cloudHsmClusterName,
- RestoreRequestProperties restoreRequestProperties, Context context) {
- return restoreAsync(resourceGroupName, cloudHsmClusterName, restoreRequestProperties, context).block();
- }
-
- /**
- * 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 list of Cloud HSM Clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(),
- res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Get the next page of items.
- *
- * @param nextLink The URL to get the next list of items.
- * @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 list of Cloud HSM Clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupNextSinglePageAsync(String nextLink,
- Context context) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
- /**
- * 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 list of Cloud HSM Clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(),
- res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Get the next page of items.
- *
- * @param nextLink The URL to get the next list of items.
- * @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 list of Cloud HSM Clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listBySubscriptionNextSinglePageAsync(String nextLink,
- Context context) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-}
diff --git a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClustersImpl.java b/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClustersImpl.java
deleted file mode 100644
index 5276598e0a70a..0000000000000
--- a/sdk/hardwaresecuritymodules/azure-resourcemanager-hardwaresecuritymodules/src/main/java/com/azure/resourcemanager/hardwaresecuritymodules/implementation/CloudHsmClustersImpl.java
+++ /dev/null
@@ -1,237 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.hardwaresecuritymodules.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.hardwaresecuritymodules.fluent.CloudHsmClustersClient;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.BackupResultInner;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.CloudHsmClusterInner;
-import com.azure.resourcemanager.hardwaresecuritymodules.fluent.models.RestoreResultInner;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.BackupRequestProperties;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.BackupResult;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmCluster;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.CloudHsmClusters;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.RestoreRequestProperties;
-import com.azure.resourcemanager.hardwaresecuritymodules.models.RestoreResult;
-
-public final class CloudHsmClustersImpl implements CloudHsmClusters {
- private static final ClientLogger LOGGER = new ClientLogger(CloudHsmClustersImpl.class);
-
- private final CloudHsmClustersClient innerClient;
-
- private final com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager serviceManager;
-
- public CloudHsmClustersImpl(CloudHsmClustersClient innerClient,
- com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager serviceManager) {
- this.innerClient = innerClient;
- this.serviceManager = serviceManager;
- }
-
- public Response getByResourceGroupWithResponse(String resourceGroupName,
- String cloudHsmClusterName, Context context) {
- Response inner
- = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, cloudHsmClusterName, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- new CloudHsmClusterImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
- }
-
- public CloudHsmCluster getByResourceGroup(String resourceGroupName, String cloudHsmClusterName) {
- CloudHsmClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, cloudHsmClusterName);
- if (inner != null) {
- return new CloudHsmClusterImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
- public void deleteByResourceGroup(String resourceGroupName, String cloudHsmClusterName) {
- this.serviceClient().delete(resourceGroupName, cloudHsmClusterName);
- }
-
- public void delete(String resourceGroupName, String cloudHsmClusterName, Context context) {
- this.serviceClient().delete(resourceGroupName, cloudHsmClusterName, context);
- }
-
- public PagedIterable listByResourceGroup(String resourceGroupName) {
- PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudHsmClusterImpl(inner1, this.manager()));
- }
-
- public PagedIterable listByResourceGroup(String resourceGroupName, String skiptoken,
- Context context) {
- PagedIterable inner
- = this.serviceClient().listByResourceGroup(resourceGroupName, skiptoken, context);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudHsmClusterImpl(inner1, this.manager()));
- }
-
- public PagedIterable