From 7f39526702461dfbf31a496507e2cf9e46c4b9e4 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 9 Jun 2022 14:41:26 +0000 Subject: [PATCH] CodeGen from PR 19390 in Azure/azure-rest-api-specs Merge 92de2040fafd9da70fa6542f13c0ca90db65f797 into d006e1d15d8fe19a6c558861dd5bba6b7baa8dd8 --- .../azure-resourcemanager-netapp/CHANGELOG.md | 4 +- .../azure-resourcemanager-netapp/README.md | 4 +- .../azure-resourcemanager-netapp/SAMPLE.md | 380 ++- .../azure-resourcemanager-netapp/pom.xml | 2 +- .../netapp/NetAppFilesManager.java | 146 +- .../netapp/fluent/NetAppManagementClient.java | 7 + .../netapp/fluent/VolumeQuotaRulesClient.java | 361 +++ .../netapp/fluent/VolumesClient.java | 285 ++ .../fluent/models/AccountProperties.java | 4 - .../netapp/fluent/models/BackupInner.java | 9 +- .../fluent/models/BackupPolicyInner.java | 12 +- .../fluent/models/BackupPolicyProperties.java | 4 - .../fluent/models/BackupProperties.java | 4 - .../fluent/models/BackupStatusInner.java | 4 - .../fluent/models/CapacityPoolInner.java | 12 +- .../CheckAvailabilityResponseInner.java | 4 - .../fluent/models/MountTargetProperties.java | 7 +- .../fluent/models/NetAppAccountInner.java | 20 - .../netapp/fluent/models/OperationInner.java | 4 - .../fluent/models/OperationProperties.java | 4 - .../fluent/models/PoolPatchProperties.java | 4 - .../netapp/fluent/models/PoolProperties.java | 7 +- .../fluent/models/ReplicationInner.java | 138 + .../fluent/models/ReplicationStatusInner.java | 4 - .../fluent/models/RestoreStatusInner.java | 4 - .../netapp/fluent/models/SnapshotInner.java | 7 +- .../fluent/models/SnapshotPolicyInner.java | 12 +- .../models/SnapshotPolicyProperties.java | 4 - .../models/SnapshotPolicyVolumeListInner.java | 4 - .../fluent/models/SnapshotProperties.java | 4 - .../models/SubscriptionQuotaItemInner.java | 20 - .../SubscriptionQuotaItemProperties.java | 4 - .../fluent/models/SubvolumeInfoInner.java | 9 +- .../fluent/models/SubvolumeModelInner.java | 4 - .../models/SubvolumeModelProperties.java | 4 - .../fluent/models/SubvolumePatchParams.java | 4 - .../fluent/models/SubvolumeProperties.java | 4 - .../netapp/fluent/models/VaultInner.java | 9 +- .../netapp/fluent/models/VaultProperties.java | 4 - .../models/VolumeGroupDetailsInner.java | 33 - .../fluent/models/VolumeGroupInner.java | 33 - .../models/VolumeGroupListProperties.java | 4 - .../fluent/models/VolumeGroupProperties.java | 4 - .../netapp/fluent/models/VolumeInner.java | 59 +- .../fluent/models/VolumePatchProperties.java | 4 - .../fluent/models/VolumeProperties.java | 42 +- .../fluent/models/VolumeQuotaRuleInner.java | 155 ++ .../models/VolumeQuotaRulesProperties.java | 123 + .../AccountBackupsClientImpl.java | 12 +- .../implementation/AccountBackupsImpl.java | 3 +- .../implementation/AccountsClientImpl.java | 12 +- .../netapp/implementation/AccountsImpl.java | 19 +- .../netapp/implementation/BackupImpl.java | 4 + .../BackupPoliciesClientImpl.java | 12 +- .../implementation/BackupPoliciesImpl.java | 27 +- .../implementation/BackupPolicyImpl.java | 4 + .../implementation/BackupsClientImpl.java | 30 +- .../netapp/implementation/BackupsImpl.java | 43 +- .../implementation/CapacityPoolImpl.java | 4 + .../implementation/NetAppAccountImpl.java | 9 +- .../NetAppManagementClientBuilder.java | 34 +- .../NetAppManagementClientImpl.java | 29 +- .../NetAppResourceQuotaLimitsClientImpl.java | 13 +- .../NetAppResourceQuotaLimitsImpl.java | 3 +- .../NetAppResourcesClientImpl.java | 32 +- .../implementation/NetAppResourcesImpl.java | 3 +- .../implementation/OperationsClientImpl.java | 3 - .../netapp/implementation/OperationsImpl.java | 3 +- .../implementation/PoolsClientImpl.java | 12 +- .../netapp/implementation/PoolsImpl.java | 27 +- .../implementation/ReplicationImpl.java | 45 + .../SnapshotPoliciesClientImpl.java | 30 +- .../implementation/SnapshotPoliciesImpl.java | 27 +- .../implementation/SnapshotPolicyImpl.java | 4 + .../implementation/SnapshotsClientImpl.java | 12 +- .../netapp/implementation/SnapshotsImpl.java | 43 +- .../SubscriptionQuotaItemImpl.java | 5 - .../implementation/SubvolumeInfoImpl.java | 4 + .../implementation/SubvolumesClientImpl.java | 12 +- .../netapp/implementation/SubvolumesImpl.java | 43 +- .../implementation/VaultsClientImpl.java | 3 - .../netapp/implementation/VaultsImpl.java | 3 +- .../VolumeGroupDetailsImpl.java | 15 - .../implementation/VolumeGroupImpl.java | 11 - .../VolumeGroupsClientImpl.java | 12 +- .../implementation/VolumeGroupsImpl.java | 27 +- .../netapp/implementation/VolumeImpl.java | 69 +- .../implementation/VolumeQuotaRuleImpl.java | 247 ++ .../VolumeQuotaRulesClientImpl.java | 1641 ++++++++++++ .../implementation/VolumeQuotaRulesImpl.java | 277 ++ .../implementation/VolumesClientImpl.java | 2285 +++++++++++++---- .../netapp/implementation/VolumesImpl.java | 87 +- .../netapp/models/AccountEncryption.java | 4 - .../netapp/models/ActiveDirectory.java | 4 - .../netapp/models/ActiveDirectoryStatus.java | 6 +- .../netapp/models/ApplicationType.java | 6 +- .../netapp/models/AuthorizeRequest.java | 4 - .../netapp/models/AvsDataStore.java | 6 +- .../resourcemanager/netapp/models/Backup.java | 7 + .../netapp/models/BackupPatch.java | 4 - .../netapp/models/BackupPoliciesList.java | 4 - .../netapp/models/BackupPolicy.java | 9 +- .../netapp/models/BackupPolicyPatch.java | 4 - .../netapp/models/BackupType.java | 6 +- .../netapp/models/BackupsList.java | 4 - .../models/BreakReplicationRequest.java | 4 - .../netapp/models/CapacityPool.java | 9 +- .../netapp/models/CapacityPoolList.java | 4 - .../netapp/models/CapacityPoolPatch.java | 4 - .../netapp/models/CheckNameResourceTypes.java | 6 +- .../models/CheckQuotaNameResourceTypes.java | 6 +- .../netapp/models/ChownMode.java | 6 +- .../netapp/models/DailySchedule.java | 4 - .../netapp/models/Dimension.java | 4 - .../netapp/models/EnableSubvolumes.java | 6 +- .../netapp/models/EncryptionKeySource.java | 35 + .../netapp/models/EncryptionType.java | 6 +- .../netapp/models/EndpointType.java | 6 +- .../netapp/models/ExportPolicyRule.java | 4 - .../models/FilePathAvailabilityRequest.java | 9 +- .../netapp/models/HourlySchedule.java | 4 - .../models/InAvailabilityReasonType.java | 6 +- .../netapp/models/LdapSearchScopeOpt.java | 4 - .../netapp/models/ListReplications.java | 51 + .../netapp/models/LogSpecification.java | 4 - .../netapp/models/MetricAggregationType.java | 6 +- .../netapp/models/MetricSpecification.java | 4 - .../netapp/models/MirrorState.java | 6 +- .../netapp/models/MonthlySchedule.java | 4 - .../netapp/models/NetAppAccount.java | 15 +- .../netapp/models/NetAppAccountList.java | 4 - .../netapp/models/NetAppAccountPatch.java | 4 - .../netapp/models/NetworkFeatures.java | 6 +- .../netapp/models/OperationDisplay.java | 4 - .../netapp/models/OperationListResult.java | 4 - .../netapp/models/PlacementKeyValuePairs.java | 9 +- .../netapp/models/PoolChangeRequest.java | 7 +- .../netapp/models/ProvisioningState.java | 62 + .../netapp/models/QosType.java | 6 +- .../models/QuotaAvailabilityRequest.java | 11 +- .../netapp/models/RelationshipStatus.java | 6 +- .../netapp/models/Replication.java | 46 + .../netapp/models/ReplicationObject.java | 7 +- .../netapp/models/ReplicationSchedule.java | 6 +- .../ResourceNameAvailabilityRequest.java | 11 +- .../netapp/models/SecurityStyle.java | 6 +- .../netapp/models/ServiceLevel.java | 6 +- .../netapp/models/ServiceSpecification.java | 4 - .../netapp/models/SnapshotPoliciesList.java | 4 - .../netapp/models/SnapshotPolicy.java | 9 +- .../netapp/models/SnapshotPolicyPatch.java | 4 - .../netapp/models/SnapshotRestoreFiles.java | 7 +- .../netapp/models/SnapshotsList.java | 4 - .../netapp/models/SubscriptionQuotaItem.java | 8 - .../models/SubscriptionQuotaItemList.java | 4 - .../netapp/models/SubvolumeInfo.java | 9 +- .../netapp/models/SubvolumePatchRequest.java | 4 - .../netapp/models/SubvolumesList.java | 4 - .../resourcemanager/netapp/models/Type.java | 44 + .../netapp/models/VaultList.java | 4 - .../resourcemanager/netapp/models/Volume.java | 142 +- .../netapp/models/VolumeBackupProperties.java | 4 - .../netapp/models/VolumeBackups.java | 4 - .../netapp/models/VolumeGroup.java | 8 - .../netapp/models/VolumeGroupDetails.java | 23 +- .../netapp/models/VolumeGroupList.java | 4 - .../netapp/models/VolumeGroupMetadata.java | 4 - .../models/VolumeGroupVolumeProperties.java | 27 +- .../netapp/models/VolumeList.java | 4 - .../netapp/models/VolumePatch.java | 4 - .../VolumePatchPropertiesDataProtection.java | 4 - .../VolumePatchPropertiesExportPolicy.java | 4 - .../VolumePropertiesDataProtection.java | 4 - .../models/VolumePropertiesExportPolicy.java | 4 - .../netapp/models/VolumeQuotaRule.java | 279 ++ .../netapp/models/VolumeQuotaRulePatch.java | 121 + .../netapp/models/VolumeQuotaRules.java | 169 ++ .../netapp/models/VolumeQuotaRulesList.java | 51 + .../netapp/models/VolumeRevert.java | 4 - .../models/VolumeSnapshotProperties.java | 4 - .../VolumeStorageToNetworkProximity.java | 6 +- .../netapp/models/Volumes.java | 142 + .../netapp/models/WeeklySchedule.java | 4 - .../AccountBackupsDeleteSamples.java | 2 +- .../generated/AccountBackupsGetSamples.java | 2 +- .../generated/AccountBackupsListSamples.java | 2 +- .../AccountsCreateOrUpdateSamples.java | 2 +- .../generated/AccountsDeleteSamples.java | 2 +- .../AccountsGetByResourceGroupSamples.java | 2 +- .../AccountsListByResourceGroupSamples.java | 2 +- .../netapp/generated/AccountsListSamples.java | 2 +- .../generated/AccountsUpdateSamples.java | 2 +- .../BackupPoliciesCreateSamples.java | 2 +- .../BackupPoliciesDeleteSamples.java | 2 +- .../generated/BackupPoliciesGetSamples.java | 2 +- .../generated/BackupPoliciesListSamples.java | 2 +- .../BackupPoliciesUpdateSamples.java | 2 +- .../generated/BackupsCreateSamples.java | 2 +- .../generated/BackupsDeleteSamples.java | 2 +- .../netapp/generated/BackupsGetSamples.java | 2 +- .../generated/BackupsGetStatusSamples.java | 2 +- .../BackupsGetVolumeRestoreStatusSamples.java | 2 +- .../netapp/generated/BackupsListSamples.java | 2 +- .../generated/BackupsUpdateSamples.java | 2 +- ...ourceCheckFilePathAvailabilitySamples.java | 2 +- ...pResourceCheckNameAvailabilitySamples.java | 2 +- ...ResourceCheckQuotaAvailabilitySamples.java | 2 +- .../NetAppResourceQuotaLimitsGetSamples.java | 2 +- .../NetAppResourceQuotaLimitsListSamples.java | 2 +- .../generated/OperationsListSamples.java | 2 +- .../generated/PoolsCreateOrUpdateSamples.java | 2 +- .../netapp/generated/PoolsDeleteSamples.java | 2 +- .../netapp/generated/PoolsGetSamples.java | 2 +- .../netapp/generated/PoolsListSamples.java | 2 +- .../netapp/generated/PoolsUpdateSamples.java | 2 +- .../SnapshotPoliciesCreateSamples.java | 2 +- .../SnapshotPoliciesDeleteSamples.java | 2 +- .../generated/SnapshotPoliciesGetSamples.java | 2 +- .../SnapshotPoliciesListSamples.java | 2 +- .../SnapshotPoliciesListVolumesSamples.java | 2 +- .../SnapshotPoliciesUpdateSamples.java | 2 +- .../generated/SnapshotsCreateSamples.java | 2 +- .../generated/SnapshotsDeleteSamples.java | 2 +- .../netapp/generated/SnapshotsGetSamples.java | 2 +- .../generated/SnapshotsListSamples.java | 2 +- .../SnapshotsRestoreFilesSamples.java | 2 +- .../generated/SnapshotsUpdateSamples.java | 2 +- .../generated/SubvolumesCreateSamples.java | 2 +- .../generated/SubvolumesDeleteSamples.java | 2 +- .../SubvolumesGetMetadataSamples.java | 2 +- .../generated/SubvolumesGetSamples.java | 2 +- .../SubvolumesListByVolumeSamples.java | 2 +- .../generated/SubvolumesUpdateSamples.java | 2 +- .../netapp/generated/VaultsListSamples.java | 2 +- .../generated/VolumeGroupsCreateSamples.java | 2 +- .../generated/VolumeGroupsDeleteSamples.java | 2 +- .../generated/VolumeGroupsGetSamples.java | 2 +- ...olumeGroupsListByNetAppAccountSamples.java | 2 +- .../VolumeQuotaRulesCreateSamples.java | 30 + .../VolumeQuotaRulesDeleteSamples.java | 24 + .../generated/VolumeQuotaRulesGetSamples.java | 24 + .../VolumeQuotaRulesListByVolumeSamples.java | 22 + .../VolumeQuotaRulesUpdateSamples.java | 28 + .../VolumesAuthorizeReplicationSamples.java | 2 +- .../VolumesBreakReplicationSamples.java | 2 +- .../VolumesCreateOrUpdateSamples.java | 5 +- .../VolumesDeleteReplicationSamples.java | 2 +- .../generated/VolumesDeleteSamples.java | 2 +- .../VolumesFinalizeRelocationSamples.java | 22 + .../netapp/generated/VolumesGetSamples.java | 2 +- .../VolumesListReplicationsSamples.java | 22 + .../netapp/generated/VolumesListSamples.java | 2 +- .../generated/VolumesPoolChangeSamples.java | 2 +- ...VolumesReInitializeReplicationSamples.java | 2 +- .../generated/VolumesRelocateSamples.java | 22 + .../VolumesReplicationStatusSamples.java | 2 +- .../VolumesResetCifsPasswordSamples.java | 22 + .../VolumesResyncReplicationSamples.java | 2 +- .../VolumesRevertRelocationSamples.java | 22 + .../generated/VolumesRevertSamples.java | 2 +- .../generated/VolumesUpdateSamples.java | 2 +- 261 files changed, 7632 insertions(+), 1588 deletions(-) create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeQuotaRulesClient.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRuleInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRulesProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRuleImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesClientImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionKeySource.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ListReplications.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ProvisioningState.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Replication.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Type.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRule.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulePatch.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRules.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulesList.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRelocateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResetCifsPasswordSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationSamples.java diff --git a/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md b/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md index fde0d391833a..7bb0da2a82cf 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md +++ b/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.9 (Unreleased) +## 1.0.0-beta.1 (2022-06-09) + +- Azure Resource Manager NetAppFiles client library for Java. This package contains Microsoft Azure SDK for NetAppFiles Management SDK. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-netapp-2022-01-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/netapp/azure-resourcemanager-netapp/README.md b/sdk/netapp/azure-resourcemanager-netapp/README.md index 107de6ef5521..eeb9ce5e64ac 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/README.md +++ b/sdk/netapp/azure-resourcemanager-netapp/README.md @@ -2,7 +2,7 @@ Azure Resource Manager NetAppFiles client library for Java. -This package contains Microsoft Azure SDK for NetAppFiles Management SDK. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-netapp-2021-10-01. 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 NetAppFiles Management SDK. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-netapp-2022-01-01. 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-netapp - 1.0.0-beta.8 + 1.0.0-beta.9 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md b/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md index 1c816eca8b01..8f10d8bd0cb6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md +++ b/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md @@ -95,6 +95,14 @@ - [Get](#volumegroups_get) - [ListByNetAppAccount](#volumegroups_listbynetappaccount) +## VolumeQuotaRules + +- [Create](#volumequotarules_create) +- [Delete](#volumequotarules_delete) +- [Get](#volumequotarules_get) +- [ListByVolume](#volumequotarules_listbyvolume) +- [Update](#volumequotarules_update) + ## Volumes - [AuthorizeReplication](#volumes_authorizereplication) @@ -102,13 +110,18 @@ - [CreateOrUpdate](#volumes_createorupdate) - [Delete](#volumes_delete) - [DeleteReplication](#volumes_deletereplication) +- [FinalizeRelocation](#volumes_finalizerelocation) - [Get](#volumes_get) - [List](#volumes_list) +- [ListReplications](#volumes_listreplications) - [PoolChange](#volumes_poolchange) - [ReInitializeReplication](#volumes_reinitializereplication) +- [Relocate](#volumes_relocate) - [ReplicationStatus](#volumes_replicationstatus) +- [ResetCifsPassword](#volumes_resetcifspassword) - [ResyncReplication](#volumes_resyncreplication) - [Revert](#volumes_revert) +- [RevertRelocation](#volumes_revertrelocation) - [Update](#volumes_update) ### AccountBackups_Delete @@ -118,7 +131,7 @@ import com.azure.core.util.Context; /** Samples for AccountBackups Delete. */ public final class AccountBackupsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Account_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Backups_Account_Delete.json */ /** * Sample code: AccountBackups_Delete. @@ -139,7 +152,7 @@ import com.azure.core.util.Context; /** Samples for AccountBackups Get. */ public final class AccountBackupsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Account_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Backups_Account_Get.json */ /** * Sample code: AccountBackups_Get. @@ -160,7 +173,7 @@ import com.azure.core.util.Context; /** Samples for AccountBackups List. */ public final class AccountBackupsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Account_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Backups_Account_List.json */ /** * Sample code: AccountBackups_List. @@ -182,7 +195,7 @@ import java.util.Arrays; /** Samples for Accounts CreateOrUpdate. */ public final class AccountsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_CreateOrUpdate.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Accounts_CreateOrUpdate.json */ /** * Sample code: Accounts_CreateOrUpdate. @@ -222,7 +235,7 @@ import com.azure.core.util.Context; /** Samples for Accounts Delete. */ public final class AccountsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Accounts_Delete.json */ /** * Sample code: Accounts_Delete. @@ -243,7 +256,7 @@ import com.azure.core.util.Context; /** Samples for Accounts GetByResourceGroup. */ public final class AccountsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Accounts_Get.json */ /** * Sample code: Accounts_Get. @@ -264,7 +277,7 @@ import com.azure.core.util.Context; /** Samples for Accounts List. */ public final class AccountsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Accounts_List.json */ /** * Sample code: Accounts_List. @@ -285,7 +298,7 @@ import com.azure.core.util.Context; /** Samples for Accounts ListByResourceGroup. */ public final class AccountsListByResourceGroupSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Accounts_List.json */ /** * Sample code: Accounts_List. @@ -309,7 +322,7 @@ import java.util.Map; /** Samples for Accounts Update. */ public final class AccountsUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Accounts_Update.json */ /** * Sample code: Accounts_Update. @@ -341,7 +354,7 @@ public final class AccountsUpdateSamples { /** Samples for BackupPolicies Create. */ public final class BackupPoliciesCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_Create.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/BackupPolicies_Create.json */ /** * Sample code: BackupPolicies_Create. @@ -371,7 +384,7 @@ import com.azure.core.util.Context; /** Samples for BackupPolicies Delete. */ public final class BackupPoliciesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/BackupPolicies_Delete.json */ /** * Sample code: Backups_Delete. @@ -392,7 +405,7 @@ import com.azure.core.util.Context; /** Samples for BackupPolicies Get. */ public final class BackupPoliciesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/BackupPolicies_Get.json */ /** * Sample code: Backups_Get. @@ -413,7 +426,7 @@ import com.azure.core.util.Context; /** Samples for BackupPolicies List. */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/BackupPolicies_List.json */ /** * Sample code: Backups_List. @@ -435,7 +448,7 @@ import com.azure.resourcemanager.netapp.models.BackupPolicy; /** Samples for BackupPolicies Update. */ public final class BackupPoliciesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/BackupPolicies_Update.json */ /** * Sample code: BackupPolicies_Update. @@ -462,7 +475,7 @@ public final class BackupPoliciesUpdateSamples { /** Samples for Backups Create. */ public final class BackupsCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Create.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Backups_Create.json */ /** * Sample code: Backups_Create. @@ -489,7 +502,7 @@ import com.azure.core.util.Context; /** Samples for Backups Delete. */ public final class BackupsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Backups_Delete.json */ /** * Sample code: Backups_Delete. @@ -510,7 +523,7 @@ import com.azure.core.util.Context; /** Samples for Backups Get. */ public final class BackupsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Backups_Get.json */ /** * Sample code: Backups_Get. @@ -531,7 +544,7 @@ import com.azure.core.util.Context; /** Samples for Backups GetStatus. */ public final class BackupsGetStatusSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_BackupStatus.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_BackupStatus.json */ /** * Sample code: Volumes_BackupStatus. @@ -552,7 +565,7 @@ import com.azure.core.util.Context; /** Samples for Backups GetVolumeRestoreStatus. */ public final class BackupsGetVolumeRestoreStatusSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_RestoreStatus.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_RestoreStatus.json */ /** * Sample code: Volumes_RestoreStatus. @@ -573,7 +586,7 @@ import com.azure.core.util.Context; /** Samples for Backups List. */ public final class BackupsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Backups_List.json */ /** * Sample code: Backups_List. @@ -595,7 +608,7 @@ import com.azure.resourcemanager.netapp.models.Backup; /** Samples for Backups Update. */ public final class BackupsUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Backups_Update.json */ /** * Sample code: Backups_Update. @@ -622,7 +635,7 @@ import com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest; /** Samples for NetAppResource CheckFilePathAvailability. */ public final class NetAppResourceCheckFilePathAvailabilitySamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/CheckFilePathAvailability.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/CheckFilePathAvailability.json */ /** * Sample code: CheckFilePathAvailability. @@ -653,7 +666,7 @@ import com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest; /** Samples for NetAppResource CheckNameAvailability. */ public final class NetAppResourceCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/CheckNameAvailability.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/CheckNameAvailability.json */ /** * Sample code: CheckNameAvailability. @@ -684,7 +697,7 @@ import com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest; /** Samples for NetAppResource CheckQuotaAvailability. */ public final class NetAppResourceCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/CheckQuotaAvailability.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/CheckQuotaAvailability.json */ /** * Sample code: CheckQuotaAvailability. @@ -713,7 +726,7 @@ import com.azure.core.util.Context; /** Samples for NetAppResourceQuotaLimits Get. */ public final class NetAppResourceQuotaLimitsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/QuotaLimits_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/QuotaLimits_Get.json */ /** * Sample code: QuotaLimits. @@ -736,7 +749,7 @@ import com.azure.core.util.Context; /** Samples for NetAppResourceQuotaLimits List. */ public final class NetAppResourceQuotaLimitsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/QuotaLimits_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/QuotaLimits_List.json */ /** * Sample code: QuotaLimits. @@ -757,7 +770,7 @@ import com.azure.core.util.Context; /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/OperationList.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/OperationList.json */ /** * Sample code: OperationList. @@ -779,7 +792,7 @@ import com.azure.resourcemanager.netapp.models.ServiceLevel; /** Samples for Pools CreateOrUpdate. */ public final class PoolsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Pools_CreateOrUpdate.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Pools_CreateOrUpdate.json */ /** * Sample code: Pools_CreateOrUpdate. @@ -808,7 +821,7 @@ import com.azure.core.util.Context; /** Samples for Pools Delete. */ public final class PoolsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Pools_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Pools_Delete.json */ /** * Sample code: Pools_Delete. @@ -829,7 +842,7 @@ import com.azure.core.util.Context; /** Samples for Pools Get. */ public final class PoolsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Pools_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Pools_Get.json */ /** * Sample code: Pools_Get. @@ -850,7 +863,7 @@ import com.azure.core.util.Context; /** Samples for Pools List. */ public final class PoolsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Pools_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Pools_List.json */ /** * Sample code: Pools_List. @@ -872,7 +885,7 @@ import com.azure.resourcemanager.netapp.models.CapacityPool; /** Samples for Pools Update. */ public final class PoolsUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Pools_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Pools_Update.json */ /** * Sample code: Pools_Update. @@ -897,7 +910,7 @@ import com.azure.resourcemanager.netapp.models.WeeklySchedule; /** Samples for SnapshotPolicies Create. */ public final class SnapshotPoliciesCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_Create.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/SnapshotPolicies_Create.json */ /** * Sample code: SnapshotPolicies_Create. @@ -930,7 +943,7 @@ import com.azure.core.util.Context; /** Samples for SnapshotPolicies Delete. */ public final class SnapshotPoliciesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/SnapshotPolicies_Delete.json */ /** * Sample code: SnapshotPolicies_Delete. @@ -951,7 +964,7 @@ import com.azure.core.util.Context; /** Samples for SnapshotPolicies Get. */ public final class SnapshotPoliciesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/SnapshotPolicies_Get.json */ /** * Sample code: SnapshotPolicies_Get. @@ -972,7 +985,7 @@ import com.azure.core.util.Context; /** Samples for SnapshotPolicies List. */ public final class SnapshotPoliciesListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/SnapshotPolicies_List.json */ /** * Sample code: SnapshotPolicies_List. @@ -993,7 +1006,7 @@ import com.azure.core.util.Context; /** Samples for SnapshotPolicies ListVolumes. */ public final class SnapshotPoliciesListVolumesSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_ListVolumes.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/SnapshotPolicies_ListVolumes.json */ /** * Sample code: SnapshotPolicies_ListVolumes. @@ -1019,7 +1032,7 @@ import com.azure.resourcemanager.netapp.models.WeeklySchedule; /** Samples for SnapshotPolicies Update. */ public final class SnapshotPoliciesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/SnapshotPolicies_Update.json */ /** * Sample code: SnapshotPolicies_Update. @@ -1052,7 +1065,7 @@ public final class SnapshotPoliciesUpdateSamples { /** Samples for Snapshots Create. */ public final class SnapshotsCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_Create.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Snapshots_Create.json */ /** * Sample code: Snapshots_Create. @@ -1078,7 +1091,7 @@ import com.azure.core.util.Context; /** Samples for Snapshots Delete. */ public final class SnapshotsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Snapshots_Delete.json */ /** * Sample code: Snapshots_Delete. @@ -1099,7 +1112,7 @@ import com.azure.core.util.Context; /** Samples for Snapshots Get. */ public final class SnapshotsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Snapshots_Get.json */ /** * Sample code: Snapshots_Get. @@ -1120,7 +1133,7 @@ import com.azure.core.util.Context; /** Samples for Snapshots List. */ public final class SnapshotsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Snapshots_List.json */ /** * Sample code: Snapshots_List. @@ -1143,7 +1156,7 @@ import java.util.Arrays; /** Samples for Snapshots RestoreFiles. */ public final class SnapshotsRestoreFilesSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_SingleFileRestore.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Snapshots_SingleFileRestore.json */ /** * Sample code: Snapshots_SingleFileRestore. @@ -1176,7 +1189,7 @@ import java.io.IOException; /** Samples for Snapshots Update. */ public final class SnapshotsUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Snapshots_Update.json */ /** * Sample code: Snapshots_Update. @@ -1206,7 +1219,7 @@ public final class SnapshotsUpdateSamples { /** Samples for Subvolumes Create. */ public final class SubvolumesCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_Create.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Subvolumes_Create.json */ /** * Sample code: Subvolumes_Create. @@ -1232,7 +1245,7 @@ import com.azure.core.util.Context; /** Samples for Subvolumes Delete. */ public final class SubvolumesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Subvolumes_Delete.json */ /** * Sample code: Subvolumes_Delete. @@ -1253,7 +1266,7 @@ import com.azure.core.util.Context; /** Samples for Subvolumes Get. */ public final class SubvolumesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Subvolumes_Get.json */ /** * Sample code: Subvolumes_Get. @@ -1274,7 +1287,7 @@ import com.azure.core.util.Context; /** Samples for Subvolumes GetMetadata. */ public final class SubvolumesGetMetadataSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_Metadata.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Subvolumes_Metadata.json */ /** * Sample code: Subvolumes_Metadata. @@ -1295,7 +1308,7 @@ import com.azure.core.util.Context; /** Samples for Subvolumes ListByVolume. */ public final class SubvolumesListByVolumeSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Subvolumes_List.json */ /** * Sample code: Subvolumes_List. @@ -1317,7 +1330,7 @@ import com.azure.resourcemanager.netapp.models.SubvolumeInfo; /** Samples for Subvolumes Update. */ public final class SubvolumesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Subvolumes_Update.json */ /** * Sample code: Subvolumes_Update. @@ -1343,7 +1356,7 @@ import com.azure.core.util.Context; /** Samples for Vaults List. */ public final class VaultsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Vaults_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Vaults_List.json */ /** * Sample code: Vaults_List. @@ -1368,7 +1381,7 @@ import java.util.Arrays; /** Samples for VolumeGroups Create. */ public final class VolumeGroupsCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/VolumeGroups_Create.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/VolumeGroups_Create.json */ /** * Sample code: VolumeGroups_Create. @@ -1442,7 +1455,7 @@ import com.azure.core.util.Context; /** Samples for VolumeGroups Delete. */ public final class VolumeGroupsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/VolumeGroups_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/VolumeGroups_Delete.json */ /** * Sample code: VolumeGroups_Delete. @@ -1463,7 +1476,7 @@ import com.azure.core.util.Context; /** Samples for VolumeGroups Get. */ public final class VolumeGroupsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/VolumeGroups_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/VolumeGroups_Get.json */ /** * Sample code: VolumeGroups_Get. @@ -1484,7 +1497,7 @@ import com.azure.core.util.Context; /** Samples for VolumeGroups ListByNetAppAccount. */ public final class VolumeGroupsListByNetAppAccountSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/VolumeGroups_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/VolumeGroups_List.json */ /** * Sample code: VolumeGroups_List. @@ -1497,6 +1510,129 @@ public final class VolumeGroupsListByNetAppAccountSamples { } ``` +### VolumeQuotaRules_Create + +```java +import com.azure.resourcemanager.netapp.models.Type; + +/** Samples for VolumeQuotaRules Create. */ +public final class VolumeQuotaRulesCreateSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/VolumeQuotaRules_Create.json + */ + /** + * Sample code: VolumeQuotaRules_Create. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumeQuotaRulesCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager + .volumeQuotaRules() + .define("rule-0004") + .withRegion("westus") + .withExistingVolume("myRG", "account-9957", "pool-5210", "volume-6387") + .withQuotaSizeInKiBs(100005L) + .withQuotaType(Type.INDIVIDUAL_USER_QUOTA) + .withQuotaTarget("1821") + .create(); + } +} +``` + +### VolumeQuotaRules_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for VolumeQuotaRules Delete. */ +public final class VolumeQuotaRulesDeleteSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/VolumeQuotaRules_Delete.json + */ + /** + * Sample code: VolumeQuotaRules_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumeQuotaRulesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager + .volumeQuotaRules() + .delete("myRG", "account-9957", "pool-5210", "volume-6387", "rule-0004", Context.NONE); + } +} +``` + +### VolumeQuotaRules_Get + +```java +import com.azure.core.util.Context; + +/** Samples for VolumeQuotaRules Get. */ +public final class VolumeQuotaRulesGetSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/VolumeQuotaRules_Get.json + */ + /** + * Sample code: VolumeQuotaRules_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumeQuotaRulesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager + .volumeQuotaRules() + .getWithResponse("myRG", "account-9957", "pool-5210", "volume-6387", "rule-0004", Context.NONE); + } +} +``` + +### VolumeQuotaRules_ListByVolume + +```java +import com.azure.core.util.Context; + +/** Samples for VolumeQuotaRules ListByVolume. */ +public final class VolumeQuotaRulesListByVolumeSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/VolumeQuotaRules_List.json + */ + /** + * Sample code: VolumeQuotaRules_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumeQuotaRulesList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumeQuotaRules().listByVolume("myRG", "account-9957", "pool-5210", "volume-6387", Context.NONE); + } +} +``` + +### VolumeQuotaRules_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.models.VolumeQuotaRule; + +/** Samples for VolumeQuotaRules Update. */ +public final class VolumeQuotaRulesUpdateSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/VolumeQuotaRules_Update.json + */ + /** + * Sample code: VolumeQuotaRules_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumeQuotaRulesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + VolumeQuotaRule resource = + manager + .volumeQuotaRules() + .getWithResponse("myRG", "account-9957", "pool-5210", "volume-6387", "rule-0004", Context.NONE) + .getValue(); + resource.update().withQuotaSizeInKiBs(100009L).apply(); + } +} +``` + ### Volumes_AuthorizeReplication ```java @@ -1506,7 +1642,7 @@ import com.azure.resourcemanager.netapp.models.AuthorizeRequest; /** Samples for Volumes AuthorizeReplication. */ public final class VolumesAuthorizeReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_AuthorizeReplication.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_AuthorizeReplication.json */ /** * Sample code: Volumes_AuthorizeReplication. @@ -1538,7 +1674,7 @@ import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; /** Samples for Volumes BreakReplication. */ public final class VolumesBreakReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_BreakReplication.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_BreakReplication.json */ /** * Sample code: Volumes_BreakReplication. @@ -1562,12 +1698,13 @@ public final class VolumesBreakReplicationSamples { ### Volumes_CreateOrUpdate ```java +import com.azure.resourcemanager.netapp.models.EncryptionKeySource; import com.azure.resourcemanager.netapp.models.ServiceLevel; /** Samples for Volumes CreateOrUpdate. */ public final class VolumesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_CreateOrUpdate.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_CreateOrUpdate.json */ /** * Sample code: Volumes_CreateOrUpdate. @@ -1586,7 +1723,7 @@ public final class VolumesCreateOrUpdateSamples { "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") .withServiceLevel(ServiceLevel.PREMIUM) .withThroughputMibps(128.0f) - .withEncryptionKeySource("Microsoft.KeyVault") + .withEncryptionKeySource(EncryptionKeySource.fromString("Microsoft.KeyVault")) .create(); } } @@ -1600,7 +1737,7 @@ import com.azure.core.util.Context; /** Samples for Volumes Delete. */ public final class VolumesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_Delete.json */ /** * Sample code: Volumes_Delete. @@ -1621,7 +1758,7 @@ import com.azure.core.util.Context; /** Samples for Volumes DeleteReplication. */ public final class VolumesDeleteReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_DeleteReplication.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_DeleteReplication.json */ /** * Sample code: Volumes_DeleteReplication. @@ -1634,6 +1771,27 @@ public final class VolumesDeleteReplicationSamples { } ``` +### Volumes_FinalizeRelocation + +```java +import com.azure.core.util.Context; + +/** Samples for Volumes FinalizeRelocation. */ +public final class VolumesFinalizeRelocationSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_FinalizeRelocation.json + */ + /** + * Sample code: Volumes_FinalizeRelocation. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesFinalizeRelocation(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().finalizeRelocation("myRG", "account1", "pool1", "volume1", Context.NONE); + } +} +``` + ### Volumes_Get ```java @@ -1642,7 +1800,7 @@ import com.azure.core.util.Context; /** Samples for Volumes Get. */ public final class VolumesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_Get.json */ /** * Sample code: Volumes_Get. @@ -1663,7 +1821,7 @@ import com.azure.core.util.Context; /** Samples for Volumes List. */ public final class VolumesListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_List.json */ /** * Sample code: Volumes_List. @@ -1676,6 +1834,27 @@ public final class VolumesListSamples { } ``` +### Volumes_ListReplications + +```java +import com.azure.core.util.Context; + +/** Samples for Volumes ListReplications. */ +public final class VolumesListReplicationsSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_ListReplications.json + */ + /** + * Sample code: Volumes_ListReplications. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesListReplications(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().listReplications("myRG", "account1", "pool1", "volume1", Context.NONE); + } +} +``` + ### Volumes_PoolChange ```java @@ -1685,7 +1864,7 @@ import com.azure.resourcemanager.netapp.models.PoolChangeRequest; /** Samples for Volumes PoolChange. */ public final class VolumesPoolChangeSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_PoolChange.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_PoolChange.json */ /** * Sample code: Volumes_AuthorizeReplication. @@ -1716,7 +1895,7 @@ import com.azure.core.util.Context; /** Samples for Volumes ReInitializeReplication. */ public final class VolumesReInitializeReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_ReInitializeReplication.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_ReInitializeReplication.json */ /** * Sample code: Volumes_ReInitializeReplication. @@ -1729,6 +1908,27 @@ public final class VolumesReInitializeReplicationSamples { } ``` +### Volumes_Relocate + +```java +import com.azure.core.util.Context; + +/** Samples for Volumes Relocate. */ +public final class VolumesRelocateSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_Relocate.json + */ + /** + * Sample code: Volumes_Relocate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesRelocate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().relocate("myRG", "account1", "pool1", "volume1", Context.NONE); + } +} +``` + ### Volumes_ReplicationStatus ```java @@ -1737,7 +1937,7 @@ import com.azure.core.util.Context; /** Samples for Volumes ReplicationStatus. */ public final class VolumesReplicationStatusSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_ReplicationStatus.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_ReplicationStatus.json */ /** * Sample code: Volumes_ReplicationStatus. @@ -1750,6 +1950,27 @@ public final class VolumesReplicationStatusSamples { } ``` +### Volumes_ResetCifsPassword + +```java +import com.azure.core.util.Context; + +/** Samples for Volumes ResetCifsPassword. */ +public final class VolumesResetCifsPasswordSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_ResetCifsPassword.json + */ + /** + * Sample code: Volumes_ResetCifsPassword. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesResetCifsPassword(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().resetCifsPassword("myRG", "account1", "pool1", "volume1", Context.NONE); + } +} +``` + ### Volumes_ResyncReplication ```java @@ -1758,7 +1979,7 @@ import com.azure.core.util.Context; /** Samples for Volumes ResyncReplication. */ public final class VolumesResyncReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_ResyncReplication.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_ResyncReplication.json */ /** * Sample code: Volumes_ResyncReplication. @@ -1780,7 +2001,7 @@ import com.azure.resourcemanager.netapp.models.VolumeRevert; /** Samples for Volumes Revert. */ public final class VolumesRevertSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_Revert.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_Revert.json */ /** * Sample code: Volumes_Revert. @@ -1803,6 +2024,27 @@ public final class VolumesRevertSamples { } ``` +### Volumes_RevertRelocation + +```java +import com.azure.core.util.Context; + +/** Samples for Volumes RevertRelocation. */ +public final class VolumesRevertRelocationSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_RevertRelocation.json + */ + /** + * Sample code: Volumes_RevertRelocation. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesRevertRelocation(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().revertRelocation("myRG", "account1", "pool1", "volume1", Context.NONE); + } +} +``` + ### Volumes_Update ```java @@ -1812,7 +2054,7 @@ import com.azure.resourcemanager.netapp.models.Volume; /** Samples for Volumes Update. */ public final class VolumesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_Update.json */ /** * Sample code: Volumes_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/pom.xml b/sdk/netapp/azure-resourcemanager-netapp/pom.xml index bdd17ef0ada2..0d10d6be453a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/pom.xml +++ b/sdk/netapp/azure-resourcemanager-netapp/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for NetAppFiles Management - This package contains Microsoft Azure SDK for NetAppFiles Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-netapp-2021-10-01. + This package contains Microsoft Azure SDK for NetAppFiles Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-netapp-2022-01-01. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java index 04f3e802fd8c..8e1f0bf9ea67 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java @@ -10,11 +10,13 @@ import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; @@ -36,6 +38,7 @@ import com.azure.resourcemanager.netapp.implementation.SubvolumesImpl; import com.azure.resourcemanager.netapp.implementation.VaultsImpl; import com.azure.resourcemanager.netapp.implementation.VolumeGroupsImpl; +import com.azure.resourcemanager.netapp.implementation.VolumeQuotaRulesImpl; import com.azure.resourcemanager.netapp.implementation.VolumesImpl; import com.azure.resourcemanager.netapp.models.AccountBackups; import com.azure.resourcemanager.netapp.models.Accounts; @@ -50,6 +53,7 @@ import com.azure.resourcemanager.netapp.models.Subvolumes; import com.azure.resourcemanager.netapp.models.Vaults; import com.azure.resourcemanager.netapp.models.VolumeGroups; +import com.azure.resourcemanager.netapp.models.VolumeQuotaRules; import com.azure.resourcemanager.netapp.models.Volumes; import java.time.Duration; import java.time.temporal.ChronoUnit; @@ -82,6 +86,8 @@ public final class NetAppFilesManager { private BackupPolicies backupPolicies; + private VolumeQuotaRules volumeQuotaRules; + private Vaults vaults; private VolumeGroups volumeGroups; @@ -115,6 +121,19 @@ public static NetAppFilesManager authenticate(TokenCredential credential, AzureP return configure().authenticate(credential, profile); } + /** + * Creates an instance of NetAppFiles service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the NetAppFiles service API instance. + */ + public static NetAppFilesManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new NetAppFilesManager(httpPipeline, profile, null); + } + /** * Gets a Configurable instance that can be used to create NetAppFilesManager with optional configuration. * @@ -126,13 +145,14 @@ public static Configurable configure() { /** The Configurable allowing configurations to be set. */ public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; + private RetryOptions retryOptions; private Duration defaultPollInterval; private Configurable() { @@ -193,6 +213,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { return this; } + /** + * Sets the retry options for the HTTP pipeline retry policy. + * + *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + * + * @param retryOptions the retry options for the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + /** * Sets the default poll interval, used when service does not provide "Retry-After" header. * @@ -200,9 +233,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); } return this; } @@ -224,7 +259,7 @@ public NetAppFilesManager authenticate(TokenCredential credential, AzureProfile .append("-") .append("com.azure.resourcemanager.netapp") .append("/") - .append("1.0.0-beta.8"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -242,10 +277,15 @@ public NetAppFilesManager authenticate(TokenCredential credential, AzureProfile scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); } if (retryPolicy == null) { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } } List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); policies .addAll( @@ -276,7 +316,11 @@ public NetAppFilesManager authenticate(TokenCredential credential, AzureProfile } } - /** @return Resource collection API of Operations. */ + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ public Operations operations() { if (this.operations == null) { this.operations = new OperationsImpl(clientObject.getOperations(), this); @@ -284,7 +328,11 @@ public Operations operations() { return operations; } - /** @return Resource collection API of NetAppResources. */ + /** + * Gets the resource collection API of NetAppResources. + * + * @return Resource collection API of NetAppResources. + */ public NetAppResources netAppResources() { if (this.netAppResources == null) { this.netAppResources = new NetAppResourcesImpl(clientObject.getNetAppResources(), this); @@ -292,7 +340,11 @@ public NetAppResources netAppResources() { return netAppResources; } - /** @return Resource collection API of NetAppResourceQuotaLimits. */ + /** + * Gets the resource collection API of NetAppResourceQuotaLimits. + * + * @return Resource collection API of NetAppResourceQuotaLimits. + */ public NetAppResourceQuotaLimits netAppResourceQuotaLimits() { if (this.netAppResourceQuotaLimits == null) { this.netAppResourceQuotaLimits = @@ -301,7 +353,11 @@ public NetAppResourceQuotaLimits netAppResourceQuotaLimits() { return netAppResourceQuotaLimits; } - /** @return Resource collection API of Accounts. */ + /** + * Gets the resource collection API of Accounts. It manages NetAppAccount. + * + * @return Resource collection API of Accounts. + */ public Accounts accounts() { if (this.accounts == null) { this.accounts = new AccountsImpl(clientObject.getAccounts(), this); @@ -309,7 +365,11 @@ public Accounts accounts() { return accounts; } - /** @return Resource collection API of Pools. */ + /** + * Gets the resource collection API of Pools. It manages CapacityPool. + * + * @return Resource collection API of Pools. + */ public Pools pools() { if (this.pools == null) { this.pools = new PoolsImpl(clientObject.getPools(), this); @@ -317,7 +377,11 @@ public Pools pools() { return pools; } - /** @return Resource collection API of Volumes. */ + /** + * Gets the resource collection API of Volumes. It manages Volume. + * + * @return Resource collection API of Volumes. + */ public Volumes volumes() { if (this.volumes == null) { this.volumes = new VolumesImpl(clientObject.getVolumes(), this); @@ -325,7 +389,11 @@ public Volumes volumes() { return volumes; } - /** @return Resource collection API of Snapshots. */ + /** + * Gets the resource collection API of Snapshots. It manages Snapshot. + * + * @return Resource collection API of Snapshots. + */ public Snapshots snapshots() { if (this.snapshots == null) { this.snapshots = new SnapshotsImpl(clientObject.getSnapshots(), this); @@ -333,7 +401,11 @@ public Snapshots snapshots() { return snapshots; } - /** @return Resource collection API of SnapshotPolicies. */ + /** + * Gets the resource collection API of SnapshotPolicies. It manages SnapshotPolicy. + * + * @return Resource collection API of SnapshotPolicies. + */ public SnapshotPolicies snapshotPolicies() { if (this.snapshotPolicies == null) { this.snapshotPolicies = new SnapshotPoliciesImpl(clientObject.getSnapshotPolicies(), this); @@ -341,7 +413,11 @@ public SnapshotPolicies snapshotPolicies() { return snapshotPolicies; } - /** @return Resource collection API of Backups. */ + /** + * Gets the resource collection API of Backups. It manages Backup. + * + * @return Resource collection API of Backups. + */ public Backups backups() { if (this.backups == null) { this.backups = new BackupsImpl(clientObject.getBackups(), this); @@ -349,7 +425,11 @@ public Backups backups() { return backups; } - /** @return Resource collection API of AccountBackups. */ + /** + * Gets the resource collection API of AccountBackups. + * + * @return Resource collection API of AccountBackups. + */ public AccountBackups accountBackups() { if (this.accountBackups == null) { this.accountBackups = new AccountBackupsImpl(clientObject.getAccountBackups(), this); @@ -357,7 +437,11 @@ public AccountBackups accountBackups() { return accountBackups; } - /** @return Resource collection API of BackupPolicies. */ + /** + * Gets the resource collection API of BackupPolicies. It manages BackupPolicy. + * + * @return Resource collection API of BackupPolicies. + */ public BackupPolicies backupPolicies() { if (this.backupPolicies == null) { this.backupPolicies = new BackupPoliciesImpl(clientObject.getBackupPolicies(), this); @@ -365,7 +449,23 @@ public BackupPolicies backupPolicies() { return backupPolicies; } - /** @return Resource collection API of Vaults. */ + /** + * Gets the resource collection API of VolumeQuotaRules. It manages VolumeQuotaRule. + * + * @return Resource collection API of VolumeQuotaRules. + */ + public VolumeQuotaRules volumeQuotaRules() { + if (this.volumeQuotaRules == null) { + this.volumeQuotaRules = new VolumeQuotaRulesImpl(clientObject.getVolumeQuotaRules(), this); + } + return volumeQuotaRules; + } + + /** + * Gets the resource collection API of Vaults. + * + * @return Resource collection API of Vaults. + */ public Vaults vaults() { if (this.vaults == null) { this.vaults = new VaultsImpl(clientObject.getVaults(), this); @@ -373,7 +473,11 @@ public Vaults vaults() { return vaults; } - /** @return Resource collection API of VolumeGroups. */ + /** + * Gets the resource collection API of VolumeGroups. It manages VolumeGroupDetails. + * + * @return Resource collection API of VolumeGroups. + */ public VolumeGroups volumeGroups() { if (this.volumeGroups == null) { this.volumeGroups = new VolumeGroupsImpl(clientObject.getVolumeGroups(), this); @@ -381,7 +485,11 @@ public VolumeGroups volumeGroups() { return volumeGroups; } - /** @return Resource collection API of Subvolumes. */ + /** + * Gets the resource collection API of Subvolumes. It manages SubvolumeInfo. + * + * @return Resource collection API of Subvolumes. + */ public Subvolumes subvolumes() { if (this.subvolumes == null) { this.subvolumes = new SubvolumesImpl(clientObject.getSubvolumes(), this); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java index 0c50983ce359..9ea5f0692bc0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java @@ -122,6 +122,13 @@ public interface NetAppManagementClient { */ BackupPoliciesClient getBackupPolicies(); + /** + * Gets the VolumeQuotaRulesClient object to access its operations. + * + * @return the VolumeQuotaRulesClient object. + */ + VolumeQuotaRulesClient getVolumeQuotaRules(); + /** * Gets the VaultsClient object to access its operations. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeQuotaRulesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeQuotaRulesClient.java new file mode 100644 index 000000000000..c4c76fcac92d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeQuotaRulesClient.java @@ -0,0 +1,361 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.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.netapp.fluent.models.VolumeQuotaRuleInner; +import com.azure.resourcemanager.netapp.models.VolumeQuotaRulePatch; + +/** An instance of this class provides access to all the operations defined in VolumeQuotaRulesClient. */ +public interface VolumeQuotaRulesClient { + /** + * List all quota rules associated with the volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 Volume Quota Rules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByVolume( + String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * List all quota rules associated with the volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 Volume Quota Rules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByVolume( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + + /** + * Get details of the specified quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified quota rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VolumeQuotaRuleInner get( + String resourceGroupName, String accountName, String poolName, String volumeName, String volumeQuotaRuleName); + + /** + * Get details of the specified quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified quota rule along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + Context context); + + /** + * Create the specified quota rule within the given volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VolumeQuotaRuleInner> beginCreate( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRuleInner body); + + /** + * Create the specified quota rule within the given volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VolumeQuotaRuleInner> beginCreate( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRuleInner body, + Context context); + + /** + * Create the specified quota rule within the given volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VolumeQuotaRuleInner create( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRuleInner body); + + /** + * Create the specified quota rule within the given volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VolumeQuotaRuleInner create( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRuleInner body, + Context context); + + /** + * Patch a quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VolumeQuotaRuleInner> beginUpdate( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRulePatch body); + + /** + * Patch a quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VolumeQuotaRuleInner> beginUpdate( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRulePatch body, + Context context); + + /** + * Patch a quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VolumeQuotaRuleInner update( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRulePatch body); + + /** + * Patch a quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VolumeQuotaRuleInner update( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRulePatch body, + Context context); + + /** + * Delete quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @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 accountName, String poolName, String volumeName, String volumeQuotaRuleName); + + /** + * Delete quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @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 accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + Context context); + + /** + * Delete quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @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 accountName, String poolName, String volumeName, String volumeQuotaRuleName); + + /** + * Delete quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @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 accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java index 3176e8a0e1b0..3e1a8544a873 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java @@ -11,6 +11,7 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.models.ReplicationInner; import com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner; import com.azure.resourcemanager.netapp.fluent.models.VolumeInner; import com.azure.resourcemanager.netapp.models.AuthorizeRequest; @@ -414,6 +415,69 @@ void revert( VolumeRevert body, Context context); + /** + * Reset cifs password from volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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> beginResetCifsPassword( + String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Reset cifs password from volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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> beginResetCifsPassword( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + + /** + * Reset cifs password from volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 resetCifsPassword(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Reset cifs password from volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 resetCifsPassword( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + /** * Break the replication connection on the destination volume. * @@ -539,6 +603,39 @@ ReplicationStatusInner replicationStatus( Response replicationStatusWithResponse( String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + /** + * List all replications for a specified volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 Replications as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listReplications( + String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * List all replications for a specified volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 Replications as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listReplications( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + /** * Resync the connection on the destination volume. If the operation is ran on the source volume it will * reverse-resync the connection and sync from destination to source. @@ -887,4 +984,192 @@ void poolChange( String volumeName, PoolChangeRequest body, Context context); + + /** + * Relocates volume to a new stamp. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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> beginRelocate( + String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Relocates volume to a new stamp. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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> beginRelocate( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + + /** + * Relocates volume to a new stamp. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 relocate(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Relocates volume to a new stamp. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 relocate(String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + + /** + * Finalizes the relocation of the volume and cleans up the old volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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> beginFinalizeRelocation( + String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Finalizes the relocation of the volume and cleans up the old volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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> beginFinalizeRelocation( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + + /** + * Finalizes the relocation of the volume and cleans up the old volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 finalizeRelocation(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Finalizes the relocation of the volume and cleans up the old volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 finalizeRelocation( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + + /** + * Reverts the volume relocation process, cleans up the new volume and starts using the former-existing volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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> beginRevertRelocation( + String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Reverts the volume relocation process, cleans up the new volume and starts using the former-existing volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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> beginRevertRelocation( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + + /** + * Reverts the volume relocation process, cleans up the new volume and starts using the former-existing volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 revertRelocation(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Reverts the volume relocation process, cleans up the new volume and starts using the former-existing volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 revertRelocation( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java index 742cb02e4c7c..27f7ac66283c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java @@ -5,18 +5,14 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.models.AccountEncryption; import com.azure.resourcemanager.netapp.models.ActiveDirectory; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** NetApp account properties. */ @Fluent public final class AccountProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountProperties.class); - /* * Azure lifecycle management */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java index 159048fd47bd..ce1c66b22fcb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java @@ -8,15 +8,12 @@ import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.models.BackupType; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Backup of a Volume. */ @Fluent public final class BackupInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupInner.class); - /* * Resource location */ @@ -176,16 +173,18 @@ public BackupInner withUseExistingSnapshot(Boolean useExistingSnapshot) { */ public void validate() { if (location() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property location in model BackupInner")); } if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property innerProperties in model BackupInner")); } else { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(BackupInner.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyInner.java index 2ab7daad6c93..1b95eef8d564 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyInner.java @@ -9,7 +9,6 @@ import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.models.VolumeBackups; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -17,8 +16,6 @@ /** Backup policy information. */ @Fluent public final class BackupPolicyInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupPolicyInner.class); - /* * A unique read-only string that changes whenever the resource is updated. */ @@ -32,7 +29,8 @@ public final class BackupPolicyInner extends Resource { private BackupPolicyProperties innerProperties = new BackupPolicyProperties(); /* - * The system meta data relating to this resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy + * information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -56,7 +54,7 @@ private BackupPolicyProperties innerProperties() { } /** - * Get the systemData property: The system meta data relating to this resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -213,7 +211,7 @@ public List volumeBackups() { */ public void validate() { if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property innerProperties in model BackupPolicyInner")); @@ -221,4 +219,6 @@ public void validate() { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(BackupPolicyInner.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyProperties.java index 493e91eaa876..d52f6bc85dc0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyProperties.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.models.VolumeBackups; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Backup policy properties. */ @Fluent public final class BackupPolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupPolicyProperties.class); - /* * Backup Policy Resource ID */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java index 5204b90e9f81..bded98966e81 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.models.BackupType; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Backup properties. */ @Fluent public final class BackupProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupProperties.class); - /* * backupId UUID v4 used to identify the Backup */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java index 9e95ebd57afb..46054e55e5f0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.models.MirrorState; import com.azure.resourcemanager.netapp.models.RelationshipStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Backup status. */ @Immutable public final class BackupStatusInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupStatusInner.class); - /* * Backup health status */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CapacityPoolInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CapacityPoolInner.java index b2ad8d776a10..e1dea6b56e14 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CapacityPoolInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CapacityPoolInner.java @@ -11,15 +11,12 @@ import com.azure.resourcemanager.netapp.models.EncryptionType; import com.azure.resourcemanager.netapp.models.QosType; import com.azure.resourcemanager.netapp.models.ServiceLevel; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** Capacity pool resource. */ @Fluent public final class CapacityPoolInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CapacityPoolInner.class); - /* * A unique read-only string that changes whenever the resource is updated. */ @@ -33,7 +30,8 @@ public final class CapacityPoolInner extends Resource { private PoolProperties innerProperties = new PoolProperties(); /* - * The system meta data relating to this resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy + * information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -57,7 +55,7 @@ private PoolProperties innerProperties() { } /** - * Get the systemData property: The system meta data relating to this resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -241,7 +239,7 @@ public CapacityPoolInner withEncryptionType(EncryptionType encryptionType) { */ public void validate() { if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property innerProperties in model CapacityPoolInner")); @@ -249,4 +247,6 @@ public void validate() { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(CapacityPoolInner.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckAvailabilityResponseInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckAvailabilityResponseInner.java index d161dbac43e7..dd7e8330f074 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckAvailabilityResponseInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckAvailabilityResponseInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.models.InAvailabilityReasonType; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Information regarding availability of a resource. */ @Fluent public final class CheckAvailabilityResponseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckAvailabilityResponseInner.class); - /* * true indicates name is valid and available. * false indicates the name is invalid, unavailable, or both. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/MountTargetProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/MountTargetProperties.java index e1f9505a0212..f9b279297cfc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/MountTargetProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/MountTargetProperties.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Mount target properties. */ @Fluent public final class MountTargetProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MountTargetProperties.class); - /* * mountTargetId UUID v4 used to identify the MountTarget */ @@ -103,10 +100,12 @@ public MountTargetProperties withSmbServerFqdn(String smbServerFqdn) { */ public void validate() { if (fileSystemId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property fileSystemId in model MountTargetProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(MountTargetProperties.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java index c282eeb78e76..a7941717b3ae 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java @@ -6,11 +6,8 @@ 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.resourcemanager.netapp.models.AccountEncryption; import com.azure.resourcemanager.netapp.models.ActiveDirectory; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -18,8 +15,6 @@ /** NetApp account resource. */ @Fluent public final class NetAppAccountInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetAppAccountInner.class); - /* * A unique read-only string that changes whenever the resource is updated. */ @@ -32,12 +27,6 @@ public final class NetAppAccountInner extends Resource { @JsonProperty(value = "properties") private AccountProperties innerProperties; - /* - * The system meta data relating to this resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - /** * Get the etag property: A unique read-only string that changes whenever the resource is updated. * @@ -56,15 +45,6 @@ private AccountProperties innerProperties() { return this.innerProperties; } - /** - * Get the systemData property: The system meta data relating to this resource. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - /** {@inheritDoc} */ @Override public NetAppAccountInner withLocation(String location) { diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationInner.java index 2a4977ad8d34..8d4b210a0797 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.models.OperationDisplay; import com.azure.resourcemanager.netapp.models.ServiceSpecification; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Microsoft.NetApp REST API operation definition. */ @Fluent public final class OperationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class); - /* * Operation name: {provider}/{resource}/{operation} */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationProperties.java index 4ce35159cf1e..41cf61910a9e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.models.ServiceSpecification; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of operation, include metric specifications. */ @Fluent public final class OperationProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationProperties.class); - /* * One property of operation, include metric specifications. */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolPatchProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolPatchProperties.java index 93b956657415..464b93a73c42 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolPatchProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolPatchProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.models.QosType; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Patchable pool properties. */ @Fluent public final class PoolPatchProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PoolPatchProperties.class); - /* * size Provisioned size of the pool (in bytes). Allowed values are in 1TiB * chunks (value must be multiply of 4398046511104). diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolProperties.java index 45e1af855c68..19202edcad86 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolProperties.java @@ -9,14 +9,11 @@ import com.azure.resourcemanager.netapp.models.EncryptionType; import com.azure.resourcemanager.netapp.models.QosType; import com.azure.resourcemanager.netapp.models.ServiceLevel; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Pool properties. */ @Fluent public final class PoolProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PoolProperties.class); - /* * poolId UUID v4 used to identify the Pool */ @@ -221,9 +218,11 @@ public PoolProperties withEncryptionType(EncryptionType encryptionType) { */ public void validate() { if (serviceLevel() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property serviceLevel in model PoolProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(PoolProperties.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationInner.java new file mode 100644 index 000000000000..6985eb191f5b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationInner.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.netapp.models.EndpointType; +import com.azure.resourcemanager.netapp.models.ReplicationSchedule; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Replication properties. */ +@Fluent +public final class ReplicationInner { + /* + * Indicates whether the local volume is the source or destination for the + * Volume Replication + */ + @JsonProperty(value = "endpointType") + private EndpointType endpointType; + + /* + * Schedule + */ + @JsonProperty(value = "replicationSchedule") + private ReplicationSchedule replicationSchedule; + + /* + * The resource ID of the remote volume. + */ + @JsonProperty(value = "remoteVolumeResourceId", required = true) + private String remoteVolumeResourceId; + + /* + * The remote region for the other end of the Volume Replication. + */ + @JsonProperty(value = "remoteVolumeRegion") + private String remoteVolumeRegion; + + /** + * Get the endpointType property: Indicates whether the local volume is the source or destination for the Volume + * Replication. + * + * @return the endpointType value. + */ + public EndpointType endpointType() { + return this.endpointType; + } + + /** + * Set the endpointType property: Indicates whether the local volume is the source or destination for the Volume + * Replication. + * + * @param endpointType the endpointType value to set. + * @return the ReplicationInner object itself. + */ + public ReplicationInner withEndpointType(EndpointType endpointType) { + this.endpointType = endpointType; + return this; + } + + /** + * Get the replicationSchedule property: Schedule. + * + * @return the replicationSchedule value. + */ + public ReplicationSchedule replicationSchedule() { + return this.replicationSchedule; + } + + /** + * Set the replicationSchedule property: Schedule. + * + * @param replicationSchedule the replicationSchedule value to set. + * @return the ReplicationInner object itself. + */ + public ReplicationInner withReplicationSchedule(ReplicationSchedule replicationSchedule) { + this.replicationSchedule = replicationSchedule; + return this; + } + + /** + * Get the remoteVolumeResourceId property: The resource ID of the remote volume. + * + * @return the remoteVolumeResourceId value. + */ + public String remoteVolumeResourceId() { + return this.remoteVolumeResourceId; + } + + /** + * Set the remoteVolumeResourceId property: The resource ID of the remote volume. + * + * @param remoteVolumeResourceId the remoteVolumeResourceId value to set. + * @return the ReplicationInner object itself. + */ + public ReplicationInner withRemoteVolumeResourceId(String remoteVolumeResourceId) { + this.remoteVolumeResourceId = remoteVolumeResourceId; + return this; + } + + /** + * Get the remoteVolumeRegion property: The remote region for the other end of the Volume Replication. + * + * @return the remoteVolumeRegion value. + */ + public String remoteVolumeRegion() { + return this.remoteVolumeRegion; + } + + /** + * Set the remoteVolumeRegion property: The remote region for the other end of the Volume Replication. + * + * @param remoteVolumeRegion the remoteVolumeRegion value to set. + * @return the ReplicationInner object itself. + */ + public ReplicationInner withRemoteVolumeRegion(String remoteVolumeRegion) { + this.remoteVolumeRegion = remoteVolumeRegion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (remoteVolumeResourceId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property remoteVolumeResourceId in model ReplicationInner")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ReplicationInner.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationStatusInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationStatusInner.java index dfeae58906d3..6c401681ee63 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationStatusInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationStatusInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.models.MirrorState; import com.azure.resourcemanager.netapp.models.RelationshipStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Replication status. */ @Fluent public final class ReplicationStatusInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReplicationStatusInner.class); - /* * Replication health check */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RestoreStatusInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RestoreStatusInner.java index 2316df0c254b..248084df03e3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RestoreStatusInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RestoreStatusInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.models.MirrorState; import com.azure.resourcemanager.netapp.models.RelationshipStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Restore status. */ @Immutable public final class RestoreStatusInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RestoreStatusInner.class); - /* * Restore health status */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotInner.java index 48777cd6f807..6c0c2bfbbbeb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotInner.java @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Snapshot of a Volume. */ @Fluent public final class SnapshotInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotInner.class); - /* * Resource location */ @@ -91,7 +88,7 @@ public String provisioningState() { */ public void validate() { if (location() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property location in model SnapshotInner")); } @@ -99,4 +96,6 @@ public void validate() { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(SnapshotInner.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyInner.java index 3292a15b8bcd..d205a5f07fb5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyInner.java @@ -12,15 +12,12 @@ import com.azure.resourcemanager.netapp.models.HourlySchedule; import com.azure.resourcemanager.netapp.models.MonthlySchedule; import com.azure.resourcemanager.netapp.models.WeeklySchedule; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** Snapshot policy information. */ @Fluent public final class SnapshotPolicyInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotPolicyInner.class); - /* * A unique read-only string that changes whenever the resource is updated. */ @@ -34,7 +31,8 @@ public final class SnapshotPolicyInner extends Resource { private SnapshotPolicyProperties innerProperties = new SnapshotPolicyProperties(); /* - * The system meta data relating to this resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy + * information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -58,7 +56,7 @@ private SnapshotPolicyProperties innerProperties() { } /** - * Get the systemData property: The system meta data relating to this resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -211,7 +209,7 @@ public String provisioningState() { */ public void validate() { if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property innerProperties in model SnapshotPolicyInner")); @@ -219,4 +217,6 @@ public void validate() { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(SnapshotPolicyInner.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyProperties.java index 910410b147b6..b991388d7101 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyProperties.java @@ -5,19 +5,15 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.models.DailySchedule; import com.azure.resourcemanager.netapp.models.HourlySchedule; import com.azure.resourcemanager.netapp.models.MonthlySchedule; import com.azure.resourcemanager.netapp.models.WeeklySchedule; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Snapshot policy properties. */ @Fluent public final class SnapshotPolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotPolicyProperties.class); - /* * Schedule for hourly snapshots */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyVolumeListInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyVolumeListInner.java index 1424329cf5ce..85f34c9ae377 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyVolumeListInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyVolumeListInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Volumes associated with snapshot policy. */ @Fluent public final class SnapshotPolicyVolumeListInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotPolicyVolumeListInner.class); - /* * List of volumes */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotProperties.java index 0f6d1ae6981f..2971b475f2fe 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Snapshot properties. */ @Immutable public final class SnapshotProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotProperties.class); - /* * snapshotId UUID v4 used to identify the Snapshot */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemInner.java index 50bfde34117e..70e2995762f1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemInner.java @@ -6,28 +6,17 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Information regarding Subscription Quota Item. */ @Fluent public final class SubscriptionQuotaItemInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SubscriptionQuotaItemInner.class); - /* * SubscriptionQuotaItem properties */ @JsonProperty(value = "properties") private SubscriptionQuotaItemProperties innerProperties; - /* - * The system meta data relating to this resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - /** * Get the innerProperties property: SubscriptionQuotaItem properties. * @@ -37,15 +26,6 @@ private SubscriptionQuotaItemProperties innerProperties() { return this.innerProperties; } - /** - * Get the systemData property: The system meta data relating to this resource. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - /** * Get the current property: The current quota value. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemProperties.java index b6d467531165..503b16294bab 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** SubscriptionQuotaItem Properties. */ @Immutable public final class SubscriptionQuotaItemProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SubscriptionQuotaItemProperties.class); - /* * The current quota value. */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeInfoInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeInfoInner.java index bf4e4d0812fe..75e561fe9639 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeInfoInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeInfoInner.java @@ -7,15 +7,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Subvolume Information properties. */ @Fluent public final class SubvolumeInfoInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SubvolumeInfoInner.class); - /* * Subvolume Properties */ @@ -23,7 +19,8 @@ public final class SubvolumeInfoInner extends ProxyResource { private SubvolumeProperties innerProperties; /* - * The system meta data relating to this resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy + * information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -38,7 +35,7 @@ private SubvolumeProperties innerProperties() { } /** - * Get the systemData property: The system meta data relating to this resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelInner.java index 47490e1d0ef7..e7203d37283d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Result of the post subvolume and action is to get metadata of the subvolume. */ @Fluent public final class SubvolumeModelInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SubvolumeModelInner.class); - /* * Resource Id */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelProperties.java index 1ec95abace80..a81a51fa61da 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Properties which represents actual subvolume model which is stored as a file in the system. */ @Fluent public final class SubvolumeModelProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SubvolumeModelProperties.class); - /* * path Path to the subvolume */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumePatchParams.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumePatchParams.java index f27c617c0d48..70603a89eef2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumePatchParams.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumePatchParams.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Parameters with which a subvolume can be updated. */ @Fluent public final class SubvolumePatchParams { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SubvolumePatchParams.class); - /* * size Truncate subvolume to the provided size in bytes */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeProperties.java index a887160fe9b0..3694df6f18c3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** This represents path associated with the subvolume. */ @Fluent public final class SubvolumeProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SubvolumeProperties.class); - /* * path Path to the subvolume */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VaultInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VaultInner.java index 6fe4f732175e..b7947496a06e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VaultInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VaultInner.java @@ -7,14 +7,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Vault information. */ @Fluent public final class VaultInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VaultInner.class); - /* * Resource location */ @@ -86,16 +83,18 @@ public VaultInner withVaultName(String vaultName) { */ public void validate() { if (location() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property location in model VaultInner")); } if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property innerProperties in model VaultInner")); } else { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(VaultInner.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VaultProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VaultProperties.java index 21295214edde..53cd65c38aad 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VaultProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VaultProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Vault properties. */ @Fluent public final class VaultProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VaultProperties.class); - /* * Vault Name */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupDetailsInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupDetailsInner.java index 838ac7cdc7d6..eead110c345d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupDetailsInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupDetailsInner.java @@ -5,20 +5,14 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.models.VolumeGroupMetadata; import com.azure.resourcemanager.netapp.models.VolumeGroupVolumeProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -import java.util.Map; /** Volume group resource for create. */ @Fluent public final class VolumeGroupDetailsInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeGroupDetailsInner.class); - /* * Resource location */ @@ -43,13 +37,6 @@ public final class VolumeGroupDetailsInner { @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) private String type; - /* - * Resource tags - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - /* * Volume group properties */ @@ -103,26 +90,6 @@ public String type() { return this.type; } - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the VolumeGroupDetailsInner object itself. - */ - public VolumeGroupDetailsInner withTags(Map tags) { - this.tags = tags; - return this; - } - /** * Get the innerProperties property: Volume group properties. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupInner.java index c10124f59412..3ee07597cecc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupInner.java @@ -5,18 +5,12 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.models.VolumeGroupMetadata; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; /** Volume group resource. */ @Fluent public final class VolumeGroupInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeGroupInner.class); - /* * Resource location */ @@ -41,13 +35,6 @@ public final class VolumeGroupInner { @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) private String type; - /* - * Resource tags - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - /* * Volume group properties */ @@ -101,26 +88,6 @@ public String type() { return this.type; } - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the VolumeGroupInner object itself. - */ - public VolumeGroupInner withTags(Map tags) { - this.tags = tags; - return this; - } - /** * Get the innerProperties property: Volume group properties. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupListProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupListProperties.java index 3dbed5328b86..1d67a3966eed 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupListProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupListProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.models.VolumeGroupMetadata; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Volume group properties. */ @Fluent public final class VolumeGroupListProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeGroupListProperties.class); - /* * Azure lifecycle management */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupProperties.java index 15ed0c882894..7fbdd123f2cf 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupProperties.java @@ -5,18 +5,14 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.models.VolumeGroupMetadata; import com.azure.resourcemanager.netapp.models.VolumeGroupVolumeProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Volume group properties. */ @Fluent public final class VolumeGroupProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeGroupProperties.class); - /* * Azure lifecycle management */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java index d0cb6d5013d2..3ab408564172 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java @@ -10,6 +10,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.models.AvsDataStore; import com.azure.resourcemanager.netapp.models.EnableSubvolumes; +import com.azure.resourcemanager.netapp.models.EncryptionKeySource; import com.azure.resourcemanager.netapp.models.NetworkFeatures; import com.azure.resourcemanager.netapp.models.PlacementKeyValuePairs; import com.azure.resourcemanager.netapp.models.SecurityStyle; @@ -17,7 +18,6 @@ import com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy; import com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -25,14 +25,18 @@ /** Volume resource. */ @Fluent public final class VolumeInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeInner.class); - /* * A unique read-only string that changes whenever the resource is updated. */ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) private String etag; + /* + * Availability Zone + */ + @JsonProperty(value = "zones") + private List zones; + /* * Volume properties */ @@ -40,7 +44,8 @@ public final class VolumeInner extends Resource { private VolumeProperties innerProperties = new VolumeProperties(); /* - * The system meta data relating to this resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy + * information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -54,6 +59,26 @@ public String etag() { return this.etag; } + /** + * Get the zones property: Availability Zone. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: Availability Zone. + * + * @param zones the zones value to set. + * @return the VolumeInner object itself. + */ + public VolumeInner withZones(List zones) { + this.zones = zones; + return this; + } + /** * Get the innerProperties property: Volume properties. * @@ -64,7 +89,7 @@ private VolumeProperties innerProperties() { } /** - * Get the systemData property: The system meta data relating to this resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -579,21 +604,23 @@ public VolumeInner withThroughputMibps(Float throughputMibps) { } /** - * Get the encryptionKeySource property: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. + * Get the encryptionKeySource property: Source of key used to encrypt data in volume. Possible values + * (case-insensitive) are: 'Microsoft.NetApp'. * * @return the encryptionKeySource value. */ - public String encryptionKeySource() { + public EncryptionKeySource encryptionKeySource() { return this.innerProperties() == null ? null : this.innerProperties().encryptionKeySource(); } /** - * Set the encryptionKeySource property: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. + * Set the encryptionKeySource property: Source of key used to encrypt data in volume. Possible values + * (case-insensitive) are: 'Microsoft.NetApp'. * * @param encryptionKeySource the encryptionKeySource value to set. * @return the VolumeInner object itself. */ - public VolumeInner withEncryptionKeySource(String encryptionKeySource) { + public VolumeInner withEncryptionKeySource(EncryptionKeySource encryptionKeySource) { if (this.innerProperties() == null) { this.innerProperties = new VolumeProperties(); } @@ -911,6 +938,16 @@ public VolumeInner withVolumeSpecName(String volumeSpecName) { return this; } + /** + * Get the encrypted property: Specifies if the volume is encrypted or not. Only available on volumes created or + * updated after 2022-01-01. + * + * @return the encrypted value. + */ + public Boolean encrypted() { + return this.innerProperties() == null ? null : this.innerProperties().encrypted(); + } + /** * Get the placementRules property: Volume placement rules Application specific placement rules for the particular * volume. @@ -966,11 +1003,13 @@ public VolumeInner withEnableSubvolumes(EnableSubvolumes enableSubvolumes) { */ public void validate() { if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property innerProperties in model VolumeInner")); } else { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(VolumeInner.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java index 3b7b5aad7082..9d29ce42ac83 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java @@ -5,18 +5,14 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.models.ServiceLevel; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Patchable volume properties. */ @Fluent public final class VolumePatchProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumePatchProperties.class); - /* * serviceLevel The service level of the file system */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java index d3d03fc75db7..0e12e842cc17 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java @@ -8,6 +8,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.models.AvsDataStore; import com.azure.resourcemanager.netapp.models.EnableSubvolumes; +import com.azure.resourcemanager.netapp.models.EncryptionKeySource; import com.azure.resourcemanager.netapp.models.NetworkFeatures; import com.azure.resourcemanager.netapp.models.PlacementKeyValuePairs; import com.azure.resourcemanager.netapp.models.SecurityStyle; @@ -15,15 +16,12 @@ import com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy; import com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Volume properties. */ @Fluent public final class VolumeProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeProperties.class); - /* * FileSystem ID Unique FileSystem Identifier. */ @@ -188,10 +186,11 @@ public final class VolumeProperties { private Float throughputMibps; /* - * Encryption Key Source. Possible values are: 'Microsoft.NetApp' + * Source of key used to encrypt data in volume. Possible values + * (case-insensitive) are: 'Microsoft.NetApp' */ @JsonProperty(value = "encryptionKeySource") - private String encryptionKeySource; + private EncryptionKeySource encryptionKeySource; /* * Specifies whether LDAP is enabled or not for a given NFS volume. @@ -298,6 +297,13 @@ public final class VolumeProperties { @JsonProperty(value = "volumeSpecName") private String volumeSpecName; + /* + * Specifies if the volume is encrypted or not. Only available on volumes + * created or updated after 2022-01-01. + */ + @JsonProperty(value = "encrypted", access = JsonProperty.Access.WRITE_ONLY) + private Boolean encrypted; + /* * Volume placement rules Application specific placement rules for the * particular volume @@ -750,21 +756,23 @@ public VolumeProperties withThroughputMibps(Float throughputMibps) { } /** - * Get the encryptionKeySource property: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. + * Get the encryptionKeySource property: Source of key used to encrypt data in volume. Possible values + * (case-insensitive) are: 'Microsoft.NetApp'. * * @return the encryptionKeySource value. */ - public String encryptionKeySource() { + public EncryptionKeySource encryptionKeySource() { return this.encryptionKeySource; } /** - * Set the encryptionKeySource property: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. + * Set the encryptionKeySource property: Source of key used to encrypt data in volume. Possible values + * (case-insensitive) are: 'Microsoft.NetApp'. * * @param encryptionKeySource the encryptionKeySource value to set. * @return the VolumeProperties object itself. */ - public VolumeProperties withEncryptionKeySource(String encryptionKeySource) { + public VolumeProperties withEncryptionKeySource(EncryptionKeySource encryptionKeySource) { this.encryptionKeySource = encryptionKeySource; return this; } @@ -1046,6 +1054,16 @@ public VolumeProperties withVolumeSpecName(String volumeSpecName) { return this; } + /** + * Get the encrypted property: Specifies if the volume is encrypted or not. Only available on volumes created or + * updated after 2022-01-01. + * + * @return the encrypted value. + */ + public Boolean encrypted() { + return this.encrypted; + } + /** * Get the placementRules property: Volume placement rules Application specific placement rules for the particular * volume. @@ -1095,7 +1113,7 @@ public VolumeProperties withEnableSubvolumes(EnableSubvolumes enableSubvolumes) */ public void validate() { if (creationToken() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property creationToken in model VolumeProperties")); } @@ -1103,7 +1121,7 @@ public void validate() { exportPolicy().validate(); } if (subnetId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property subnetId in model VolumeProperties")); } @@ -1117,4 +1135,6 @@ public void validate() { placementRules().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(VolumeProperties.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRuleInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRuleInner.java new file mode 100644 index 000000000000..a23a8f04f1a5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRuleInner.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.netapp.models.ProvisioningState; +import com.azure.resourcemanager.netapp.models.Type; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Quota Rule of a Volume. */ +@Fluent +public final class VolumeQuotaRuleInner extends Resource { + /* + * Volume Quota Rule Properties + */ + @JsonProperty(value = "properties") + private VolumeQuotaRulesProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy + * information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the innerProperties property: Volume Quota Rule Properties. + * + * @return the innerProperties value. + */ + private VolumeQuotaRulesProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public VolumeQuotaRuleInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public VolumeQuotaRuleInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: Gets the status of the VolumeQuotaRule at the time the operation was called. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the quotaSizeInKiBs property: Size of quota. + * + * @return the quotaSizeInKiBs value. + */ + public Long quotaSizeInKiBs() { + return this.innerProperties() == null ? null : this.innerProperties().quotaSizeInKiBs(); + } + + /** + * Set the quotaSizeInKiBs property: Size of quota. + * + * @param quotaSizeInKiBs the quotaSizeInKiBs value to set. + * @return the VolumeQuotaRuleInner object itself. + */ + public VolumeQuotaRuleInner withQuotaSizeInKiBs(Long quotaSizeInKiBs) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeQuotaRulesProperties(); + } + this.innerProperties().withQuotaSizeInKiBs(quotaSizeInKiBs); + return this; + } + + /** + * Get the quotaType property: quotaType Type of quota. + * + * @return the quotaType value. + */ + public Type quotaType() { + return this.innerProperties() == null ? null : this.innerProperties().quotaType(); + } + + /** + * Set the quotaType property: quotaType Type of quota. + * + * @param quotaType the quotaType value to set. + * @return the VolumeQuotaRuleInner object itself. + */ + public VolumeQuotaRuleInner withQuotaType(Type quotaType) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeQuotaRulesProperties(); + } + this.innerProperties().withQuotaType(quotaType); + return this; + } + + /** + * Get the quotaTarget property: UserID/GroupID/SID based on the quota target type. UserID and groupID can be found + * by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running <wmic useraccount + * where name='user-name' get sid>. + * + * @return the quotaTarget value. + */ + public String quotaTarget() { + return this.innerProperties() == null ? null : this.innerProperties().quotaTarget(); + } + + /** + * Set the quotaTarget property: UserID/GroupID/SID based on the quota target type. UserID and groupID can be found + * by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running <wmic useraccount + * where name='user-name' get sid>. + * + * @param quotaTarget the quotaTarget value to set. + * @return the VolumeQuotaRuleInner object itself. + */ + public VolumeQuotaRuleInner withQuotaTarget(String quotaTarget) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeQuotaRulesProperties(); + } + this.innerProperties().withQuotaTarget(quotaTarget); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRulesProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRulesProperties.java new file mode 100644 index 000000000000..d77294e346fa --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRulesProperties.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.netapp.models.ProvisioningState; +import com.azure.resourcemanager.netapp.models.Type; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Volume Quota Rule properties. */ +@Fluent +public final class VolumeQuotaRulesProperties { + /* + * Gets the status of the VolumeQuotaRule at the time the operation was + * called. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Size of quota + */ + @JsonProperty(value = "quotaSizeInKiBs") + private Long quotaSizeInKiBs; + + /* + * quotaType Type of quota + */ + @JsonProperty(value = "quotaType") + private Type quotaType; + + /* + * UserID/GroupID/SID based on the quota target type. UserID and groupID + * can be found by running ‘id’ or ‘getent’ command for the user or group + * and SID can be found by running + */ + @JsonProperty(value = "quotaTarget") + private String quotaTarget; + + /** + * Get the provisioningState property: Gets the status of the VolumeQuotaRule at the time the operation was called. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the quotaSizeInKiBs property: Size of quota. + * + * @return the quotaSizeInKiBs value. + */ + public Long quotaSizeInKiBs() { + return this.quotaSizeInKiBs; + } + + /** + * Set the quotaSizeInKiBs property: Size of quota. + * + * @param quotaSizeInKiBs the quotaSizeInKiBs value to set. + * @return the VolumeQuotaRulesProperties object itself. + */ + public VolumeQuotaRulesProperties withQuotaSizeInKiBs(Long quotaSizeInKiBs) { + this.quotaSizeInKiBs = quotaSizeInKiBs; + return this; + } + + /** + * Get the quotaType property: quotaType Type of quota. + * + * @return the quotaType value. + */ + public Type quotaType() { + return this.quotaType; + } + + /** + * Set the quotaType property: quotaType Type of quota. + * + * @param quotaType the quotaType value to set. + * @return the VolumeQuotaRulesProperties object itself. + */ + public VolumeQuotaRulesProperties withQuotaType(Type quotaType) { + this.quotaType = quotaType; + return this; + } + + /** + * Get the quotaTarget property: UserID/GroupID/SID based on the quota target type. UserID and groupID can be found + * by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running <wmic useraccount + * where name='user-name' get sid>. + * + * @return the quotaTarget value. + */ + public String quotaTarget() { + return this.quotaTarget; + } + + /** + * Set the quotaTarget property: UserID/GroupID/SID based on the quota target type. UserID and groupID can be found + * by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running <wmic useraccount + * where name='user-name' get sid>. + * + * @param quotaTarget the quotaTarget value to set. + * @return the VolumeQuotaRulesProperties object itself. + */ + public VolumeQuotaRulesProperties withQuotaTarget(String quotaTarget) { + this.quotaTarget = quotaTarget; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountBackupsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountBackupsClientImpl.java index 88da32b3b159..b9a6053fc7e5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountBackupsClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountBackupsClientImpl.java @@ -27,7 +27,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.netapp.fluent.AccountBackupsClient; @@ -39,8 +38,6 @@ /** An instance of this class provides access to all the operations defined in AccountBackupsClient. */ public final class AccountBackupsClientImpl implements AccountBackupsClient { - private final ClientLogger logger = new ClientLogger(AccountBackupsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final AccountBackupsService service; @@ -395,14 +392,7 @@ private Mono> getWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String accountName, String backupName) { return getWithResponseAsync(resourceGroupName, accountName, backupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountBackupsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountBackupsImpl.java index bb26b306532e..bc060d9d9ff8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountBackupsImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountBackupsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.netapp.fluent.models.BackupInner; import com.azure.resourcemanager.netapp.models.AccountBackups; import com.azure.resourcemanager.netapp.models.Backup; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class AccountBackupsImpl implements AccountBackups { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountBackupsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AccountBackupsImpl.class); private final AccountBackupsClient innerClient; diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java index 796f3dcd9fea..eebe4f4794e8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java @@ -30,7 +30,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.netapp.fluent.AccountsClient; @@ -43,8 +42,6 @@ /** An instance of this class provides access to all the operations defined in AccountsClient. */ public final class AccountsClientImpl implements AccountsClient { - private final ClientLogger logger = new ClientLogger(AccountsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final AccountsService service; @@ -589,14 +586,7 @@ private Mono> getByResourceGroupWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String accountName) { return getByResourceGroupWithResponseAsync(resourceGroupName, accountName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsImpl.java index 6958ee3434ac..f697fea7b9c9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner; import com.azure.resourcemanager.netapp.models.Accounts; import com.azure.resourcemanager.netapp.models.NetAppAccount; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class AccountsImpl implements Accounts { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AccountsImpl.class); private final AccountsClient innerClient; @@ -83,7 +82,7 @@ public void delete(String resourceGroupName, String accountName, Context context public NetAppAccount getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -91,7 +90,7 @@ public NetAppAccount getById(String id) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -103,7 +102,7 @@ public NetAppAccount getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -111,7 +110,7 @@ public Response getByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -123,7 +122,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -131,7 +130,7 @@ public void deleteById(String id) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -143,7 +142,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -151,7 +150,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupImpl.java index 3e7f48717f2f..43aa2e6dc5a3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupImpl.java @@ -78,6 +78,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public BackupInner innerModel() { return this.innerObject; } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesClientImpl.java index 5d4a8d578ec3..7f728ffda875 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesClientImpl.java @@ -30,7 +30,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient; @@ -43,8 +42,6 @@ /** An instance of this class provides access to all the operations defined in BackupPoliciesClient. */ public final class BackupPoliciesClientImpl implements BackupPoliciesClient { - private final ClientLogger logger = new ClientLogger(BackupPoliciesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final BackupPoliciesService service; @@ -433,14 +430,7 @@ private Mono> getWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String accountName, String backupPolicyName) { return getWithResponseAsync(resourceGroupName, accountName, backupPolicyName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesImpl.java index fd0b0279c868..8ed1aa144eee 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner; import com.azure.resourcemanager.netapp.models.BackupPolicies; import com.azure.resourcemanager.netapp.models.BackupPolicy; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class BackupPoliciesImpl implements BackupPolicies { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupPoliciesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(BackupPoliciesImpl.class); private final BackupPoliciesClient innerClient; @@ -73,7 +72,7 @@ public void delete(String resourceGroupName, String accountName, String backupPo public BackupPolicy getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -81,7 +80,7 @@ public BackupPolicy getById(String id) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -89,7 +88,7 @@ public BackupPolicy getById(String id) { } String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies"); if (backupPolicyName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -101,7 +100,7 @@ public BackupPolicy getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -109,7 +108,7 @@ public Response getByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -117,7 +116,7 @@ public Response getByIdWithResponse(String id, Context context) { } String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies"); if (backupPolicyName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -129,7 +128,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -137,7 +136,7 @@ public void deleteById(String id) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -145,7 +144,7 @@ public void deleteById(String id) { } String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies"); if (backupPolicyName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -157,7 +156,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -165,7 +164,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -173,7 +172,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies"); if (backupPolicyName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPolicyImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPolicyImpl.java index db809d662673..630296dc4031 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPolicyImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPolicyImpl.java @@ -98,6 +98,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public BackupPolicyInner innerModel() { return this.innerObject; } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsClientImpl.java index 9b7178c643d7..f60d7cf8972a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsClientImpl.java @@ -30,7 +30,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.netapp.fluent.BackupsClient; @@ -45,8 +44,6 @@ /** An instance of this class provides access to all the operations defined in BackupsClient. */ public final class BackupsClientImpl implements BackupsClient { - private final ClientLogger logger = new ClientLogger(BackupsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final BackupsService service; @@ -327,14 +324,7 @@ private Mono> getStatusWithResponseAsync( private Mono getStatusAsync( String resourceGroupName, String accountName, String poolName, String volumeName) { return getStatusWithResponseAsync(resourceGroupName, accountName, poolName, volumeName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -506,14 +496,7 @@ private Mono> getVolumeRestoreStatusWithResponseAsy private Mono getVolumeRestoreStatusAsync( String resourceGroupName, String accountName, String poolName, String volumeName) { return getVolumeRestoreStatusWithResponseAsync(resourceGroupName, accountName, poolName, volumeName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -897,14 +880,7 @@ private Mono> getWithResponseAsync( private Mono getAsync( String resourceGroupName, String accountName, String poolName, String volumeName, String backupName) { return getWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, backupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsImpl.java index e9271be237e4..1e170be3bf53 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsImpl.java @@ -17,10 +17,9 @@ import com.azure.resourcemanager.netapp.models.BackupStatus; import com.azure.resourcemanager.netapp.models.Backups; import com.azure.resourcemanager.netapp.models.RestoreStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class BackupsImpl implements Backups { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(BackupsImpl.class); private final BackupsClient innerClient; @@ -147,7 +146,7 @@ public void delete( public Backup getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -155,7 +154,7 @@ public Backup getById(String id) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -163,21 +162,21 @@ public Backup getById(String id) { } String poolName = Utils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } String volumeName = Utils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } String backupName = Utils.getValueFromIdByName(id, "backups"); if (backupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'backups'.", id))); @@ -190,7 +189,7 @@ public Backup getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -198,7 +197,7 @@ public Response getByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -206,21 +205,21 @@ public Response getByIdWithResponse(String id, Context context) { } String poolName = Utils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } String volumeName = Utils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } String backupName = Utils.getValueFromIdByName(id, "backups"); if (backupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'backups'.", id))); @@ -231,7 +230,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -239,7 +238,7 @@ public void deleteById(String id) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -247,21 +246,21 @@ public void deleteById(String id) { } String poolName = Utils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } String volumeName = Utils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } String backupName = Utils.getValueFromIdByName(id, "backups"); if (backupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'backups'.", id))); @@ -272,7 +271,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -280,7 +279,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -288,21 +287,21 @@ public void deleteByIdWithResponse(String id, Context context) { } String poolName = Utils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } String volumeName = Utils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } String backupName = Utils.getValueFromIdByName(id, "backups"); if (backupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'backups'.", id))); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CapacityPoolImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CapacityPoolImpl.java index dedbbcd6ce3a..054afca3a0af 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CapacityPoolImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CapacityPoolImpl.java @@ -98,6 +98,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public CapacityPoolInner innerModel() { return this.innerObject; } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java index 97599b9591a3..fc6c4bcff808 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.implementation; import com.azure.core.management.Region; -import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner; import com.azure.resourcemanager.netapp.models.AccountEncryption; @@ -50,10 +49,6 @@ public String etag() { return this.innerModel().etag(); } - public SystemData systemData() { - return this.innerModel().systemData(); - } - public String provisioningState() { return this.innerModel().provisioningState(); } @@ -79,6 +74,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public NetAppAccountInner innerModel() { return this.innerObject; } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientBuilder.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientBuilder.java index 15875b653aa3..0e16a59a86ca 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientBuilder.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientBuilder.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.AzureEnvironment; @@ -70,34 +69,34 @@ public NetAppManagementClientBuilder environment(AzureEnvironment environment) { } /* - * The default poll interval for long-running operation + * The HTTP pipeline to send requests through */ - private Duration defaultPollInterval; + private HttpPipeline pipeline; /** - * Sets The default poll interval for long-running operation. + * Sets The HTTP pipeline to send requests through. * - * @param defaultPollInterval the defaultPollInterval value. + * @param pipeline the pipeline value. * @return the NetAppManagementClientBuilder. */ - public NetAppManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; + public NetAppManagementClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; return this; } /* - * The HTTP pipeline to send requests through + * The default poll interval for long-running operation */ - private HttpPipeline pipeline; + private Duration defaultPollInterval; /** - * Sets The HTTP pipeline to send requests through. + * Sets The default poll interval for long-running operation. * - * @param pipeline the pipeline value. + * @param defaultPollInterval the defaultPollInterval value. * @return the NetAppManagementClientBuilder. */ - public NetAppManagementClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; + public NetAppManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; return this; } @@ -129,15 +128,12 @@ public NetAppManagementClientImpl buildClient() { if (environment == null) { this.environment = AzureEnvironment.AZURE; } + if (pipeline == null) { + this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + } if (defaultPollInterval == null) { this.defaultPollInterval = Duration.ofSeconds(30); } - if (pipeline == null) { - this.pipeline = - new HttpPipelineBuilder() - .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) - .build(); - } if (serializerAdapter == null) { this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java index 0f7cc459c3cd..4e4cbe29c3a1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java @@ -15,6 +15,7 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; @@ -35,6 +36,7 @@ import com.azure.resourcemanager.netapp.fluent.SubvolumesClient; import com.azure.resourcemanager.netapp.fluent.VaultsClient; import com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient; +import com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient; import com.azure.resourcemanager.netapp.fluent.VolumesClient; import java.io.IOException; import java.lang.reflect.Type; @@ -42,15 +44,12 @@ import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.time.Duration; -import java.util.Map; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** Initializes a new instance of the NetAppManagementClientImpl type. */ @ServiceClient(builder = NetAppManagementClientBuilder.class) public final class NetAppManagementClientImpl implements NetAppManagementClient { - private final ClientLogger logger = new ClientLogger(NetAppManagementClientImpl.class); - /** * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of * the URI for every service call. @@ -259,6 +258,18 @@ public BackupPoliciesClient getBackupPolicies() { return this.backupPolicies; } + /** The VolumeQuotaRulesClient object to access its operations. */ + private final VolumeQuotaRulesClient volumeQuotaRules; + + /** + * Gets the VolumeQuotaRulesClient object to access its operations. + * + * @return the VolumeQuotaRulesClient object. + */ + public VolumeQuotaRulesClient getVolumeQuotaRules() { + return this.volumeQuotaRules; + } + /** The VaultsClient object to access its operations. */ private final VaultsClient vaults; @@ -318,7 +329,7 @@ public SubvolumesClient getSubvolumes() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-10-01"; + this.apiVersion = "2022-01-01"; this.operations = new OperationsClientImpl(this); this.netAppResources = new NetAppResourcesClientImpl(this); this.netAppResourceQuotaLimits = new NetAppResourceQuotaLimitsClientImpl(this); @@ -330,6 +341,7 @@ public SubvolumesClient getSubvolumes() { this.backups = new BackupsClientImpl(this); this.accountBackups = new AccountBackupsClientImpl(this); this.backupPolicies = new BackupPoliciesClientImpl(this); + this.volumeQuotaRules = new VolumeQuotaRulesClientImpl(this); this.vaults = new VaultsClientImpl(this); this.volumeGroups = new VolumeGroupsClientImpl(this); this.subvolumes = new SubvolumesClientImpl(this); @@ -351,10 +363,7 @@ public Context getContext() { * @return the merged context. */ public Context mergeContext(Context context) { - for (Map.Entry entry : this.getContext().getValues().entrySet()) { - context = context.addData(entry.getKey(), entry.getValue()); - } - return context; + return CoreUtils.mergeContexts(this.getContext(), context); } /** @@ -418,7 +427,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -477,4 +486,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(NetAppManagementClientImpl.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsClientImpl.java index 6643fbc6327e..a1141ff8e3b7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient; import com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner; import com.azure.resourcemanager.netapp.models.SubscriptionQuotaItemList; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in NetAppResourceQuotaLimitsClient. */ public final class NetAppResourceQuotaLimitsClientImpl implements NetAppResourceQuotaLimitsClient { - private final ClientLogger logger = new ClientLogger(NetAppResourceQuotaLimitsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final NetAppResourceQuotaLimitsService service; @@ -342,15 +339,7 @@ private Mono> getWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String location, String quotaLimitName) { - return getWithResponseAsync(location, quotaLimitName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getWithResponseAsync(location, quotaLimitName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsImpl.java index 4ad68db430cb..0d7e1ca3a842 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner; import com.azure.resourcemanager.netapp.models.NetAppResourceQuotaLimits; import com.azure.resourcemanager.netapp.models.SubscriptionQuotaItem; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class NetAppResourceQuotaLimitsImpl implements NetAppResourceQuotaLimits { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetAppResourceQuotaLimitsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(NetAppResourceQuotaLimitsImpl.class); private final NetAppResourceQuotaLimitsClient innerClient; diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesClientImpl.java index 10d44b71f313..c370b6e3eb17 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesClientImpl.java @@ -22,7 +22,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient; import com.azure.resourcemanager.netapp.fluent.models.CheckAvailabilityResponseInner; import com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest; @@ -32,8 +31,6 @@ /** An instance of this class provides access to all the operations defined in NetAppResourcesClient. */ public final class NetAppResourcesClientImpl implements NetAppResourcesClient { - private final ClientLogger logger = new ClientLogger(NetAppResourcesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final NetAppResourcesService service; @@ -210,15 +207,7 @@ private Mono> checkNameAvailabilityWith @ServiceMethod(returns = ReturnType.SINGLE) private Mono checkNameAvailabilityAsync( String location, ResourceNameAvailabilityRequest body) { - return checkNameAvailabilityWithResponseAsync(location, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return checkNameAvailabilityWithResponseAsync(location, body).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -365,14 +354,7 @@ private Mono> checkFilePathAvailability private Mono checkFilePathAvailabilityAsync( String location, FilePathAvailabilityRequest body) { return checkFilePathAvailabilityWithResponseAsync(location, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -518,15 +500,7 @@ private Mono> checkQuotaAvailabilityWit @ServiceMethod(returns = ReturnType.SINGLE) private Mono checkQuotaAvailabilityAsync( String location, QuotaAvailabilityRequest body) { - return checkQuotaAvailabilityWithResponseAsync(location, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return checkQuotaAvailabilityWithResponseAsync(location, body).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesImpl.java index d8602db57aab..4c128e3f9081 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesImpl.java @@ -15,10 +15,9 @@ import com.azure.resourcemanager.netapp.models.NetAppResources; import com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest; import com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class NetAppResourcesImpl implements NetAppResources { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetAppResourcesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(NetAppResourcesImpl.class); private final NetAppResourcesClient innerClient; diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsClientImpl.java index 0a01ea388582..e7202a1809b4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsClientImpl.java @@ -24,7 +24,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.OperationsClient; import com.azure.resourcemanager.netapp.fluent.models.OperationInner; import com.azure.resourcemanager.netapp.models.OperationListResult; @@ -32,8 +31,6 @@ /** An instance of this class provides access to all the operations defined in OperationsClient. */ public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsService service; diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsImpl.java index 0701a4f76fed..dcc8a71d326b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.netapp.fluent.models.OperationInner; import com.azure.resourcemanager.netapp.models.Operation; import com.azure.resourcemanager.netapp.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); private final OperationsClient innerClient; diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsClientImpl.java index 06b5f1d1fbb1..344c700894eb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsClientImpl.java @@ -30,7 +30,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.netapp.fluent.PoolsClient; @@ -43,8 +42,6 @@ /** An instance of this class provides access to all the operations defined in PoolsClient. */ public final class PoolsClientImpl implements PoolsClient { - private final ClientLogger logger = new ClientLogger(PoolsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final PoolsService service; @@ -457,14 +454,7 @@ private Mono> getWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String accountName, String poolName) { return getWithResponseAsync(resourceGroupName, accountName, poolName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsImpl.java index 8052c1eff8d3..184fc6421d7b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner; import com.azure.resourcemanager.netapp.models.CapacityPool; import com.azure.resourcemanager.netapp.models.Pools; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class PoolsImpl implements Pools { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PoolsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(PoolsImpl.class); private final PoolsClient innerClient; @@ -72,7 +71,7 @@ public void delete(String resourceGroupName, String accountName, String poolName public CapacityPool getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -80,7 +79,7 @@ public CapacityPool getById(String id) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -88,7 +87,7 @@ public CapacityPool getById(String id) { } String poolName = Utils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); @@ -99,7 +98,7 @@ public CapacityPool getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -107,7 +106,7 @@ public Response getByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -115,7 +114,7 @@ public Response getByIdWithResponse(String id, Context context) { } String poolName = Utils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); @@ -126,7 +125,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -134,7 +133,7 @@ public void deleteById(String id) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -142,7 +141,7 @@ public void deleteById(String id) { } String poolName = Utils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); @@ -153,7 +152,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -161,7 +160,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -169,7 +168,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String poolName = Utils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationImpl.java new file mode 100644 index 000000000000..a541643c1e0e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.resourcemanager.netapp.fluent.models.ReplicationInner; +import com.azure.resourcemanager.netapp.models.EndpointType; +import com.azure.resourcemanager.netapp.models.Replication; +import com.azure.resourcemanager.netapp.models.ReplicationSchedule; + +public final class ReplicationImpl implements Replication { + private ReplicationInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + ReplicationImpl(ReplicationInner innerObject, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public EndpointType endpointType() { + return this.innerModel().endpointType(); + } + + public ReplicationSchedule replicationSchedule() { + return this.innerModel().replicationSchedule(); + } + + public String remoteVolumeResourceId() { + return this.innerModel().remoteVolumeResourceId(); + } + + public String remoteVolumeRegion() { + return this.innerModel().remoteVolumeRegion(); + } + + public ReplicationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesClientImpl.java index 922f4cd5f628..a0395b597c63 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesClientImpl.java @@ -30,7 +30,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient; @@ -44,8 +43,6 @@ /** An instance of this class provides access to all the operations defined in SnapshotPoliciesClient. */ public final class SnapshotPoliciesClientImpl implements SnapshotPoliciesClient { - private final ClientLogger logger = new ClientLogger(SnapshotPoliciesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final SnapshotPoliciesService service; @@ -451,14 +448,7 @@ private Mono> getWithResponseAsync( private Mono getAsync( String resourceGroupName, String accountName, String snapshotPolicyName) { return getWithResponseAsync(resourceGroupName, accountName, snapshotPolicyName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -635,14 +625,7 @@ private Mono> createWithResponseAsync( private Mono createAsync( String resourceGroupName, String accountName, String snapshotPolicyName, SnapshotPolicyInner body) { return createWithResponseAsync(resourceGroupName, accountName, snapshotPolicyName, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1367,14 +1350,7 @@ private Mono> listVolumesWithResponseAsy private Mono listVolumesAsync( String resourceGroupName, String accountName, String snapshotPolicyName) { return listVolumesWithResponseAsync(resourceGroupName, accountName, snapshotPolicyName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesImpl.java index 77390c932f2d..7850ef99f35b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesImpl.java @@ -15,10 +15,9 @@ import com.azure.resourcemanager.netapp.models.SnapshotPolicies; import com.azure.resourcemanager.netapp.models.SnapshotPolicy; import com.azure.resourcemanager.netapp.models.SnapshotPolicyVolumeList; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class SnapshotPoliciesImpl implements SnapshotPolicies { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotPoliciesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(SnapshotPoliciesImpl.class); private final SnapshotPoliciesClient innerClient; @@ -101,7 +100,7 @@ public Response listVolumesWithResponse( public SnapshotPolicy getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -109,7 +108,7 @@ public SnapshotPolicy getById(String id) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -117,7 +116,7 @@ public SnapshotPolicy getById(String id) { } String snapshotPolicyName = Utils.getValueFromIdByName(id, "snapshotPolicies"); if (snapshotPolicyName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -130,7 +129,7 @@ public SnapshotPolicy getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -138,7 +137,7 @@ public Response getByIdWithResponse(String id, Context context) } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -146,7 +145,7 @@ public Response getByIdWithResponse(String id, Context context) } String snapshotPolicyName = Utils.getValueFromIdByName(id, "snapshotPolicies"); if (snapshotPolicyName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -159,7 +158,7 @@ public Response getByIdWithResponse(String id, Context context) public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -167,7 +166,7 @@ public void deleteById(String id) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -175,7 +174,7 @@ public void deleteById(String id) { } String snapshotPolicyName = Utils.getValueFromIdByName(id, "snapshotPolicies"); if (snapshotPolicyName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -188,7 +187,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -196,7 +195,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -204,7 +203,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String snapshotPolicyName = Utils.getValueFromIdByName(id, "snapshotPolicies"); if (snapshotPolicyName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyImpl.java index 86f45c52ea66..3578341a9a79 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyImpl.java @@ -87,6 +87,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public SnapshotPolicyInner innerModel() { return this.innerObject; } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsClientImpl.java index 5c079c528b31..1632149dd3e9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.netapp.fluent.SnapshotsClient; @@ -44,8 +43,6 @@ /** An instance of this class provides access to all the operations defined in SnapshotsClient. */ public final class SnapshotsClientImpl implements SnapshotsClient { - private final ClientLogger logger = new ClientLogger(SnapshotsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final SnapshotsService service; @@ -527,14 +524,7 @@ private Mono> getWithResponseAsync( private Mono getAsync( String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName) { return getWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsImpl.java index f6c6c5b4b995..b7c632d42aef 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsImpl.java @@ -14,10 +14,9 @@ import com.azure.resourcemanager.netapp.models.Snapshot; import com.azure.resourcemanager.netapp.models.SnapshotRestoreFiles; import com.azure.resourcemanager.netapp.models.Snapshots; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class SnapshotsImpl implements Snapshots { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(SnapshotsImpl.class); private final SnapshotsClient innerClient; @@ -152,7 +151,7 @@ public void restoreFiles( public Snapshot getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -160,7 +159,7 @@ public Snapshot getById(String id) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -168,21 +167,21 @@ public Snapshot getById(String id) { } String poolName = Utils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } String volumeName = Utils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } String snapshotName = Utils.getValueFromIdByName(id, "snapshots"); if (snapshotName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); @@ -195,7 +194,7 @@ public Snapshot getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -203,7 +202,7 @@ public Response getByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -211,21 +210,21 @@ public Response getByIdWithResponse(String id, Context context) { } String poolName = Utils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } String volumeName = Utils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } String snapshotName = Utils.getValueFromIdByName(id, "snapshots"); if (snapshotName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); @@ -236,7 +235,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -244,7 +243,7 @@ public void deleteById(String id) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -252,21 +251,21 @@ public void deleteById(String id) { } String poolName = Utils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } String volumeName = Utils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } String snapshotName = Utils.getValueFromIdByName(id, "snapshots"); if (snapshotName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); @@ -277,7 +276,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -285,7 +284,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -293,21 +292,21 @@ public void deleteByIdWithResponse(String id, Context context) { } String poolName = Utils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } String volumeName = Utils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } String snapshotName = Utils.getValueFromIdByName(id, "snapshots"); if (snapshotName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubscriptionQuotaItemImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubscriptionQuotaItemImpl.java index 3960f0d4352b..9afda4725120 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubscriptionQuotaItemImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubscriptionQuotaItemImpl.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.netapp.implementation; -import com.azure.core.management.SystemData; import com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner; import com.azure.resourcemanager.netapp.models.SubscriptionQuotaItem; @@ -31,10 +30,6 @@ public String type() { return this.innerModel().type(); } - public SystemData systemData() { - return this.innerModel().systemData(); - } - public Integer current() { return this.innerModel().current(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumeInfoImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumeInfoImpl.java index f9dad412dda8..cd5e78e0d7ee 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumeInfoImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumeInfoImpl.java @@ -48,6 +48,10 @@ public String provisioningState() { return this.innerModel().provisioningState(); } + public String resourceGroupName() { + return resourceGroupName; + } + public SubvolumeInfoInner innerModel() { return this.innerObject; } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesClientImpl.java index 9f4fbb27103b..b76e72c95458 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.netapp.fluent.SubvolumesClient; @@ -45,8 +44,6 @@ /** An instance of this class provides access to all the operations defined in SubvolumesClient. */ public final class SubvolumesClientImpl implements SubvolumesClient { - private final ClientLogger logger = new ClientLogger(SubvolumesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final SubvolumesService service; @@ -551,14 +548,7 @@ private Mono> getWithResponseAsync( private Mono getAsync( String resourceGroupName, String accountName, String poolName, String volumeName, String subvolumeName) { return getWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, subvolumeName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesImpl.java index 80f3a9b01f21..d5ed31cd0d17 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesImpl.java @@ -15,10 +15,9 @@ import com.azure.resourcemanager.netapp.models.SubvolumeInfo; import com.azure.resourcemanager.netapp.models.SubvolumeModel; import com.azure.resourcemanager.netapp.models.Subvolumes; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class SubvolumesImpl implements Subvolumes { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SubvolumesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(SubvolumesImpl.class); private final SubvolumesClient innerClient; @@ -124,7 +123,7 @@ public SubvolumeModel getMetadata( public SubvolumeInfo getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -132,7 +131,7 @@ public SubvolumeInfo getById(String id) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -140,21 +139,21 @@ public SubvolumeInfo getById(String id) { } String poolName = Utils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } String volumeName = Utils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } String subvolumeName = Utils.getValueFromIdByName(id, "subvolumes"); if (subvolumeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'subvolumes'.", id))); @@ -167,7 +166,7 @@ public SubvolumeInfo getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -175,7 +174,7 @@ public Response getByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -183,21 +182,21 @@ public Response getByIdWithResponse(String id, Context context) { } String poolName = Utils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } String volumeName = Utils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } String subvolumeName = Utils.getValueFromIdByName(id, "subvolumes"); if (subvolumeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'subvolumes'.", id))); @@ -208,7 +207,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -216,7 +215,7 @@ public void deleteById(String id) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -224,21 +223,21 @@ public void deleteById(String id) { } String poolName = Utils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } String volumeName = Utils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } String subvolumeName = Utils.getValueFromIdByName(id, "subvolumes"); if (subvolumeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'subvolumes'.", id))); @@ -249,7 +248,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -257,7 +256,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -265,21 +264,21 @@ public void deleteByIdWithResponse(String id, Context context) { } String poolName = Utils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } String volumeName = Utils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } String subvolumeName = Utils.getValueFromIdByName(id, "subvolumes"); if (subvolumeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'subvolumes'.", id))); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VaultsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VaultsClientImpl.java index ac04c94e35d1..04e737ea465c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VaultsClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VaultsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.VaultsClient; import com.azure.resourcemanager.netapp.fluent.models.VaultInner; import com.azure.resourcemanager.netapp.models.VaultList; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in VaultsClient. */ public final class VaultsClientImpl implements VaultsClient { - private final ClientLogger logger = new ClientLogger(VaultsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final VaultsService service; diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VaultsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VaultsImpl.java index 30878336324b..0ef005530ea2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VaultsImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VaultsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.netapp.fluent.models.VaultInner; import com.azure.resourcemanager.netapp.models.Vault; import com.azure.resourcemanager.netapp.models.Vaults; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class VaultsImpl implements Vaults { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VaultsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(VaultsImpl.class); private final VaultsClient innerClient; diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupDetailsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupDetailsImpl.java index ec5b35b9e87a..ce232efb3fb5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupDetailsImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupDetailsImpl.java @@ -12,7 +12,6 @@ import com.azure.resourcemanager.netapp.models.VolumeGroupVolumeProperties; import java.util.Collections; import java.util.List; -import java.util.Map; public final class VolumeGroupDetailsImpl implements VolumeGroupDetails, VolumeGroupDetails.Definition { private VolumeGroupDetailsInner innerObject; @@ -41,15 +40,6 @@ public String type() { return this.innerModel().type(); } - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - public String provisioningState() { return this.innerModel().provisioningState(); } @@ -149,11 +139,6 @@ public VolumeGroupDetailsImpl withRegion(String location) { return this; } - public VolumeGroupDetailsImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; - } - public VolumeGroupDetailsImpl withGroupMetadata(VolumeGroupMetadata groupMetadata) { this.innerModel().withGroupMetadata(groupMetadata); return this; diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupImpl.java index ef47dc7481e4..76c2f576d89e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupImpl.java @@ -7,8 +7,6 @@ import com.azure.resourcemanager.netapp.fluent.models.VolumeGroupInner; import com.azure.resourcemanager.netapp.models.VolumeGroup; import com.azure.resourcemanager.netapp.models.VolumeGroupMetadata; -import java.util.Collections; -import java.util.Map; public final class VolumeGroupImpl implements VolumeGroup { private VolumeGroupInner innerObject; @@ -36,15 +34,6 @@ public String type() { return this.innerModel().type(); } - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - public String provisioningState() { return this.innerModel().provisioningState(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsClientImpl.java index 97775c00a0ce..ac1e1c105cec 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsClientImpl.java @@ -29,7 +29,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient; @@ -42,8 +41,6 @@ /** An instance of this class provides access to all the operations defined in VolumeGroupsClient. */ public final class VolumeGroupsClientImpl implements VolumeGroupsClient { - private final ClientLogger logger = new ClientLogger(VolumeGroupsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final VolumeGroupsService service; @@ -421,14 +418,7 @@ private Mono> getWithResponseAsync( private Mono getAsync( String resourceGroupName, String accountName, String volumeGroupName) { return getWithResponseAsync(resourceGroupName, accountName, volumeGroupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsImpl.java index 5dfbdeb34c1a..59cf36c16030 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsImpl.java @@ -15,10 +15,9 @@ import com.azure.resourcemanager.netapp.models.VolumeGroup; import com.azure.resourcemanager.netapp.models.VolumeGroupDetails; import com.azure.resourcemanager.netapp.models.VolumeGroups; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class VolumeGroupsImpl implements VolumeGroups { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeGroupsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(VolumeGroupsImpl.class); private final VolumeGroupsClient innerClient; @@ -78,7 +77,7 @@ public void delete(String resourceGroupName, String accountName, String volumeGr public VolumeGroupDetails getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -86,7 +85,7 @@ public VolumeGroupDetails getById(String id) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -94,7 +93,7 @@ public VolumeGroupDetails getById(String id) { } String volumeGroupName = Utils.getValueFromIdByName(id, "volumeGroups"); if (volumeGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); @@ -105,7 +104,7 @@ public VolumeGroupDetails getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -113,7 +112,7 @@ public Response getByIdWithResponse(String id, Context conte } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -121,7 +120,7 @@ public Response getByIdWithResponse(String id, Context conte } String volumeGroupName = Utils.getValueFromIdByName(id, "volumeGroups"); if (volumeGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); @@ -132,7 +131,7 @@ public Response getByIdWithResponse(String id, Context conte public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -140,7 +139,7 @@ public void deleteById(String id) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -148,7 +147,7 @@ public void deleteById(String id) { } String volumeGroupName = Utils.getValueFromIdByName(id, "volumeGroups"); if (volumeGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); @@ -159,7 +158,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -167,7 +166,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -175,7 +174,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String volumeGroupName = Utils.getValueFromIdByName(id, "volumeGroups"); if (volumeGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java index 7c385f26a452..868ddf96e608 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.netapp.implementation; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; @@ -13,9 +14,11 @@ import com.azure.resourcemanager.netapp.models.AvsDataStore; import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; import com.azure.resourcemanager.netapp.models.EnableSubvolumes; +import com.azure.resourcemanager.netapp.models.EncryptionKeySource; import com.azure.resourcemanager.netapp.models.NetworkFeatures; import com.azure.resourcemanager.netapp.models.PlacementKeyValuePairs; import com.azure.resourcemanager.netapp.models.PoolChangeRequest; +import com.azure.resourcemanager.netapp.models.Replication; import com.azure.resourcemanager.netapp.models.SecurityStyle; import com.azure.resourcemanager.netapp.models.ServiceLevel; import com.azure.resourcemanager.netapp.models.Volume; @@ -64,6 +67,15 @@ public String etag() { return this.innerModel().etag(); } + public List zones() { + List inner = this.innerModel().zones(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -174,7 +186,7 @@ public Float throughputMibps() { return this.innerModel().throughputMibps(); } - public String encryptionKeySource() { + public EncryptionKeySource encryptionKeySource() { return this.innerModel().encryptionKeySource(); } @@ -238,6 +250,10 @@ public String volumeSpecName() { return this.innerModel().volumeSpecName(); } + public Boolean encrypted() { + return this.innerModel().encrypted(); + } + public List placementRules() { List inner = this.innerModel().placementRules(); if (inner != null) { @@ -259,6 +275,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public VolumeInner innerModel() { return this.innerObject; } @@ -368,6 +388,14 @@ public void revert(VolumeRevert body, Context context) { serviceManager.volumes().revert(resourceGroupName, accountName, poolName, volumeName, body, context); } + public void resetCifsPassword() { + serviceManager.volumes().resetCifsPassword(resourceGroupName, accountName, poolName, volumeName); + } + + public void resetCifsPassword(Context context) { + serviceManager.volumes().resetCifsPassword(resourceGroupName, accountName, poolName, volumeName, context); + } + public void breakReplication(BreakReplicationRequest body) { serviceManager.volumes().breakReplication(resourceGroupName, accountName, poolName, volumeName, body); } @@ -380,6 +408,14 @@ public void breakReplication(BreakReplicationRequest body, Context context) { serviceManager.volumes().breakReplication(resourceGroupName, accountName, poolName, volumeName, body, context); } + public PagedIterable listReplications() { + return serviceManager.volumes().listReplications(resourceGroupName, accountName, poolName, volumeName); + } + + public PagedIterable listReplications(Context context) { + return serviceManager.volumes().listReplications(resourceGroupName, accountName, poolName, volumeName, context); + } + public void resyncReplication() { serviceManager.volumes().resyncReplication(resourceGroupName, accountName, poolName, volumeName); } @@ -422,6 +458,30 @@ public void poolChange(PoolChangeRequest body, Context context) { serviceManager.volumes().poolChange(resourceGroupName, accountName, poolName, volumeName, body, context); } + public void relocate() { + serviceManager.volumes().relocate(resourceGroupName, accountName, poolName, volumeName); + } + + public void relocate(Context context) { + serviceManager.volumes().relocate(resourceGroupName, accountName, poolName, volumeName, context); + } + + public void finalizeRelocation() { + serviceManager.volumes().finalizeRelocation(resourceGroupName, accountName, poolName, volumeName); + } + + public void finalizeRelocation(Context context) { + serviceManager.volumes().finalizeRelocation(resourceGroupName, accountName, poolName, volumeName, context); + } + + public void revertRelocation() { + serviceManager.volumes().revertRelocation(resourceGroupName, accountName, poolName, volumeName); + } + + public void revertRelocation(Context context) { + serviceManager.volumes().revertRelocation(resourceGroupName, accountName, poolName, volumeName, context); + } + public VolumeImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -457,6 +517,11 @@ public VolumeImpl withTags(Map tags) { } } + public VolumeImpl withZones(List zones) { + this.innerModel().withZones(zones); + return this; + } + public VolumeImpl withServiceLevel(ServiceLevel serviceLevel) { if (isInCreateMode()) { this.innerModel().withServiceLevel(serviceLevel); @@ -542,7 +607,7 @@ public VolumeImpl withThroughputMibps(Float throughputMibps) { } } - public VolumeImpl withEncryptionKeySource(String encryptionKeySource) { + public VolumeImpl withEncryptionKeySource(EncryptionKeySource encryptionKeySource) { this.innerModel().withEncryptionKeySource(encryptionKeySource); return this; } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRuleImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRuleImpl.java new file mode 100644 index 000000000000..ed85ea96a7c7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRuleImpl.java @@ -0,0 +1,247 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRuleInner; +import com.azure.resourcemanager.netapp.models.ProvisioningState; +import com.azure.resourcemanager.netapp.models.Type; +import com.azure.resourcemanager.netapp.models.VolumeQuotaRule; +import com.azure.resourcemanager.netapp.models.VolumeQuotaRulePatch; +import java.util.Collections; +import java.util.Map; + +public final class VolumeQuotaRuleImpl implements VolumeQuotaRule, VolumeQuotaRule.Definition, VolumeQuotaRule.Update { + private VolumeQuotaRuleInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager 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 SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public Long quotaSizeInKiBs() { + return this.innerModel().quotaSizeInKiBs(); + } + + public Type quotaType() { + return this.innerModel().quotaType(); + } + + public String quotaTarget() { + return this.innerModel().quotaTarget(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public VolumeQuotaRuleInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String poolName; + + private String volumeName; + + private String volumeQuotaRuleName; + + private VolumeQuotaRulePatch updateBody; + + public VolumeQuotaRuleImpl withExistingVolume( + String resourceGroupName, String accountName, String poolName, String volumeName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + this.poolName = poolName; + this.volumeName = volumeName; + return this; + } + + public VolumeQuotaRule create() { + this.innerObject = + serviceManager + .serviceClient() + .getVolumeQuotaRules() + .create( + resourceGroupName, + accountName, + poolName, + volumeName, + volumeQuotaRuleName, + this.innerModel(), + Context.NONE); + return this; + } + + public VolumeQuotaRule create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getVolumeQuotaRules() + .create( + resourceGroupName, + accountName, + poolName, + volumeName, + volumeQuotaRuleName, + this.innerModel(), + context); + return this; + } + + VolumeQuotaRuleImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new VolumeQuotaRuleInner(); + this.serviceManager = serviceManager; + this.volumeQuotaRuleName = name; + } + + public VolumeQuotaRuleImpl update() { + this.updateBody = new VolumeQuotaRulePatch(); + return this; + } + + public VolumeQuotaRule apply() { + this.innerObject = + serviceManager + .serviceClient() + .getVolumeQuotaRules() + .update( + resourceGroupName, + accountName, + poolName, + volumeName, + volumeQuotaRuleName, + updateBody, + Context.NONE); + return this; + } + + public VolumeQuotaRule apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getVolumeQuotaRules() + .update(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, updateBody, context); + return this; + } + + VolumeQuotaRuleImpl( + VolumeQuotaRuleInner innerObject, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = Utils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); + this.poolName = Utils.getValueFromIdByName(innerObject.id(), "capacityPools"); + this.volumeName = Utils.getValueFromIdByName(innerObject.id(), "volumes"); + this.volumeQuotaRuleName = Utils.getValueFromIdByName(innerObject.id(), "volumeQuotaRules"); + } + + public VolumeQuotaRule refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getVolumeQuotaRules() + .getWithResponse( + resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, Context.NONE) + .getValue(); + return this; + } + + public VolumeQuotaRule refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getVolumeQuotaRules() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, context) + .getValue(); + return this; + } + + public VolumeQuotaRuleImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public VolumeQuotaRuleImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public VolumeQuotaRuleImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public VolumeQuotaRuleImpl withQuotaSizeInKiBs(Long quotaSizeInKiBs) { + if (isInCreateMode()) { + this.innerModel().withQuotaSizeInKiBs(quotaSizeInKiBs); + return this; + } else { + this.updateBody.withQuotaSizeInKiBs(quotaSizeInKiBs); + return this; + } + } + + public VolumeQuotaRuleImpl withQuotaType(Type quotaType) { + this.innerModel().withQuotaType(quotaType); + return this; + } + + public VolumeQuotaRuleImpl withQuotaTarget(String quotaTarget) { + this.innerModel().withQuotaTarget(quotaTarget); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesClientImpl.java new file mode 100644 index 000000000000..c797f388165e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesClientImpl.java @@ -0,0 +1,1641 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.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.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.netapp.fluent.VolumeQuotaRulesClient; +import com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRuleInner; +import com.azure.resourcemanager.netapp.models.VolumeQuotaRulePatch; +import com.azure.resourcemanager.netapp.models.VolumeQuotaRulesList; +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 VolumeQuotaRulesClient. */ +public final class VolumeQuotaRulesClientImpl implements VolumeQuotaRulesClient { + /** The proxy service used to perform REST calls. */ + private final VolumeQuotaRulesService service; + + /** The service client containing this operation class. */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of VolumeQuotaRulesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + VolumeQuotaRulesClientImpl(NetAppManagementClientImpl client) { + this.service = + RestProxy.create(VolumeQuotaRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientVolumeQuotaRules to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "NetAppManagementClie") + private interface VolumeQuotaRulesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" + + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByVolume( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, + @PathParam("volumeName") String volumeName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" + + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules" + + "/{volumeQuotaRuleName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, + @PathParam("volumeName") String volumeName, + @PathParam("volumeQuotaRuleName") String volumeQuotaRuleName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" + + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules" + + "/{volumeQuotaRuleName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, + @PathParam("volumeName") String volumeName, + @PathParam("volumeQuotaRuleName") String volumeQuotaRuleName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") VolumeQuotaRuleInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" + + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules" + + "/{volumeQuotaRuleName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, + @PathParam("volumeName") String volumeName, + @PathParam("volumeQuotaRuleName") String volumeQuotaRuleName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") VolumeQuotaRulePatch body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" + + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules" + + "/{volumeQuotaRuleName}") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, + @PathParam("volumeName") String volumeName, + @PathParam("volumeQuotaRuleName") String volumeQuotaRuleName, + @QueryParam("api-version") String apiVersion, + Context context); + } + + /** + * List all quota rules associated with the volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 Volume Quota Rules along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByVolumeSinglePageAsync( + String resourceGroupName, String accountName, String poolName, String volumeName) { + 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 (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByVolume( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + poolName, + volumeName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all quota rules associated with the volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 Volume Quota Rules along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByVolumeSinglePageAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, 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 (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByVolume( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + poolName, + volumeName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + } + + /** + * List all quota rules associated with the volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 Volume Quota Rules as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByVolumeAsync( + String resourceGroupName, String accountName, String poolName, String volumeName) { + return new PagedFlux<>(() -> listByVolumeSinglePageAsync(resourceGroupName, accountName, poolName, volumeName)); + } + + /** + * List all quota rules associated with the volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 Volume Quota Rules as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByVolumeAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + return new PagedFlux<>( + () -> listByVolumeSinglePageAsync(resourceGroupName, accountName, poolName, volumeName, context)); + } + + /** + * List all quota rules associated with the volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 Volume Quota Rules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByVolume( + String resourceGroupName, String accountName, String poolName, String volumeName) { + return new PagedIterable<>(listByVolumeAsync(resourceGroupName, accountName, poolName, volumeName)); + } + + /** + * List all quota rules associated with the volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 Volume Quota Rules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByVolume( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + return new PagedIterable<>(listByVolumeAsync(resourceGroupName, accountName, poolName, volumeName, context)); + } + + /** + * Get details of the specified quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified quota rule along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, String volumeQuotaRuleName) { + 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 (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (volumeQuotaRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter volumeQuotaRuleName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + poolName, + volumeName, + volumeQuotaRuleName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get details of the specified quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified quota rule along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + 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 (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (volumeQuotaRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter volumeQuotaRuleName 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, + accountName, + poolName, + volumeName, + volumeQuotaRuleName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get details of the specified quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified quota rule on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, String volumeQuotaRuleName) { + return getWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get details of the specified quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified quota rule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VolumeQuotaRuleInner get( + String resourceGroupName, String accountName, String poolName, String volumeName, String volumeQuotaRuleName) { + return getAsync(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName).block(); + } + + /** + * Get details of the specified quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified quota rule along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + Context context) { + return getWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, context) + .block(); + } + + /** + * Create the specified quota rule within the given volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRuleInner 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 (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (volumeQuotaRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter volumeQuotaRuleName 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 + .create( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + poolName, + volumeName, + volumeQuotaRuleName, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create the specified quota rule within the given volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRuleInner 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 (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (volumeQuotaRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter volumeQuotaRuleName 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 + .create( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + poolName, + volumeName, + volumeQuotaRuleName, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create the specified quota rule within the given volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VolumeQuotaRuleInner> beginCreateAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRuleInner body) { + Mono>> mono = + createWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + VolumeQuotaRuleInner.class, + VolumeQuotaRuleInner.class, + this.client.getContext()); + } + + /** + * Create the specified quota rule within the given volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VolumeQuotaRuleInner> beginCreateAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRuleInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createWithResponseAsync( + resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), VolumeQuotaRuleInner.class, VolumeQuotaRuleInner.class, context); + } + + /** + * Create the specified quota rule within the given volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VolumeQuotaRuleInner> beginCreate( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRuleInner body) { + return beginCreateAsync(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, body) + .getSyncPoller(); + } + + /** + * Create the specified quota rule within the given volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VolumeQuotaRuleInner> beginCreate( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRuleInner body, + Context context) { + return beginCreateAsync( + resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, body, context) + .getSyncPoller(); + } + + /** + * Create the specified quota rule within the given volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRuleInner body) { + return beginCreateAsync(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create the specified quota rule within the given volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRuleInner body, + Context context) { + return beginCreateAsync( + resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create the specified quota rule within the given volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VolumeQuotaRuleInner create( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRuleInner body) { + return createAsync(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, body).block(); + } + + /** + * Create the specified quota rule within the given volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VolumeQuotaRuleInner create( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRuleInner body, + Context context) { + return createAsync(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, body, context) + .block(); + } + + /** + * Patch a quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRulePatch 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 (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (volumeQuotaRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter volumeQuotaRuleName 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, + accountName, + poolName, + volumeName, + volumeQuotaRuleName, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch a quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRulePatch 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 (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (volumeQuotaRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter volumeQuotaRuleName 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, + accountName, + poolName, + volumeName, + volumeQuotaRuleName, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Patch a quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VolumeQuotaRuleInner> beginUpdateAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRulePatch body) { + Mono>> mono = + updateWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + VolumeQuotaRuleInner.class, + VolumeQuotaRuleInner.class, + this.client.getContext()); + } + + /** + * Patch a quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VolumeQuotaRuleInner> beginUpdateAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRulePatch body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync( + resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), VolumeQuotaRuleInner.class, VolumeQuotaRuleInner.class, context); + } + + /** + * Patch a quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VolumeQuotaRuleInner> beginUpdate( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRulePatch body) { + return beginUpdateAsync(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, body) + .getSyncPoller(); + } + + /** + * Patch a quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VolumeQuotaRuleInner> beginUpdate( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRulePatch body, + Context context) { + return beginUpdateAsync( + resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, body, context) + .getSyncPoller(); + } + + /** + * Patch a quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRulePatch body) { + return beginUpdateAsync(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch a quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRulePatch body, + Context context) { + return beginUpdateAsync( + resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch a quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VolumeQuotaRuleInner update( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRulePatch body) { + return updateAsync(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, body).block(); + } + + /** + * Patch a quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param body Quota rule object supplied in the body of the 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 quota Rule of a Volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VolumeQuotaRuleInner update( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + VolumeQuotaRulePatch body, + Context context) { + return updateAsync(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, body, context) + .block(); + } + + /** + * Delete quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @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 accountName, String poolName, String volumeName, String volumeQuotaRuleName) { + 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 (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (volumeQuotaRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter volumeQuotaRuleName is required and cannot be null.")); + } + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + poolName, + volumeName, + volumeQuotaRuleName, + this.client.getApiVersion(), + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @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 accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + 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 (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (volumeQuotaRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter volumeQuotaRuleName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + poolName, + volumeName, + volumeQuotaRuleName, + this.client.getApiVersion(), + context); + } + + /** + * Delete quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @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 accountName, String poolName, String volumeName, String volumeQuotaRuleName) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @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 accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @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 accountName, String poolName, String volumeName, String volumeQuotaRuleName) { + return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName) + .getSyncPoller(); + } + + /** + * Delete quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @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 accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + Context context) { + return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, context) + .getSyncPoller(); + } + + /** + * Delete quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @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 accountName, String poolName, String volumeName, String volumeQuotaRuleName) { + return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @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 accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + Context context) { + return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @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 accountName, String poolName, String volumeName, String volumeQuotaRuleName) { + deleteAsync(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName).block(); + } + + /** + * Delete quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @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 accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + Context context) { + deleteAsync(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, context).block(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesImpl.java new file mode 100644 index 000000000000..a529136f59e0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesImpl.java @@ -0,0 +1,277 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.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.netapp.fluent.VolumeQuotaRulesClient; +import com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRuleInner; +import com.azure.resourcemanager.netapp.models.VolumeQuotaRule; +import com.azure.resourcemanager.netapp.models.VolumeQuotaRules; + +public final class VolumeQuotaRulesImpl implements VolumeQuotaRules { + private static final ClientLogger LOGGER = new ClientLogger(VolumeQuotaRulesImpl.class); + + private final VolumeQuotaRulesClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public VolumeQuotaRulesImpl( + VolumeQuotaRulesClient innerClient, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByVolume( + String resourceGroupName, String accountName, String poolName, String volumeName) { + PagedIterable inner = + this.serviceClient().listByVolume(resourceGroupName, accountName, poolName, volumeName); + return Utils.mapPage(inner, inner1 -> new VolumeQuotaRuleImpl(inner1, this.manager())); + } + + public PagedIterable listByVolume( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + PagedIterable inner = + this.serviceClient().listByVolume(resourceGroupName, accountName, poolName, volumeName, context); + return Utils.mapPage(inner, inner1 -> new VolumeQuotaRuleImpl(inner1, this.manager())); + } + + public VolumeQuotaRule get( + String resourceGroupName, String accountName, String poolName, String volumeName, String volumeQuotaRuleName) { + VolumeQuotaRuleInner inner = + this.serviceClient().get(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName); + if (inner != null) { + return new VolumeQuotaRuleImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + Context context) { + Response inner = + this + .serviceClient() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new VolumeQuotaRuleImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void delete( + String resourceGroupName, String accountName, String poolName, String volumeName, String volumeQuotaRuleName) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName); + } + + public void delete( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + Context context) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, context); + } + + public VolumeQuotaRule getById(String id) { + String resourceGroupName = Utils.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 accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + if (accountName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); + } + String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + if (poolName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); + } + String volumeName = Utils.getValueFromIdByName(id, "volumes"); + if (volumeName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); + } + String volumeQuotaRuleName = Utils.getValueFromIdByName(id, "volumeQuotaRules"); + if (volumeQuotaRuleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'volumeQuotaRules'.", id))); + } + return this + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.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 accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + if (accountName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); + } + String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + if (poolName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); + } + String volumeName = Utils.getValueFromIdByName(id, "volumes"); + if (volumeName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); + } + String volumeQuotaRuleName = Utils.getValueFromIdByName(id, "volumeQuotaRules"); + if (volumeQuotaRuleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'volumeQuotaRules'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.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 accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + if (accountName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); + } + String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + if (poolName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); + } + String volumeName = Utils.getValueFromIdByName(id, "volumes"); + if (volumeName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); + } + String volumeQuotaRuleName = Utils.getValueFromIdByName(id, "volumeQuotaRules"); + if (volumeQuotaRuleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'volumeQuotaRules'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.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 accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + if (accountName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); + } + String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + if (poolName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); + } + String volumeName = Utils.getValueFromIdByName(id, "volumes"); + if (volumeName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); + } + String volumeQuotaRuleName = Utils.getValueFromIdByName(id, "volumeQuotaRules"); + if (volumeQuotaRuleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'volumeQuotaRules'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, context); + } + + private VolumeQuotaRulesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public VolumeQuotaRuleImpl define(String name) { + return new VolumeQuotaRuleImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java index e82effdb435b..3927c8632f0f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java @@ -31,14 +31,15 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.netapp.fluent.VolumesClient; +import com.azure.resourcemanager.netapp.fluent.models.ReplicationInner; import com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner; import com.azure.resourcemanager.netapp.fluent.models.VolumeInner; import com.azure.resourcemanager.netapp.models.AuthorizeRequest; import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; +import com.azure.resourcemanager.netapp.models.ListReplications; import com.azure.resourcemanager.netapp.models.PoolChangeRequest; import com.azure.resourcemanager.netapp.models.VolumeList; import com.azure.resourcemanager.netapp.models.VolumePatch; @@ -49,8 +50,6 @@ /** An instance of this class provides access to all the operations defined in VolumesClient. */ public final class VolumesClientImpl implements VolumesClient { - private final ClientLogger logger = new ClientLogger(VolumesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final VolumesService service; @@ -177,6 +176,22 @@ Mono>> revert( @BodyParam("application/json") VolumeRevert body, Context context); + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" + + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/resetCifsPassword") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resetCifsPassword( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, + @PathParam("volumeName") String volumeName, + @QueryParam("api-version") String apiVersion, + Context context); + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" @@ -211,6 +226,23 @@ Mono> replicationStatus( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" + + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/listReplications") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listReplications( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, + @PathParam("volumeName") String volumeName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" @@ -293,6 +325,54 @@ Mono>> poolChange( @BodyParam("application/json") PoolChangeRequest body, Context context); + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" + + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/relocate") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> relocate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, + @PathParam("volumeName") String volumeName, + @QueryParam("api-version") String apiVersion, + Context context); + + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" + + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/finalizeRelocation") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> finalizeRelocation( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, + @PathParam("volumeName") String volumeName, + @QueryParam("api-version") String apiVersion, + Context context); + + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" + + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/revertRelocation") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> revertRelocation( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, + @PathParam("volumeName") String volumeName, + @QueryParam("api-version") String apiVersion, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -628,14 +708,7 @@ private Mono> getWithResponseAsync( private Mono getAsync( String resourceGroupName, String accountName, String poolName, String volumeName) { return getWithResponseAsync(resourceGroupName, accountName, poolName, volumeName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1996,25 +2069,20 @@ public void revert( } /** - * Break the replication connection on the destination volume. + * Reset cifs password from volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. * @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>> breakReplicationWithResponseAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - BreakReplicationRequest body) { + private Mono>> resetCifsPasswordWithResponseAsync( + String resourceGroupName, String accountName, String poolName, String volumeName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -2040,14 +2108,11 @@ private Mono>> breakReplicationWithResponseAsync( if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); } - if (body != null) { - body.validate(); - } return FluxUtil .withContext( context -> service - .breakReplication( + .resetCifsPassword( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -2055,19 +2120,17 @@ private Mono>> breakReplicationWithResponseAsync( poolName, volumeName, this.client.getApiVersion(), - body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Break the replication connection on the destination volume. + * Reset cifs password from volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. * @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. @@ -2075,13 +2138,8 @@ private Mono>> breakReplicationWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> breakReplicationWithResponseAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - BreakReplicationRequest body, - Context context) { + private Mono>> resetCifsPasswordWithResponseAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -2107,12 +2165,9 @@ private Mono>> breakReplicationWithResponseAsync( if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); } - if (body != null) { - body.validate(); - } context = this.client.mergeContext(context); return service - .breakReplication( + .resetCifsPassword( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -2120,32 +2175,26 @@ private Mono>> breakReplicationWithResponseAsync( poolName, volumeName, this.client.getApiVersion(), - body, context); } /** - * Break the replication connection on the destination volume. + * Reset cifs password from volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. * @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> beginBreakReplicationAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - BreakReplicationRequest body) { + private PollerFlux, Void> beginResetCifsPasswordAsync( + String resourceGroupName, String accountName, String poolName, String volumeName) { Mono>> mono = - breakReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); + resetCifsPasswordWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); return this .client .getLroResult( @@ -2153,13 +2202,12 @@ private PollerFlux, Void> beginBreakReplicationAsync( } /** - * Break the replication connection on the destination volume. + * Reset cifs password from volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. * @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. @@ -2167,52 +2215,41 @@ private PollerFlux, Void> beginBreakReplicationAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginBreakReplicationAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - BreakReplicationRequest body, - Context context) { + private PollerFlux, Void> beginResetCifsPasswordAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { context = this.client.mergeContext(context); Mono>> mono = - breakReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body, context); + resetCifsPasswordWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context); return this .client .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Break the replication connection on the destination volume. + * Reset cifs password from volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. * @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> beginBreakReplication( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - BreakReplicationRequest body) { - return beginBreakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body).getSyncPoller(); + public SyncPoller, Void> beginResetCifsPassword( + String resourceGroupName, String accountName, String poolName, String volumeName) { + return beginResetCifsPasswordAsync(resourceGroupName, accountName, poolName, volumeName).getSyncPoller(); } /** - * Break the replication connection on the destination volume. + * Reset cifs password from volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. * @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. @@ -2220,44 +2257,14 @@ public SyncPoller, Void> beginBreakReplication( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginBreakReplication( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - BreakReplicationRequest body, - Context context) { - return beginBreakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context) + public SyncPoller, Void> beginResetCifsPassword( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + return beginResetCifsPasswordAsync(resourceGroupName, accountName, poolName, volumeName, context) .getSyncPoller(); } /** - * Break the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. - * @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 breakReplicationAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - BreakReplicationRequest body) { - return beginBreakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Break the replication connection on the destination volume. + * Reset cifs password from volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. @@ -2269,22 +2276,20 @@ private Mono breakReplicationAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono breakReplicationAsync( + private Mono resetCifsPasswordAsync( String resourceGroupName, String accountName, String poolName, String volumeName) { - final BreakReplicationRequest body = null; - return beginBreakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body) + return beginResetCifsPasswordAsync(resourceGroupName, accountName, poolName, volumeName) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Break the replication connection on the destination volume. + * Reset cifs password from volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. * @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. @@ -2292,55 +2297,45 @@ private Mono breakReplicationAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono breakReplicationAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - BreakReplicationRequest body, - Context context) { - return beginBreakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context) + private Mono resetCifsPasswordAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + return beginResetCifsPasswordAsync(resourceGroupName, accountName, poolName, volumeName, context) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Break the replication connection on the destination volume. + * Reset cifs password from volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. * @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 breakReplication( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - BreakReplicationRequest body) { - breakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); + public void resetCifsPassword(String resourceGroupName, String accountName, String poolName, String volumeName) { + resetCifsPasswordAsync(resourceGroupName, accountName, poolName, volumeName).block(); } /** - * Break the replication connection on the destination volume. + * Reset cifs password from volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. + * @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 breakReplication(String resourceGroupName, String accountName, String poolName, String volumeName) { - final BreakReplicationRequest body = null; - breakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); + public void resetCifsPassword( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + resetCifsPasswordAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); } /** @@ -2351,37 +2346,18 @@ public void breakReplication(String resourceGroupName, String accountName, Strin * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. * @param body Optional body to force break the replication. - * @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) - public void breakReplication( + private Mono>> breakReplicationWithResponseAsync( String resourceGroupName, String accountName, String poolName, String volumeName, - BreakReplicationRequest body, - Context context) { - breakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context).block(); - } - - /** - * Get the status of the replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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 status of the replication along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> replicationStatusWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { + BreakReplicationRequest body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -2407,12 +2383,14 @@ private Mono> replicationStatusWithResponseAsyn if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); } - final String accept = "application/json"; + if (body != null) { + body.validate(); + } return FluxUtil .withContext( context -> service - .replicationStatus( + .breakReplication( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -2420,27 +2398,33 @@ private Mono> replicationStatusWithResponseAsyn poolName, volumeName, this.client.getApiVersion(), - accept, + body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get the status of the replication. + * Break the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. + * @param body Optional body to force break the replication. * @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 status of the replication along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> replicationStatusWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + private Mono>> breakReplicationWithResponseAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + BreakReplicationRequest body, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -2466,10 +2450,12 @@ private Mono> replicationStatusWithResponseAsyn if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); } - final String accept = "application/json"; + if (body != null) { + body.validate(); + } context = this.client.mergeContext(context); return service - .replicationStatus( + .breakReplication( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -2477,12 +2463,369 @@ private Mono> replicationStatusWithResponseAsyn poolName, volumeName, this.client.getApiVersion(), - accept, + body, context); } /** - * Get the status of the replication. + * Break the replication connection on the destination volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param body Optional body to force break the replication. + * @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> beginBreakReplicationAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + BreakReplicationRequest body) { + Mono>> mono = + breakReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Break the replication connection on the destination volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param body Optional body to force break the replication. + * @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> beginBreakReplicationAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + BreakReplicationRequest body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + breakReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Break the replication connection on the destination volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param body Optional body to force break the replication. + * @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> beginBreakReplication( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + BreakReplicationRequest body) { + return beginBreakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body).getSyncPoller(); + } + + /** + * Break the replication connection on the destination volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param body Optional body to force break the replication. + * @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> beginBreakReplication( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + BreakReplicationRequest body, + Context context) { + return beginBreakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context) + .getSyncPoller(); + } + + /** + * Break the replication connection on the destination volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param body Optional body to force break the replication. + * @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 breakReplicationAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + BreakReplicationRequest body) { + return beginBreakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Break the replication connection on the destination volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 breakReplicationAsync( + String resourceGroupName, String accountName, String poolName, String volumeName) { + final BreakReplicationRequest body = null; + return beginBreakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Break the replication connection on the destination volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param body Optional body to force break the replication. + * @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 breakReplicationAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + BreakReplicationRequest body, + Context context) { + return beginBreakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Break the replication connection on the destination volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param body Optional body to force break the replication. + * @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 breakReplication( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + BreakReplicationRequest body) { + breakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); + } + + /** + * Break the replication connection on the destination volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 breakReplication(String resourceGroupName, String accountName, String poolName, String volumeName) { + final BreakReplicationRequest body = null; + breakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); + } + + /** + * Break the replication connection on the destination volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param body Optional body to force break the replication. + * @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 breakReplication( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + BreakReplicationRequest body, + Context context) { + breakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context).block(); + } + + /** + * Get the status of the replication. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 status of the replication along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> replicationStatusWithResponseAsync( + String resourceGroupName, String accountName, String poolName, String volumeName) { + 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 (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .replicationStatus( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + poolName, + volumeName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the status of the replication. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 status of the replication along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> replicationStatusWithResponseAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, 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 (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .replicationStatus( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + poolName, + volumeName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get the status of the replication. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. @@ -2494,60 +2837,1120 @@ private Mono> replicationStatusWithResponseAsyn * @return the status of the replication on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono replicationStatusAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { - return replicationStatusWithResponseAsync(resourceGroupName, accountName, poolName, volumeName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + private Mono replicationStatusAsync( + String resourceGroupName, String accountName, String poolName, String volumeName) { + return replicationStatusWithResponseAsync(resourceGroupName, accountName, poolName, volumeName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the status of the replication. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 status of the replication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ReplicationStatusInner replicationStatus( + String resourceGroupName, String accountName, String poolName, String volumeName) { + return replicationStatusAsync(resourceGroupName, accountName, poolName, volumeName).block(); + } + + /** + * Get the status of the replication. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 status of the replication along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response replicationStatusWithResponse( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + return replicationStatusWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context) + .block(); + } + + /** + * List all replications for a specified volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 Replications along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listReplicationsSinglePageAsync( + String resourceGroupName, String accountName, String poolName, String volumeName) { + 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 (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listReplications( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + poolName, + volumeName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all replications for a specified volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 Replications along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listReplicationsSinglePageAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, 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 (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listReplications( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + poolName, + volumeName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + } + + /** + * List all replications for a specified volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 Replications as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listReplicationsAsync( + String resourceGroupName, String accountName, String poolName, String volumeName) { + return new PagedFlux<>( + () -> listReplicationsSinglePageAsync(resourceGroupName, accountName, poolName, volumeName)); + } + + /** + * List all replications for a specified volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 Replications as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listReplicationsAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + return new PagedFlux<>( + () -> listReplicationsSinglePageAsync(resourceGroupName, accountName, poolName, volumeName, context)); + } + + /** + * List all replications for a specified volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 Replications as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listReplications( + String resourceGroupName, String accountName, String poolName, String volumeName) { + return new PagedIterable<>(listReplicationsAsync(resourceGroupName, accountName, poolName, volumeName)); + } + + /** + * List all replications for a specified volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 Replications as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listReplications( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + return new PagedIterable<>( + listReplicationsAsync(resourceGroupName, accountName, poolName, volumeName, context)); + } + + /** + * Resync the connection on the destination volume. If the operation is ran on the source volume it will + * reverse-resync the connection and sync from destination to source. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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>> resyncReplicationWithResponseAsync( + String resourceGroupName, String accountName, String poolName, String volumeName) { + 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 (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + return FluxUtil + .withContext( + context -> + service + .resyncReplication( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + poolName, + volumeName, + this.client.getApiVersion(), + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Resync the connection on the destination volume. If the operation is ran on the source volume it will + * reverse-resync the connection and sync from destination to source. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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>> resyncReplicationWithResponseAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, 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 (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .resyncReplication( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + poolName, + volumeName, + this.client.getApiVersion(), + context); + } + + /** + * Resync the connection on the destination volume. If the operation is ran on the source volume it will + * reverse-resync the connection and sync from destination to source. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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> beginResyncReplicationAsync( + String resourceGroupName, String accountName, String poolName, String volumeName) { + Mono>> mono = + resyncReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Resync the connection on the destination volume. If the operation is ran on the source volume it will + * reverse-resync the connection and sync from destination to source. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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> beginResyncReplicationAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + resyncReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Resync the connection on the destination volume. If the operation is ran on the source volume it will + * reverse-resync the connection and sync from destination to source. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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> beginResyncReplication( + String resourceGroupName, String accountName, String poolName, String volumeName) { + return beginResyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName).getSyncPoller(); + } + + /** + * Resync the connection on the destination volume. If the operation is ran on the source volume it will + * reverse-resync the connection and sync from destination to source. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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> beginResyncReplication( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + return beginResyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) + .getSyncPoller(); + } + + /** + * Resync the connection on the destination volume. If the operation is ran on the source volume it will + * reverse-resync the connection and sync from destination to source. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 resyncReplicationAsync( + String resourceGroupName, String accountName, String poolName, String volumeName) { + return beginResyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Resync the connection on the destination volume. If the operation is ran on the source volume it will + * reverse-resync the connection and sync from destination to source. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 resyncReplicationAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + return beginResyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Resync the connection on the destination volume. If the operation is ran on the source volume it will + * reverse-resync the connection and sync from destination to source. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 resyncReplication(String resourceGroupName, String accountName, String poolName, String volumeName) { + resyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName).block(); + } + + /** + * Resync the connection on the destination volume. If the operation is ran on the source volume it will + * reverse-resync the connection and sync from destination to source. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 resyncReplication( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + resyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); + } + + /** + * Delete the replication connection on the destination volume, and send release to the source replication. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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>> deleteReplicationWithResponseAsync( + String resourceGroupName, String accountName, String poolName, String volumeName) { + 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 (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + return FluxUtil + .withContext( + context -> + service + .deleteReplication( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + poolName, + volumeName, + this.client.getApiVersion(), + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the replication connection on the destination volume, and send release to the source replication. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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>> deleteReplicationWithResponseAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, 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 (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .deleteReplication( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + poolName, + volumeName, + this.client.getApiVersion(), + context); + } + + /** + * Delete the replication connection on the destination volume, and send release to the source replication. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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> beginDeleteReplicationAsync( + String resourceGroupName, String accountName, String poolName, String volumeName) { + Mono>> mono = + deleteReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete the replication connection on the destination volume, and send release to the source replication. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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> beginDeleteReplicationAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete the replication connection on the destination volume, and send release to the source replication. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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> beginDeleteReplication( + String resourceGroupName, String accountName, String poolName, String volumeName) { + return beginDeleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName).getSyncPoller(); + } + + /** + * Delete the replication connection on the destination volume, and send release to the source replication. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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> beginDeleteReplication( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + return beginDeleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) + .getSyncPoller(); + } + + /** + * Delete the replication connection on the destination volume, and send release to the source replication. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 deleteReplicationAsync( + String resourceGroupName, String accountName, String poolName, String volumeName) { + return beginDeleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the replication connection on the destination volume, and send release to the source replication. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 deleteReplicationAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + return beginDeleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the replication connection on the destination volume, and send release to the source replication. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 deleteReplication(String resourceGroupName, String accountName, String poolName, String volumeName) { + deleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName).block(); + } + + /** + * Delete the replication connection on the destination volume, and send release to the source replication. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 deleteReplication( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + deleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); + } + + /** + * Authorize the replication connection on the source volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param body Authorize request object supplied in the body of the 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>> authorizeReplicationWithResponseAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, AuthorizeRequest 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 (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName 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(); + } + return FluxUtil + .withContext( + context -> + service + .authorizeReplication( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + poolName, + volumeName, + this.client.getApiVersion(), + body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Authorize the replication connection on the source volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param body Authorize request object supplied in the body of the 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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> authorizeReplicationWithResponseAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + AuthorizeRequest 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 (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName 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(); + } + context = this.client.mergeContext(context); + return service + .authorizeReplication( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + poolName, + volumeName, + this.client.getApiVersion(), + body, + context); + } + + /** + * Authorize the replication connection on the source volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param body Authorize request object supplied in the body of the 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> beginAuthorizeReplicationAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, AuthorizeRequest body) { + Mono>> mono = + authorizeReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Authorize the replication connection on the source volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param body Authorize request object supplied in the body of the 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginAuthorizeReplicationAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + AuthorizeRequest body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + authorizeReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Authorize the replication connection on the source volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param body Authorize request object supplied in the body of the 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> beginAuthorizeReplication( + String resourceGroupName, String accountName, String poolName, String volumeName, AuthorizeRequest body) { + return beginAuthorizeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body) + .getSyncPoller(); + } + + /** + * Authorize the replication connection on the source volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param body Authorize request object supplied in the body of the 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginAuthorizeReplication( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + AuthorizeRequest body, + Context context) { + return beginAuthorizeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context) + .getSyncPoller(); + } + + /** + * Authorize the replication connection on the source volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param body Authorize request object supplied in the body of the 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 authorizeReplicationAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, AuthorizeRequest body) { + return beginAuthorizeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get the status of the replication. + * Authorize the replication connection on the source volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. + * @param body Authorize request object supplied in the body of the 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 status of the replication. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationStatusInner replicationStatus( - String resourceGroupName, String accountName, String poolName, String volumeName) { - return replicationStatusAsync(resourceGroupName, accountName, poolName, volumeName).block(); + private Mono authorizeReplicationAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + AuthorizeRequest body, + Context context) { + return beginAuthorizeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get the status of the replication. + * Authorize the replication connection on the source volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param body Authorize request object supplied in the body of the 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 authorizeReplication( + String resourceGroupName, String accountName, String poolName, String volumeName, AuthorizeRequest body) { + authorizeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); + } + + /** + * Authorize the replication connection on the source volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. + * @param body Authorize request object supplied in the body of the 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 status of the replication along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response replicationStatusWithResponse( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return replicationStatusWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context) - .block(); + public void authorizeReplication( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + AuthorizeRequest body, + Context context) { + authorizeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context).block(); } /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. + * Re-Initializes the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. @@ -2559,7 +3962,7 @@ public Response replicationStatusWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resyncReplicationWithResponseAsync( + private Mono>> reInitializeReplicationWithResponseAsync( String resourceGroupName, String accountName, String poolName, String volumeName) { if (this.client.getEndpoint() == null) { return Mono @@ -2590,7 +3993,7 @@ private Mono>> resyncReplicationWithResponseAsync( .withContext( context -> service - .resyncReplication( + .reInitializeReplication( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -2603,8 +4006,7 @@ private Mono>> resyncReplicationWithResponseAsync( } /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. + * Re-Initializes the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. @@ -2617,7 +4019,7 @@ private Mono>> resyncReplicationWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resyncReplicationWithResponseAsync( + private Mono>> reInitializeReplicationWithResponseAsync( String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -2646,7 +4048,7 @@ private Mono>> resyncReplicationWithResponseAsync( } context = this.client.mergeContext(context); return service - .resyncReplication( + .reInitializeReplication( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -2658,8 +4060,7 @@ private Mono>> resyncReplicationWithResponseAsync( } /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. + * Re-Initializes the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. @@ -2671,10 +4072,10 @@ private Mono>> resyncReplicationWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginResyncReplicationAsync( + private PollerFlux, Void> beginReInitializeReplicationAsync( String resourceGroupName, String accountName, String poolName, String volumeName) { Mono>> mono = - resyncReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); + reInitializeReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); return this .client .getLroResult( @@ -2682,8 +4083,7 @@ private PollerFlux, Void> beginResyncReplicationAsync( } /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. + * Re-Initializes the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. @@ -2696,19 +4096,18 @@ private PollerFlux, Void> beginResyncReplicationAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginResyncReplicationAsync( + private PollerFlux, Void> beginReInitializeReplicationAsync( String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { context = this.client.mergeContext(context); Mono>> mono = - resyncReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context); + reInitializeReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context); return this .client .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. + * Re-Initializes the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. @@ -2720,14 +4119,13 @@ private PollerFlux, Void> beginResyncReplicationAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResyncReplication( + public SyncPoller, Void> beginReInitializeReplication( String resourceGroupName, String accountName, String poolName, String volumeName) { - return beginResyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName).getSyncPoller(); + return beginReInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName).getSyncPoller(); } /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. + * Re-Initializes the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. @@ -2740,15 +4138,14 @@ public SyncPoller, Void> beginResyncReplication( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResyncReplication( + public SyncPoller, Void> beginReInitializeReplication( String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return beginResyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) + return beginReInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) .getSyncPoller(); } /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. + * Re-Initializes the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. @@ -2760,16 +4157,15 @@ public SyncPoller, Void> beginResyncReplication( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resyncReplicationAsync( + private Mono reInitializeReplicationAsync( String resourceGroupName, String accountName, String poolName, String volumeName) { - return beginResyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName) + return beginReInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. + * Re-Initializes the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. @@ -2782,16 +4178,15 @@ private Mono resyncReplicationAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resyncReplicationAsync( + private Mono reInitializeReplicationAsync( String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return beginResyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) + return beginReInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. + * Re-Initializes the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. @@ -2802,13 +4197,13 @@ private Mono resyncReplicationAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void resyncReplication(String resourceGroupName, String accountName, String poolName, String volumeName) { - resyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName).block(); + public void reInitializeReplication( + String resourceGroupName, String accountName, String poolName, String volumeName) { + reInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName).block(); } /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. + * Re-Initializes the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. @@ -2820,26 +4215,27 @@ public void resyncReplication(String resourceGroupName, String accountName, Stri * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void resyncReplication( + public void reInitializeReplication( String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - resyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); + reInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); } /** - * Delete the replication connection on the destination volume, and send release to the source replication. + * Moves volume to another pool. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. + * @param body Move volume to the pool supplied in the body of the 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>> deleteReplicationWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { + private Mono>> poolChangeWithResponseAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, PoolChangeRequest body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -2865,11 +4261,16 @@ private Mono>> deleteReplicationWithResponseAsync( if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName 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(); + } return FluxUtil .withContext( context -> service - .deleteReplication( + .poolChange( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -2877,17 +4278,19 @@ private Mono>> deleteReplicationWithResponseAsync( poolName, volumeName, this.client.getApiVersion(), + body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete the replication connection on the destination volume, and send release to the source replication. + * Moves volume to another pool. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. + * @param body Move volume to the pool supplied in the body of the 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. @@ -2895,8 +4298,13 @@ private Mono>> deleteReplicationWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteReplicationWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + private Mono>> poolChangeWithResponseAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + PoolChangeRequest body, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -2922,9 +4330,14 @@ private Mono>> deleteReplicationWithResponseAsync( if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName 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(); + } context = this.client.mergeContext(context); return service - .deleteReplication( + .poolChange( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -2932,26 +4345,28 @@ private Mono>> deleteReplicationWithResponseAsync( poolName, volumeName, this.client.getApiVersion(), + body, context); } /** - * Delete the replication connection on the destination volume, and send release to the source replication. + * Moves volume to another pool. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. + * @param body Move volume to the pool supplied in the body of the 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> beginDeleteReplicationAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { + private PollerFlux, Void> beginPoolChangeAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, PoolChangeRequest body) { Mono>> mono = - deleteReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); + poolChangeWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); return this .client .getLroResult( @@ -2959,12 +4374,13 @@ private PollerFlux, Void> beginDeleteReplicationAsync( } /** - * Delete the replication connection on the destination volume, and send release to the source replication. + * Moves volume to another pool. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. + * @param body Move volume to the pool supplied in the body of the 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. @@ -2972,41 +4388,48 @@ private PollerFlux, Void> beginDeleteReplicationAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteReplicationAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + private PollerFlux, Void> beginPoolChangeAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + PoolChangeRequest body, + Context context) { context = this.client.mergeContext(context); Mono>> mono = - deleteReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context); + poolChangeWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body, context); return this .client .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Delete the replication connection on the destination volume, and send release to the source replication. + * Moves volume to another pool. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. + * @param body Move volume to the pool supplied in the body of the 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> beginDeleteReplication( - String resourceGroupName, String accountName, String poolName, String volumeName) { - return beginDeleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName).getSyncPoller(); + public SyncPoller, Void> beginPoolChange( + String resourceGroupName, String accountName, String poolName, String volumeName, PoolChangeRequest body) { + return beginPoolChangeAsync(resourceGroupName, accountName, poolName, volumeName, body).getSyncPoller(); } /** - * Delete the replication connection on the destination volume, and send release to the source replication. + * Moves volume to another pool. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. + * @param body Move volume to the pool supplied in the body of the 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. @@ -3014,103 +4437,122 @@ public SyncPoller, Void> beginDeleteReplication( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return beginDeleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) + public SyncPoller, Void> beginPoolChange( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + PoolChangeRequest body, + Context context) { + return beginPoolChangeAsync(resourceGroupName, accountName, poolName, volumeName, body, context) .getSyncPoller(); } /** - * Delete the replication connection on the destination volume, and send release to the source replication. + * Moves volume to another pool. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. + * @param body Move volume to the pool supplied in the body of the 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 deleteReplicationAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { - return beginDeleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName) + private Mono poolChangeAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, PoolChangeRequest body) { + return beginPoolChangeAsync(resourceGroupName, accountName, poolName, volumeName, body) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the replication connection on the destination volume, and send release to the source replication. + * Moves volume to another pool. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. + * @param body Move volume to the pool supplied in the body of the 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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteReplicationAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return beginDeleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono poolChangeAsync( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + PoolChangeRequest body, + Context context) { + return beginPoolChangeAsync(resourceGroupName, accountName, poolName, volumeName, body, context) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete the replication connection on the destination volume, and send release to the source replication. + * Moves volume to another pool. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. + * @param body Move volume to the pool supplied in the body of the 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 deleteReplication(String resourceGroupName, String accountName, String poolName, String volumeName) { - deleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName).block(); + public void poolChange( + String resourceGroupName, String accountName, String poolName, String volumeName, PoolChangeRequest body) { + poolChangeAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); } /** - * Delete the replication connection on the destination volume, and send release to the source replication. + * Moves volume to another pool. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. + * @param body Move volume to the pool supplied in the body of the 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - deleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); + public void poolChange( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + PoolChangeRequest body, + Context context) { + poolChangeAsync(resourceGroupName, accountName, poolName, volumeName, body, context).block(); } /** - * Authorize the replication connection on the source volume. + * Relocates volume to a new stamp. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the 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>> authorizeReplicationWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, AuthorizeRequest body) { + private Mono>> relocateWithResponseAsync( + String resourceGroupName, String accountName, String poolName, String volumeName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -3136,16 +4578,11 @@ private Mono>> authorizeReplicationWithResponseAsync( if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName 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(); - } return FluxUtil .withContext( context -> service - .authorizeReplication( + .relocate( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -3153,19 +4590,17 @@ private Mono>> authorizeReplicationWithResponseAsync( poolName, volumeName, this.client.getApiVersion(), - body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Authorize the replication connection on the source volume. + * Relocates volume to a new stamp. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the 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. @@ -3173,13 +4608,8 @@ private Mono>> authorizeReplicationWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> authorizeReplicationWithResponseAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - AuthorizeRequest body, - Context context) { + private Mono>> relocateWithResponseAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -3205,14 +4635,9 @@ private Mono>> authorizeReplicationWithResponseAsync( if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName 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(); - } context = this.client.mergeContext(context); return service - .authorizeReplication( + .relocate( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -3220,28 +4645,26 @@ private Mono>> authorizeReplicationWithResponseAsync( poolName, volumeName, this.client.getApiVersion(), - body, context); } /** - * Authorize the replication connection on the source volume. + * Relocates volume to a new stamp. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the 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> beginAuthorizeReplicationAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, AuthorizeRequest body) { + private PollerFlux, Void> beginRelocateAsync( + String resourceGroupName, String accountName, String poolName, String volumeName) { Mono>> mono = - authorizeReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); + relocateWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); return this .client .getLroResult( @@ -3249,13 +4672,12 @@ private PollerFlux, Void> beginAuthorizeReplicationAsync( } /** - * Authorize the replication connection on the source volume. + * Relocates volume to a new stamp. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the 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. @@ -3263,49 +4685,41 @@ private PollerFlux, Void> beginAuthorizeReplicationAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginAuthorizeReplicationAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - AuthorizeRequest body, - Context context) { + private PollerFlux, Void> beginRelocateAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { context = this.client.mergeContext(context); Mono>> mono = - authorizeReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body, context); + relocateWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context); return this .client .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Authorize the replication connection on the source volume. + * Relocates volume to a new stamp. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the 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> beginAuthorizeReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, AuthorizeRequest body) { - return beginAuthorizeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body) - .getSyncPoller(); + public SyncPoller, Void> beginRelocate( + String resourceGroupName, String accountName, String poolName, String volumeName) { + return beginRelocateAsync(resourceGroupName, accountName, poolName, volumeName).getSyncPoller(); } /** - * Authorize the replication connection on the source volume. + * Relocates volume to a new stamp. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the 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. @@ -3313,46 +4727,37 @@ public SyncPoller, Void> beginAuthorizeReplication( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginAuthorizeReplication( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - AuthorizeRequest body, - Context context) { - return beginAuthorizeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context) - .getSyncPoller(); + public SyncPoller, Void> beginRelocate( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + return beginRelocateAsync(resourceGroupName, accountName, poolName, volumeName, context).getSyncPoller(); } /** - * Authorize the replication connection on the source volume. + * Relocates volume to a new stamp. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the 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 authorizeReplicationAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, AuthorizeRequest body) { - return beginAuthorizeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body) + private Mono relocateAsync(String resourceGroupName, String accountName, String poolName, String volumeName) { + return beginRelocateAsync(resourceGroupName, accountName, poolName, volumeName) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Authorize the replication connection on the source volume. + * Relocates volume to a new stamp. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the 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. @@ -3360,62 +4765,49 @@ private Mono authorizeReplicationAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono authorizeReplicationAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - AuthorizeRequest body, - Context context) { - return beginAuthorizeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context) + private Mono relocateAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + return beginRelocateAsync(resourceGroupName, accountName, poolName, volumeName, context) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Authorize the replication connection on the source volume. + * Relocates volume to a new stamp. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the 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 authorizeReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, AuthorizeRequest body) { - authorizeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); + public void relocate(String resourceGroupName, String accountName, String poolName, String volumeName) { + relocateAsync(resourceGroupName, accountName, poolName, volumeName).block(); } /** - * Authorize the replication connection on the source volume. + * Relocates volume to a new stamp. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void authorizeReplication( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - AuthorizeRequest body, - Context context) { - authorizeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context).block(); + public void relocate( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + relocateAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); } /** - * Re-Initializes the replication connection on the destination volume. + * Finalizes the relocation of the volume and cleans up the old volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. @@ -3427,7 +4819,7 @@ public void authorizeReplication( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reInitializeReplicationWithResponseAsync( + private Mono>> finalizeRelocationWithResponseAsync( String resourceGroupName, String accountName, String poolName, String volumeName) { if (this.client.getEndpoint() == null) { return Mono @@ -3458,7 +4850,7 @@ private Mono>> reInitializeReplicationWithResponseAsyn .withContext( context -> service - .reInitializeReplication( + .finalizeRelocation( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -3471,7 +4863,7 @@ private Mono>> reInitializeReplicationWithResponseAsyn } /** - * Re-Initializes the replication connection on the destination volume. + * Finalizes the relocation of the volume and cleans up the old volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. @@ -3484,7 +4876,7 @@ private Mono>> reInitializeReplicationWithResponseAsyn * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reInitializeReplicationWithResponseAsync( + private Mono>> finalizeRelocationWithResponseAsync( String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -3513,7 +4905,7 @@ private Mono>> reInitializeReplicationWithResponseAsyn } context = this.client.mergeContext(context); return service - .reInitializeReplication( + .finalizeRelocation( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -3525,7 +4917,7 @@ private Mono>> reInitializeReplicationWithResponseAsyn } /** - * Re-Initializes the replication connection on the destination volume. + * Finalizes the relocation of the volume and cleans up the old volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. @@ -3537,10 +4929,10 @@ private Mono>> reInitializeReplicationWithResponseAsyn * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginReInitializeReplicationAsync( + private PollerFlux, Void> beginFinalizeRelocationAsync( String resourceGroupName, String accountName, String poolName, String volumeName) { Mono>> mono = - reInitializeReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); + finalizeRelocationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); return this .client .getLroResult( @@ -3548,7 +4940,7 @@ private PollerFlux, Void> beginReInitializeReplicationAsync( } /** - * Re-Initializes the replication connection on the destination volume. + * Finalizes the relocation of the volume and cleans up the old volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. @@ -3561,18 +4953,18 @@ private PollerFlux, Void> beginReInitializeReplicationAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginReInitializeReplicationAsync( + private PollerFlux, Void> beginFinalizeRelocationAsync( String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { context = this.client.mergeContext(context); Mono>> mono = - reInitializeReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context); + finalizeRelocationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context); return this .client .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Re-Initializes the replication connection on the destination volume. + * Finalizes the relocation of the volume and cleans up the old volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. @@ -3584,13 +4976,13 @@ private PollerFlux, Void> beginReInitializeReplicationAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginReInitializeReplication( + public SyncPoller, Void> beginFinalizeRelocation( String resourceGroupName, String accountName, String poolName, String volumeName) { - return beginReInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName).getSyncPoller(); + return beginFinalizeRelocationAsync(resourceGroupName, accountName, poolName, volumeName).getSyncPoller(); } /** - * Re-Initializes the replication connection on the destination volume. + * Finalizes the relocation of the volume and cleans up the old volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. @@ -3603,14 +4995,14 @@ public SyncPoller, Void> beginReInitializeReplication( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginReInitializeReplication( + public SyncPoller, Void> beginFinalizeRelocation( String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return beginReInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) + return beginFinalizeRelocationAsync(resourceGroupName, accountName, poolName, volumeName, context) .getSyncPoller(); } /** - * Re-Initializes the replication connection on the destination volume. + * Finalizes the relocation of the volume and cleans up the old volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. @@ -3622,15 +5014,15 @@ public SyncPoller, Void> beginReInitializeReplication( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reInitializeReplicationAsync( + private Mono finalizeRelocationAsync( String resourceGroupName, String accountName, String poolName, String volumeName) { - return beginReInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName) + return beginFinalizeRelocationAsync(resourceGroupName, accountName, poolName, volumeName) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Re-Initializes the replication connection on the destination volume. + * Finalizes the relocation of the volume and cleans up the old volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. @@ -3643,15 +5035,15 @@ private Mono reInitializeReplicationAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reInitializeReplicationAsync( + private Mono finalizeRelocationAsync( String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return beginReInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) + return beginFinalizeRelocationAsync(resourceGroupName, accountName, poolName, volumeName, context) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Re-Initializes the replication connection on the destination volume. + * Finalizes the relocation of the volume and cleans up the old volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. @@ -3662,13 +5054,12 @@ private Mono reInitializeReplicationAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void reInitializeReplication( - String resourceGroupName, String accountName, String poolName, String volumeName) { - reInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName).block(); + public void finalizeRelocation(String resourceGroupName, String accountName, String poolName, String volumeName) { + finalizeRelocationAsync(resourceGroupName, accountName, poolName, volumeName).block(); } /** - * Re-Initializes the replication connection on the destination volume. + * Finalizes the relocation of the volume and cleans up the old volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. @@ -3680,27 +5071,26 @@ public void reInitializeReplication( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void reInitializeReplication( + public void finalizeRelocation( String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - reInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); + finalizeRelocationAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); } /** - * Moves volume to another pool. + * Reverts the volume relocation process, cleans up the new volume and starts using the former-existing volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the 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>> poolChangeWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, PoolChangeRequest body) { + private Mono>> revertRelocationWithResponseAsync( + String resourceGroupName, String accountName, String poolName, String volumeName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -3726,16 +5116,11 @@ private Mono>> poolChangeWithResponseAsync( if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName 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(); - } return FluxUtil .withContext( context -> service - .poolChange( + .revertRelocation( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -3743,19 +5128,17 @@ private Mono>> poolChangeWithResponseAsync( poolName, volumeName, this.client.getApiVersion(), - body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Moves volume to another pool. + * Reverts the volume relocation process, cleans up the new volume and starts using the former-existing volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the 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. @@ -3763,13 +5146,8 @@ private Mono>> poolChangeWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> poolChangeWithResponseAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - PoolChangeRequest body, - Context context) { + private Mono>> revertRelocationWithResponseAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -3795,14 +5173,9 @@ private Mono>> poolChangeWithResponseAsync( if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName 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(); - } context = this.client.mergeContext(context); return service - .poolChange( + .revertRelocation( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -3810,28 +5183,26 @@ private Mono>> poolChangeWithResponseAsync( poolName, volumeName, this.client.getApiVersion(), - body, context); } /** - * Moves volume to another pool. + * Reverts the volume relocation process, cleans up the new volume and starts using the former-existing volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the 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> beginPoolChangeAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, PoolChangeRequest body) { + private PollerFlux, Void> beginRevertRelocationAsync( + String resourceGroupName, String accountName, String poolName, String volumeName) { Mono>> mono = - poolChangeWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); + revertRelocationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); return this .client .getLroResult( @@ -3839,13 +5210,12 @@ private PollerFlux, Void> beginPoolChangeAsync( } /** - * Moves volume to another pool. + * Reverts the volume relocation process, cleans up the new volume and starts using the former-existing volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the 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. @@ -3853,48 +5223,41 @@ private PollerFlux, Void> beginPoolChangeAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPoolChangeAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - PoolChangeRequest body, - Context context) { + private PollerFlux, Void> beginRevertRelocationAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { context = this.client.mergeContext(context); Mono>> mono = - poolChangeWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body, context); + revertRelocationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context); return this .client .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Moves volume to another pool. + * Reverts the volume relocation process, cleans up the new volume and starts using the former-existing volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the 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> beginPoolChange( - String resourceGroupName, String accountName, String poolName, String volumeName, PoolChangeRequest body) { - return beginPoolChangeAsync(resourceGroupName, accountName, poolName, volumeName, body).getSyncPoller(); + public SyncPoller, Void> beginRevertRelocation( + String resourceGroupName, String accountName, String poolName, String volumeName) { + return beginRevertRelocationAsync(resourceGroupName, accountName, poolName, volumeName).getSyncPoller(); } /** - * Moves volume to another pool. + * Reverts the volume relocation process, cleans up the new volume and starts using the former-existing volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the 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. @@ -3902,46 +5265,39 @@ public SyncPoller, Void> beginPoolChange( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPoolChange( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - PoolChangeRequest body, - Context context) { - return beginPoolChangeAsync(resourceGroupName, accountName, poolName, volumeName, body, context) + public SyncPoller, Void> beginRevertRelocation( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + return beginRevertRelocationAsync(resourceGroupName, accountName, poolName, volumeName, context) .getSyncPoller(); } /** - * Moves volume to another pool. + * Reverts the volume relocation process, cleans up the new volume and starts using the former-existing volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the 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 poolChangeAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, PoolChangeRequest body) { - return beginPoolChangeAsync(resourceGroupName, accountName, poolName, volumeName, body) + private Mono revertRelocationAsync( + String resourceGroupName, String accountName, String poolName, String volumeName) { + return beginRevertRelocationAsync(resourceGroupName, accountName, poolName, volumeName) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Moves volume to another pool. + * Reverts the volume relocation process, cleans up the new volume and starts using the former-existing volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the 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. @@ -3949,58 +5305,45 @@ private Mono poolChangeAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono poolChangeAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - PoolChangeRequest body, - Context context) { - return beginPoolChangeAsync(resourceGroupName, accountName, poolName, volumeName, body, context) + private Mono revertRelocationAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + return beginRevertRelocationAsync(resourceGroupName, accountName, poolName, volumeName, context) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Moves volume to another pool. + * Reverts the volume relocation process, cleans up the new volume and starts using the former-existing volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the 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 poolChange( - String resourceGroupName, String accountName, String poolName, String volumeName, PoolChangeRequest body) { - poolChangeAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); + public void revertRelocation(String resourceGroupName, String accountName, String poolName, String volumeName) { + revertRelocationAsync(resourceGroupName, accountName, poolName, volumeName).block(); } /** - * Moves volume to another pool. + * Reverts the volume relocation process, cleans up the new volume and starts using the former-existing volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void poolChange( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - PoolChangeRequest body, - Context context) { - poolChangeAsync(resourceGroupName, accountName, poolName, volumeName, body, context).block(); + public void revertRelocation( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + revertRelocationAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java index 93f1ff6c8aed..21eaf1b9151d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java @@ -10,19 +10,20 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.VolumesClient; +import com.azure.resourcemanager.netapp.fluent.models.ReplicationInner; import com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner; import com.azure.resourcemanager.netapp.fluent.models.VolumeInner; import com.azure.resourcemanager.netapp.models.AuthorizeRequest; import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; import com.azure.resourcemanager.netapp.models.PoolChangeRequest; +import com.azure.resourcemanager.netapp.models.Replication; import com.azure.resourcemanager.netapp.models.ReplicationStatus; import com.azure.resourcemanager.netapp.models.Volume; import com.azure.resourcemanager.netapp.models.VolumeRevert; import com.azure.resourcemanager.netapp.models.Volumes; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class VolumesImpl implements Volumes { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(VolumesImpl.class); private final VolumesClient innerClient; @@ -101,6 +102,15 @@ public void revert( this.serviceClient().revert(resourceGroupName, accountName, poolName, volumeName, body, context); } + public void resetCifsPassword(String resourceGroupName, String accountName, String poolName, String volumeName) { + this.serviceClient().resetCifsPassword(resourceGroupName, accountName, poolName, volumeName); + } + + public void resetCifsPassword( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + this.serviceClient().resetCifsPassword(resourceGroupName, accountName, poolName, volumeName, context); + } + public void breakReplication( String resourceGroupName, String accountName, @@ -152,6 +162,20 @@ public Response replicationStatusWithResponse( } } + public PagedIterable listReplications( + String resourceGroupName, String accountName, String poolName, String volumeName) { + PagedIterable inner = + this.serviceClient().listReplications(resourceGroupName, accountName, poolName, volumeName); + return Utils.mapPage(inner, inner1 -> new ReplicationImpl(inner1, this.manager())); + } + + public PagedIterable listReplications( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + PagedIterable inner = + this.serviceClient().listReplications(resourceGroupName, accountName, poolName, volumeName, context); + return Utils.mapPage(inner, inner1 -> new ReplicationImpl(inner1, this.manager())); + } + public void resyncReplication(String resourceGroupName, String accountName, String poolName, String volumeName) { this.serviceClient().resyncReplication(resourceGroupName, accountName, poolName, volumeName); } @@ -210,10 +234,37 @@ public void poolChange( this.serviceClient().poolChange(resourceGroupName, accountName, poolName, volumeName, body, context); } + public void relocate(String resourceGroupName, String accountName, String poolName, String volumeName) { + this.serviceClient().relocate(resourceGroupName, accountName, poolName, volumeName); + } + + public void relocate( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + this.serviceClient().relocate(resourceGroupName, accountName, poolName, volumeName, context); + } + + public void finalizeRelocation(String resourceGroupName, String accountName, String poolName, String volumeName) { + this.serviceClient().finalizeRelocation(resourceGroupName, accountName, poolName, volumeName); + } + + public void finalizeRelocation( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + this.serviceClient().finalizeRelocation(resourceGroupName, accountName, poolName, volumeName, context); + } + + public void revertRelocation(String resourceGroupName, String accountName, String poolName, String volumeName) { + this.serviceClient().revertRelocation(resourceGroupName, accountName, poolName, volumeName); + } + + public void revertRelocation( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + this.serviceClient().revertRelocation(resourceGroupName, accountName, poolName, volumeName, context); + } + public Volume getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -221,7 +272,7 @@ public Volume getById(String id) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -229,14 +280,14 @@ public Volume getById(String id) { } String poolName = Utils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } String volumeName = Utils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); @@ -247,7 +298,7 @@ public Volume getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -255,7 +306,7 @@ public Response getByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -263,14 +314,14 @@ public Response getByIdWithResponse(String id, Context context) { } String poolName = Utils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } String volumeName = Utils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); @@ -281,7 +332,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -289,7 +340,7 @@ public void deleteById(String id) { } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -297,14 +348,14 @@ public void deleteById(String id) { } String poolName = Utils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } String volumeName = Utils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); @@ -316,7 +367,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Boolean forceDelete, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -324,7 +375,7 @@ public void deleteByIdWithResponse(String id, Boolean forceDelete, Context conte } String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -332,14 +383,14 @@ public void deleteByIdWithResponse(String id, Boolean forceDelete, Context conte } String poolName = Utils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } String volumeName = Utils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AccountEncryption.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AccountEncryption.java index c1aabf218b63..4a33917c38ed 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AccountEncryption.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AccountEncryption.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Encryption settings. */ @Fluent public final class AccountEncryption { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountEncryption.class); - /* * Encryption Key Source. Possible values are: 'Microsoft.NetApp'. */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectory.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectory.java index fa2d0fa8e0e9..62f3d2d47b65 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectory.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectory.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Active Directory. */ @Fluent public final class ActiveDirectory { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ActiveDirectory.class); - /* * Id of the Active Directory */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryStatus.java index 50504731acba..4fc4c3cf687d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryStatus.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryStatus.java @@ -36,7 +36,11 @@ public static ActiveDirectoryStatus fromString(String name) { return fromString(name, ActiveDirectoryStatus.class); } - /** @return known ActiveDirectoryStatus values. */ + /** + * Gets known ActiveDirectoryStatus values. + * + * @return known ActiveDirectoryStatus values. + */ public static Collection values() { return values(ActiveDirectoryStatus.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ApplicationType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ApplicationType.java index 822f9aee9ec3..60896e21bd9b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ApplicationType.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ApplicationType.java @@ -24,7 +24,11 @@ public static ApplicationType fromString(String name) { return fromString(name, ApplicationType.class); } - /** @return known ApplicationType values. */ + /** + * Gets known ApplicationType values. + * + * @return known ApplicationType values. + */ public static Collection values() { return values(ApplicationType.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AuthorizeRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AuthorizeRequest.java index 29285c40434c..014c4f46ee58 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AuthorizeRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AuthorizeRequest.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Authorize request. */ @Fluent public final class AuthorizeRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AuthorizeRequest.class); - /* * Resource id of the remote volume */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AvsDataStore.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AvsDataStore.java index dcbf18ca42c4..ce702a601715 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AvsDataStore.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AvsDataStore.java @@ -27,7 +27,11 @@ public static AvsDataStore fromString(String name) { return fromString(name, AvsDataStore.class); } - /** @return known AvsDataStore values. */ + /** + * Gets known AvsDataStore values. + * + * @return known AvsDataStore values. + */ public static Collection values() { return values(AvsDataStore.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backup.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backup.java index 37b928d79657..b1cdcfa39d7a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backup.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backup.java @@ -118,6 +118,13 @@ public interface Backup { */ String regionName(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.netapp.fluent.models.BackupInner object. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java index b7d7f5531cfb..557678c9ea86 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.models.BackupProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; @@ -16,8 +14,6 @@ /** Backup patch. */ @Fluent public final class BackupPatch { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupPatch.class); - /* * Resource tags */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPoliciesList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPoliciesList.java index 08f6b6535546..85136b4b6be5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPoliciesList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPoliciesList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of Backup Policies. */ @Fluent public final class BackupPoliciesList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupPoliciesList.class); - /* * A list of backup policies */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicy.java index e1321e058dce..86c05ce7159f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicy.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicy.java @@ -56,7 +56,7 @@ public interface BackupPolicy { String etag(); /** - * Gets the systemData property: The system meta data relating to this resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -132,6 +132,13 @@ public interface BackupPolicy { */ String regionName(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner object. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicyPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicyPatch.java index 7e668d30f887..cbd70c629637 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicyPatch.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicyPatch.java @@ -6,9 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.models.BackupPolicyProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -16,8 +14,6 @@ /** Backup policy Details for create and update. */ @Fluent public final class BackupPolicyPatch extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupPolicyPatch.class); - /* * Backup policy Properties */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java index f8ebe45eb876..2e0b75e2b4dc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java @@ -27,7 +27,11 @@ public static BackupType fromString(String name) { return fromString(name, BackupType.class); } - /** @return known BackupType values. */ + /** + * Gets known BackupType values. + * + * @return known BackupType values. + */ public static Collection values() { return values(BackupType.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsList.java index 0b6696a5dd6b..e2f70c82a622 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.models.BackupInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of Backups. */ @Fluent public final class BackupsList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupsList.class); - /* * A list of Backups */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakReplicationRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakReplicationRequest.java index b334b31a8c54..19b54ac899c5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakReplicationRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakReplicationRequest.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Break replication request. */ @Fluent public final class BreakReplicationRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BreakReplicationRequest.class); - /* * If replication is in status transferring and you want to force break the * replication, set to true diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPool.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPool.java index 25b60b7c0355..08732c8955d0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPool.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPool.java @@ -55,7 +55,7 @@ public interface CapacityPool { String etag(); /** - * Gets the systemData property: The system meta data relating to this resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -140,6 +140,13 @@ public interface CapacityPool { */ String regionName(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner object. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolList.java index 57f1b9266ae1..ff4043b3848e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of capacity pool resources. */ @Fluent public final class CapacityPoolList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CapacityPoolList.class); - /* * List of Capacity pools */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolPatch.java index 9b1829fec471..20bd3f84f495 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolPatch.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolPatch.java @@ -6,17 +6,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.models.PoolPatchProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** Capacity pool patch resource. */ @Fluent public final class CapacityPoolPatch extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CapacityPoolPatch.class); - /* * Capacity pool properties */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckNameResourceTypes.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckNameResourceTypes.java index 72b16ab4fcf0..a08fa6e3638d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckNameResourceTypes.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckNameResourceTypes.java @@ -37,7 +37,11 @@ public static CheckNameResourceTypes fromString(String name) { return fromString(name, CheckNameResourceTypes.class); } - /** @return known CheckNameResourceTypes values. */ + /** + * Gets known CheckNameResourceTypes values. + * + * @return known CheckNameResourceTypes values. + */ public static Collection values() { return values(CheckNameResourceTypes.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckQuotaNameResourceTypes.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckQuotaNameResourceTypes.java index 111e960fc7f8..687976f9ac7d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckQuotaNameResourceTypes.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckQuotaNameResourceTypes.java @@ -38,7 +38,11 @@ public static CheckQuotaNameResourceTypes fromString(String name) { return fromString(name, CheckQuotaNameResourceTypes.class); } - /** @return known CheckQuotaNameResourceTypes values. */ + /** + * Gets known CheckQuotaNameResourceTypes values. + * + * @return known CheckQuotaNameResourceTypes values. + */ public static Collection values() { return values(CheckQuotaNameResourceTypes.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChownMode.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChownMode.java index e2c9bd6d649e..5b4e4cb1bdc3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChownMode.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChownMode.java @@ -27,7 +27,11 @@ public static ChownMode fromString(String name) { return fromString(name, ChownMode.class); } - /** @return known ChownMode values. */ + /** + * Gets known ChownMode values. + * + * @return known ChownMode values. + */ public static Collection values() { return values(ChownMode.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DailySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DailySchedule.java index bf9bf7a5364b..edcba3670103 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DailySchedule.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DailySchedule.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Daily Schedule properties. */ @Fluent public final class DailySchedule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DailySchedule.class); - /* * Daily snapshot count to keep */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Dimension.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Dimension.java index 1a3e90bfc950..5eb5332350f1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Dimension.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Dimension.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Dimension of blobs, possibly be blob type or access tier. */ @Fluent public final class Dimension { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Dimension.class); - /* * Display name of dimension. */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EnableSubvolumes.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EnableSubvolumes.java index 89b167862441..b89853c8164d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EnableSubvolumes.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EnableSubvolumes.java @@ -27,7 +27,11 @@ public static EnableSubvolumes fromString(String name) { return fromString(name, EnableSubvolumes.class); } - /** @return known EnableSubvolumes values. */ + /** + * Gets known EnableSubvolumes values. + * + * @return known EnableSubvolumes values. + */ public static Collection values() { return values(EnableSubvolumes.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionKeySource.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionKeySource.java new file mode 100644 index 000000000000..00ce3f52e025 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionKeySource.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for EncryptionKeySource. */ +public final class EncryptionKeySource extends ExpandableStringEnum { + /** Static value Microsoft.NetApp for EncryptionKeySource. */ + public static final EncryptionKeySource MICROSOFT_NET_APP = fromString("Microsoft.NetApp"); + + /** + * Creates or finds a EncryptionKeySource from its string representation. + * + * @param name a name to look for. + * @return the corresponding EncryptionKeySource. + */ + @JsonCreator + public static EncryptionKeySource fromString(String name) { + return fromString(name, EncryptionKeySource.class); + } + + /** + * Gets known EncryptionKeySource values. + * + * @return known EncryptionKeySource values. + */ + public static Collection values() { + return values(EncryptionKeySource.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionType.java index 03f82808a729..0707ab7196ec 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionType.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionType.java @@ -27,7 +27,11 @@ public static EncryptionType fromString(String name) { return fromString(name, EncryptionType.class); } - /** @return known EncryptionType values. */ + /** + * Gets known EncryptionType values. + * + * @return known EncryptionType values. + */ public static Collection values() { return values(EncryptionType.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EndpointType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EndpointType.java index 7b200d3714ec..d123d3736643 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EndpointType.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EndpointType.java @@ -27,7 +27,11 @@ public static EndpointType fromString(String name) { return fromString(name, EndpointType.class); } - /** @return known EndpointType values. */ + /** + * Gets known EndpointType values. + * + * @return known EndpointType values. + */ public static Collection values() { return values(EndpointType.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExportPolicyRule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExportPolicyRule.java index d8712b2fa56d..1d531173aab5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExportPolicyRule.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExportPolicyRule.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Volume Export Policy Rule. */ @Fluent public final class ExportPolicyRule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ExportPolicyRule.class); - /* * Order index */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/FilePathAvailabilityRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/FilePathAvailabilityRequest.java index 6b532fa852cf..24a8a8b00ffc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/FilePathAvailabilityRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/FilePathAvailabilityRequest.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** File path availability request content - availability is based on the name and the subnetId. */ @Fluent public final class FilePathAvailabilityRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FilePathAvailabilityRequest.class); - /* * File path to verify. */ @@ -76,16 +73,18 @@ public FilePathAvailabilityRequest withSubnetId(String subnetId) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property name in model FilePathAvailabilityRequest")); } if (subnetId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property subnetId in model FilePathAvailabilityRequest")); } } + + private static final ClientLogger LOGGER = new ClientLogger(FilePathAvailabilityRequest.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/HourlySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/HourlySchedule.java index 55c9fdafa75e..de364d96856c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/HourlySchedule.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/HourlySchedule.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Hourly Schedule properties. */ @Fluent public final class HourlySchedule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(HourlySchedule.class); - /* * Hourly snapshot count to keep */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/InAvailabilityReasonType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/InAvailabilityReasonType.java index 2dbf273087ce..b2440b50d643 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/InAvailabilityReasonType.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/InAvailabilityReasonType.java @@ -27,7 +27,11 @@ public static InAvailabilityReasonType fromString(String name) { return fromString(name, InAvailabilityReasonType.class); } - /** @return known InAvailabilityReasonType values. */ + /** + * Gets known InAvailabilityReasonType values. + * + * @return known InAvailabilityReasonType values. + */ public static Collection values() { return values(InAvailabilityReasonType.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapSearchScopeOpt.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapSearchScopeOpt.java index 9796f003e9fe..38481031856b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapSearchScopeOpt.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapSearchScopeOpt.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** LDAP search scope. */ @Fluent public final class LdapSearchScopeOpt { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LdapSearchScopeOpt.class); - /* * This specifies the user DN, which overrides the base DN for user * lookups. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ListReplications.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ListReplications.java new file mode 100644 index 000000000000..5f10efeca70a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ListReplications.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.netapp.fluent.models.ReplicationInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List Replications. */ +@Fluent +public final class ListReplications { + /* + * A list of replications + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value property: A list of replications. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of replications. + * + * @param value the value value to set. + * @return the ListReplications object itself. + */ + public ListReplications withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LogSpecification.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LogSpecification.java index 68ef6cc2b7d3..a0a69568eb4f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LogSpecification.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LogSpecification.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Log Definition of a single resource metric. */ @Fluent public final class LogSpecification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LogSpecification.class); - /* * Name of log specification. */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricAggregationType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricAggregationType.java index 32ab9525ec6f..fa432d1d4fb9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricAggregationType.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricAggregationType.java @@ -24,7 +24,11 @@ public static MetricAggregationType fromString(String name) { return fromString(name, MetricAggregationType.class); } - /** @return known MetricAggregationType values. */ + /** + * Gets known MetricAggregationType values. + * + * @return known MetricAggregationType values. + */ public static Collection values() { return values(MetricAggregationType.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricSpecification.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricSpecification.java index b5c8f8550774..c4ea1557b19a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricSpecification.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricSpecification.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Metric specification of operation. */ @Fluent public final class MetricSpecification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetricSpecification.class); - /* * Name of metric specification. */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MirrorState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MirrorState.java index 3023db197620..2751a51d7a3e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MirrorState.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MirrorState.java @@ -30,7 +30,11 @@ public static MirrorState fromString(String name) { return fromString(name, MirrorState.class); } - /** @return known MirrorState values. */ + /** + * Gets known MirrorState values. + * + * @return known MirrorState values. + */ public static Collection values() { return values(MirrorState.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MonthlySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MonthlySchedule.java index e52042b5622d..97791817a92c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MonthlySchedule.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MonthlySchedule.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Monthly Schedule properties. */ @Fluent public final class MonthlySchedule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MonthlySchedule.class); - /* * Monthly snapshot count to keep */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java index 4d978529d532..94cf494ed1e4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.management.Region; -import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner; import java.util.List; @@ -55,13 +54,6 @@ public interface NetAppAccount { */ String etag(); - /** - * Gets the systemData property: The system meta data relating to this resource. - * - * @return the systemData value. - */ - SystemData systemData(); - /** * Gets the provisioningState property: Azure lifecycle management. * @@ -97,6 +89,13 @@ public interface NetAppAccount { */ String regionName(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner object. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountList.java index 18d16c5d6a9d..95d4bd0d0df3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of NetApp account resources. */ @Fluent public final class NetAppAccountList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetAppAccountList.class); - /* * Multiple NetApp accounts */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java index ca02631d05a9..16e614a1e53f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java @@ -6,9 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.models.AccountProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -16,8 +14,6 @@ /** NetApp account patch resource. */ @Fluent public final class NetAppAccountPatch extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetAppAccountPatch.class); - /* * NetApp Account properties */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetworkFeatures.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetworkFeatures.java index 51ee84538d37..f0ee915b916c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetworkFeatures.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetworkFeatures.java @@ -27,7 +27,11 @@ public static NetworkFeatures fromString(String name) { return fromString(name, NetworkFeatures.class); } - /** @return known NetworkFeatures values. */ + /** + * Gets known NetworkFeatures values. + * + * @return known NetworkFeatures values. + */ public static Collection values() { return values(NetworkFeatures.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationDisplay.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationDisplay.java index c6a4eb56751c..7ba683e55acc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationDisplay.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationDisplay.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Display metadata associated with the operation. */ @Fluent public final class OperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - /* * Service provider: Microsoft NetApp. */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationListResult.java index 33ed0ad62cec..1bf6be3c0b02 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationListResult.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationListResult.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,8 +15,6 @@ */ @Fluent public final class OperationListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResult.class); - /* * List of Storage operations supported by the Storage resource provider. */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PlacementKeyValuePairs.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PlacementKeyValuePairs.java index 49267ff7b8f2..58ae99ba812a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PlacementKeyValuePairs.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PlacementKeyValuePairs.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Application specific parameters for the placement of volumes in the volume group. */ @Fluent public final class PlacementKeyValuePairs { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PlacementKeyValuePairs.class); - /* * Key for an application specific parameter for the placement of volumes * in the volume group @@ -77,14 +74,16 @@ public PlacementKeyValuePairs withValue(String value) { */ public void validate() { if (key() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property key in model PlacementKeyValuePairs")); } if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model PlacementKeyValuePairs")); } } + + private static final ClientLogger LOGGER = new ClientLogger(PlacementKeyValuePairs.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PoolChangeRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PoolChangeRequest.java index 7f4ff5aab0a0..0bbd7b5ac6b6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PoolChangeRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PoolChangeRequest.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Pool change request. */ @Fluent public final class PoolChangeRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PoolChangeRequest.class); - /* * Resource id of the pool to move volume to */ @@ -47,10 +44,12 @@ public PoolChangeRequest withNewPoolResourceId(String newPoolResourceId) { */ public void validate() { if (newPoolResourceId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property newPoolResourceId in model PoolChangeRequest")); } } + + private static final ClientLogger LOGGER = new ClientLogger(PoolChangeRequest.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ProvisioningState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ProvisioningState.java new file mode 100644 index 000000000000..3dafe16f6915 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ProvisioningState.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for ProvisioningState. */ +public enum ProvisioningState { + /** Enum value Accepted. */ + ACCEPTED("Accepted"), + + /** Enum value Creating. */ + CREATING("Creating"), + + /** Enum value Patching. */ + PATCHING("Patching"), + + /** Enum value Deleting. */ + DELETING("Deleting"), + + /** Enum value Moving. */ + MOVING("Moving"), + + /** Enum value Failed. */ + FAILED("Failed"), + + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"); + + /** The actual serialized value for a ProvisioningState instance. */ + private final String value; + + ProvisioningState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ProvisioningState instance. + * + * @param value the serialized value to parse. + * @return the parsed ProvisioningState object, or null if unable to parse. + */ + @JsonCreator + public static ProvisioningState fromString(String value) { + ProvisioningState[] items = ProvisioningState.values(); + for (ProvisioningState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QosType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QosType.java index 8fb9d8d0ccaf..a80d1960bf13 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QosType.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QosType.java @@ -27,7 +27,11 @@ public static QosType fromString(String name) { return fromString(name, QosType.class); } - /** @return known QosType values. */ + /** + * Gets known QosType values. + * + * @return known QosType values. + */ public static Collection values() { return values(QosType.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QuotaAvailabilityRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QuotaAvailabilityRequest.java index 331c0db04734..8a6c3449dde1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QuotaAvailabilityRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QuotaAvailabilityRequest.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Quota availability request content. */ @Fluent public final class QuotaAvailabilityRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(QuotaAvailabilityRequest.class); - /* * Name of the resource to verify. */ @@ -99,20 +96,22 @@ public QuotaAvailabilityRequest withResourceGroup(String resourceGroup) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property name in model QuotaAvailabilityRequest")); } if (type() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property type in model QuotaAvailabilityRequest")); } if (resourceGroup() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property resourceGroup in model QuotaAvailabilityRequest")); } } + + private static final ClientLogger LOGGER = new ClientLogger(QuotaAvailabilityRequest.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RelationshipStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RelationshipStatus.java index ca782d0c427b..3f7c86bc4ae6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RelationshipStatus.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RelationshipStatus.java @@ -27,7 +27,11 @@ public static RelationshipStatus fromString(String name) { return fromString(name, RelationshipStatus.class); } - /** @return known RelationshipStatus values. */ + /** + * Gets known RelationshipStatus values. + * + * @return known RelationshipStatus values. + */ public static Collection values() { return values(RelationshipStatus.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Replication.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Replication.java new file mode 100644 index 000000000000..2855f8534a75 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Replication.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.resourcemanager.netapp.fluent.models.ReplicationInner; + +/** An immutable client-side representation of Replication. */ +public interface Replication { + /** + * Gets the endpointType property: Indicates whether the local volume is the source or destination for the Volume + * Replication. + * + * @return the endpointType value. + */ + EndpointType endpointType(); + + /** + * Gets the replicationSchedule property: Schedule. + * + * @return the replicationSchedule value. + */ + ReplicationSchedule replicationSchedule(); + + /** + * Gets the remoteVolumeResourceId property: The resource ID of the remote volume. + * + * @return the remoteVolumeResourceId value. + */ + String remoteVolumeResourceId(); + + /** + * Gets the remoteVolumeRegion property: The remote region for the other end of the Volume Replication. + * + * @return the remoteVolumeRegion value. + */ + String remoteVolumeRegion(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.ReplicationInner object. + * + * @return the inner object. + */ + ReplicationInner innerModel(); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java index ae79fab80acf..0884e92d00d7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Replication properties. */ @Fluent public final class ReplicationObject { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReplicationObject.class); - /* * Id */ @@ -154,10 +151,12 @@ public ReplicationObject withRemoteVolumeRegion(String remoteVolumeRegion) { */ public void validate() { if (remoteVolumeResourceId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property remoteVolumeResourceId in model ReplicationObject")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ReplicationObject.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationSchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationSchedule.java index ae4b75185d4d..0639beb60483 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationSchedule.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationSchedule.java @@ -30,7 +30,11 @@ public static ReplicationSchedule fromString(String name) { return fromString(name, ReplicationSchedule.class); } - /** @return known ReplicationSchedule values. */ + /** + * Gets known ReplicationSchedule values. + * + * @return known ReplicationSchedule values. + */ public static Collection values() { return values(ReplicationSchedule.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ResourceNameAvailabilityRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ResourceNameAvailabilityRequest.java index 24ec34ac130f..3e18fa755cd4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ResourceNameAvailabilityRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ResourceNameAvailabilityRequest.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Resource name availability request content. */ @Fluent public final class ResourceNameAvailabilityRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceNameAvailabilityRequest.class); - /* * Resource name to verify. */ @@ -99,22 +96,24 @@ public ResourceNameAvailabilityRequest withResourceGroup(String resourceGroup) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property name in model ResourceNameAvailabilityRequest")); } if (type() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property type in model ResourceNameAvailabilityRequest")); } if (resourceGroup() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property resourceGroup in model ResourceNameAvailabilityRequest")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceNameAvailabilityRequest.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecurityStyle.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecurityStyle.java index 3aa59c8153c5..fd23dfd895bb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecurityStyle.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecurityStyle.java @@ -27,7 +27,11 @@ public static SecurityStyle fromString(String name) { return fromString(name, SecurityStyle.class); } - /** @return known SecurityStyle values. */ + /** + * Gets known SecurityStyle values. + * + * @return known SecurityStyle values. + */ public static Collection values() { return values(SecurityStyle.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceLevel.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceLevel.java index 5b85a1d0382a..6cf3ffa421bb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceLevel.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceLevel.java @@ -33,7 +33,11 @@ public static ServiceLevel fromString(String name) { return fromString(name, ServiceLevel.class); } - /** @return known ServiceLevel values. */ + /** + * Gets known ServiceLevel values. + * + * @return known ServiceLevel values. + */ public static Collection values() { return values(ServiceLevel.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceSpecification.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceSpecification.java index 2bebb9ff204c..87769d52e505 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceSpecification.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceSpecification.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** One property of operation, include metric specifications. */ @Fluent public final class ServiceSpecification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceSpecification.class); - /* * Metric specifications of operation. */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPoliciesList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPoliciesList.java index 9760eae3f76f..a0df640062e5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPoliciesList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPoliciesList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of Snapshot Policies. */ @Fluent public final class SnapshotPoliciesList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotPoliciesList.class); - /* * A list of snapshot policies */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicy.java index b6806a4ed86a..a890f26fb3b6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicy.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicy.java @@ -55,7 +55,7 @@ public interface SnapshotPolicy { String etag(); /** - * Gets the systemData property: The system meta data relating to this resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -117,6 +117,13 @@ public interface SnapshotPolicy { */ String regionName(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyInner object. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyPatch.java index e090fcf80038..3ae51ba4e83e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyPatch.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyPatch.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -15,8 +13,6 @@ /** Snapshot policy Details for create and update. */ @Fluent public final class SnapshotPolicyPatch { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotPolicyPatch.class); - /* * Resource location */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotRestoreFiles.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotRestoreFiles.java index 4abe5aae7130..b775edddaf15 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotRestoreFiles.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotRestoreFiles.java @@ -6,15 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Restore payload for Single File Snapshot Restore. */ @Fluent public final class SnapshotRestoreFiles { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotRestoreFiles.class); - /* * List of files to be restored */ @@ -74,9 +71,11 @@ public SnapshotRestoreFiles withDestinationPath(String destinationPath) { */ public void validate() { if (filePaths() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property filePaths in model SnapshotRestoreFiles")); } } + + private static final ClientLogger LOGGER = new ClientLogger(SnapshotRestoreFiles.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotsList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotsList.java index 054800ade20c..9cc7b268d60c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotsList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotsList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.models.SnapshotInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of Snapshots. */ @Fluent public final class SnapshotsList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotsList.class); - /* * A list of Snapshots */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItem.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItem.java index 29796abf2037..2ad30f9ddba6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItem.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItem.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.netapp.models; -import com.azure.core.management.SystemData; import com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner; /** An immutable client-side representation of SubscriptionQuotaItem. */ @@ -30,13 +29,6 @@ public interface SubscriptionQuotaItem { */ String type(); - /** - * Gets the systemData property: The system meta data relating to this resource. - * - * @return the systemData value. - */ - SystemData systemData(); - /** * Gets the current property: The current quota value. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItemList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItemList.java index 97d1fb8b7ae6..0b2322d33485 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItemList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItemList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of Subscription Quota Items. */ @Fluent public final class SubscriptionQuotaItemList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SubscriptionQuotaItemList.class); - /* * A list of SubscriptionQuotaItems */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeInfo.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeInfo.java index 476f8df999c2..8bfcb659d339 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeInfo.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeInfo.java @@ -32,7 +32,7 @@ public interface SubvolumeInfo { String type(); /** - * Gets the systemData property: The system meta data relating to this resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -66,6 +66,13 @@ public interface SubvolumeInfo { */ String provisioningState(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.netapp.fluent.models.SubvolumeInfoInner object. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumePatchRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumePatchRequest.java index f4003c36f2b1..f766f48b6e79 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumePatchRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumePatchRequest.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.models.SubvolumePatchParams; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Subvolume Patch Request properties. */ @Fluent public final class SubvolumePatchRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SubvolumePatchRequest.class); - /* * Subvolume Properties */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumesList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumesList.java index be7da064bbdc..05e2cc84b180 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumesList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumesList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.models.SubvolumeInfoInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of Subvolumes. */ @Fluent public final class SubvolumesList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SubvolumesList.class); - /* * A list of Subvolumes */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Type.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Type.java new file mode 100644 index 000000000000..67e4f20fd108 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Type.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for Type. */ +public final class Type extends ExpandableStringEnum { + /** Static value DefaultUserQuota for Type. */ + public static final Type DEFAULT_USER_QUOTA = fromString("DefaultUserQuota"); + + /** Static value DefaultGroupQuota for Type. */ + public static final Type DEFAULT_GROUP_QUOTA = fromString("DefaultGroupQuota"); + + /** Static value IndividualUserQuota for Type. */ + public static final Type INDIVIDUAL_USER_QUOTA = fromString("IndividualUserQuota"); + + /** Static value IndividualGroupQuota for Type. */ + public static final Type INDIVIDUAL_GROUP_QUOTA = fromString("IndividualGroupQuota"); + + /** + * Creates or finds a Type from its string representation. + * + * @param name a name to look for. + * @return the corresponding Type. + */ + @JsonCreator + public static Type fromString(String name) { + return fromString(name, Type.class); + } + + /** + * Gets known Type values. + * + * @return known Type values. + */ + public static Collection values() { + return values(Type.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VaultList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VaultList.java index 5392f171c952..382e645afa1c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VaultList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VaultList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.models.VaultInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of Vaults. */ @Fluent public final class VaultList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VaultList.class); - /* * A list of vaults */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volume.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volume.java index bdba95b1cd91..8bf20d2e4fba 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volume.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volume.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.netapp.models; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; @@ -57,7 +58,14 @@ public interface Volume { String etag(); /** - * Gets the systemData property: The system meta data relating to this resource. + * Gets the zones property: Availability Zone. + * + * @return the zones value. + */ + List zones(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -245,11 +253,12 @@ public interface Volume { Float throughputMibps(); /** - * Gets the encryptionKeySource property: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. + * Gets the encryptionKeySource property: Source of key used to encrypt data in volume. Possible values + * (case-insensitive) are: 'Microsoft.NetApp'. * * @return the encryptionKeySource value. */ - String encryptionKeySource(); + EncryptionKeySource encryptionKeySource(); /** * Gets the ldapEnabled property: Specifies whether LDAP is enabled or not for a given NFS volume. @@ -369,6 +378,14 @@ public interface Volume { */ String volumeSpecName(); + /** + * Gets the encrypted property: Specifies if the volume is encrypted or not. Only available on volumes created or + * updated after 2022-01-01. + * + * @return the encrypted value. + */ + Boolean encrypted(); + /** * Gets the placementRules property: Volume placement rules Application specific placement rules for the particular * volume. @@ -398,6 +415,13 @@ public interface Volume { */ String regionName(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.netapp.fluent.models.VolumeInner object. * @@ -494,6 +518,7 @@ interface WithSubnetId { */ interface WithCreate extends DefinitionStages.WithTags, + DefinitionStages.WithZones, DefinitionStages.WithServiceLevel, DefinitionStages.WithExportPolicy, DefinitionStages.WithProtocolTypes, @@ -548,6 +573,16 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the Volume definition allowing to specify zones. */ + interface WithZones { + /** + * Specifies the zones property: Availability Zone. + * + * @param zones Availability Zone. + * @return the next definition stage. + */ + WithCreate withZones(List zones); + } /** The stage of the Volume definition allowing to specify serviceLevel. */ interface WithServiceLevel { /** @@ -720,13 +755,14 @@ interface WithThroughputMibps { /** The stage of the Volume definition allowing to specify encryptionKeySource. */ interface WithEncryptionKeySource { /** - * Specifies the encryptionKeySource property: Encryption Key Source. Possible values are: - * 'Microsoft.NetApp'. + * Specifies the encryptionKeySource property: Source of key used to encrypt data in volume. Possible values + * (case-insensitive) are: 'Microsoft.NetApp'. * - * @param encryptionKeySource Encryption Key Source. Possible values are: 'Microsoft.NetApp'. + * @param encryptionKeySource Source of key used to encrypt data in volume. Possible values + * (case-insensitive) are: 'Microsoft.NetApp'. * @return the next definition stage. */ - WithCreate withEncryptionKeySource(String encryptionKeySource); + WithCreate withEncryptionKeySource(EncryptionKeySource encryptionKeySource); } /** The stage of the Volume definition allowing to specify ldapEnabled. */ interface WithLdapEnabled { @@ -1074,6 +1110,24 @@ interface WithUnixPermissions { */ void revert(VolumeRevert body, Context context); + /** + * Reset cifs password from volume. + * + * @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. + */ + void resetCifsPassword(); + + /** + * Reset cifs password from volume. + * + * @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. + */ + void resetCifsPassword(Context context); + /** * Break the replication connection on the destination volume. * @@ -1103,6 +1157,26 @@ interface WithUnixPermissions { */ void breakReplication(BreakReplicationRequest body, Context context); + /** + * List all replications for a specified volume. + * + * @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 Replications as paginated response with {@link PagedIterable}. + */ + PagedIterable listReplications(); + + /** + * List all replications for a specified volume. + * + * @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 Replications as paginated response with {@link PagedIterable}. + */ + PagedIterable listReplications(Context context); + /** * Resync the connection on the destination volume. If the operation is ran on the source volume it will * reverse-resync the connection and sync from destination to source. @@ -1200,4 +1274,58 @@ interface WithUnixPermissions { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void poolChange(PoolChangeRequest body, Context context); + + /** + * Relocates volume to a new stamp. + * + * @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. + */ + void relocate(); + + /** + * Relocates volume to a new stamp. + * + * @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. + */ + void relocate(Context context); + + /** + * Finalizes the relocation of the volume and cleans up the old volume. + * + * @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. + */ + void finalizeRelocation(); + + /** + * Finalizes the relocation of the volume and cleans up the old volume. + * + * @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. + */ + void finalizeRelocation(Context context); + + /** + * Reverts the volume relocation process, cleans up the new volume and starts using the former-existing volume. + * + * @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. + */ + void revertRelocation(); + + /** + * Reverts the volume relocation process, cleans up the new volume and starts using the former-existing volume. + * + * @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. + */ + void revertRelocation(Context context); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupProperties.java index ed59afbc95c6..0f91c94d50d3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Volume Backup Properties. */ @Fluent public final class VolumeBackupProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeBackupProperties.class); - /* * Backup Policy Resource ID */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackups.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackups.java index 83d6d152f7e0..8ac4930e3165 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackups.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackups.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Volume details using the backup policy. */ @Fluent public final class VolumeBackups { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeBackups.class); - /* * Volume name */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroup.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroup.java index c43cfc348589..8bc8461d03dd 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroup.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroup.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.resourcemanager.netapp.fluent.models.VolumeGroupInner; -import java.util.Map; /** An immutable client-side representation of VolumeGroup. */ public interface VolumeGroup { @@ -37,13 +36,6 @@ public interface VolumeGroup { */ String type(); - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - /** * Gets the provisioningState property: Azure lifecycle management. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupDetails.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupDetails.java index a92734a82111..cfdd310893b9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupDetails.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupDetails.java @@ -8,7 +8,6 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.netapp.fluent.models.VolumeGroupDetailsInner; import java.util.List; -import java.util.Map; /** An immutable client-side representation of VolumeGroupDetails. */ public interface VolumeGroupDetails { @@ -40,13 +39,6 @@ public interface VolumeGroupDetails { */ String type(); - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - /** * Gets the provisioningState property: Azure lifecycle management. * @@ -114,10 +106,7 @@ interface WithParentResource { * resource to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithLocation, - DefinitionStages.WithTags, - DefinitionStages.WithGroupMetadata, - DefinitionStages.WithVolumes { + extends DefinitionStages.WithLocation, DefinitionStages.WithGroupMetadata, DefinitionStages.WithVolumes { /** * Executes the create request. * @@ -151,16 +140,6 @@ interface WithLocation { */ WithCreate withRegion(String location); } - /** The stage of the VolumeGroupDetails definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } /** The stage of the VolumeGroupDetails definition allowing to specify groupMetadata. */ interface WithGroupMetadata { /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupList.java index 5fdd44cc5183..0e8190dda01c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.models.VolumeGroupInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of volume group resources. */ @Fluent public final class VolumeGroupList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeGroupList.class); - /* * List of volume Groups */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupMetadata.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupMetadata.java index 404a22053d0f..e53bbd42d89e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupMetadata.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupMetadata.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Volume group properties. */ @Fluent public final class VolumeGroupMetadata { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeGroupMetadata.class); - /* * Group Description */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java index f906fe0ffe04..cf7bf54bbf39 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java @@ -9,7 +9,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.models.MountTargetProperties; import com.azure.resourcemanager.netapp.fluent.models.VolumeProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -18,8 +17,6 @@ /** Volume resource. */ @Fluent public final class VolumeGroupVolumeProperties extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeGroupVolumeProperties.class); - /* * Resource name */ @@ -581,21 +578,23 @@ public VolumeGroupVolumeProperties withThroughputMibps(Float throughputMibps) { } /** - * Get the encryptionKeySource property: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. + * Get the encryptionKeySource property: Source of key used to encrypt data in volume. Possible values + * (case-insensitive) are: 'Microsoft.NetApp'. * * @return the encryptionKeySource value. */ - public String encryptionKeySource() { + public EncryptionKeySource encryptionKeySource() { return this.innerProperties() == null ? null : this.innerProperties().encryptionKeySource(); } /** - * Set the encryptionKeySource property: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. + * Set the encryptionKeySource property: Source of key used to encrypt data in volume. Possible values + * (case-insensitive) are: 'Microsoft.NetApp'. * * @param encryptionKeySource the encryptionKeySource value to set. * @return the VolumeGroupVolumeProperties object itself. */ - public VolumeGroupVolumeProperties withEncryptionKeySource(String encryptionKeySource) { + public VolumeGroupVolumeProperties withEncryptionKeySource(EncryptionKeySource encryptionKeySource) { if (this.innerProperties() == null) { this.innerProperties = new VolumeProperties(); } @@ -913,6 +912,16 @@ public VolumeGroupVolumeProperties withVolumeSpecName(String volumeSpecName) { return this; } + /** + * Get the encrypted property: Specifies if the volume is encrypted or not. Only available on volumes created or + * updated after 2022-01-01. + * + * @return the encrypted value. + */ + public Boolean encrypted() { + return this.innerProperties() == null ? null : this.innerProperties().encrypted(); + } + /** * Get the placementRules property: Volume placement rules Application specific placement rules for the particular * volume. @@ -968,7 +977,7 @@ public VolumeGroupVolumeProperties withEnableSubvolumes(EnableSubvolumes enableS */ public void validate() { if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property innerProperties in model VolumeGroupVolumeProperties")); @@ -976,4 +985,6 @@ public void validate() { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(VolumeGroupVolumeProperties.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeList.java index 46a96f5821eb..8ab8debd66e2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.models.VolumeInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of volume resources. */ @Fluent public final class VolumeList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeList.class); - /* * List of volumes */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java index 75abb67731f3..edbc8f0db90e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java @@ -6,17 +6,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.models.VolumePatchProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** Volume patch resource. */ @Fluent public final class VolumePatch extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumePatch.class); - /* * Patchable volume properties */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java index f56a6dbdd01c..26b45311055a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** DataProtection DataProtection type volumes include an object containing details of the replication. */ @Fluent public final class VolumePatchPropertiesDataProtection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumePatchPropertiesDataProtection.class); - /* * Backup Properties */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesExportPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesExportPolicy.java index 92c1a0378f0f..ba993dca64b5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesExportPolicy.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesExportPolicy.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** exportPolicy Set of export policy rules. */ @Fluent public final class VolumePatchPropertiesExportPolicy { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumePatchPropertiesExportPolicy.class); - /* * Export policy rule */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java index 48eae8c7d113..8bc20cae6d8b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** DataProtection DataProtection type volumes include an object containing details of the replication. */ @Fluent public final class VolumePropertiesDataProtection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumePropertiesDataProtection.class); - /* * Backup Properties */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesExportPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesExportPolicy.java index d01226c7b59f..1368a3a3489e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesExportPolicy.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesExportPolicy.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** exportPolicy Set of export policy rules. */ @Fluent public final class VolumePropertiesExportPolicy { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumePropertiesExportPolicy.class); - /* * Export policy rule */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRule.java new file mode 100644 index 000000000000..5cd649985df3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRule.java @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRuleInner; +import java.util.Map; + +/** An immutable client-side representation of VolumeQuotaRule. */ +public interface VolumeQuotaRule { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: Gets the status of the VolumeQuotaRule at the time the operation was called. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the quotaSizeInKiBs property: Size of quota. + * + * @return the quotaSizeInKiBs value. + */ + Long quotaSizeInKiBs(); + + /** + * Gets the quotaType property: quotaType Type of quota. + * + * @return the quotaType value. + */ + Type quotaType(); + + /** + * Gets the quotaTarget property: UserID/GroupID/SID based on the quota target type. UserID and groupID can be found + * by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running <wmic useraccount + * where name='user-name' get sid>. + * + * @return the quotaTarget value. + */ + String quotaTarget(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRuleInner object. + * + * @return the inner object. + */ + VolumeQuotaRuleInner innerModel(); + + /** The entirety of the VolumeQuotaRule definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, + DefinitionStages.WithCreate { + } + /** The VolumeQuotaRule definition stages. */ + interface DefinitionStages { + /** The first stage of the VolumeQuotaRule definition. */ + interface Blank extends WithLocation { + } + /** The stage of the VolumeQuotaRule definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + /** The stage of the VolumeQuotaRule definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, accountName, poolName, volumeName. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @return the next definition stage. + */ + WithCreate withExistingVolume( + String resourceGroupName, String accountName, String poolName, String volumeName); + } + /** + * The stage of the VolumeQuotaRule definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithQuotaSizeInKiBs, + DefinitionStages.WithQuotaType, + DefinitionStages.WithQuotaTarget { + /** + * Executes the create request. + * + * @return the created resource. + */ + VolumeQuotaRule create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + VolumeQuotaRule create(Context context); + } + /** The stage of the VolumeQuotaRule definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** The stage of the VolumeQuotaRule definition allowing to specify quotaSizeInKiBs. */ + interface WithQuotaSizeInKiBs { + /** + * Specifies the quotaSizeInKiBs property: Size of quota. + * + * @param quotaSizeInKiBs Size of quota. + * @return the next definition stage. + */ + WithCreate withQuotaSizeInKiBs(Long quotaSizeInKiBs); + } + /** The stage of the VolumeQuotaRule definition allowing to specify quotaType. */ + interface WithQuotaType { + /** + * Specifies the quotaType property: quotaType Type of quota. + * + * @param quotaType quotaType Type of quota. + * @return the next definition stage. + */ + WithCreate withQuotaType(Type quotaType); + } + /** The stage of the VolumeQuotaRule definition allowing to specify quotaTarget. */ + interface WithQuotaTarget { + /** + * Specifies the quotaTarget property: UserID/GroupID/SID based on the quota target type. UserID and groupID + * can be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running + * <wmic useraccount where name='user-name' get sid>. + * + * @param quotaTarget UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by + * running ‘id’ or ‘getent’ command for the user or group and SID can be found by running <wmic + * useraccount where name='user-name' get sid>. + * @return the next definition stage. + */ + WithCreate withQuotaTarget(String quotaTarget); + } + } + /** + * Begins update for the VolumeQuotaRule resource. + * + * @return the stage of resource update. + */ + VolumeQuotaRule.Update update(); + + /** The template for VolumeQuotaRule update. */ + interface Update extends UpdateStages.WithQuotaSizeInKiBs { + /** + * Executes the update request. + * + * @return the updated resource. + */ + VolumeQuotaRule apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + VolumeQuotaRule apply(Context context); + } + /** The VolumeQuotaRule update stages. */ + interface UpdateStages { + /** The stage of the VolumeQuotaRule update allowing to specify quotaSizeInKiBs. */ + interface WithQuotaSizeInKiBs { + /** + * Specifies the quotaSizeInKiBs property: Size of quota. + * + * @param quotaSizeInKiBs Size of quota. + * @return the next definition stage. + */ + Update withQuotaSizeInKiBs(Long quotaSizeInKiBs); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + VolumeQuotaRule refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + VolumeQuotaRule refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulePatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulePatch.java new file mode 100644 index 000000000000..bba88f896d1c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulePatch.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRulesProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Patchable Quota Rule of a Volume. */ +@Fluent +public final class VolumeQuotaRulePatch { + /* + * Volume Quota Rule Properties + */ + @JsonProperty(value = "properties") + private VolumeQuotaRulesProperties innerProperties; + + /** + * Get the innerProperties property: Volume Quota Rule Properties. + * + * @return the innerProperties value. + */ + private VolumeQuotaRulesProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the provisioningState property: Gets the status of the VolumeQuotaRule at the time the operation was called. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the quotaSizeInKiBs property: Size of quota. + * + * @return the quotaSizeInKiBs value. + */ + public Long quotaSizeInKiBs() { + return this.innerProperties() == null ? null : this.innerProperties().quotaSizeInKiBs(); + } + + /** + * Set the quotaSizeInKiBs property: Size of quota. + * + * @param quotaSizeInKiBs the quotaSizeInKiBs value to set. + * @return the VolumeQuotaRulePatch object itself. + */ + public VolumeQuotaRulePatch withQuotaSizeInKiBs(Long quotaSizeInKiBs) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeQuotaRulesProperties(); + } + this.innerProperties().withQuotaSizeInKiBs(quotaSizeInKiBs); + return this; + } + + /** + * Get the quotaType property: quotaType Type of quota. + * + * @return the quotaType value. + */ + public Type quotaType() { + return this.innerProperties() == null ? null : this.innerProperties().quotaType(); + } + + /** + * Set the quotaType property: quotaType Type of quota. + * + * @param quotaType the quotaType value to set. + * @return the VolumeQuotaRulePatch object itself. + */ + public VolumeQuotaRulePatch withQuotaType(Type quotaType) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeQuotaRulesProperties(); + } + this.innerProperties().withQuotaType(quotaType); + return this; + } + + /** + * Get the quotaTarget property: UserID/GroupID/SID based on the quota target type. UserID and groupID can be found + * by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running <wmic useraccount + * where name='user-name' get sid>. + * + * @return the quotaTarget value. + */ + public String quotaTarget() { + return this.innerProperties() == null ? null : this.innerProperties().quotaTarget(); + } + + /** + * Set the quotaTarget property: UserID/GroupID/SID based on the quota target type. UserID and groupID can be found + * by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running <wmic useraccount + * where name='user-name' get sid>. + * + * @param quotaTarget the quotaTarget value to set. + * @return the VolumeQuotaRulePatch object itself. + */ + public VolumeQuotaRulePatch withQuotaTarget(String quotaTarget) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeQuotaRulesProperties(); + } + this.innerProperties().withQuotaTarget(quotaTarget); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRules.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRules.java new file mode 100644 index 000000000000..5eb431c6b006 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRules.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.netapp.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of VolumeQuotaRules. */ +public interface VolumeQuotaRules { + /** + * List all quota rules associated with the volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 Volume Quota Rules as paginated response with {@link PagedIterable}. + */ + PagedIterable listByVolume( + String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * List all quota rules associated with the volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 Volume Quota Rules as paginated response with {@link PagedIterable}. + */ + PagedIterable listByVolume( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + + /** + * Get details of the specified quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified quota rule. + */ + VolumeQuotaRule get( + String resourceGroupName, String accountName, String poolName, String volumeName, String volumeQuotaRuleName); + + /** + * Get details of the specified quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified quota rule along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + Context context); + + /** + * Delete quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @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. + */ + void delete( + String resourceGroupName, String accountName, String poolName, String volumeName, String volumeQuotaRuleName); + + /** + * Delete quota rule. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param volumeQuotaRuleName The name of volume quota rule. + * @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. + */ + void delete( + String resourceGroupName, + String accountName, + String poolName, + String volumeName, + String volumeQuotaRuleName, + Context context); + + /** + * Get details of the specified quota rule. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified quota rule along with {@link Response}. + */ + VolumeQuotaRule getById(String id); + + /** + * Get details of the specified quota rule. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified quota rule along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete quota rule. + * + * @param id the resource ID. + * @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. + */ + void deleteById(String id); + + /** + * Delete quota rule. + * + * @param id the resource ID. + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new VolumeQuotaRule resource. + * + * @param name resource name. + * @return the first stage of the new VolumeQuotaRule definition. + */ + VolumeQuotaRule.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulesList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulesList.java new file mode 100644 index 000000000000..93b82a173fc8 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulesList.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRuleInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of Volume Quota Rules. */ +@Fluent +public final class VolumeQuotaRulesList { + /* + * A list of Volume Quota Rules + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value property: A list of Volume Quota Rules. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of Volume Quota Rules. + * + * @param value the value value to set. + * @return the VolumeQuotaRulesList object itself. + */ + public VolumeQuotaRulesList withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeRevert.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeRevert.java index ae33a731af3f..961747d5f529 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeRevert.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeRevert.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** revert a volume to the snapshot. */ @Fluent public final class VolumeRevert { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeRevert.class); - /* * Resource id of the snapshot */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeSnapshotProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeSnapshotProperties.java index 65cb1f1a8fec..8cdeb9d91563 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeSnapshotProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeSnapshotProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Volume Snapshot Properties. */ @Fluent public final class VolumeSnapshotProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeSnapshotProperties.class); - /* * Snapshot Policy ResourceId */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeStorageToNetworkProximity.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeStorageToNetworkProximity.java index 8972f77103ae..a1f0f1da464e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeStorageToNetworkProximity.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeStorageToNetworkProximity.java @@ -30,7 +30,11 @@ public static VolumeStorageToNetworkProximity fromString(String name) { return fromString(name, VolumeStorageToNetworkProximity.class); } - /** @return known VolumeStorageToNetworkProximity values. */ + /** + * Gets known VolumeStorageToNetworkProximity values. + * + * @return known VolumeStorageToNetworkProximity values. + */ public static Collection values() { return values(VolumeStorageToNetworkProximity.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java index 8a07b07e93e3..c342a5f2898f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java @@ -152,6 +152,34 @@ void revert( VolumeRevert body, Context context); + /** + * Reset cifs password from volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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. + */ + void resetCifsPassword(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Reset cifs password from volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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. + */ + void resetCifsPassword( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + /** * Break the replication connection on the destination volume. * @@ -232,6 +260,37 @@ ReplicationStatus replicationStatus( Response replicationStatusWithResponse( String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + /** + * List all replications for a specified volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 Replications as paginated response with {@link PagedIterable}. + */ + PagedIterable listReplications( + String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * List all replications for a specified volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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 Replications as paginated response with {@link PagedIterable}. + */ + PagedIterable listReplications( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + /** * Resync the connection on the destination volume. If the operation is ran on the source volume it will * reverse-resync the connection and sync from destination to source. @@ -390,6 +449,89 @@ void poolChange( PoolChangeRequest body, Context context); + /** + * Relocates volume to a new stamp. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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. + */ + void relocate(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Relocates volume to a new stamp. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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. + */ + void relocate(String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + + /** + * Finalizes the relocation of the volume and cleans up the old volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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. + */ + void finalizeRelocation(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Finalizes the relocation of the volume and cleans up the old volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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. + */ + void finalizeRelocation( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + + /** + * Reverts the volume relocation process, cleans up the new volume and starts using the former-existing volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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. + */ + void revertRelocation(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Reverts the volume relocation process, cleans up the new volume and starts using the former-existing volume. + * + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @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. + */ + void revertRelocation( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + /** * Get the details of the specified volume. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/WeeklySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/WeeklySchedule.java index 95a94f47299e..141e2e1050a0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/WeeklySchedule.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/WeeklySchedule.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Weekly Schedule properties, make a snapshot every week at a specific day or days. */ @Fluent public final class WeeklySchedule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WeeklySchedule.class); - /* * Weekly snapshot count to keep */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsDeleteSamples.java index 95a463d750dc..94418f62d04f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for AccountBackups Delete. */ public final class AccountBackupsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Account_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Backups_Account_Delete.json */ /** * Sample code: AccountBackups_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsGetSamples.java index 03ab8f8265a8..ef4b2c6c3858 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for AccountBackups Get. */ public final class AccountBackupsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Account_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Backups_Account_Get.json */ /** * Sample code: AccountBackups_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsListSamples.java index 4b0eee224d3d..29ee45b4d296 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsListSamples.java @@ -9,7 +9,7 @@ /** Samples for AccountBackups List. */ public final class AccountBackupsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Account_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Backups_Account_List.json */ /** * Sample code: AccountBackups_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsCreateOrUpdateSamples.java index 56a18af054e8..934c31de13ae 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsCreateOrUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsCreateOrUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for Accounts CreateOrUpdate. */ public final class AccountsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_CreateOrUpdate.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Accounts_CreateOrUpdate.json */ /** * Sample code: Accounts_CreateOrUpdate. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsDeleteSamples.java index 07a46d8827ab..9e3495d7025a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for Accounts Delete. */ public final class AccountsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Accounts_Delete.json */ /** * Sample code: Accounts_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetByResourceGroupSamples.java index 0e03bb1d3e2c..a67ee4fd4aea 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetByResourceGroupSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for Accounts GetByResourceGroup. */ public final class AccountsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Accounts_Get.json */ /** * Sample code: Accounts_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListByResourceGroupSamples.java index e3bc022da6af..53a0a4c9b289 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListByResourceGroupSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for Accounts ListByResourceGroup. */ public final class AccountsListByResourceGroupSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Accounts_List.json */ /** * Sample code: Accounts_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListSamples.java index 39b468d0f576..06bc93e67c0d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListSamples.java @@ -9,7 +9,7 @@ /** Samples for Accounts List. */ public final class AccountsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Accounts_List.json */ /** * Sample code: Accounts_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsUpdateSamples.java index 5050dd399fab..8de77c75ac4b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsUpdateSamples.java @@ -12,7 +12,7 @@ /** Samples for Accounts Update. */ public final class AccountsUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Accounts_Update.json */ /** * Sample code: Accounts_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateSamples.java index ea4f762ab03d..cd46675d0747 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateSamples.java @@ -7,7 +7,7 @@ /** Samples for BackupPolicies Create. */ public final class BackupPoliciesCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_Create.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/BackupPolicies_Create.json */ /** * Sample code: BackupPolicies_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteSamples.java index 8271d6b7b5dc..cfcf3ef03419 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for BackupPolicies Delete. */ public final class BackupPoliciesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/BackupPolicies_Delete.json */ /** * Sample code: Backups_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetSamples.java index 05d0a95a4ad2..0301d0aa4772 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetSamples.java @@ -9,7 +9,7 @@ /** Samples for BackupPolicies Get. */ public final class BackupPoliciesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/BackupPolicies_Get.json */ /** * Sample code: Backups_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListSamples.java index d5ad18a2a93f..9833e176c5f3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListSamples.java @@ -9,7 +9,7 @@ /** Samples for BackupPolicies List. */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/BackupPolicies_List.json */ /** * Sample code: Backups_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesUpdateSamples.java index ca118a2c1a68..96d88f5af4f0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for BackupPolicies Update. */ public final class BackupPoliciesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/BackupPolicies_Update.json */ /** * Sample code: BackupPolicies_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsCreateSamples.java index 6744f166d32e..71a873da156d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsCreateSamples.java @@ -7,7 +7,7 @@ /** Samples for Backups Create. */ public final class BackupsCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Create.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Backups_Create.json */ /** * Sample code: Backups_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsDeleteSamples.java index 34a6aa0d21de..d311fe87aad0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for Backups Delete. */ public final class BackupsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Backups_Delete.json */ /** * Sample code: Backups_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetSamples.java index 405f58ec4921..bb3cb26ecf13 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for Backups Get. */ public final class BackupsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Backups_Get.json */ /** * Sample code: Backups_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetStatusSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetStatusSamples.java index 223b2582f83d..f68f87ade963 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetStatusSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetStatusSamples.java @@ -9,7 +9,7 @@ /** Samples for Backups GetStatus. */ public final class BackupsGetStatusSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_BackupStatus.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_BackupStatus.json */ /** * Sample code: Volumes_BackupStatus. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeRestoreStatusSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeRestoreStatusSamples.java index 4336960c29ec..f26b9af760f3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeRestoreStatusSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeRestoreStatusSamples.java @@ -9,7 +9,7 @@ /** Samples for Backups GetVolumeRestoreStatus. */ public final class BackupsGetVolumeRestoreStatusSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_RestoreStatus.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_RestoreStatus.json */ /** * Sample code: Volumes_RestoreStatus. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListSamples.java index 282846f5d74b..408df5183e1c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListSamples.java @@ -9,7 +9,7 @@ /** Samples for Backups List. */ public final class BackupsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Backups_List.json */ /** * Sample code: Backups_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUpdateSamples.java index 218bf2235aaa..a0924dada85c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for Backups Update. */ public final class BackupsUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Backups_Update.json */ /** * Sample code: Backups_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckFilePathAvailabilitySamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckFilePathAvailabilitySamples.java index 1fbc626daf72..bbd3dc3c2284 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckFilePathAvailabilitySamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckFilePathAvailabilitySamples.java @@ -10,7 +10,7 @@ /** Samples for NetAppResource CheckFilePathAvailability. */ public final class NetAppResourceCheckFilePathAvailabilitySamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/CheckFilePathAvailability.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/CheckFilePathAvailability.json */ /** * Sample code: CheckFilePathAvailability. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckNameAvailabilitySamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckNameAvailabilitySamples.java index c74c3b51720f..ec56dd8369e8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckNameAvailabilitySamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckNameAvailabilitySamples.java @@ -11,7 +11,7 @@ /** Samples for NetAppResource CheckNameAvailability. */ public final class NetAppResourceCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/CheckNameAvailability.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/CheckNameAvailability.json */ /** * Sample code: CheckNameAvailability. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckQuotaAvailabilitySamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckQuotaAvailabilitySamples.java index db3315955d27..d47ad66a7ee8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckQuotaAvailabilitySamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckQuotaAvailabilitySamples.java @@ -11,7 +11,7 @@ /** Samples for NetAppResource CheckQuotaAvailability. */ public final class NetAppResourceCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/CheckQuotaAvailability.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/CheckQuotaAvailability.json */ /** * Sample code: CheckQuotaAvailability. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetSamples.java index bb8fe536d24d..fe2507910d4c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for NetAppResourceQuotaLimits Get. */ public final class NetAppResourceQuotaLimitsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/QuotaLimits_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/QuotaLimits_Get.json */ /** * Sample code: QuotaLimits. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListSamples.java index f820a4d73d9f..be8c255e4e2b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListSamples.java @@ -9,7 +9,7 @@ /** Samples for NetAppResourceQuotaLimits List. */ public final class NetAppResourceQuotaLimitsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/QuotaLimits_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/QuotaLimits_List.json */ /** * Sample code: QuotaLimits. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/OperationsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/OperationsListSamples.java index c7f3a5e9c20a..ccee7b750b71 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/OperationsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/OperationList.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/OperationList.json */ /** * Sample code: OperationList. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateSamples.java index 60c565566259..a2aa7528ae53 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for Pools CreateOrUpdate. */ public final class PoolsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Pools_CreateOrUpdate.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Pools_CreateOrUpdate.json */ /** * Sample code: Pools_CreateOrUpdate. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsDeleteSamples.java index 6e0f9a6fa1cb..9f91b0aca47d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for Pools Delete. */ public final class PoolsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Pools_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Pools_Delete.json */ /** * Sample code: Pools_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsGetSamples.java index a0a00bf31f89..28aa323ec941 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for Pools Get. */ public final class PoolsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Pools_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Pools_Get.json */ /** * Sample code: Pools_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsListSamples.java index 3d22232eb339..fb8a198433ad 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsListSamples.java @@ -9,7 +9,7 @@ /** Samples for Pools List. */ public final class PoolsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Pools_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Pools_List.json */ /** * Sample code: Pools_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsUpdateSamples.java index 6d376d7f47ca..8641e7409109 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for Pools Update. */ public final class PoolsUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Pools_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Pools_Update.json */ /** * Sample code: Pools_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateSamples.java index 43b970864c82..baf41f172323 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateSamples.java @@ -12,7 +12,7 @@ /** Samples for SnapshotPolicies Create. */ public final class SnapshotPoliciesCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_Create.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/SnapshotPolicies_Create.json */ /** * Sample code: SnapshotPolicies_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteSamples.java index 3f12113cc429..9765f9700da3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for SnapshotPolicies Delete. */ public final class SnapshotPoliciesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/SnapshotPolicies_Delete.json */ /** * Sample code: SnapshotPolicies_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetSamples.java index 2e1c0ce29383..3282f6f276b9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetSamples.java @@ -9,7 +9,7 @@ /** Samples for SnapshotPolicies Get. */ public final class SnapshotPoliciesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/SnapshotPolicies_Get.json */ /** * Sample code: SnapshotPolicies_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListSamples.java index 33252fbd8d1c..5ded3634389f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListSamples.java @@ -9,7 +9,7 @@ /** Samples for SnapshotPolicies List. */ public final class SnapshotPoliciesListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/SnapshotPolicies_List.json */ /** * Sample code: SnapshotPolicies_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListVolumesSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListVolumesSamples.java index d88bd7900d48..39a1bc64001b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListVolumesSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListVolumesSamples.java @@ -9,7 +9,7 @@ /** Samples for SnapshotPolicies ListVolumes. */ public final class SnapshotPoliciesListVolumesSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_ListVolumes.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/SnapshotPolicies_ListVolumes.json */ /** * Sample code: SnapshotPolicies_ListVolumes. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesUpdateSamples.java index d7ae111af577..9fe255d4a0e7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesUpdateSamples.java @@ -14,7 +14,7 @@ /** Samples for SnapshotPolicies Update. */ public final class SnapshotPoliciesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/SnapshotPolicies_Update.json */ /** * Sample code: SnapshotPolicies_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsCreateSamples.java index 70a3eeb82674..e05eedc93ed6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsCreateSamples.java @@ -7,7 +7,7 @@ /** Samples for Snapshots Create. */ public final class SnapshotsCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_Create.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Snapshots_Create.json */ /** * Sample code: Snapshots_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteSamples.java index 29d8ad4171ce..08ae5d810ae2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for Snapshots Delete. */ public final class SnapshotsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Snapshots_Delete.json */ /** * Sample code: Snapshots_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetSamples.java index 3c1235fb3057..afcdb3236ee6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for Snapshots Get. */ public final class SnapshotsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Snapshots_Get.json */ /** * Sample code: Snapshots_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsListSamples.java index 474f4ebf35fd..ae4a2d0275a0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsListSamples.java @@ -9,7 +9,7 @@ /** Samples for Snapshots List. */ public final class SnapshotsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Snapshots_List.json */ /** * Sample code: Snapshots_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesSamples.java index 60f85f58b9e4..58170c126329 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesSamples.java @@ -11,7 +11,7 @@ /** Samples for Snapshots RestoreFiles. */ public final class SnapshotsRestoreFilesSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_SingleFileRestore.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Snapshots_SingleFileRestore.json */ /** * Sample code: Snapshots_SingleFileRestore. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateSamples.java index 4ea42d25dd9c..8078469d7e47 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateSamples.java @@ -12,7 +12,7 @@ /** Samples for Snapshots Update. */ public final class SnapshotsUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Snapshots_Update.json */ /** * Sample code: Snapshots_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateSamples.java index 61952674735e..e1b37944cdaf 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateSamples.java @@ -7,7 +7,7 @@ /** Samples for Subvolumes Create. */ public final class SubvolumesCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_Create.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Subvolumes_Create.json */ /** * Sample code: Subvolumes_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteSamples.java index 355b9bee4ab2..f25c3650f3e3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for Subvolumes Delete. */ public final class SubvolumesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Subvolumes_Delete.json */ /** * Sample code: Subvolumes_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataSamples.java index 5d85b9b5ccc4..6059290adc25 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataSamples.java @@ -9,7 +9,7 @@ /** Samples for Subvolumes GetMetadata. */ public final class SubvolumesGetMetadataSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_Metadata.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Subvolumes_Metadata.json */ /** * Sample code: Subvolumes_Metadata. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetSamples.java index 637942a891fb..ebfd3b40483b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetSamples.java @@ -9,7 +9,7 @@ /** Samples for Subvolumes Get. */ public final class SubvolumesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Subvolumes_Get.json */ /** * Sample code: Subvolumes_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeSamples.java index dade5886e987..86fe058c07af 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeSamples.java @@ -9,7 +9,7 @@ /** Samples for Subvolumes ListByVolume. */ public final class SubvolumesListByVolumeSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Subvolumes_List.json */ /** * Sample code: Subvolumes_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesUpdateSamples.java index 89156d49c165..dc49b763958b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for Subvolumes Update. */ public final class SubvolumesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Subvolumes_Update.json */ /** * Sample code: Subvolumes_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VaultsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VaultsListSamples.java index 298ef3264754..6901ef513956 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VaultsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VaultsListSamples.java @@ -9,7 +9,7 @@ /** Samples for Vaults List. */ public final class VaultsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Vaults_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Vaults_List.json */ /** * Sample code: Vaults_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsCreateSamples.java index d3ca239b7cfd..5a9cdbd50ca4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsCreateSamples.java @@ -13,7 +13,7 @@ /** Samples for VolumeGroups Create. */ public final class VolumeGroupsCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/VolumeGroups_Create.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/VolumeGroups_Create.json */ /** * Sample code: VolumeGroups_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteSamples.java index 7277310ed37c..a82329f31a5b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for VolumeGroups Delete. */ public final class VolumeGroupsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/VolumeGroups_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/VolumeGroups_Delete.json */ /** * Sample code: VolumeGroups_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsGetSamples.java index a6922195b9d8..2c19cb6bade7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for VolumeGroups Get. */ public final class VolumeGroupsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/VolumeGroups_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/VolumeGroups_Get.json */ /** * Sample code: VolumeGroups_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsListByNetAppAccountSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsListByNetAppAccountSamples.java index 58ac083899cf..f4869b51bef5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsListByNetAppAccountSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsListByNetAppAccountSamples.java @@ -9,7 +9,7 @@ /** Samples for VolumeGroups ListByNetAppAccount. */ public final class VolumeGroupsListByNetAppAccountSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/VolumeGroups_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/VolumeGroups_List.json */ /** * Sample code: VolumeGroups_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateSamples.java new file mode 100644 index 000000000000..dfc8b3cec76f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.Type; + +/** Samples for VolumeQuotaRules Create. */ +public final class VolumeQuotaRulesCreateSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/VolumeQuotaRules_Create.json + */ + /** + * Sample code: VolumeQuotaRules_Create. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumeQuotaRulesCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager + .volumeQuotaRules() + .define("rule-0004") + .withRegion("westus") + .withExistingVolume("myRG", "account-9957", "pool-5210", "volume-6387") + .withQuotaSizeInKiBs(100005L) + .withQuotaType(Type.INDIVIDUAL_USER_QUOTA) + .withQuotaTarget("1821") + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteSamples.java new file mode 100644 index 000000000000..49fded5c3541 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.Context; + +/** Samples for VolumeQuotaRules Delete. */ +public final class VolumeQuotaRulesDeleteSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/VolumeQuotaRules_Delete.json + */ + /** + * Sample code: VolumeQuotaRules_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumeQuotaRulesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager + .volumeQuotaRules() + .delete("myRG", "account-9957", "pool-5210", "volume-6387", "rule-0004", Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetSamples.java new file mode 100644 index 000000000000..d51481d6ff33 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.Context; + +/** Samples for VolumeQuotaRules Get. */ +public final class VolumeQuotaRulesGetSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/VolumeQuotaRules_Get.json + */ + /** + * Sample code: VolumeQuotaRules_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumeQuotaRulesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager + .volumeQuotaRules() + .getWithResponse("myRG", "account-9957", "pool-5210", "volume-6387", "rule-0004", Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeSamples.java new file mode 100644 index 000000000000..5ab784d9c111 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.Context; + +/** Samples for VolumeQuotaRules ListByVolume. */ +public final class VolumeQuotaRulesListByVolumeSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/VolumeQuotaRules_List.json + */ + /** + * Sample code: VolumeQuotaRules_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumeQuotaRulesList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumeQuotaRules().listByVolume("myRG", "account-9957", "pool-5210", "volume-6387", Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesUpdateSamples.java new file mode 100644 index 000000000000..2bee33c5265c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesUpdateSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.models.VolumeQuotaRule; + +/** Samples for VolumeQuotaRules Update. */ +public final class VolumeQuotaRulesUpdateSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/VolumeQuotaRules_Update.json + */ + /** + * Sample code: VolumeQuotaRules_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumeQuotaRulesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + VolumeQuotaRule resource = + manager + .volumeQuotaRules() + .getWithResponse("myRG", "account-9957", "pool-5210", "volume-6387", "rule-0004", Context.NONE) + .getValue(); + resource.update().withQuotaSizeInKiBs(100009L).apply(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationSamples.java index 87f65422549e..9b018fe351ca 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationSamples.java @@ -10,7 +10,7 @@ /** Samples for Volumes AuthorizeReplication. */ public final class VolumesAuthorizeReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_AuthorizeReplication.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_AuthorizeReplication.json */ /** * Sample code: Volumes_AuthorizeReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationSamples.java index ef5d97aef16c..2646d3640755 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationSamples.java @@ -10,7 +10,7 @@ /** Samples for Volumes BreakReplication. */ public final class VolumesBreakReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_BreakReplication.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_BreakReplication.json */ /** * Sample code: Volumes_BreakReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOrUpdateSamples.java index 0a5b4d7e7071..58c75edf1ec0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOrUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOrUpdateSamples.java @@ -4,12 +4,13 @@ package com.azure.resourcemanager.netapp.generated; +import com.azure.resourcemanager.netapp.models.EncryptionKeySource; import com.azure.resourcemanager.netapp.models.ServiceLevel; /** Samples for Volumes CreateOrUpdate. */ public final class VolumesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_CreateOrUpdate.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_CreateOrUpdate.json */ /** * Sample code: Volumes_CreateOrUpdate. @@ -28,7 +29,7 @@ public static void volumesCreateOrUpdate(com.azure.resourcemanager.netapp.NetApp "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") .withServiceLevel(ServiceLevel.PREMIUM) .withThroughputMibps(128.0f) - .withEncryptionKeySource("Microsoft.KeyVault") + .withEncryptionKeySource(EncryptionKeySource.fromString("Microsoft.KeyVault")) .create(); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationSamples.java index 40d590b413b7..1cdb4580ce2a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationSamples.java @@ -9,7 +9,7 @@ /** Samples for Volumes DeleteReplication. */ public final class VolumesDeleteReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_DeleteReplication.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_DeleteReplication.json */ /** * Sample code: Volumes_DeleteReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteSamples.java index 1983a5e85a97..3163db13d7b3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for Volumes Delete. */ public final class VolumesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_Delete.json */ /** * Sample code: Volumes_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationSamples.java new file mode 100644 index 000000000000..397e3924aba4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.Context; + +/** Samples for Volumes FinalizeRelocation. */ +public final class VolumesFinalizeRelocationSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_FinalizeRelocation.json + */ + /** + * Sample code: Volumes_FinalizeRelocation. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesFinalizeRelocation(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().finalizeRelocation("myRG", "account1", "pool1", "volume1", Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesGetSamples.java index 050e7b653d0c..ed8af1272fb0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesGetSamples.java @@ -9,7 +9,7 @@ /** Samples for Volumes Get. */ public final class VolumesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_Get.json */ /** * Sample code: Volumes_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsSamples.java new file mode 100644 index 000000000000..9840b8cd0888 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.Context; + +/** Samples for Volumes ListReplications. */ +public final class VolumesListReplicationsSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_ListReplications.json + */ + /** + * Sample code: Volumes_ListReplications. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesListReplications(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().listReplications("myRG", "account1", "pool1", "volume1", Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListSamples.java index 294e3c3270f1..53ab34516d05 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListSamples.java @@ -9,7 +9,7 @@ /** Samples for Volumes List. */ public final class VolumesListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_List.json */ /** * Sample code: Volumes_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeSamples.java index a2cb9d5a945d..67ceece74431 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeSamples.java @@ -10,7 +10,7 @@ /** Samples for Volumes PoolChange. */ public final class VolumesPoolChangeSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_PoolChange.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_PoolChange.json */ /** * Sample code: Volumes_AuthorizeReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationSamples.java index cbd857c051a8..8f8223beccb8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationSamples.java @@ -9,7 +9,7 @@ /** Samples for Volumes ReInitializeReplication. */ public final class VolumesReInitializeReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_ReInitializeReplication.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_ReInitializeReplication.json */ /** * Sample code: Volumes_ReInitializeReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRelocateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRelocateSamples.java new file mode 100644 index 000000000000..613a7782aafd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRelocateSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.Context; + +/** Samples for Volumes Relocate. */ +public final class VolumesRelocateSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_Relocate.json + */ + /** + * Sample code: Volumes_Relocate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesRelocate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().relocate("myRG", "account1", "pool1", "volume1", Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusSamples.java index 37e0dd6fdb04..fed92d0b0b11 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusSamples.java @@ -9,7 +9,7 @@ /** Samples for Volumes ReplicationStatus. */ public final class VolumesReplicationStatusSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_ReplicationStatus.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_ReplicationStatus.json */ /** * Sample code: Volumes_ReplicationStatus. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResetCifsPasswordSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResetCifsPasswordSamples.java new file mode 100644 index 000000000000..21442f569ef1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResetCifsPasswordSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.Context; + +/** Samples for Volumes ResetCifsPassword. */ +public final class VolumesResetCifsPasswordSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_ResetCifsPassword.json + */ + /** + * Sample code: Volumes_ResetCifsPassword. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesResetCifsPassword(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().resetCifsPassword("myRG", "account1", "pool1", "volume1", Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationSamples.java index 5260e6485705..f78060db1544 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationSamples.java @@ -9,7 +9,7 @@ /** Samples for Volumes ResyncReplication. */ public final class VolumesResyncReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_ResyncReplication.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_ResyncReplication.json */ /** * Sample code: Volumes_ResyncReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationSamples.java new file mode 100644 index 000000000000..ebf186d567ce --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.Context; + +/** Samples for Volumes RevertRelocation. */ +public final class VolumesRevertRelocationSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_RevertRelocation.json + */ + /** + * Sample code: Volumes_RevertRelocation. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesRevertRelocation(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().revertRelocation("myRG", "account1", "pool1", "volume1", Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertSamples.java index ee0166e82ed7..85f0bda53bf0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertSamples.java @@ -10,7 +10,7 @@ /** Samples for Volumes Revert. */ public final class VolumesRevertSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_Revert.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_Revert.json */ /** * Sample code: Volumes_Revert. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesUpdateSamples.java index 6170d648abcc..27b315600665 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for Volumes Update. */ public final class VolumesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2022-01-01/examples/Volumes_Update.json */ /** * Sample code: Volumes_Update.