From 49892ee37b211b60205ec52885fb09908d3ef75a Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 29 May 2024 15:15:56 +0000 Subject: [PATCH] CodeGen from PR 29206 in Azure/azure-rest-api-specs Merge cd38838dc8106d619da480d2526db4c37d13d07f into 45ed7d13be79760a39301ff85cc0937f017329de --- .../azure-resourcemanager-netapp/CHANGELOG.md | 4 +- .../azure-resourcemanager-netapp/README.md | 4 +- .../azure-resourcemanager-netapp/SAMPLE.md | 1705 +++++++--- .../azure-resourcemanager-netapp/pom.xml | 4 +- .../netapp/NetAppFilesManager.java | 144 +- .../netapp/fluent/AccountsClient.java | 206 ++ .../netapp/fluent/BackupVaultsClient.java | 299 ++ .../netapp/fluent/BackupsClient.java | 354 +- .../fluent/BackupsUnderAccountsClient.java | 83 + .../BackupsUnderBackupVaultsClient.java | 93 + .../fluent/BackupsUnderVolumesClient.java | 93 + .../netapp/fluent/NetAppManagementClient.java | 49 +- .../NetAppResourceRegionInfosClient.java | 75 + .../netapp/fluent/VolumesClient.java | 380 +++ .../fluent/models/AccountProperties.java | 43 + .../netapp/fluent/models/BackupInner.java | 234 ++ .../fluent/models/BackupPatchProperties.java | 54 + .../fluent/models/BackupPolicyInner.java | 5 +- .../fluent/models/BackupProperties.java | 261 ++ .../fluent/models/BackupStatusInner.java | 165 + .../fluent/models/BackupVaultInner.java | 91 + .../fluent/models/BackupVaultProperties.java | 43 + .../fluent/models/CapacityPoolInner.java | 9 +- .../CheckAvailabilityResponseInner.java | 18 +- .../ClusterPeerCommandResponseInner.java | 58 + .../fluent/models/MountTargetProperties.java | 5 +- .../fluent/models/NetAppAccountInner.java | 34 + .../fluent/models/NetworkSiblingSetInner.java | 4 +- .../fluent/models/PoolPatchProperties.java | 3 +- .../netapp/fluent/models/PoolProperties.java | 14 +- .../models/RegionInfoResourceInner.java | 122 + .../fluent/models/ReplicationInner.java | 20 +- .../netapp/fluent/models/SnapshotInner.java | 4 +- .../fluent/models/SnapshotPolicyInner.java | 5 +- .../models/SvmPeerCommandResponseInner.java | 56 + .../netapp/fluent/models/VolumeInner.java | 118 +- .../fluent/models/VolumePatchProperties.java | 38 +- .../fluent/models/VolumeProperties.java | 197 +- .../models/VolumeQuotaRulesProperties.java | 3 +- .../implementation/AccountsClientImpl.java | 867 +++++ .../netapp/implementation/AccountsImpl.java | 27 + .../netapp/implementation/BackupImpl.java | 201 ++ .../implementation/BackupPolicyImpl.java | 32 +- .../implementation/BackupStatusImpl.java | 66 + .../implementation/BackupVaultImpl.java | 174 + .../BackupVaultsClientImpl.java | 1270 +++++++ .../implementation/BackupVaultsImpl.java | 159 + .../implementation/BackupsClientImpl.java | 1600 ++++++++- .../netapp/implementation/BackupsImpl.java | 182 +- .../BackupsUnderAccountsClientImpl.java | 322 ++ .../BackupsUnderAccountsImpl.java | 42 + .../BackupsUnderBackupVaultsClientImpl.java | 363 ++ .../BackupsUnderBackupVaultsImpl.java | 43 + .../BackupsUnderVolumesClientImpl.java | 361 ++ .../BackupsUnderVolumesImpl.java | 43 + .../implementation/CapacityPoolImpl.java | 32 +- .../ClusterPeerCommandResponseImpl.java | 32 + .../implementation/NetAppAccountImpl.java | 71 +- .../NetAppManagementClientBuilder.java | 6 +- .../NetAppManagementClientImpl.java | 121 +- .../NetAppResourceRegionInfosClientImpl.java | 390 +++ .../NetAppResourceRegionInfosImpl.java | 66 + .../NetAppResourcesClientImpl.java | 4 +- .../RegionInfoResourceImpl.java | 62 + .../implementation/ReplicationImpl.java | 4 + .../implementation/ResourceManagerUtils.java | 2 - .../netapp/implementation/SnapshotImpl.java | 28 +- .../implementation/SnapshotPolicyImpl.java | 28 +- .../implementation/SnapshotsClientImpl.java | 9 +- .../netapp/implementation/SnapshotsImpl.java | 12 +- .../implementation/SubvolumeInfoImpl.java | 38 +- .../implementation/SubvolumesClientImpl.java | 9 +- .../netapp/implementation/SubvolumesImpl.java | 8 +- .../SvmPeerCommandResponseImpl.java | 32 + .../VolumeGroupDetailsImpl.java | 22 +- .../VolumeGroupsClientImpl.java | 4 +- .../netapp/implementation/VolumeImpl.java | 127 +- .../implementation/VolumeQuotaRuleImpl.java | 29 +- .../VolumeQuotaRulesClientImpl.java | 3 +- .../implementation/VolumeQuotaRulesImpl.java | 4 +- .../implementation/VolumesClientImpl.java | 2971 ++++++++++++----- .../netapp/implementation/VolumesImpl.java | 90 +- ...rowCapacityPoolForShortTermCloneSplit.java | 58 + .../netapp/models/AccountEncryption.java | 2 +- .../netapp/models/Accounts.java | 92 + .../netapp/models/ActiveDirectory.java | 40 +- .../resourcemanager/netapp/models/Backup.java | 311 ++ .../netapp/models/BackupPatch.java | 70 + .../netapp/models/BackupRestoreFiles.java | 125 + .../netapp/models/BackupStatus.java | 83 + .../netapp/models/BackupType.java | 55 + .../netapp/models/BackupVault.java | 240 ++ .../netapp/models/BackupVaultPatch.java | 57 + .../netapp/models/BackupVaults.java | 164 + .../netapp/models/BackupVaultsList.java | 85 + .../netapp/models/Backups.java | 211 +- .../netapp/models/BackupsList.java | 85 + .../models/BackupsMigrationRequest.java | 62 + .../netapp/models/BackupsUnderAccounts.java | 41 + .../models/BackupsUnderBackupVaults.java | 47 + .../netapp/models/BackupsUnderVolumes.java | 47 + .../netapp/models/BreakFileLocksRequest.java | 3 +- .../netapp/models/CapacityPool.java | 6 +- .../netapp/models/ChangeKeyVault.java | 182 + .../models/ClusterPeerCommandResponse.java | 28 + .../netapp/models/EncryptionIdentity.java | 3 +- .../models/EncryptionMigrationRequest.java | 105 + .../netapp/models/ExportPolicyRule.java | 19 +- .../models/FilePathAvailabilityRequest.java | 44 +- .../GetGroupIdListForLdapUserRequest.java | 5 +- .../models/KeyVaultPrivateEndpoint.java | 95 + .../netapp/models/KeyVaultProperties.java | 13 +- .../netapp/models/ManagedServiceIdentity.java | 20 +- .../netapp/models/NetAppAccount.java | 128 +- .../netapp/models/NetAppAccountPatch.java | 34 + .../models/NetAppResourceRegionInfos.java | 68 + .../PeerClusterForVolumeMigrationRequest.java | 94 + .../netapp/models/PlacementKeyValuePairs.java | 14 +- .../netapp/models/PoolChangeRequest.java | 5 +- .../models/QueryNetworkSiblingSetRequest.java | 14 +- .../models/QuotaAvailabilityRequest.java | 13 +- .../netapp/models/RegionInfoResource.java | 67 + .../netapp/models/RegionInfosList.java | 85 + .../netapp/models/RemotePath.java | 121 + .../netapp/models/Replication.java | 7 + .../netapp/models/ReplicationObject.java | 44 +- .../ResourceNameAvailabilityRequest.java | 15 +- .../netapp/models/SnapshotRestoreFiles.java | 4 +- .../netapp/models/SvmPeerCommandResponse.java | 27 + .../UpdateNetworkSiblingSetRequest.java | 30 +- .../resourcemanager/netapp/models/Volume.java | 227 +- .../netapp/models/VolumeBackupProperties.java | 106 + .../netapp/models/VolumeBackups.java | 26 + .../models/VolumeGroupVolumeProperties.java | 117 +- .../netapp/models/VolumeLanguage.java | 390 +++ .../netapp/models/VolumePatch.java | 12 +- .../VolumePatchPropertiesDataProtection.java | 29 + .../VolumePropertiesDataProtection.java | 29 + .../netapp/models/Volumes.java | 172 + .../src/main/java/module-info.java | 2 +- .../proxy-config.json | 2 +- .../reflect-config.json | 135 +- .../AccountsChangeKeyVaultSamples.java | 34 + .../AccountsCreateOrUpdateSamples.java | 23 +- .../generated/AccountsDeleteSamples.java | 3 +- .../AccountsGetByResourceGroupSamples.java | 3 +- ...tsGetChangeKeyVaultInformationSamples.java | 23 + .../AccountsListByResourceGroupSamples.java | 3 +- .../netapp/generated/AccountsListSamples.java | 3 +- .../AccountsMigrateEncryptionKeySamples.java | 29 + .../AccountsRenewCredentialsSamples.java | 3 +- .../generated/AccountsUpdateSamples.java | 6 +- .../BackupPoliciesCreateSamples.java | 15 +- .../BackupPoliciesDeleteSamples.java | 11 +- .../generated/BackupPoliciesGetSamples.java | 7 +- .../generated/BackupPoliciesListSamples.java | 7 +- .../BackupPoliciesUpdateSamples.java | 14 +- .../BackupVaultsCreateOrUpdateSamples.java | 26 + .../generated/BackupVaultsDeleteSamples.java | 22 + .../generated/BackupVaultsGetSamples.java | 22 + ...ackupVaultsListByNetAppAccountSamples.java | 22 + .../generated/BackupVaultsUpdateSamples.java | 41 + .../generated/BackupsCreateSamples.java | 28 + .../generated/BackupsDeleteSamples.java | 23 + .../BackupsGetLatestStatusSamples.java | 23 + .../netapp/generated/BackupsGetSamples.java | 23 + ...sGetVolumeLatestRestoreStatusSamples.java} | 12 +- .../generated/BackupsListByVaultSamples.java | 22 + ...kupsUnderAccountMigrateBackupsSamples.java | 27 + ...psUnderBackupVaultRestoreFilesSamples.java | 30 + ...ckupsUnderVolumeMigrateBackupsSamples.java | 27 + .../generated/BackupsUpdateSamples.java | 27 + ...ourceCheckFilePathAvailabilitySamples.java | 13 +- ...pResourceCheckNameAvailabilitySamples.java | 13 +- ...ResourceCheckQuotaAvailabilitySamples.java | 13 +- ...ResourceQueryNetworkSiblingSetSamples.java | 13 +- .../NetAppResourceQueryRegionInfoSamples.java | 3 +- .../NetAppResourceQuotaLimitsGetSamples.java | 7 +- .../NetAppResourceQuotaLimitsListSamples.java | 3 +- .../NetAppResourceRegionInfosGetSamples.java | 22 + .../NetAppResourceRegionInfosListSamples.java | 22 + ...esourceUpdateNetworkSiblingSetSamples.java | 16 +- .../generated/OperationsListSamples.java | 3 +- .../generated/PoolsCreateOrUpdateSamples.java | 13 +- .../netapp/generated/PoolsDeleteSamples.java | 3 +- .../netapp/generated/PoolsGetSamples.java | 3 +- .../netapp/generated/PoolsListSamples.java | 3 +- .../netapp/generated/PoolsUpdateSamples.java | 3 +- .../SnapshotPoliciesCreateSamples.java | 10 +- .../SnapshotPoliciesDeleteSamples.java | 7 +- .../generated/SnapshotPoliciesGetSamples.java | 7 +- .../SnapshotPoliciesListSamples.java | 3 +- .../SnapshotPoliciesListVolumesSamples.java | 8 +- .../SnapshotPoliciesUpdateSamples.java | 12 +- .../generated/SnapshotsCreateSamples.java | 10 +- .../generated/SnapshotsDeleteSamples.java | 7 +- .../netapp/generated/SnapshotsGetSamples.java | 7 +- .../generated/SnapshotsListSamples.java | 3 +- .../SnapshotsRestoreFilesSamples.java | 11 +- .../generated/SnapshotsUpdateSamples.java | 8 +- .../generated/SubvolumesCreateSamples.java | 10 +- .../generated/SubvolumesDeleteSamples.java | 7 +- .../SubvolumesGetMetadataSamples.java | 7 +- .../generated/SubvolumesGetSamples.java | 7 +- .../SubvolumesListByVolumeSamples.java | 3 +- .../generated/SubvolumesUpdateSamples.java | 3 +- .../generated/VolumeGroupsCreateSamples.java | 513 ++- .../generated/VolumeGroupsDeleteSamples.java | 3 +- .../generated/VolumeGroupsGetSamples.java | 6 +- ...olumeGroupsListByNetAppAccountSamples.java | 6 +- .../VolumeQuotaRulesCreateSamples.java | 14 +- .../VolumeQuotaRulesDeleteSamples.java | 7 +- .../generated/VolumeQuotaRulesGetSamples.java | 8 +- .../VolumeQuotaRulesListByVolumeSamples.java | 7 +- .../VolumeQuotaRulesUpdateSamples.java | 9 +- .../VolumesAuthorizeReplicationSamples.java | 13 +- .../VolumesBreakFileLocksSamples.java | 10 +- .../VolumesBreakReplicationSamples.java | 8 +- ...eateOnPremMigrationReplicationSamples.java | 24 + .../VolumesCreateOrUpdateSamples.java | 14 +- .../VolumesDeleteReplicationSamples.java | 3 +- .../generated/VolumesDeleteSamples.java | 3 +- ...VolumesFinalizeOnPremMigrationSamples.java | 23 + .../VolumesFinalizeRelocationSamples.java | 3 +- .../netapp/generated/VolumesGetSamples.java | 3 +- ...sListGetGroupIdListForLdapUserSamples.java | 8 +- .../VolumesListReplicationsSamples.java | 3 +- .../netapp/generated/VolumesListSamples.java | 3 +- ...sPeerClusterForOnPremMigrationSamples.java | 30 + ...umesPerformReplicationTransferSamples.java | 23 + .../generated/VolumesPoolChangeSamples.java | 9 +- ...olumesPopulateAvailabilityZoneSamples.java | 7 +- ...VolumesReInitializeReplicationSamples.java | 8 +- .../VolumesReestablishReplicationSamples.java | 13 +- .../generated/VolumesRelocateSamples.java | 8 +- .../VolumesReplicationStatusSamples.java | 7 +- .../VolumesResetCifsPasswordSamples.java | 3 +- .../VolumesResyncReplicationSamples.java | 3 +- .../VolumesRevertRelocationSamples.java | 3 +- .../generated/VolumesRevertSamples.java | 10 +- .../VolumesSplitCloneFromParentSamples.java | 23 + .../generated/VolumesUpdateSamples.java | 6 +- .../AccountsRenewCredentialsMockTests.java | 51 - .../generated/AuthorizeRequestTests.java | 25 - .../BackupPoliciesCreateMockTests.java | 78 - .../BackupPoliciesDeleteMockTests.java | 51 - ...ackupPoliciesGetWithResponseMockTests.java | 61 - .../BackupPoliciesListMockTests.java | 62 - .../generated/BackupPoliciesListTests.java | 56 - .../generated/BackupPolicyInnerTests.java | 52 - .../generated/BackupPolicyPatchTests.java | 52 - .../BackupPolicyPropertiesTests.java | 33 - ...umeRestoreStatusWithResponseMockTests.java | 54 - .../generated/BreakFileLocksRequestTests.java | 29 - .../BreakReplicationRequestTests.java | 25 - .../generated/CapacityPoolInnerTests.java | 58 - .../generated/CapacityPoolListTests.java | 72 - .../generated/CapacityPoolPatchTests.java | 50 - .../CheckAvailabilityResponseInnerTests.java | 32 - .../netapp/generated/DailyScheduleTests.java | 33 - .../netapp/generated/DimensionTests.java | 27 - .../generated/EncryptionIdentityTests.java | 26 - .../generated/ExportPolicyRuleTests.java | 59 - .../FilePathAvailabilityRequestTests.java | 27 - ...GetGroupIdListForLdapUserRequestTests.java | 25 - ...upIdListForLdapUserResponseInnerTests.java | 28 - .../netapp/generated/HourlyScheduleTests.java | 31 - .../generated/LdapSearchScopeOptTests.java | 31 - .../generated/ListReplicationsTests.java | 44 - .../generated/LogSpecificationTests.java | 27 - .../ManagedServiceIdentityTests.java | 45 - .../generated/MetricSpecificationTests.java | 73 - .../generated/MonthlyScheduleTests.java | 35 - .../generated/MountTargetPropertiesTests.java | 29 - ...ceQuotaLimitsGetWithResponseMockTests.java | 54 - ...etAppResourceQuotaLimitsListMockTests.java | 55 - ...PathAvailabilityWithResponseMockTests.java | 62 - ...NameAvailabilityWithResponseMockTests.java | 65 - ...uotaAvailabilityWithResponseMockTests.java | 65 - ...etworkSiblingSetWithResponseMockTests.java | 65 - ...sQueryRegionInfoWithResponseMockTests.java | 59 - ...urcesUpdateNetworkSiblingSetMockTests.java | 64 - .../NetworkSiblingSetInnerTests.java | 40 - .../netapp/generated/NicInfoTests.java | 27 - .../generated/OperationDisplayTests.java | 33 - .../netapp/generated/OperationInnerTests.java | 154 - .../generated/OperationListResultTests.java | 65 - .../generated/OperationPropertiesTests.java | 140 - .../generated/OperationsListMockTests.java | 96 - .../generated/PoolChangeRequestTests.java | 25 - .../generated/PoolPatchPropertiesTests.java | 32 - .../netapp/generated/PoolPropertiesTests.java | 38 - .../PoolsCreateOrUpdateMockTests.java | 81 - .../PoolsGetWithResponseMockTests.java | 65 - .../netapp/generated/PoolsListMockTests.java | 66 - .../QueryNetworkSiblingSetRequestTests.java | 29 - .../QuotaAvailabilityRequestTests.java | 35 - .../ReestablishReplicationRequestTests.java | 25 - ...InfoAvailabilityZoneMappingsItemTests.java | 29 - .../generated/RegionInfoInnerTests.java | 41 - .../generated/ReplicationInnerTests.java | 36 - .../generated/ReplicationObjectTests.java | 36 - .../ReplicationStatusInnerTests.java | 38 - .../ResourceNameAvailabilityRequestTests.java | 35 - .../generated/RestoreStatusInnerTests.java | 23 - .../generated/ServiceSpecificationTests.java | 99 - .../netapp/generated/SnapshotInnerTests.java | 26 - ...otPoliciesCreateWithResponseMockTests.java | 102 - .../SnapshotPoliciesDeleteMockTests.java | 51 - ...pshotPoliciesGetWithResponseMockTests.java | 75 - .../SnapshotPoliciesListMockTests.java | 76 - .../generated/SnapshotPoliciesListTests.java | 131 - .../generated/SnapshotPolicyInnerTests.java | 92 - .../generated/SnapshotPolicyPatchTests.java | 93 - .../SnapshotPolicyPropertiesTests.java | 73 - .../generated/SnapshotPropertiesTests.java | 24 - .../generated/SnapshotRestoreFilesTests.java | 30 - .../generated/SnapshotsDeleteMockTests.java | 52 - .../SnapshotsGetWithResponseMockTests.java | 56 - .../generated/SnapshotsListMockTests.java | 57 - .../netapp/generated/SnapshotsListTests.java | 29 - .../SnapshotsRestoreFilesMockTests.java | 55 - .../generated/SnapshotsUpdateMockTests.java | 56 - .../SubscriptionQuotaItemInnerTests.java | 23 - .../SubscriptionQuotaItemListTests.java | 27 - .../SubscriptionQuotaItemPropertiesTests.java | 22 - .../generated/SubvolumeInfoInnerTests.java | 31 - .../generated/SubvolumeModelInnerTests.java | 50 - .../SubvolumeModelPropertiesTests.java | 50 - .../generated/SubvolumePatchParamsTests.java | 27 - .../generated/SubvolumePatchRequestTests.java | 29 - .../generated/SubvolumePropertiesTests.java | 31 - .../generated/SubvolumesCreateMockTests.java | 59 - .../generated/SubvolumesDeleteMockTests.java | 51 - .../SubvolumesGetMetadataMockTests.java | 65 - .../SubvolumesGetWithResponseMockTests.java | 59 - .../SubvolumesListByVolumeMockTests.java | 59 - .../netapp/generated/SubvolumesListTests.java | 36 - .../UpdateNetworkSiblingSetRequestTests.java | 35 - .../generated/UserAssignedIdentityTests.java | 23 - .../netapp/generated/VolumeBackupsTests.java | 31 - .../VolumeGroupsDeleteMockTests.java | 52 - ...umePatchPropertiesDataProtectionTests.java | 27 - ...olumePatchPropertiesExportPolicyTests.java | 72 - .../generated/VolumePatchPropertiesTests.java | 107 - .../netapp/generated/VolumePatchTests.java | 141 - .../VolumePropertiesDataProtectionTests.java | 46 - .../VolumePropertiesExportPolicyTests.java | 67 - .../generated/VolumeQuotaRuleInnerTests.java | 51 - .../generated/VolumeQuotaRulePatchTests.java | 51 - .../VolumeQuotaRulesCreateMockTests.java | 79 - .../VolumeQuotaRulesDeleteMockTests.java | 52 - ...umeQuotaRulesGetWithResponseMockTests.java | 61 - ...VolumeQuotaRulesListByVolumeMockTests.java | 62 - .../generated/VolumeQuotaRulesListTests.java | 56 - .../VolumeQuotaRulesPropertiesTests.java | 32 - .../VolumeRelocationPropertiesTests.java | 26 - .../netapp/generated/VolumeRevertTests.java | 24 - .../VolumeSnapshotPropertiesTests.java | 25 - .../VolumesAuthorizeReplicationMockTests.java | 53 - .../VolumesBreakFileLocksMockTests.java | 54 - .../VolumesBreakReplicationMockTests.java | 53 - .../VolumesDeleteReplicationMockTests.java | 52 - .../VolumesFinalizeRelocationMockTests.java | 52 - ...istGetGroupIdListForLdapUserMockTests.java | 57 - .../VolumesListReplicationsMockTests.java | 62 - .../generated/VolumesPoolChangeMockTests.java | 53 - ...lumesReInitializeReplicationMockTests.java | 52 - ...eplicationStatusWithResponseMockTests.java | 62 - .../VolumesResyncReplicationMockTests.java | 52 - .../generated/VolumesRevertMockTests.java | 53 - .../VolumesRevertRelocationMockTests.java | 52 - .../netapp/generated/WeeklyScheduleTests.java | 35 - 373 files changed, 18934 insertions(+), 8937 deletions(-) create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupVaultsClient.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderAccountsClient.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderBackupVaultsClient.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderVolumesClient.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceRegionInfosClient.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPatchProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ClusterPeerCommandResponseInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoResourceInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SvmPeerCommandResponseInner.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupStatusImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsClientImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsClientImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsClientImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesClientImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ClusterPeerCommandResponseImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosClientImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RegionInfoResourceImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SvmPeerCommandResponseImpl.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AcceptGrowCapacityPoolForShortTermCloneSplit.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backup.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupRestoreFiles.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupStatus.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVault.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultPatch.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaults.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultsList.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsList.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsMigrationRequest.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderAccounts.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderBackupVaults.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderVolumes.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChangeKeyVault.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeerCommandResponse.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionMigrationRequest.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultPrivateEndpoint.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceRegionInfos.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PeerClusterForVolumeMigrationRequest.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoResource.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfosList.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RemotePath.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerCommandResponse.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupProperties.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeLanguage.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsChangeKeyVaultSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetChangeKeyVaultInformationSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsMigrateEncryptionKeySamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsDeleteSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsCreateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsDeleteSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetSamples.java rename sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/{BackupsGetVolumeRestoreStatusSamples.java => BackupsGetVolumeLatestRestoreStatusSamples.java} (51%) create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderAccountMigrateBackupsSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderBackupVaultRestoreFilesSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderVolumeMigrateBackupsSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUpdateSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOnPremMigrationReplicationSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeOnPremMigrationSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPeerClusterForOnPremMigrationSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPerformReplicationTransferSamples.java create mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesSplitCloneFromParentSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AuthorizeRequestTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetWithResponseMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyInnerTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPatchTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPropertiesTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeRestoreStatusWithResponseMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakFileLocksRequestTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakReplicationRequestTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolInnerTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolPatchTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckAvailabilityResponseInnerTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DailyScheduleTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DimensionTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExportPolicyRuleTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserRequestTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserResponseInnerTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/HourlyScheduleTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LogSpecificationTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MetricSpecificationTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MonthlyScheduleTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MountTargetPropertiesTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetWithResponseMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckNameAvailabilityWithResponseMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryRegionInfoWithResponseMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesUpdateNetworkSiblingSetMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetworkSiblingSetInnerTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NicInfoTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationDisplayTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationInnerTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationListResultTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationPropertiesTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationsListMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolChangeRequestTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPatchPropertiesTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPropertiesTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsGetWithResponseMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsListMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QueryNetworkSiblingSetRequestTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaAvailabilityRequestTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReestablishReplicationRequestTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoAvailabilityZoneMappingsItemTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoInnerTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationInnerTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationObjectTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationStatusInnerTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ResourceNameAvailabilityRequestTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RestoreStatusInnerTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ServiceSpecificationTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotInnerTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateWithResponseMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetWithResponseMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyInnerTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPatchTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPropertiesTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPropertiesTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotRestoreFilesTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetWithResponseMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubscriptionQuotaItemInnerTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubscriptionQuotaItemListTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubscriptionQuotaItemPropertiesTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeInfoInnerTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelInnerTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelPropertiesTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchParamsTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchRequestTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePropertiesTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetWithResponseMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UpdateNetworkSiblingSetRequestTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupsTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesExportPolicyTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesDataProtectionTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesExportPolicyTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRuleInnerTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulePatchTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetWithResponseMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesPropertiesTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRelocationPropertiesTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRevertTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeSnapshotPropertiesTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusWithResponseMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationMockTests.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/WeeklyScheduleTests.java diff --git a/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md b/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md index 370553640ed69..016149a2be194 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md +++ b/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2024-05-29) + +- 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-preview-2023-11. 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 e391122fca3f4..85e335ab247f0 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-2023-07-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-preview-2023-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-netapp - 1.1.0 + 1.2.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md b/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md index 013ef157b6580..d61be9159e4ae 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md +++ b/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md @@ -3,11 +3,14 @@ ## Accounts +- [ChangeKeyVault](#accounts_changekeyvault) - [CreateOrUpdate](#accounts_createorupdate) - [Delete](#accounts_delete) - [GetByResourceGroup](#accounts_getbyresourcegroup) +- [GetChangeKeyVaultInformation](#accounts_getchangekeyvaultinformation) - [List](#accounts_list) - [ListByResourceGroup](#accounts_listbyresourcegroup) +- [MigrateEncryptionKey](#accounts_migrateencryptionkey) - [RenewCredentials](#accounts_renewcredentials) - [Update](#accounts_update) @@ -19,9 +22,35 @@ - [List](#backuppolicies_list) - [Update](#backuppolicies_update) +## BackupVaults + +- [CreateOrUpdate](#backupvaults_createorupdate) +- [Delete](#backupvaults_delete) +- [Get](#backupvaults_get) +- [ListByNetAppAccount](#backupvaults_listbynetappaccount) +- [Update](#backupvaults_update) + ## Backups -- [GetVolumeRestoreStatus](#backups_getvolumerestorestatus) +- [Create](#backups_create) +- [Delete](#backups_delete) +- [Get](#backups_get) +- [GetLatestStatus](#backups_getlateststatus) +- [GetVolumeLatestRestoreStatus](#backups_getvolumelatestrestorestatus) +- [ListByVault](#backups_listbyvault) +- [Update](#backups_update) + +## BackupsUnderAccount + +- [MigrateBackups](#backupsunderaccount_migratebackups) + +## BackupsUnderBackupVault + +- [RestoreFiles](#backupsunderbackupvault_restorefiles) + +## BackupsUnderVolume + +- [MigrateBackups](#backupsundervolume_migratebackups) ## NetAppResource @@ -37,6 +66,11 @@ - [Get](#netappresourcequotalimits_get) - [List](#netappresourcequotalimits_list) +## NetAppResourceRegionInfos + +- [Get](#netappresourceregioninfos_get) +- [List](#netappresourceregioninfos_list) + ## Operations - [List](#operations_list) @@ -96,14 +130,18 @@ - [AuthorizeReplication](#volumes_authorizereplication) - [BreakFileLocks](#volumes_breakfilelocks) - [BreakReplication](#volumes_breakreplication) +- [CreateOnPremMigrationReplication](#volumes_createonpremmigrationreplication) - [CreateOrUpdate](#volumes_createorupdate) - [Delete](#volumes_delete) - [DeleteReplication](#volumes_deletereplication) +- [FinalizeOnPremMigration](#volumes_finalizeonpremmigration) - [FinalizeRelocation](#volumes_finalizerelocation) - [Get](#volumes_get) - [List](#volumes_list) - [ListGetGroupIdListForLdapUser](#volumes_listgetgroupidlistforldapuser) - [ListReplications](#volumes_listreplications) +- [PeerClusterForOnPremMigration](#volumes_peerclusterforonpremmigration) +- [PerformReplicationTransfer](#volumes_performreplicationtransfer) - [PoolChange](#volumes_poolchange) - [PopulateAvailabilityZone](#volumes_populateavailabilityzone) - [ReInitializeReplication](#volumes_reinitializereplication) @@ -114,7 +152,41 @@ - [ResyncReplication](#volumes_resyncreplication) - [Revert](#volumes_revert) - [RevertRelocation](#volumes_revertrelocation) +- [SplitCloneFromParent](#volumes_splitclonefromparent) - [Update](#volumes_update) +### Accounts_ChangeKeyVault + +```java +import com.azure.resourcemanager.netapp.models.ChangeKeyVault; +import com.azure.resourcemanager.netapp.models.KeyVaultPrivateEndpoint; +import java.util.Arrays; + +/** + * Samples for Accounts ChangeKeyVault. + */ +public final class AccountsChangeKeyVaultSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Accounts_ChangeKeyVault.json + */ + /** + * Sample code: Accounts_ChangeKeyVault. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void accountsChangeKeyVault(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.accounts() + .changeKeyVault("myRG", "account1", new ChangeKeyVault().withKeyVaultUri("fakeTokenPlaceholder") + .withKeyName("fakeTokenPlaceholder") + .withKeyVaultResourceId("fakeTokenPlaceholder") + .withKeyVaultPrivateEndpoints(Arrays.asList(new KeyVaultPrivateEndpoint().withVirtualNetworkId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.Network/virtualNetworks/vnet1") + .withPrivateEndpointId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.Network/privateEndpoints/privip1"))), + com.azure.core.util.Context.NONE); + } +} +``` + ### Accounts_CreateOrUpdate ```java @@ -126,8 +198,7 @@ import java.util.Arrays; */ public final class AccountsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_CreateOrUpdate.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Accounts_CreateOrUpdate.json */ /** * Sample code: Accounts_CreateOrUpdate. @@ -139,8 +210,7 @@ public final class AccountsCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_CreateOrUpdateAD.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Accounts_CreateOrUpdateAD.json */ /** * Sample code: Accounts_CreateOrUpdateWithActiveDirectory. @@ -149,11 +219,20 @@ public final class AccountsCreateOrUpdateSamples { */ public static void accountsCreateOrUpdateWithActiveDirectory(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.accounts().define("account1").withRegion("eastus").withExistingResourceGroup("myRG") + manager.accounts() + .define("account1") + .withRegion("eastus") + .withExistingResourceGroup("myRG") .withActiveDirectories(Arrays.asList(new ActiveDirectory().withUsername("ad_user_name") - .withPassword("fakeTokenPlaceholder").withDomain("10.10.10.3").withDns("10.10.10.3") - .withSmbServerName("SMBServer").withOrganizationalUnit("OU=Engineering").withSite("SiteName") - .withAesEncryption(true).withLdapSigning(false).withLdapOverTls(false))) + .withPassword("fakeTokenPlaceholder") + .withDomain("10.10.10.3") + .withDns("10.10.10.3") + .withSmbServerName("SMBServer") + .withOrganizationalUnit("OU=Engineering") + .withSite("SiteName") + .withAesEncryption(true) + .withLdapSigning(false) + .withLdapOverTls(false))) .create(); } } @@ -167,8 +246,7 @@ public final class AccountsCreateOrUpdateSamples { */ public final class AccountsDeleteSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Accounts_Delete.json */ /** * Sample code: Accounts_Delete. @@ -189,8 +267,7 @@ public final class AccountsDeleteSamples { */ public final class AccountsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Accounts_Get.json */ /** * Sample code: Accounts_Get. @@ -203,6 +280,28 @@ public final class AccountsGetByResourceGroupSamples { } ``` +### Accounts_GetChangeKeyVaultInformation + +```java +/** + * Samples for Accounts GetChangeKeyVaultInformation. + */ +public final class AccountsGetChangeKeyVaultInformationSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Accounts_GetChangeKeyVaultInformation.json + */ + /** + * Sample code: Accounts_GetChangeKeyVaultInformation. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + accountsGetChangeKeyVaultInformation(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.accounts().getChangeKeyVaultInformation("myRG", "account1", com.azure.core.util.Context.NONE); + } +} +``` + ### Accounts_List ```java @@ -211,8 +310,7 @@ public final class AccountsGetByResourceGroupSamples { */ public final class AccountsListSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Accounts_List.json */ /** * Sample code: Accounts_List. @@ -233,8 +331,7 @@ public final class AccountsListSamples { */ public final class AccountsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Accounts_List.json */ /** * Sample code: Accounts_List. @@ -247,6 +344,34 @@ public final class AccountsListByResourceGroupSamples { } ``` +### Accounts_MigrateEncryptionKey + +```java +import com.azure.resourcemanager.netapp.models.EncryptionMigrationRequest; + +/** + * Samples for Accounts MigrateEncryptionKey. + */ +public final class AccountsMigrateEncryptionKeySamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Accounts_MigrateEncryptionKey.json + */ + /** + * Sample code: Accounts_MigrateEncryptionKey. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void accountsMigrateEncryptionKey(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.accounts() + .migrateEncryptionKey("myRG", "account1", new EncryptionMigrationRequest().withVirtualNetworkId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.Network/virtualNetworks/vnet1") + .withPrivateEndpointId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.Network/privateEndpoints/privip1"), + com.azure.core.util.Context.NONE); + } +} +``` + ### Accounts_RenewCredentials ```java @@ -255,8 +380,7 @@ public final class AccountsListByResourceGroupSamples { */ public final class AccountsRenewCredentialsSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_RenewCredentials.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Accounts_RenewCredentials.json */ /** * Sample code: Accounts_RenewCredentials. @@ -281,8 +405,7 @@ import java.util.Map; */ public final class AccountsUpdateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Accounts_Update.json */ /** * Sample code: Accounts_Update. @@ -291,7 +414,8 @@ public final class AccountsUpdateSamples { */ public static void accountsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { NetAppAccount resource = manager.accounts() - .getByResourceGroupWithResponse("myRG", "account1", com.azure.core.util.Context.NONE).getValue(); + .getByResourceGroupWithResponse("myRG", "account1", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("Tag1", "Value1")).apply(); } @@ -317,8 +441,7 @@ public final class AccountsUpdateSamples { */ public final class BackupPoliciesCreateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/BackupPolicies_Create.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupPolicies_Create.json */ /** * Sample code: BackupPolicies_Create. @@ -326,9 +449,15 @@ public final class BackupPoliciesCreateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void backupPoliciesCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupPolicies().define("backupPolicyName").withRegion("westus") - .withExistingNetAppAccount("myRG", "account1").withDailyBackupsToKeep(10).withWeeklyBackupsToKeep(10) - .withMonthlyBackupsToKeep(10).withEnabled(true).create(); + manager.backupPolicies() + .define("backupPolicyName") + .withRegion("westus") + .withExistingNetAppAccount("myRG", "account1") + .withDailyBackupsToKeep(10) + .withWeeklyBackupsToKeep(10) + .withMonthlyBackupsToKeep(10) + .withEnabled(true) + .create(); } } ``` @@ -341,17 +470,16 @@ public final class BackupPoliciesCreateSamples { */ public final class BackupPoliciesDeleteSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/BackupPolicies_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupPolicies_Delete.json */ /** - * Sample code: Backups_Delete. + * Sample code: BackupPolicies_Delete. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupPolicies().delete("resourceGroup", "accountName", "backupPolicyName", - com.azure.core.util.Context.NONE); + public static void backupPoliciesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupPolicies() + .delete("resourceGroup", "accountName", "backupPolicyName", com.azure.core.util.Context.NONE); } } ``` @@ -364,8 +492,7 @@ public final class BackupPoliciesDeleteSamples { */ public final class BackupPoliciesGetSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/BackupPolicies_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupPolicies_Get.json */ /** * Sample code: Backups_Get. @@ -373,8 +500,8 @@ public final class BackupPoliciesGetSamples { * @param manager Entry point to NetAppFilesManager. */ public static void backupsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupPolicies().getWithResponse("myRG", "account1", "backupPolicyName", - com.azure.core.util.Context.NONE); + manager.backupPolicies() + .getWithResponse("myRG", "account1", "backupPolicyName", com.azure.core.util.Context.NONE); } } ``` @@ -387,15 +514,14 @@ public final class BackupPoliciesGetSamples { */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/BackupPolicies_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupPolicies_List.json */ /** - * Sample code: Backups_List. + * Sample code: BackupPolicies_List. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + public static void backupPoliciesList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { manager.backupPolicies().list("myRG", "account1", com.azure.core.util.Context.NONE); } } @@ -411,8 +537,7 @@ import com.azure.resourcemanager.netapp.models.BackupPolicy; */ public final class BackupPoliciesUpdateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/BackupPolicies_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupPolicies_Update.json */ /** * Sample code: BackupPolicies_Update. @@ -421,23 +546,248 @@ public final class BackupPoliciesUpdateSamples { */ public static void backupPoliciesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { BackupPolicy resource = manager.backupPolicies() - .getWithResponse("myRG", "account1", "backupPolicyName", com.azure.core.util.Context.NONE).getValue(); - resource.update().withDailyBackupsToKeep(5).withWeeklyBackupsToKeep(10).withMonthlyBackupsToKeep(10) - .withEnabled(false).apply(); + .getWithResponse("myRG", "account1", "backupPolicyName", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withDailyBackupsToKeep(5) + .withWeeklyBackupsToKeep(10) + .withMonthlyBackupsToKeep(10) + .withEnabled(false) + .apply(); + } +} +``` + +### BackupVaults_CreateOrUpdate + +```java +/** + * Samples for BackupVaults CreateOrUpdate. + */ +public final class BackupVaultsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupVaults_Create.json + */ + /** + * Sample code: BackupVault_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupVaultCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupVaults() + .define("backupVault1") + .withRegion("eastus") + .withExistingNetAppAccount("myRG", "account1") + .create(); + } +} +``` + +### BackupVaults_Delete + +```java +/** + * Samples for BackupVaults Delete. + */ +public final class BackupVaultsDeleteSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupVaults_Delete.json + */ + /** + * Sample code: BackupVaults_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupVaultsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupVaults().delete("resourceGroup", "account1", "backupVault1", com.azure.core.util.Context.NONE); + } +} +``` + +### BackupVaults_Get + +```java +/** + * Samples for BackupVaults Get. + */ +public final class BackupVaultsGetSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupVaults_Get.json + */ + /** + * Sample code: BackupVaults_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupVaultsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupVaults().getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE); } } ``` -### Backups_GetVolumeRestoreStatus +### BackupVaults_ListByNetAppAccount ```java /** - * Samples for Backups GetVolumeRestoreStatus. + * Samples for BackupVaults ListByNetAppAccount. */ -public final class BackupsGetVolumeRestoreStatusSamples { +public final class BackupVaultsListByNetAppAccountSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_RestoreStatus.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupVaults_List.json + */ + /** + * Sample code: BackupVaults_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupVaultsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupVaults().listByNetAppAccount("myRG", "account1", com.azure.core.util.Context.NONE); + } +} +``` + +### BackupVaults_Update + +```java +import com.azure.resourcemanager.netapp.models.BackupVault; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for BackupVaults Update. + */ +public final class BackupVaultsUpdateSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupVaults_Update.json + */ + /** + * Sample code: BackupVaults_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupVaultsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + BackupVault resource = manager.backupVaults() + .getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("Tag1", "Value1")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Backups_Create + +```java +/** + * Samples for Backups Create. + */ +public final class BackupsCreateSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupsUnderBackupVault_Create.json + */ + /** + * Sample code: BackupsUnderBackupVault_Create. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderBackupVaultCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backups() + .define("backup1") + .withExistingBackupVault("myRG", "account1", "backupVault1") + .withVolumeResourceId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPool/pool1/volumes/volume1") + .withLabel("myLabel") + .create(); + } +} +``` + +### Backups_Delete + +```java +/** + * Samples for Backups Delete. + */ +public final class BackupsDeleteSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupsUnderBackupVault_Delete.json + */ + /** + * Sample code: BackupsUnderBackupVault_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderBackupVaultDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backups() + .delete("resourceGroup", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE); + } +} +``` + +### Backups_Get + +```java +/** + * Samples for Backups Get. + */ +public final class BackupsGetSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupsUnderBackupVault_Get.json + */ + /** + * Sample code: BackupsUnderBackupVault_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderBackupVaultGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backups() + .getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE); + } +} +``` + +### Backups_GetLatestStatus + +```java +/** + * Samples for Backups GetLatestStatus. + */ +public final class BackupsGetLatestStatusSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_LatestBackupStatus.json + */ + /** + * Sample code: Volumes_BackupStatus. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesBackupStatus(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backups() + .getLatestStatusWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} +``` + +### Backups_GetVolumeLatestRestoreStatus + +```java +/** + * Samples for Backups GetVolumeLatestRestoreStatus. + */ +public final class BackupsGetVolumeLatestRestoreStatusSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_LatestRestoreStatus.json */ /** * Sample code: Volumes_RestoreStatus. @@ -445,8 +795,137 @@ public final class BackupsGetVolumeRestoreStatusSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesRestoreStatus(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups().getVolumeRestoreStatusWithResponse("myRG", "account1", "pool1", "volume1", - com.azure.core.util.Context.NONE); + manager.backups() + .getVolumeLatestRestoreStatusWithResponse("myRG", "account1", "pool1", "volume1", + com.azure.core.util.Context.NONE); + } +} +``` + +### Backups_ListByVault + +```java +/** + * Samples for Backups ListByVault. + */ +public final class BackupsListByVaultSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupsUnderBackupVault_List.json + */ + /** + * Sample code: Backups_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backups().listByVault("myRG", "account1", "backupVault1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### Backups_Update + +```java +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/preview/2023-11-01-preview/examples/BackupsUnderBackupVault_Update.json + */ + /** + * Sample code: BackupsUnderBackupVault_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderBackupVaultUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + Backup resource = manager.backups() + .getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} +``` + +### BackupsUnderAccount_MigrateBackups + +```java +import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; + +/** + * Samples for BackupsUnderAccount MigrateBackups. + */ +public final class BackupsUnderAccountMigrateBackupsSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupsUnderAccount_Migrate.json + */ + /** + * Sample code: BackupsUnderAccount_Migrate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderAccountMigrate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupsUnderAccounts() + .migrateBackups("myRG", "account1", new BackupsMigrationRequest().withBackupVaultId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"), + com.azure.core.util.Context.NONE); + } +} +``` + +### BackupsUnderBackupVault_RestoreFiles + +```java +import com.azure.resourcemanager.netapp.models.BackupRestoreFiles; +import java.util.Arrays; + +/** + * Samples for BackupsUnderBackupVault RestoreFiles. + */ +public final class BackupsUnderBackupVaultRestoreFilesSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupsUnderBackupVault_SingleFileRestore.json + */ + /** + * Sample code: Backups_SingleFileRestore. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsSingleFileRestore(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupsUnderBackupVaults() + .restoreFiles("myRG", "account1", "backupVault1", "backup1", new BackupRestoreFiles() + .withFileList(Arrays.asList("/dir1/customer1.db", "/dir1/customer2.db")) + .withDestinationVolumeId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1"), + com.azure.core.util.Context.NONE); + } +} +``` + +### BackupsUnderVolume_MigrateBackups + +```java +import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; + +/** + * Samples for BackupsUnderVolume MigrateBackups. + */ +public final class BackupsUnderVolumeMigrateBackupsSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupsUnderVolume_Migrate.json + */ + /** + * Sample code: BackupsUnderVolume_Migrate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderVolumeMigrate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupsUnderVolumes() + .migrateBackups("myRG", "account1", "pool1", "volume1", new BackupsMigrationRequest().withBackupVaultId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"), + com.azure.core.util.Context.NONE); } } ``` @@ -461,8 +940,7 @@ import com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest; */ public final class NetAppResourceCheckFilePathAvailabilitySamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/CheckFilePathAvailability.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/CheckFilePathAvailability.json */ /** * Sample code: CheckFilePathAvailability. @@ -470,10 +948,12 @@ public final class NetAppResourceCheckFilePathAvailabilitySamples { * @param manager Entry point to NetAppFilesManager. */ public static void checkFilePathAvailability(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResources().checkFilePathAvailabilityWithResponse("eastus", - new FilePathAvailabilityRequest().withName("my-exact-filepth").withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - com.azure.core.util.Context.NONE); + manager.netAppResources() + .checkFilePathAvailabilityWithResponse("eastus", new FilePathAvailabilityRequest() + .withName("my-exact-filepth") + .withSubnetId( + "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), + com.azure.core.util.Context.NONE); } } ``` @@ -489,8 +969,7 @@ import com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest; */ public final class NetAppResourceCheckNameAvailabilitySamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/CheckNameAvailability.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/CheckNameAvailability.json */ /** * Sample code: CheckNameAvailability. @@ -498,10 +977,12 @@ public final class NetAppResourceCheckNameAvailabilitySamples { * @param manager Entry point to NetAppFilesManager. */ public static void checkNameAvailability(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResources().checkNameAvailabilityWithResponse("eastus", - new ResourceNameAvailabilityRequest().withName("accName") - .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS).withResourceGroup("myRG"), - com.azure.core.util.Context.NONE); + manager.netAppResources() + .checkNameAvailabilityWithResponse("eastus", + new ResourceNameAvailabilityRequest().withName("accName") + .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS) + .withResourceGroup("myRG"), + com.azure.core.util.Context.NONE); } } ``` @@ -517,8 +998,7 @@ import com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest; */ public final class NetAppResourceCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/CheckQuotaAvailability.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/CheckQuotaAvailability.json */ /** * Sample code: CheckQuotaAvailability. @@ -526,10 +1006,12 @@ public final class NetAppResourceCheckQuotaAvailabilitySamples { * @param manager Entry point to NetAppFilesManager. */ public static void checkQuotaAvailability(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResources().checkQuotaAvailabilityWithResponse("eastus", - new QuotaAvailabilityRequest().withName("resource1") - .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS).withResourceGroup("myRG"), - com.azure.core.util.Context.NONE); + manager.netAppResources() + .checkQuotaAvailabilityWithResponse("eastus", + new QuotaAvailabilityRequest().withName("resource1") + .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS) + .withResourceGroup("myRG"), + com.azure.core.util.Context.NONE); } } ``` @@ -544,8 +1026,7 @@ import com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest; */ public final class NetAppResourceQueryNetworkSiblingSetSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/NetworkSiblingSet_Query.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/NetworkSiblingSet_Query.json */ /** * Sample code: NetworkSiblingSet_Query. @@ -553,10 +1034,12 @@ public final class NetAppResourceQueryNetworkSiblingSetSamples { * @param manager Entry point to NetAppFilesManager. */ public static void networkSiblingSetQuery(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResources().queryNetworkSiblingSetWithResponse("eastus", new QueryNetworkSiblingSetRequest() - .withNetworkSiblingSetId("9760acf5-4638-11e7-9bdb-020073ca3333").withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), - com.azure.core.util.Context.NONE); + manager.netAppResources() + .queryNetworkSiblingSetWithResponse("eastus", new QueryNetworkSiblingSetRequest() + .withNetworkSiblingSetId("9760acf5-4638-11e7-9bdb-020073ca3333") + .withSubnetId( + "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), + com.azure.core.util.Context.NONE); } } ``` @@ -569,8 +1052,7 @@ public final class NetAppResourceQueryNetworkSiblingSetSamples { */ public final class NetAppResourceQueryRegionInfoSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/RegionInfo.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/RegionInfo.json */ /** * Sample code: RegionInfo_Query. @@ -594,8 +1076,7 @@ import com.azure.resourcemanager.netapp.models.UpdateNetworkSiblingSetRequest; */ public final class NetAppResourceUpdateNetworkSiblingSetSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/NetworkSiblingSet_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/NetworkSiblingSet_Update.json */ /** * Sample code: NetworkFeatures_Update. @@ -603,12 +1084,13 @@ public final class NetAppResourceUpdateNetworkSiblingSetSamples { * @param manager Entry point to NetAppFilesManager. */ public static void networkFeaturesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResources().updateNetworkSiblingSet("eastus", new UpdateNetworkSiblingSetRequest() - .withNetworkSiblingSetId("9760acf5-4638-11e7-9bdb-020073ca3333") - .withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet") - .withNetworkSiblingSetStateId("12345_44420.8001578125").withNetworkFeatures(NetworkFeatures.STANDARD), - com.azure.core.util.Context.NONE); + manager.netAppResources() + .updateNetworkSiblingSet("eastus", new UpdateNetworkSiblingSetRequest() + .withNetworkSiblingSetId("9760acf5-4638-11e7-9bdb-020073ca3333") + .withSubnetId( + "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet") + .withNetworkSiblingSetStateId("12345_44420.8001578125") + .withNetworkFeatures(NetworkFeatures.STANDARD), com.azure.core.util.Context.NONE); } } ``` @@ -621,8 +1103,7 @@ public final class NetAppResourceUpdateNetworkSiblingSetSamples { */ public final class NetAppResourceQuotaLimitsGetSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/QuotaLimits_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/QuotaLimits_Get.json */ /** * Sample code: QuotaLimits. @@ -630,8 +1111,8 @@ public final class NetAppResourceQuotaLimitsGetSamples { * @param manager Entry point to NetAppFilesManager. */ public static void quotaLimits(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResourceQuotaLimits().getWithResponse("eastus", "totalCoolAccessVolumesPerSubscription", - com.azure.core.util.Context.NONE); + manager.netAppResourceQuotaLimits() + .getWithResponse("eastus", "totalCoolAccessVolumesPerSubscription", com.azure.core.util.Context.NONE); } } ``` @@ -644,8 +1125,7 @@ public final class NetAppResourceQuotaLimitsGetSamples { */ public final class NetAppResourceQuotaLimitsListSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/QuotaLimits_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/QuotaLimits_List.json */ /** * Sample code: QuotaLimits. @@ -658,6 +1138,48 @@ public final class NetAppResourceQuotaLimitsListSamples { } ``` +### NetAppResourceRegionInfos_Get + +```java +/** + * Samples for NetAppResourceRegionInfos Get. + */ +public final class NetAppResourceRegionInfosGetSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/RegionInfos_Get.json + */ + /** + * Sample code: RegionInfos_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void regionInfosGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.netAppResourceRegionInfos().getWithResponse("eastus", com.azure.core.util.Context.NONE); + } +} +``` + +### NetAppResourceRegionInfos_List + +```java +/** + * Samples for NetAppResourceRegionInfos List. + */ +public final class NetAppResourceRegionInfosListSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/RegionInfos_List.json + */ + /** + * Sample code: RegionInfos_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void regionInfosList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.netAppResourceRegionInfos().list("eastus", com.azure.core.util.Context.NONE); + } +} +``` + ### Operations_List ```java @@ -666,8 +1188,7 @@ public final class NetAppResourceQuotaLimitsListSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/OperationList.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/OperationList.json */ /** * Sample code: OperationList. @@ -691,8 +1212,7 @@ import com.azure.resourcemanager.netapp.models.ServiceLevel; */ public final class PoolsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Pools_CreateOrUpdate.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Pools_CreateOrUpdate.json */ /** * Sample code: Pools_CreateOrUpdate. @@ -700,8 +1220,14 @@ public final class PoolsCreateOrUpdateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void poolsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.pools().define("pool1").withRegion("eastus").withExistingNetAppAccount("myRG", "account1") - .withSize(4398046511104L).withServiceLevel(ServiceLevel.PREMIUM).withQosType(QosType.AUTO).create(); + manager.pools() + .define("pool1") + .withRegion("eastus") + .withExistingNetAppAccount("myRG", "account1") + .withSize(4398046511104L) + .withServiceLevel(ServiceLevel.PREMIUM) + .withQosType(QosType.AUTO) + .create(); } } ``` @@ -714,8 +1240,7 @@ public final class PoolsCreateOrUpdateSamples { */ public final class PoolsDeleteSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Pools_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Pools_Delete.json */ /** * Sample code: Pools_Delete. @@ -736,8 +1261,7 @@ public final class PoolsDeleteSamples { */ public final class PoolsGetSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Pools_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Pools_Get.json */ /** * Sample code: Pools_Get. @@ -758,8 +1282,7 @@ public final class PoolsGetSamples { */ public final class PoolsListSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Pools_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Pools_List.json */ /** * Sample code: Pools_List. @@ -782,8 +1305,7 @@ import com.azure.resourcemanager.netapp.models.CapacityPool; */ public final class PoolsUpdateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Pools_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Pools_Update.json */ /** * Sample code: Pools_Update. @@ -811,8 +1333,7 @@ import com.azure.resourcemanager.netapp.models.WeeklySchedule; */ public final class SnapshotPoliciesCreateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_Create.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/SnapshotPolicies_Create.json */ /** * Sample code: SnapshotPolicies_Create. @@ -820,7 +1341,9 @@ public final class SnapshotPoliciesCreateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotPoliciesCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshotPolicies().define("snapshotPolicyName").withRegion("eastus") + manager.snapshotPolicies() + .define("snapshotPolicyName") + .withRegion("eastus") .withExistingNetAppAccount("myRG", "account1") .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(2).withMinute(50)) .withDailySchedule(new DailySchedule().withSnapshotsToKeep(4).withHour(14).withMinute(30)) @@ -828,7 +1351,8 @@ public final class SnapshotPoliciesCreateSamples { new WeeklySchedule().withSnapshotsToKeep(3).withDay("Wednesday").withHour(14).withMinute(45)) .withMonthlySchedule( new MonthlySchedule().withSnapshotsToKeep(5).withDaysOfMonth("10,11,12").withHour(14).withMinute(15)) - .withEnabled(true).create(); + .withEnabled(true) + .create(); } } ``` @@ -841,8 +1365,7 @@ public final class SnapshotPoliciesCreateSamples { */ public final class SnapshotPoliciesDeleteSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/SnapshotPolicies_Delete.json */ /** * Sample code: SnapshotPolicies_Delete. @@ -850,8 +1373,8 @@ public final class SnapshotPoliciesDeleteSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotPoliciesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshotPolicies().delete("resourceGroup", "accountName", "snapshotPolicyName", - com.azure.core.util.Context.NONE); + manager.snapshotPolicies() + .delete("resourceGroup", "accountName", "snapshotPolicyName", com.azure.core.util.Context.NONE); } } ``` @@ -864,8 +1387,7 @@ public final class SnapshotPoliciesDeleteSamples { */ public final class SnapshotPoliciesGetSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/SnapshotPolicies_Get.json */ /** * Sample code: SnapshotPolicies_Get. @@ -873,8 +1395,8 @@ public final class SnapshotPoliciesGetSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotPoliciesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshotPolicies().getWithResponse("myRG", "account1", "snapshotPolicyName", - com.azure.core.util.Context.NONE); + manager.snapshotPolicies() + .getWithResponse("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE); } } ``` @@ -887,8 +1409,7 @@ public final class SnapshotPoliciesGetSamples { */ public final class SnapshotPoliciesListSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/SnapshotPolicies_List.json */ /** * Sample code: SnapshotPolicies_List. @@ -909,9 +1430,7 @@ public final class SnapshotPoliciesListSamples { */ public final class SnapshotPoliciesListVolumesSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_ListVolumes. - * json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/SnapshotPolicies_ListVolumes.json */ /** * Sample code: SnapshotPolicies_ListVolumes. @@ -919,8 +1438,8 @@ public final class SnapshotPoliciesListVolumesSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotPoliciesListVolumes(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshotPolicies().listVolumesWithResponse("myRG", "account1", "snapshotPolicyName", - com.azure.core.util.Context.NONE); + manager.snapshotPolicies() + .listVolumesWithResponse("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE); } } ``` @@ -939,8 +1458,7 @@ import com.azure.resourcemanager.netapp.models.WeeklySchedule; */ public final class SnapshotPoliciesUpdateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/SnapshotPolicies_Update.json */ /** * Sample code: SnapshotPolicies_Update. @@ -949,14 +1467,17 @@ public final class SnapshotPoliciesUpdateSamples { */ public static void snapshotPoliciesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { SnapshotPolicy resource = manager.snapshotPolicies() - .getWithResponse("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE).getValue(); - resource.update().withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(2).withMinute(50)) + .getWithResponse("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(2).withMinute(50)) .withDailySchedule(new DailySchedule().withSnapshotsToKeep(4).withHour(14).withMinute(30)) .withWeeklySchedule( new WeeklySchedule().withSnapshotsToKeep(3).withDay("Wednesday").withHour(14).withMinute(45)) .withMonthlySchedule( new MonthlySchedule().withSnapshotsToKeep(5).withDaysOfMonth("10,11,12").withHour(14).withMinute(15)) - .withEnabled(true).apply(); + .withEnabled(true) + .apply(); } } ``` @@ -969,8 +1490,7 @@ public final class SnapshotPoliciesUpdateSamples { */ public final class SnapshotsCreateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_Create.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Snapshots_Create.json */ /** * Sample code: Snapshots_Create. @@ -978,8 +1498,11 @@ public final class SnapshotsCreateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotsCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshots().define("snapshot1").withRegion("eastus") - .withExistingVolume("myRG", "account1", "pool1", "volume1").create(); + manager.snapshots() + .define("snapshot1") + .withRegion("eastus") + .withExistingVolume("myRG", "account1", "pool1", "volume1") + .create(); } } ``` @@ -992,8 +1515,7 @@ public final class SnapshotsCreateSamples { */ public final class SnapshotsDeleteSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Snapshots_Delete.json */ /** * Sample code: Snapshots_Delete. @@ -1001,8 +1523,8 @@ public final class SnapshotsDeleteSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshots().delete("myRG", "account1", "pool1", "volume1", "snapshot1", - com.azure.core.util.Context.NONE); + manager.snapshots() + .delete("myRG", "account1", "pool1", "volume1", "snapshot1", com.azure.core.util.Context.NONE); } } ``` @@ -1015,8 +1537,7 @@ public final class SnapshotsDeleteSamples { */ public final class SnapshotsGetSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Snapshots_Get.json */ /** * Sample code: Snapshots_Get. @@ -1024,8 +1545,8 @@ public final class SnapshotsGetSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshots().getWithResponse("myRG", "account1", "pool1", "volume1", "snapshot1", - com.azure.core.util.Context.NONE); + manager.snapshots() + .getWithResponse("myRG", "account1", "pool1", "volume1", "snapshot1", com.azure.core.util.Context.NONE); } } ``` @@ -1038,8 +1559,7 @@ public final class SnapshotsGetSamples { */ public final class SnapshotsListSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Snapshots_List.json */ /** * Sample code: Snapshots_List. @@ -1063,9 +1583,7 @@ import java.util.Arrays; */ public final class SnapshotsRestoreFilesSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_SingleFileRestore. - * json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Snapshots_SingleFileRestore.json */ /** * Sample code: Snapshots_SingleFileRestore. @@ -1073,9 +1591,10 @@ public final class SnapshotsRestoreFilesSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotsSingleFileRestore(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshots().restoreFiles("myRG", "account1", "pool1", "volume1", "snapshot1", - new SnapshotRestoreFiles().withFilePaths(Arrays.asList("/dir1/customer1.db", "/dir1/customer2.db")), - com.azure.core.util.Context.NONE); + manager.snapshots() + .restoreFiles("myRG", "account1", "pool1", "volume1", "snapshot1", + new SnapshotRestoreFiles().withFilePaths(Arrays.asList("/dir1/customer1.db", "/dir1/customer2.db")), + com.azure.core.util.Context.NONE); } } ``` @@ -1092,8 +1611,7 @@ import java.io.IOException; */ public final class SnapshotsUpdateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Snapshots_Update.json */ /** * Sample code: Snapshots_Update. @@ -1102,8 +1620,9 @@ public final class SnapshotsUpdateSamples { */ public static void snapshotsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) throws IOException { manager.snapshots() - .update("myRG", "account1", "pool1", "volume1", "snapshot1", SerializerFactory - .createDefaultManagementSerializerAdapter().deserialize("{}", Object.class, SerializerEncoding.JSON), + .update("myRG", "account1", "pool1", "volume1", "snapshot1", + SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON), com.azure.core.util.Context.NONE); } } @@ -1117,8 +1636,7 @@ public final class SnapshotsUpdateSamples { */ public final class SubvolumesCreateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_Create.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Subvolumes_Create.json */ /** * Sample code: Subvolumes_Create. @@ -1126,8 +1644,11 @@ public final class SubvolumesCreateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void subvolumesCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.subvolumes().define("subvolume1").withExistingVolume("myRG", "account1", "pool1", "volume1") - .withPath("/subvolumePath").create(); + manager.subvolumes() + .define("subvolume1") + .withExistingVolume("myRG", "account1", "pool1", "volume1") + .withPath("/subvolumePath") + .create(); } } ``` @@ -1140,8 +1661,7 @@ public final class SubvolumesCreateSamples { */ public final class SubvolumesDeleteSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Subvolumes_Delete.json */ /** * Sample code: Subvolumes_Delete. @@ -1149,8 +1669,8 @@ public final class SubvolumesDeleteSamples { * @param manager Entry point to NetAppFilesManager. */ public static void subvolumesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.subvolumes().delete("myRG", "account1", "pool1", "volume1", "subvolume1", - com.azure.core.util.Context.NONE); + manager.subvolumes() + .delete("myRG", "account1", "pool1", "volume1", "subvolume1", com.azure.core.util.Context.NONE); } } ``` @@ -1163,8 +1683,7 @@ public final class SubvolumesDeleteSamples { */ public final class SubvolumesGetSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Subvolumes_Get.json */ /** * Sample code: Subvolumes_Get. @@ -1172,8 +1691,8 @@ public final class SubvolumesGetSamples { * @param manager Entry point to NetAppFilesManager. */ public static void subvolumesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.subvolumes().getWithResponse("myRG", "account1", "pool1", "volume1", "subvolume1", - com.azure.core.util.Context.NONE); + manager.subvolumes() + .getWithResponse("myRG", "account1", "pool1", "volume1", "subvolume1", com.azure.core.util.Context.NONE); } } ``` @@ -1186,8 +1705,7 @@ public final class SubvolumesGetSamples { */ public final class SubvolumesGetMetadataSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_Metadata.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Subvolumes_Metadata.json */ /** * Sample code: Subvolumes_Metadata. @@ -1195,8 +1713,8 @@ public final class SubvolumesGetMetadataSamples { * @param manager Entry point to NetAppFilesManager. */ public static void subvolumesMetadata(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.subvolumes().getMetadata("myRG", "account1", "pool1", "volume1", "subvolume1", - com.azure.core.util.Context.NONE); + manager.subvolumes() + .getMetadata("myRG", "account1", "pool1", "volume1", "subvolume1", com.azure.core.util.Context.NONE); } } ``` @@ -1209,8 +1727,7 @@ public final class SubvolumesGetMetadataSamples { */ public final class SubvolumesListByVolumeSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Subvolumes_List.json */ /** * Sample code: Subvolumes_List. @@ -1233,8 +1750,7 @@ import com.azure.resourcemanager.netapp.models.SubvolumeInfo; */ public final class SubvolumesUpdateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Subvolumes_Update.json */ /** * Sample code: Subvolumes_Update. @@ -1266,9 +1782,7 @@ import java.util.Arrays; */ public final class VolumeGroupsCreateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_Create_SapHana. - * json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeGroups_Create_SapHana.json */ /** * Sample code: VolumeGroups_Create_SapHana. @@ -1276,39 +1790,61 @@ public final class VolumeGroupsCreateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumeGroupsCreateSapHana(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager - .volumeGroups().define("group1").withExistingNetAppAccount("myRG", "account1").withRegion( - "westus") - .withGroupMetadata( - new VolumeGroupMetadata() - .withGroupDescription("Volume group").withApplicationType( - ApplicationType.SAP_HANA) - .withApplicationIdentifier("SH9")) - .withVolumes(Arrays.asList(new VolumeGroupVolumeProperties().withName("test-data-mnt00001") - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) - .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) - .withProtocolTypes(Arrays.asList("NFSv4.1")) - .withSubnetId( - "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") - .withThroughputMibps(10.0F) - .withCapacityPoolResourceId( - "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") - .withProximityPlacementGroup( - "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg") - .withVolumeSpecName("data"), + manager.volumeGroups() + .define("group1") + .withExistingNetAppAccount("myRG", "account1") + .withRegion("westus") + .withGroupMetadata(new VolumeGroupMetadata().withGroupDescription("Volume group") + .withApplicationType(ApplicationType.SAP_HANA) + .withApplicationIdentifier("SH9")) + .withVolumes(Arrays.asList( + new VolumeGroupVolumeProperties().withName("test-data-mnt00001") + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) + .withProtocolTypes(Arrays.asList("NFSv4.1")) + .withSubnetId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withProximityPlacementGroup( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg") + .withVolumeSpecName("data"), new VolumeGroupVolumeProperties().withName("test-log-mnt00001") - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -1318,13 +1854,25 @@ public final class VolumeGroupsCreateSamples { .withProximityPlacementGroup( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg") .withVolumeSpecName("log"), - new VolumeGroupVolumeProperties().withName("test-shared").withCreationToken("fakeTokenPlaceholder") - .withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + new VolumeGroupVolumeProperties().withName("test-shared") + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -1334,13 +1882,25 @@ public final class VolumeGroupsCreateSamples { .withProximityPlacementGroup( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg") .withVolumeSpecName("shared"), - new VolumeGroupVolumeProperties().withName("test-data-backup").withCreationToken("fakeTokenPlaceholder") - .withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + new VolumeGroupVolumeProperties().withName("test-data-backup") + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -1350,13 +1910,25 @@ public final class VolumeGroupsCreateSamples { .withProximityPlacementGroup( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg") .withVolumeSpecName("data-backup"), - new VolumeGroupVolumeProperties().withName("test-log-backup").withCreationToken("fakeTokenPlaceholder") - .withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + new VolumeGroupVolumeProperties().withName("test-log-backup") + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -1370,8 +1942,7 @@ public final class VolumeGroupsCreateSamples { } /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_Create_Oracle.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeGroups_Create_Oracle.json */ /** * Sample code: VolumeGroups_Create_Oracle. @@ -1379,37 +1950,61 @@ public final class VolumeGroupsCreateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumeGroupsCreateOracle(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager - .volumeGroups().define("group1").withExistingNetAppAccount("myRG", "account1").withRegion( - "westus") - .withGroupMetadata( - new VolumeGroupMetadata() - .withGroupDescription("Volume group").withApplicationType( - ApplicationType.ORACLE) - .withApplicationIdentifier("OR2")) - .withVolumes(Arrays.asList(new VolumeGroupVolumeProperties().withName("test-ora-data1") - .withZones(Arrays.asList("1")).withCreationToken("fakeTokenPlaceholder") - .withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) - .withProtocolTypes(Arrays.asList("NFSv4.1")) - .withSubnetId( - "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") - .withThroughputMibps(10.0F) - .withCapacityPoolResourceId( - "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") - .withVolumeSpecName("ora-data1"), - new VolumeGroupVolumeProperties().withName("test-ora-data2").withZones(Arrays.asList("1")) - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + manager.volumeGroups() + .define("group1") + .withExistingNetAppAccount("myRG", "account1") + .withRegion("westus") + .withGroupMetadata(new VolumeGroupMetadata().withGroupDescription("Volume group") + .withApplicationType(ApplicationType.ORACLE) + .withApplicationIdentifier("OR2")) + .withVolumes(Arrays.asList( + new VolumeGroupVolumeProperties().withName("test-ora-data1") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) + .withProtocolTypes(Arrays.asList("NFSv4.1")) + .withSubnetId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("ora-data1"), + new VolumeGroupVolumeProperties().withName("test-ora-data2") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -1417,14 +2012,26 @@ public final class VolumeGroupsCreateSamples { .withCapacityPoolResourceId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") .withVolumeSpecName("ora-data2"), - new VolumeGroupVolumeProperties().withName("test-ora-data3").withZones(Arrays.asList("1")) - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + new VolumeGroupVolumeProperties().withName("test-ora-data3") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -1432,14 +2039,26 @@ public final class VolumeGroupsCreateSamples { .withCapacityPoolResourceId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") .withVolumeSpecName("ora-data3"), - new VolumeGroupVolumeProperties().withName("test-ora-data4").withZones(Arrays.asList("1")) - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + new VolumeGroupVolumeProperties().withName("test-ora-data4") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -1447,14 +2066,26 @@ public final class VolumeGroupsCreateSamples { .withCapacityPoolResourceId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") .withVolumeSpecName("ora-data4"), - new VolumeGroupVolumeProperties().withName("test-ora-data5").withZones(Arrays.asList("1")) - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + new VolumeGroupVolumeProperties().withName("test-ora-data5") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -1462,14 +2093,26 @@ public final class VolumeGroupsCreateSamples { .withCapacityPoolResourceId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") .withVolumeSpecName("ora-data5"), - new VolumeGroupVolumeProperties().withName("test-ora-data6").withZones(Arrays.asList("1")) - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + new VolumeGroupVolumeProperties().withName("test-ora-data6") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -1477,14 +2120,26 @@ public final class VolumeGroupsCreateSamples { .withCapacityPoolResourceId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") .withVolumeSpecName("ora-data6"), - new VolumeGroupVolumeProperties().withName("test-ora-data7").withZones(Arrays.asList("1")) - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + new VolumeGroupVolumeProperties().withName("test-ora-data7") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -1492,14 +2147,26 @@ public final class VolumeGroupsCreateSamples { .withCapacityPoolResourceId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") .withVolumeSpecName("ora-data7"), - new VolumeGroupVolumeProperties().withName("test-ora-data8").withZones(Arrays.asList("1")) - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + new VolumeGroupVolumeProperties().withName("test-ora-data8") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -1507,14 +2174,26 @@ public final class VolumeGroupsCreateSamples { .withCapacityPoolResourceId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") .withVolumeSpecName("ora-data8"), - new VolumeGroupVolumeProperties().withName("test-ora-log").withZones(Arrays.asList("1")) - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + new VolumeGroupVolumeProperties().withName("test-ora-log") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -1522,14 +2201,26 @@ public final class VolumeGroupsCreateSamples { .withCapacityPoolResourceId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") .withVolumeSpecName("ora-log"), - new VolumeGroupVolumeProperties().withName("test-ora-log-mirror").withZones(Arrays.asList("1")) - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + new VolumeGroupVolumeProperties().withName("test-ora-log-mirror") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -1537,14 +2228,26 @@ public final class VolumeGroupsCreateSamples { .withCapacityPoolResourceId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") .withVolumeSpecName("ora-log-mirror"), - new VolumeGroupVolumeProperties().withName("test-ora-binary").withZones(Arrays.asList("1")) - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + new VolumeGroupVolumeProperties().withName("test-ora-binary") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -1552,14 +2255,26 @@ public final class VolumeGroupsCreateSamples { .withCapacityPoolResourceId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") .withVolumeSpecName("ora-binary"), - new VolumeGroupVolumeProperties().withName("test-ora-backup").withZones(Arrays.asList("1")) - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + new VolumeGroupVolumeProperties().withName("test-ora-backup") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -1580,8 +2295,7 @@ public final class VolumeGroupsCreateSamples { */ public final class VolumeGroupsDeleteSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeGroups_Delete.json */ /** * Sample code: VolumeGroups_Delete. @@ -1602,8 +2316,7 @@ public final class VolumeGroupsDeleteSamples { */ public final class VolumeGroupsGetSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_Get_SapHana.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeGroups_Get_SapHana.json */ /** * Sample code: VolumeGroups_Get_SapHana. @@ -1615,8 +2328,7 @@ public final class VolumeGroupsGetSamples { } /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_Get_Oracle.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeGroups_Get_Oracle.json */ /** * Sample code: VolumeGroups_Get_Oracle. @@ -1637,8 +2349,7 @@ public final class VolumeGroupsGetSamples { */ public final class VolumeGroupsListByNetAppAccountSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_List_Oracle.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeGroups_List_Oracle.json */ /** * Sample code: VolumeGroups_List_Oracle. @@ -1650,8 +2361,7 @@ public final class VolumeGroupsListByNetAppAccountSamples { } /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_List_SapHana.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeGroups_List_SapHana.json */ /** * Sample code: VolumeGroups_List_SapHana. @@ -1674,8 +2384,7 @@ import com.azure.resourcemanager.netapp.models.Type; */ public final class VolumeQuotaRulesCreateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeQuotaRules_Create.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeQuotaRules_Create.json */ /** * Sample code: VolumeQuotaRules_Create. @@ -1683,9 +2392,14 @@ public final class VolumeQuotaRulesCreateSamples { * @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(); + 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(); } } ``` @@ -1698,8 +2412,7 @@ public final class VolumeQuotaRulesCreateSamples { */ public final class VolumeQuotaRulesDeleteSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeQuotaRules_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeQuotaRules_Delete.json */ /** * Sample code: VolumeQuotaRules_Delete. @@ -1707,8 +2420,8 @@ public final class VolumeQuotaRulesDeleteSamples { * @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", - com.azure.core.util.Context.NONE); + manager.volumeQuotaRules() + .delete("myRG", "account-9957", "pool-5210", "volume-6387", "rule-0004", com.azure.core.util.Context.NONE); } } ``` @@ -1721,8 +2434,7 @@ public final class VolumeQuotaRulesDeleteSamples { */ public final class VolumeQuotaRulesGetSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeQuotaRules_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeQuotaRules_Get.json */ /** * Sample code: VolumeQuotaRules_Get. @@ -1730,8 +2442,9 @@ public final class VolumeQuotaRulesGetSamples { * @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", - com.azure.core.util.Context.NONE); + manager.volumeQuotaRules() + .getWithResponse("myRG", "account-9957", "pool-5210", "volume-6387", "rule-0004", + com.azure.core.util.Context.NONE); } } ``` @@ -1744,8 +2457,7 @@ public final class VolumeQuotaRulesGetSamples { */ public final class VolumeQuotaRulesListByVolumeSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeQuotaRules_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeQuotaRules_List.json */ /** * Sample code: VolumeQuotaRules_List. @@ -1753,8 +2465,8 @@ public final class VolumeQuotaRulesListByVolumeSamples { * @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", - com.azure.core.util.Context.NONE); + manager.volumeQuotaRules() + .listByVolume("myRG", "account-9957", "pool-5210", "volume-6387", com.azure.core.util.Context.NONE); } } ``` @@ -1769,8 +2481,7 @@ import com.azure.resourcemanager.netapp.models.VolumeQuotaRule; */ public final class VolumeQuotaRulesUpdateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeQuotaRules_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeQuotaRules_Update.json */ /** * Sample code: VolumeQuotaRules_Update. @@ -1778,8 +2489,10 @@ public final class VolumeQuotaRulesUpdateSamples { * @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", com.azure.core.util.Context.NONE).getValue(); + VolumeQuotaRule resource = manager.volumeQuotaRules() + .getWithResponse("myRG", "account-9957", "pool-5210", "volume-6387", "rule-0004", + com.azure.core.util.Context.NONE) + .getValue(); resource.update().withQuotaSizeInKiBs(100009L).apply(); } } @@ -1795,9 +2508,7 @@ import com.azure.resourcemanager.netapp.models.AuthorizeRequest; */ public final class VolumesAuthorizeReplicationSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_AuthorizeReplication. - * json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_AuthorizeReplication.json */ /** * Sample code: Volumes_AuthorizeReplication. @@ -1805,10 +2516,11 @@ public final class VolumesAuthorizeReplicationSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesAuthorizeReplication(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().authorizeReplication("myRG", "account1", "pool1", "volume1", - new AuthorizeRequest().withRemoteVolumeResourceId( - "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRemoteRG/providers/Microsoft.NetApp/netAppAccounts/remoteAccount1/capacityPools/remotePool1/volumes/remoteVolume1"), - com.azure.core.util.Context.NONE); + manager.volumes() + .authorizeReplication("myRG", "account1", "pool1", "volume1", + new AuthorizeRequest().withRemoteVolumeResourceId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRemoteRG/providers/Microsoft.NetApp/netAppAccounts/remoteAccount1/capacityPools/remotePool1/volumes/remoteVolume1"), + com.azure.core.util.Context.NONE); } } ``` @@ -1823,8 +2535,7 @@ import com.azure.resourcemanager.netapp.models.BreakFileLocksRequest; */ public final class VolumesBreakFileLocksSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_BreakFileLocks.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_BreakFileLocks.json */ /** * Sample code: Volumes_BreakFileLocks. @@ -1832,9 +2543,10 @@ public final class VolumesBreakFileLocksSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesBreakFileLocks(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().breakFileLocks("myRG", "account1", "pool1", "volume1", - new BreakFileLocksRequest().withClientIp("101.102.103.104").withConfirmRunningDisruptiveOperation(true), - com.azure.core.util.Context.NONE); + manager.volumes() + .breakFileLocks("myRG", "account1", "pool1", "volume1", + new BreakFileLocksRequest().withClientIp("101.102.103.104").withConfirmRunningDisruptiveOperation(true), + com.azure.core.util.Context.NONE); } } ``` @@ -1849,8 +2561,7 @@ import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; */ public final class VolumesBreakReplicationSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_BreakReplication.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_BreakReplication.json */ /** * Sample code: Volumes_BreakReplication. @@ -1858,8 +2569,32 @@ public final class VolumesBreakReplicationSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesBreakReplication(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().breakReplication("myRG", "account1", "pool1", "volume1", - new BreakReplicationRequest().withForceBreakReplication(false), com.azure.core.util.Context.NONE); + manager.volumes() + .breakReplication("myRG", "account1", "pool1", "volume1", + new BreakReplicationRequest().withForceBreakReplication(false), com.azure.core.util.Context.NONE); + } +} +``` + +### Volumes_CreateOnPremMigrationReplication + +```java +/** + * Samples for Volumes CreateOnPremMigrationReplication. + */ +public final class VolumesCreateOnPremMigrationReplicationSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_CreateOnPremMigrationReplication.json + */ + /** + * Sample code: Volumes_CreateOnPremMigrationReplication. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + volumesCreateOnPremMigrationReplication(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes() + .createOnPremMigrationReplication("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); } } ``` @@ -1874,8 +2609,7 @@ import com.azure.resourcemanager.netapp.models.ServiceLevel; */ public final class VolumesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_CreateOrUpdate.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_CreateOrUpdate.json */ /** * Sample code: Volumes_CreateOrUpdate. @@ -1883,11 +2617,16 @@ public final class VolumesCreateOrUpdateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().define("volume1").withRegion("eastus").withExistingCapacityPool("myRG", "account1", "pool1") - .withCreationToken("my-unique-file-path").withUsageThreshold(107374182400L) + manager.volumes() + .define("volume1") + .withRegion("eastus") + .withExistingCapacityPool("myRG", "account1", "pool1") + .withCreationToken("my-unique-file-path") + .withUsageThreshold(107374182400L) .withSubnetId( "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") - .withServiceLevel(ServiceLevel.PREMIUM).create(); + .withServiceLevel(ServiceLevel.PREMIUM) + .create(); } } ``` @@ -1900,8 +2639,7 @@ public final class VolumesCreateOrUpdateSamples { */ public final class VolumesDeleteSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_Delete.json */ /** * Sample code: Volumes_Delete. @@ -1922,8 +2660,7 @@ public final class VolumesDeleteSamples { */ public final class VolumesDeleteReplicationSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_DeleteReplication.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_DeleteReplication.json */ /** * Sample code: Volumes_DeleteReplication. @@ -1936,6 +2673,28 @@ public final class VolumesDeleteReplicationSamples { } ``` +### Volumes_FinalizeOnPremMigration + +```java +/** + * Samples for Volumes FinalizeOnPremMigration. + */ +public final class VolumesFinalizeOnPremMigrationSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_FinalizeOnPremMigration.json + */ + /** + * Sample code: Volumes_FinalizeOnPremMigration. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesFinalizeOnPremMigration(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes() + .finalizeOnPremMigration("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} +``` + ### Volumes_FinalizeRelocation ```java @@ -1944,8 +2703,7 @@ public final class VolumesDeleteReplicationSamples { */ public final class VolumesFinalizeRelocationSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_FinalizeRelocation.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_FinalizeRelocation.json */ /** * Sample code: Volumes_FinalizeRelocation. @@ -1966,8 +2724,7 @@ public final class VolumesFinalizeRelocationSamples { */ public final class VolumesGetSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_Get.json */ /** * Sample code: Volumes_Get. @@ -1988,8 +2745,7 @@ public final class VolumesGetSamples { */ public final class VolumesListSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_List.json */ /** * Sample code: Volumes_List. @@ -2012,8 +2768,7 @@ import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest; */ public final class VolumesListGetGroupIdListForLdapUserSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/GroupIdListForLDAPUser.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/GroupIdListForLDAPUser.json */ /** * Sample code: GetGroupIdListForUser. @@ -2021,8 +2776,9 @@ public final class VolumesListGetGroupIdListForLdapUserSamples { * @param manager Entry point to NetAppFilesManager. */ public static void getGroupIdListForUser(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().listGetGroupIdListForLdapUser("myRG", "account1", "pool1", "volume1", - new GetGroupIdListForLdapUserRequest().withUsername("user1"), com.azure.core.util.Context.NONE); + manager.volumes() + .listGetGroupIdListForLdapUser("myRG", "account1", "pool1", "volume1", + new GetGroupIdListForLdapUserRequest().withUsername("user1"), com.azure.core.util.Context.NONE); } } ``` @@ -2035,8 +2791,7 @@ public final class VolumesListGetGroupIdListForLdapUserSamples { */ public final class VolumesListReplicationsSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ListReplications.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_ListReplications.json */ /** * Sample code: Volumes_ListReplications. @@ -2049,6 +2804,57 @@ public final class VolumesListReplicationsSamples { } ``` +### Volumes_PeerClusterForOnPremMigration + +```java +import com.azure.resourcemanager.netapp.models.PeerClusterForVolumeMigrationRequest; +import java.util.Arrays; + +/** + * Samples for Volumes PeerClusterForOnPremMigration. + */ +public final class VolumesPeerClusterForOnPremMigrationSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_PeerClusterForOnPremMigration.json + */ + /** + * Sample code: Volumes_PeerClusterForOnPremMigration. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + volumesPeerClusterForOnPremMigration(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes() + .peerClusterForOnPremMigration("myRG", "account1", "pool1", "volume1", + new PeerClusterForVolumeMigrationRequest() + .withPeerAddresses(Arrays.asList("0.0.0.1", "0.0.0.2", "0.0.0.3", "0.0.0.4", "0.0.0.5", "0.0.0.6")), + com.azure.core.util.Context.NONE); + } +} +``` + +### Volumes_PerformReplicationTransfer + +```java +/** + * Samples for Volumes PerformReplicationTransfer. + */ +public final class VolumesPerformReplicationTransferSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_PerformReplicationTransfer.json + */ + /** + * Sample code: Volumes_PerformReplicationTransfer. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesPerformReplicationTransfer(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes() + .performReplicationTransfer("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} +``` + ### Volumes_PoolChange ```java @@ -2059,8 +2865,7 @@ import com.azure.resourcemanager.netapp.models.PoolChangeRequest; */ public final class VolumesPoolChangeSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_PoolChange.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_PoolChange.json */ /** * Sample code: Volumes_AuthorizeReplication. @@ -2068,10 +2873,10 @@ public final class VolumesPoolChangeSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesAuthorizeReplication(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().poolChange("myRG", "account1", "pool1", "volume1", - new PoolChangeRequest().withNewPoolResourceId( + manager.volumes() + .poolChange("myRG", "account1", "pool1", "volume1", new PoolChangeRequest().withNewPoolResourceId( "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - com.azure.core.util.Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -2084,8 +2889,7 @@ public final class VolumesPoolChangeSamples { */ public final class VolumesPopulateAvailabilityZoneSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/ - * Volumes_PopulateAvailabilityZones.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_PopulateAvailabilityZones.json */ /** * Sample code: Volumes_PopulateAvailabilityZones. @@ -2093,8 +2897,8 @@ public final class VolumesPopulateAvailabilityZoneSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesPopulateAvailabilityZones(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().populateAvailabilityZone("myRG", "account1", "pool1", "volume1", - com.azure.core.util.Context.NONE); + manager.volumes() + .populateAvailabilityZone("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); } } ``` @@ -2107,9 +2911,7 @@ public final class VolumesPopulateAvailabilityZoneSamples { */ public final class VolumesReInitializeReplicationSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ReInitializeReplication - * .json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_ReInitializeReplication.json */ /** * Sample code: Volumes_ReInitializeReplication. @@ -2117,8 +2919,8 @@ public final class VolumesReInitializeReplicationSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesReInitializeReplication(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().reInitializeReplication("myRG", "account1", "pool1", "volume1", - com.azure.core.util.Context.NONE); + manager.volumes() + .reInitializeReplication("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); } } ``` @@ -2133,9 +2935,7 @@ import com.azure.resourcemanager.netapp.models.ReestablishReplicationRequest; */ public final class VolumesReestablishReplicationSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ReestablishReplication. - * json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_ReestablishReplication.json */ /** * Sample code: Volumes_ReestablishReplication. @@ -2143,10 +2943,11 @@ public final class VolumesReestablishReplicationSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesReestablishReplication(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().reestablishReplication("myRG", "account1", "pool1", "volume1", - new ReestablishReplicationRequest().withSourceVolumeId( - "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/mySourceRG/providers/Microsoft.NetApp/netAppAccounts/sourceAccount1/capacityPools/sourcePool1/volumes/sourceVolume1"), - com.azure.core.util.Context.NONE); + manager.volumes() + .reestablishReplication("myRG", "account1", "pool1", "volume1", + new ReestablishReplicationRequest().withSourceVolumeId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/mySourceRG/providers/Microsoft.NetApp/netAppAccounts/sourceAccount1/capacityPools/sourcePool1/volumes/sourceVolume1"), + com.azure.core.util.Context.NONE); } } ``` @@ -2161,8 +2962,7 @@ import com.azure.resourcemanager.netapp.models.RelocateVolumeRequest; */ public final class VolumesRelocateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_Relocate.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_Relocate.json */ /** * Sample code: Volumes_Relocate. @@ -2170,8 +2970,9 @@ public final class VolumesRelocateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesRelocate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().relocate("myRG", "account1", "pool1", "volume1", new RelocateVolumeRequest(), - com.azure.core.util.Context.NONE); + manager.volumes() + .relocate("myRG", "account1", "pool1", "volume1", new RelocateVolumeRequest(), + com.azure.core.util.Context.NONE); } } ``` @@ -2184,8 +2985,7 @@ public final class VolumesRelocateSamples { */ public final class VolumesReplicationStatusSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ReplicationStatus.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_ReplicationStatus.json */ /** * Sample code: Volumes_ReplicationStatus. @@ -2193,8 +2993,8 @@ public final class VolumesReplicationStatusSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesReplicationStatus(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().replicationStatusWithResponse("myRG", "account1", "pool1", "volume1", - com.azure.core.util.Context.NONE); + manager.volumes() + .replicationStatusWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); } } ``` @@ -2207,8 +3007,7 @@ public final class VolumesReplicationStatusSamples { */ public final class VolumesResetCifsPasswordSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ResetCifsPassword.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_ResetCifsPassword.json */ /** * Sample code: Volumes_ResetCifsPassword. @@ -2229,8 +3028,7 @@ public final class VolumesResetCifsPasswordSamples { */ public final class VolumesResyncReplicationSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ResyncReplication.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_ResyncReplication.json */ /** * Sample code: Volumes_ResyncReplication. @@ -2253,8 +3051,7 @@ import com.azure.resourcemanager.netapp.models.VolumeRevert; */ public final class VolumesRevertSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_Revert.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_Revert.json */ /** * Sample code: Volumes_Revert. @@ -2262,9 +3059,10 @@ public final class VolumesRevertSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesRevert(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().revert("myRG", "account1", "pool1", "volume1", new VolumeRevert().withSnapshotId( - "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/snapshots/snapshot1"), - com.azure.core.util.Context.NONE); + manager.volumes() + .revert("myRG", "account1", "pool1", "volume1", new VolumeRevert().withSnapshotId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/snapshots/snapshot1"), + com.azure.core.util.Context.NONE); } } ``` @@ -2277,8 +3075,7 @@ public final class VolumesRevertSamples { */ public final class VolumesRevertRelocationSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_RevertRelocation.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_RevertRelocation.json */ /** * Sample code: Volumes_RevertRelocation. @@ -2291,6 +3088,28 @@ public final class VolumesRevertRelocationSamples { } ``` +### Volumes_SplitCloneFromParent + +```java +/** + * Samples for Volumes SplitCloneFromParent. + */ +public final class VolumesSplitCloneFromParentSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_SplitClone.json + */ + /** + * Sample code: Volumes_SplitClone. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesSplitClone(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes() + .splitCloneFromParent("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} +``` + ### Volumes_Update ```java @@ -2301,8 +3120,7 @@ import com.azure.resourcemanager.netapp.models.Volume; */ public final class VolumesUpdateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_Update.json */ /** * Sample code: Volumes_Update. @@ -2311,7 +3129,8 @@ public final class VolumesUpdateSamples { */ public static void volumesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { Volume resource = manager.volumes() - .getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE).getValue(); + .getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE) + .getValue(); resource.update().apply(); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/pom.xml b/sdk/netapp/azure-resourcemanager-netapp/pom.xml index d2b8c21299955..bf8de16fa3619 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/pom.xml +++ b/sdk/netapp/azure-resourcemanager-netapp/pom.xml @@ -18,7 +18,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-2023-07-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-preview-2023-11. https://github.com/Azure/azure-sdk-for-java @@ -61,7 +61,7 @@ com.azure azure-core-test - 1.26.0-beta.1 + 1.25.0 test 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 71c237b9770fc..d5825f0c11d62 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 @@ -11,8 +11,8 @@ 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.HttpLogOptions; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; @@ -27,8 +27,13 @@ import com.azure.resourcemanager.netapp.implementation.AccountsImpl; import com.azure.resourcemanager.netapp.implementation.BackupPoliciesImpl; import com.azure.resourcemanager.netapp.implementation.BackupsImpl; +import com.azure.resourcemanager.netapp.implementation.BackupsUnderAccountsImpl; +import com.azure.resourcemanager.netapp.implementation.BackupsUnderBackupVaultsImpl; +import com.azure.resourcemanager.netapp.implementation.BackupsUnderVolumesImpl; +import com.azure.resourcemanager.netapp.implementation.BackupVaultsImpl; import com.azure.resourcemanager.netapp.implementation.NetAppManagementClientBuilder; import com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsImpl; +import com.azure.resourcemanager.netapp.implementation.NetAppResourceRegionInfosImpl; import com.azure.resourcemanager.netapp.implementation.NetAppResourcesImpl; import com.azure.resourcemanager.netapp.implementation.OperationsImpl; import com.azure.resourcemanager.netapp.implementation.PoolsImpl; @@ -41,7 +46,12 @@ import com.azure.resourcemanager.netapp.models.Accounts; import com.azure.resourcemanager.netapp.models.BackupPolicies; import com.azure.resourcemanager.netapp.models.Backups; +import com.azure.resourcemanager.netapp.models.BackupsUnderAccounts; +import com.azure.resourcemanager.netapp.models.BackupsUnderBackupVaults; +import com.azure.resourcemanager.netapp.models.BackupsUnderVolumes; +import com.azure.resourcemanager.netapp.models.BackupVaults; import com.azure.resourcemanager.netapp.models.NetAppResourceQuotaLimits; +import com.azure.resourcemanager.netapp.models.NetAppResourceRegionInfos; import com.azure.resourcemanager.netapp.models.NetAppResources; import com.azure.resourcemanager.netapp.models.Operations; import com.azure.resourcemanager.netapp.models.Pools; @@ -69,6 +79,8 @@ public final class NetAppFilesManager { private NetAppResourceQuotaLimits netAppResourceQuotaLimits; + private NetAppResourceRegionInfos netAppResourceRegionInfos; + private Accounts accounts; private Pools pools; @@ -79,8 +91,6 @@ public final class NetAppFilesManager { private SnapshotPolicies snapshotPolicies; - private Backups backups; - private BackupPolicies backupPolicies; private VolumeQuotaRules volumeQuotaRules; @@ -89,14 +99,26 @@ public final class NetAppFilesManager { private Subvolumes subvolumes; + private Backups backups; + + private BackupVaults backupVaults; + + private BackupsUnderBackupVaults backupsUnderBackupVaults; + + private BackupsUnderVolumes backupsUnderVolumes; + + private BackupsUnderAccounts backupsUnderAccounts; + private final NetAppManagementClient clientObject; private NetAppFilesManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); this.clientObject = new NetAppManagementClientBuilder().pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval).buildClient(); + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval) + .buildClient(); } /** @@ -247,12 +269,19 @@ public NetAppFilesManager authenticate(TokenCredential credential, AzureProfile Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.netapp").append("/") - .append("1.1.0"); + userAgentBuilder.append("azsdk-java") + .append("-") + .append("com.azure.resourcemanager.netapp") + .append("/") + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)"); + userAgentBuilder.append(" (") + .append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.name")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")) + .append("; auto-generated)"); } else { userAgentBuilder.append(" (auto-generated)"); } @@ -271,18 +300,21 @@ public NetAppFilesManager authenticate(TokenCredential credential, AzureProfile policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies.addAll(this.policies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList())); + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])).build(); + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .build(); return new NetAppFilesManager(httpPipeline, profile, defaultPollInterval); } } @@ -324,6 +356,19 @@ public NetAppResourceQuotaLimits netAppResourceQuotaLimits() { return netAppResourceQuotaLimits; } + /** + * Gets the resource collection API of NetAppResourceRegionInfos. + * + * @return Resource collection API of NetAppResourceRegionInfos. + */ + public NetAppResourceRegionInfos netAppResourceRegionInfos() { + if (this.netAppResourceRegionInfos == null) { + this.netAppResourceRegionInfos + = new NetAppResourceRegionInfosImpl(clientObject.getNetAppResourceRegionInfos(), this); + } + return netAppResourceRegionInfos; + } + /** * Gets the resource collection API of Accounts. It manages NetAppAccount. * @@ -384,18 +429,6 @@ public SnapshotPolicies snapshotPolicies() { return snapshotPolicies; } - /** - * Gets the resource collection API of Backups. - * - * @return Resource collection API of Backups. - */ - public Backups backups() { - if (this.backups == null) { - this.backups = new BackupsImpl(clientObject.getBackups(), this); - } - return backups; - } - /** * Gets the resource collection API of BackupPolicies. It manages BackupPolicy. * @@ -444,6 +477,67 @@ public Subvolumes subvolumes() { return subvolumes; } + /** + * 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); + } + return backups; + } + + /** + * Gets the resource collection API of BackupVaults. It manages BackupVault. + * + * @return Resource collection API of BackupVaults. + */ + public BackupVaults backupVaults() { + if (this.backupVaults == null) { + this.backupVaults = new BackupVaultsImpl(clientObject.getBackupVaults(), this); + } + return backupVaults; + } + + /** + * Gets the resource collection API of BackupsUnderBackupVaults. + * + * @return Resource collection API of BackupsUnderBackupVaults. + */ + public BackupsUnderBackupVaults backupsUnderBackupVaults() { + if (this.backupsUnderBackupVaults == null) { + this.backupsUnderBackupVaults + = new BackupsUnderBackupVaultsImpl(clientObject.getBackupsUnderBackupVaults(), this); + } + return backupsUnderBackupVaults; + } + + /** + * Gets the resource collection API of BackupsUnderVolumes. + * + * @return Resource collection API of BackupsUnderVolumes. + */ + public BackupsUnderVolumes backupsUnderVolumes() { + if (this.backupsUnderVolumes == null) { + this.backupsUnderVolumes = new BackupsUnderVolumesImpl(clientObject.getBackupsUnderVolumes(), this); + } + return backupsUnderVolumes; + } + + /** + * Gets the resource collection API of BackupsUnderAccounts. + * + * @return Resource collection API of BackupsUnderAccounts. + */ + public BackupsUnderAccounts backupsUnderAccounts() { + if (this.backupsUnderAccounts == null) { + this.backupsUnderAccounts = new BackupsUnderAccountsImpl(clientObject.getBackupsUnderAccounts(), this); + } + return backupsUnderAccounts; + } + /** * Gets wrapped service client NetAppManagementClient providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/AccountsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/AccountsClient.java index b82f0b74cb0a9..146d04bc329ed 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/AccountsClient.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/AccountsClient.java @@ -12,6 +12,8 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner; +import com.azure.resourcemanager.netapp.models.ChangeKeyVault; +import com.azure.resourcemanager.netapp.models.EncryptionMigrationRequest; import com.azure.resourcemanager.netapp.models.NetAppAccountPatch; /** @@ -366,4 +368,208 @@ SyncPoller, Void> beginRenewCredentials(String resourceGroupNam */ @ServiceMethod(returns = ReturnType.SINGLE) void renewCredentials(String resourceGroupName, String accountName, Context context); + + /** + * Migrate volumes encryption key source. + * + * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). + * Operation fails if targeted volumes share encryption sibling set with volumes from another account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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> beginMigrateEncryptionKey(String resourceGroupName, String accountName); + + /** + * Migrate volumes encryption key source. + * + * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). + * Operation fails if targeted volumes share encryption sibling set with volumes from another account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body The required parameters to perform encryption migration. + * @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> beginMigrateEncryptionKey(String resourceGroupName, String accountName, + EncryptionMigrationRequest body, Context context); + + /** + * Migrate volumes encryption key source. + * + * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). + * Operation fails if targeted volumes share encryption sibling set with volumes from another account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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 migrateEncryptionKey(String resourceGroupName, String accountName); + + /** + * Migrate volumes encryption key source. + * + * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). + * Operation fails if targeted volumes share encryption sibling set with volumes from another account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body The required parameters to perform encryption migration. + * @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 migrateEncryptionKey(String resourceGroupName, String accountName, EncryptionMigrationRequest body, + Context context); + + /** + * Get information about how volumes under NetApp account are encrypted. + * + * Contains data from encryption.keyVaultProperties as well as information about which private endpoint is used by + * each encryption sibling set. Response from this endpoint can be modified and used as request body for POST + * request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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> beginGetChangeKeyVaultInformation(String resourceGroupName, String accountName); + + /** + * Get information about how volumes under NetApp account are encrypted. + * + * Contains data from encryption.keyVaultProperties as well as information about which private endpoint is used by + * each encryption sibling set. Response from this endpoint can be modified and used as request body for POST + * request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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> beginGetChangeKeyVaultInformation(String resourceGroupName, String accountName, + Context context); + + /** + * Get information about how volumes under NetApp account are encrypted. + * + * Contains data from encryption.keyVaultProperties as well as information about which private endpoint is used by + * each encryption sibling set. Response from this endpoint can be modified and used as request body for POST + * request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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 getChangeKeyVaultInformation(String resourceGroupName, String accountName); + + /** + * Get information about how volumes under NetApp account are encrypted. + * + * Contains data from encryption.keyVaultProperties as well as information about which private endpoint is used by + * each encryption sibling set. Response from this endpoint can be modified and used as request body for POST + * request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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 getChangeKeyVaultInformation(String resourceGroupName, String accountName, Context context); + + /** + * Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + * + * Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports MHSM to Key + * Vault, Key Vault to MHSM, MHSM to MHSM and Key Vault to Key Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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> beginChangeKeyVault(String resourceGroupName, String accountName); + + /** + * Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + * + * Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports MHSM to Key + * Vault, Key Vault to MHSM, MHSM to MHSM and Key Vault to Key Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body The required parameters to perform encryption migration. + * @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> beginChangeKeyVault(String resourceGroupName, String accountName, + ChangeKeyVault body, Context context); + + /** + * Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + * + * Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports MHSM to Key + * Vault, Key Vault to MHSM, MHSM to MHSM and Key Vault to Key Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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 changeKeyVault(String resourceGroupName, String accountName); + + /** + * Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + * + * Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports MHSM to Key + * Vault, Key Vault to MHSM, MHSM to MHSM and Key Vault to Key Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body The required parameters to perform encryption migration. + * @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 changeKeyVault(String resourceGroupName, String accountName, ChangeKeyVault body, Context context); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupVaultsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupVaultsClient.java new file mode 100644 index 0000000000000..0abfd494ddcdd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupVaultsClient.java @@ -0,0 +1,299 @@ +// 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.BackupVaultInner; +import com.azure.resourcemanager.netapp.models.BackupVaultPatch; + +/** + * An instance of this class provides access to all the operations defined in BackupVaultsClient. + */ +public interface BackupVaultsClient { + /** + * Describe all Backup Vaults + * + * List and describe all Backup Vaults in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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 Backup Vaults as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNetAppAccount(String resourceGroupName, String accountName); + + /** + * Describe all Backup Vaults + * + * List and describe all Backup Vaults in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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 Backup Vaults as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNetAppAccount(String resourceGroupName, String accountName, Context context); + + /** + * Describe the Backup Vault + * + * Get the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String accountName, String backupVaultName, + Context context); + + /** + * Describe the Backup Vault + * + * Get the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupVaultInner get(String resourceGroupName, String accountName, String backupVaultName); + + /** + * Create or Update a Backup Vault + * + * Create or update the specified Backup Vault in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body BackupVault 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 backup Vault information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BackupVaultInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String backupVaultName, BackupVaultInner body); + + /** + * Create or Update a Backup Vault + * + * Create or update the specified Backup Vault in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body BackupVault 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 backup Vault information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BackupVaultInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String backupVaultName, BackupVaultInner body, Context context); + + /** + * Create or Update a Backup Vault + * + * Create or update the specified Backup Vault in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body BackupVault 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 backup Vault information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupVaultInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + BackupVaultInner body); + + /** + * Create or Update a Backup Vault + * + * Create or update the specified Backup Vault in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body BackupVault 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 backup Vault information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupVaultInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + BackupVaultInner body, Context context); + + /** + * Update NetApp Backup Vault + * + * Patch the specified NetApp Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body Backup Vault 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 backup Vault information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BackupVaultInner> beginUpdate(String resourceGroupName, String accountName, + String backupVaultName, BackupVaultPatch body); + + /** + * Update NetApp Backup Vault + * + * Patch the specified NetApp Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body Backup Vault 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 backup Vault information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BackupVaultInner> beginUpdate(String resourceGroupName, String accountName, + String backupVaultName, BackupVaultPatch body, Context context); + + /** + * Update NetApp Backup Vault + * + * Patch the specified NetApp Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body Backup Vault 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 backup Vault information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupVaultInner update(String resourceGroupName, String accountName, String backupVaultName, + BackupVaultPatch body); + + /** + * Update NetApp Backup Vault + * + * Patch the specified NetApp Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body Backup Vault 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 backup Vault information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupVaultInner update(String resourceGroupName, String accountName, String backupVaultName, BackupVaultPatch body, + Context context); + + /** + * Delete NetApp Backup Vault + * + * Delete the specified Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @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 backupVaultName); + + /** + * Delete NetApp Backup Vault + * + * Delete the specified Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @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 backupVaultName, + Context context); + + /** + * Delete NetApp Backup Vault + * + * Delete the specified Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @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 backupVaultName); + + /** + * Delete NetApp Backup Vault + * + * Delete the specified Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @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 backupVaultName, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsClient.java index 7bc0fc8898036..05de10aa11ad1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsClient.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsClient.java @@ -6,18 +6,24 @@ 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.BackupInner; +import com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner; import com.azure.resourcemanager.netapp.fluent.models.RestoreStatusInner; +import com.azure.resourcemanager.netapp.models.BackupPatch; /** * An instance of this class provides access to all the operations defined in BackupsClient. */ public interface BackupsClient { /** - * Get volume's restore status + * Get the latest backup status of a volume * - * Get the status of the restore for a volume. + * Get the latest status of the backup for a volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -27,16 +33,16 @@ public interface BackupsClient { * @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 status of the restore for a volume along with {@link Response}. + * @return the latest status of the backup for a volume along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getVolumeRestoreStatusWithResponse(String resourceGroupName, String accountName, + Response getLatestStatusWithResponse(String resourceGroupName, String accountName, String poolName, String volumeName, Context context); /** - * Get volume's restore status + * Get the latest backup status of a volume * - * Get the status of the restore for a volume. + * Get the latest status of the backup for a volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -45,9 +51,341 @@ Response getVolumeRestoreStatusWithResponse(String resourceG * @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 status of the restore for a volume. + * @return the latest status of the backup for a volume. */ @ServiceMethod(returns = ReturnType.SINGLE) - RestoreStatusInner getVolumeRestoreStatus(String resourceGroupName, String accountName, String poolName, + BackupStatusInner getLatestStatus(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Get the latest restore status of a volume + * + * Get the latest status of the restore for a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 latest status of the restore for a volume along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getVolumeLatestRestoreStatusWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, Context context); + + /** + * Get the latest restore status of a volume + * + * Get the latest status of the restore for a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 latest status of the restore for a volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RestoreStatusInner getVolumeLatestRestoreStatus(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * List Backups + * + * List all backups Under a Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @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 Backups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByVault(String resourceGroupName, String accountName, String backupVaultName); + + /** + * List Backups + * + * List all backups Under a Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param filter An option to specify the VolumeResourceId. If present, then only returns the backups under the + * 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 of Backups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByVault(String resourceGroupName, String accountName, String backupVaultName, + String filter, Context context); + + /** + * Describe the Backup under Backup Vault + * + * Get the specified Backup under Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Backup under Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String accountName, String backupVaultName, + String backupName, Context context); + + /** + * Describe the Backup under Backup Vault + * + * Get the specified Backup under Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Backup under Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupInner get(String resourceGroupName, String accountName, String backupVaultName, String backupName); + + /** + * Create a backup + * + * Create a backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BackupInner> beginCreate(String resourceGroupName, String accountName, + String backupVaultName, String backupName, BackupInner body); + + /** + * Create a backup + * + * Create a backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BackupInner> beginCreate(String resourceGroupName, String accountName, + String backupVaultName, String backupName, BackupInner body, Context context); + + /** + * Create a backup + * + * Create a backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupInner create(String resourceGroupName, String accountName, String backupVaultName, String backupName, + BackupInner body); + + /** + * Create a backup + * + * Create a backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupInner create(String resourceGroupName, String accountName, String backupVaultName, String backupName, + BackupInner body, Context context); + + /** + * Patch a backup + * + * Patch a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of backup under a Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BackupInner> beginUpdate(String resourceGroupName, String accountName, + String backupVaultName, String backupName); + + /** + * Patch a backup + * + * Patch a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BackupInner> beginUpdate(String resourceGroupName, String accountName, + String backupVaultName, String backupName, BackupPatch body, Context context); + + /** + * Patch a backup + * + * Patch a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup under a Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupInner update(String resourceGroupName, String accountName, String backupVaultName, String backupName); + + /** + * Patch a backup + * + * Patch a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupInner update(String resourceGroupName, String accountName, String backupVaultName, String backupName, + BackupPatch body, Context context); + + /** + * Delete backup + * + * Delete a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @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 backupVaultName, + String backupName); + + /** + * Delete backup + * + * Delete a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @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 backupVaultName, + String backupName, Context context); + + /** + * Delete backup + * + * Delete a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @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 backupVaultName, String backupName); + + /** + * Delete backup + * + * Delete a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @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 backupVaultName, String backupName, + Context context); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderAccountsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderAccountsClient.java new file mode 100644 index 0000000000000..c6c4122091429 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderAccountsClient.java @@ -0,0 +1,83 @@ +// 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.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; + +/** + * An instance of this class provides access to all the operations defined in BackupsUnderAccountsClient. + */ +public interface BackupsUnderAccountsClient { + /** + * Create a new migrate request for backups under account + * + * Migrate the backups under a NetApp account to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body Migrate backups under an account payload 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginMigrateBackups(String resourceGroupName, String accountName, + BackupsMigrationRequest body); + + /** + * Create a new migrate request for backups under account + * + * Migrate the backups under a NetApp account to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body Migrate backups under an account payload 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginMigrateBackups(String resourceGroupName, String accountName, + BackupsMigrationRequest body, Context context); + + /** + * Create a new migrate request for backups under account + * + * Migrate the backups under a NetApp account to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body Migrate backups under an account payload 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void migrateBackups(String resourceGroupName, String accountName, BackupsMigrationRequest body); + + /** + * Create a new migrate request for backups under account + * + * Migrate the backups under a NetApp account to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body Migrate backups under an account payload 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void migrateBackups(String resourceGroupName, String accountName, BackupsMigrationRequest body, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderBackupVaultsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderBackupVaultsClient.java new file mode 100644 index 0000000000000..590bf356e98e1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderBackupVaultsClient.java @@ -0,0 +1,93 @@ +// 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.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.models.BackupRestoreFiles; + +/** + * An instance of this class provides access to all the operations defined in BackupsUnderBackupVaultsClient. + */ +public interface BackupsUnderBackupVaultsClient { + /** + * Create a new Backup Restore Files request + * + * Restore the specified files from the specified backup to the active filesystem. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Restore payload 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestoreFiles(String resourceGroupName, String accountName, + String backupVaultName, String backupName, BackupRestoreFiles body); + + /** + * Create a new Backup Restore Files request + * + * Restore the specified files from the specified backup to the active filesystem. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Restore payload 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestoreFiles(String resourceGroupName, String accountName, + String backupVaultName, String backupName, BackupRestoreFiles body, Context context); + + /** + * Create a new Backup Restore Files request + * + * Restore the specified files from the specified backup to the active filesystem. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Restore payload 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void restoreFiles(String resourceGroupName, String accountName, String backupVaultName, String backupName, + BackupRestoreFiles body); + + /** + * Create a new Backup Restore Files request + * + * Restore the specified files from the specified backup to the active filesystem. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Restore payload 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void restoreFiles(String resourceGroupName, String accountName, String backupVaultName, String backupName, + BackupRestoreFiles body, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderVolumesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderVolumesClient.java new file mode 100644 index 0000000000000..6f8b97e2af644 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderVolumesClient.java @@ -0,0 +1,93 @@ +// 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.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; + +/** + * An instance of this class provides access to all the operations defined in BackupsUnderVolumesClient. + */ +public interface BackupsUnderVolumesClient { + /** + * Create a new migrate request for backups under volume + * + * Migrate the backups under volume to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Migrate backups under volume payload 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginMigrateBackups(String resourceGroupName, String accountName, + String poolName, String volumeName, BackupsMigrationRequest body); + + /** + * Create a new migrate request for backups under volume + * + * Migrate the backups under volume to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Migrate backups under volume payload 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginMigrateBackups(String resourceGroupName, String accountName, + String poolName, String volumeName, BackupsMigrationRequest body, Context context); + + /** + * Create a new migrate request for backups under volume + * + * Migrate the backups under volume to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Migrate backups under volume payload 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void migrateBackups(String resourceGroupName, String accountName, String poolName, String volumeName, + BackupsMigrationRequest body); + + /** + * Create a new migrate request for backups under volume + * + * Migrate the backups under volume to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Migrate backups under volume payload 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void migrateBackups(String resourceGroupName, String accountName, String poolName, String volumeName, + BackupsMigrationRequest body, Context context); +} 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 340aad54fa128..cd8cb7a15cc9f 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 @@ -67,6 +67,13 @@ public interface NetAppManagementClient { */ NetAppResourceQuotaLimitsClient getNetAppResourceQuotaLimits(); + /** + * Gets the NetAppResourceRegionInfosClient object to access its operations. + * + * @return the NetAppResourceRegionInfosClient object. + */ + NetAppResourceRegionInfosClient getNetAppResourceRegionInfos(); + /** * Gets the AccountsClient object to access its operations. * @@ -102,13 +109,6 @@ public interface NetAppManagementClient { */ SnapshotPoliciesClient getSnapshotPolicies(); - /** - * Gets the BackupsClient object to access its operations. - * - * @return the BackupsClient object. - */ - BackupsClient getBackups(); - /** * Gets the BackupPoliciesClient object to access its operations. * @@ -136,4 +136,39 @@ public interface NetAppManagementClient { * @return the SubvolumesClient object. */ SubvolumesClient getSubvolumes(); + + /** + * Gets the BackupsClient object to access its operations. + * + * @return the BackupsClient object. + */ + BackupsClient getBackups(); + + /** + * Gets the BackupVaultsClient object to access its operations. + * + * @return the BackupVaultsClient object. + */ + BackupVaultsClient getBackupVaults(); + + /** + * Gets the BackupsUnderBackupVaultsClient object to access its operations. + * + * @return the BackupsUnderBackupVaultsClient object. + */ + BackupsUnderBackupVaultsClient getBackupsUnderBackupVaults(); + + /** + * Gets the BackupsUnderVolumesClient object to access its operations. + * + * @return the BackupsUnderVolumesClient object. + */ + BackupsUnderVolumesClient getBackupsUnderVolumes(); + + /** + * Gets the BackupsUnderAccountsClient object to access its operations. + * + * @return the BackupsUnderAccountsClient object. + */ + BackupsUnderAccountsClient getBackupsUnderAccounts(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceRegionInfosClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceRegionInfosClient.java new file mode 100644 index 0000000000000..d1077d2c2671c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceRegionInfosClient.java @@ -0,0 +1,75 @@ +// 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.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner; + +/** + * An instance of this class provides access to all the operations defined in NetAppResourceRegionInfosClient. + */ +public interface NetAppResourceRegionInfosClient { + /** + * Describes region specific information. + * + * Provides region specific information. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of regionInfo resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location); + + /** + * Describes region specific information. + * + * Provides region specific information. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of regionInfo resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location, Context context); + + /** + * Describes region specific information. + * + * Provides storage to network proximity and logical zone mapping information. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding regionInfo Item along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, Context context); + + /** + * Describes region specific information. + * + * Provides storage to network proximity and logical zone mapping information. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding regionInfo Item. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RegionInfoResourceInner get(String location); +} 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 b6142c79bf04c..73ce00ddcf9cb 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,14 +11,17 @@ 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.ClusterPeerCommandResponseInner; import com.azure.resourcemanager.netapp.fluent.models.GetGroupIdListForLdapUserResponseInner; import com.azure.resourcemanager.netapp.fluent.models.ReplicationInner; import com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner; +import com.azure.resourcemanager.netapp.fluent.models.SvmPeerCommandResponseInner; import com.azure.resourcemanager.netapp.fluent.models.VolumeInner; import com.azure.resourcemanager.netapp.models.AuthorizeRequest; import com.azure.resourcemanager.netapp.models.BreakFileLocksRequest; import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest; +import com.azure.resourcemanager.netapp.models.PeerClusterForVolumeMigrationRequest; import com.azure.resourcemanager.netapp.models.PoolChangeRequest; import com.azure.resourcemanager.netapp.models.ReestablishReplicationRequest; import com.azure.resourcemanager.netapp.models.RelocateVolumeRequest; @@ -549,6 +552,77 @@ SyncPoller, Void> beginResetCifsPassword(String resourceGroupNa void resetCifsPassword(String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + /** + * Split clone from parent volume + * + * Split operation to convert clone volume to an independent volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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> beginSplitCloneFromParent(String resourceGroupName, String accountName, + String poolName, String volumeName); + + /** + * Split clone from parent volume + * + * Split operation to convert clone volume to an independent volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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> beginSplitCloneFromParent(String resourceGroupName, String accountName, + String poolName, String volumeName, Context context); + + /** + * Split clone from parent volume + * + * Split operation to convert clone volume to an independent volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 splitCloneFromParent(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Split clone from parent volume + * + * Split operation to convert clone volume to an independent volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 splitCloneFromParent(String resourceGroupName, String accountName, String poolName, String volumeName, + Context context); + /** * Break file locks * @@ -1222,6 +1296,312 @@ SyncPoller, Void> beginReInitializeReplication(String resourceG void reInitializeReplication(String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + /** + * Start Cluster peering + * + * Starts peering the cluster for this migration volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Cluster peer request 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 information about cluster peering process. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ClusterPeerCommandResponseInner> + beginPeerClusterForOnPremMigration(String resourceGroupName, String accountName, String poolName, + String volumeName, PeerClusterForVolumeMigrationRequest body); + + /** + * Start Cluster peering + * + * Starts peering the cluster for this migration volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Cluster peer 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 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 information about cluster peering process. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ClusterPeerCommandResponseInner> + beginPeerClusterForOnPremMigration(String resourceGroupName, String accountName, String poolName, + String volumeName, PeerClusterForVolumeMigrationRequest body, Context context); + + /** + * Start Cluster peering + * + * Starts peering the cluster for this migration volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Cluster peer request 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 information about cluster peering process. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClusterPeerCommandResponseInner peerClusterForOnPremMigration(String resourceGroupName, String accountName, + String poolName, String volumeName, PeerClusterForVolumeMigrationRequest body); + + /** + * Start Cluster peering + * + * Starts peering the cluster for this migration volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Cluster peer 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 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 information about cluster peering process. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClusterPeerCommandResponseInner peerClusterForOnPremMigration(String resourceGroupName, String accountName, + String poolName, String volumeName, PeerClusterForVolumeMigrationRequest body, Context context); + + /** + * Start migration process + * + * Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once the SVMs have been + * peered a SnapMirror will be created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 information about SVM peering process. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SvmPeerCommandResponseInner> + beginCreateOnPremMigrationReplication(String resourceGroupName, String accountName, String poolName, + String volumeName); + + /** + * Start migration process + * + * Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once the SVMs have been + * peered a SnapMirror will be created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 information about SVM peering process. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SvmPeerCommandResponseInner> + beginCreateOnPremMigrationReplication(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context); + + /** + * Start migration process + * + * Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once the SVMs have been + * peered a SnapMirror will be created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 information about SVM peering process. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SvmPeerCommandResponseInner createOnPremMigrationReplication(String resourceGroupName, String accountName, + String poolName, String volumeName); + + /** + * Start migration process + * + * Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once the SVMs have been + * peered a SnapMirror will be created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 information about SVM peering process. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SvmPeerCommandResponseInner createOnPremMigrationReplication(String resourceGroupName, String accountName, + String poolName, String volumeName, Context context); + + /** + * Finalize migration process + * + * Finalizes the migration of a volume by performing a final sync on the replication, breaking and releasing the + * replication, and breaking the cluster peering if no other migration is active. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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> beginFinalizeOnPremMigration(String resourceGroupName, String accountName, + String poolName, String volumeName); + + /** + * Finalize migration process + * + * Finalizes the migration of a volume by performing a final sync on the replication, breaking and releasing the + * replication, and breaking the cluster peering if no other migration is active. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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> beginFinalizeOnPremMigration(String resourceGroupName, String accountName, + String poolName, String volumeName, Context context); + + /** + * Finalize migration process + * + * Finalizes the migration of a volume by performing a final sync on the replication, breaking and releasing the + * replication, and breaking the cluster peering if no other migration is active. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 finalizeOnPremMigration(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Finalize migration process + * + * Finalizes the migration of a volume by performing a final sync on the replication, breaking and releasing the + * replication, and breaking the cluster peering if no other migration is active. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 finalizeOnPremMigration(String resourceGroupName, String accountName, String poolName, String volumeName, + Context context); + + /** + * Perform a replication transfer + * + * Performs an adhoc replication transfer on a volume with volumeType Migration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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> beginPerformReplicationTransfer(String resourceGroupName, String accountName, + String poolName, String volumeName); + + /** + * Perform a replication transfer + * + * Performs an adhoc replication transfer on a volume with volumeType Migration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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> beginPerformReplicationTransfer(String resourceGroupName, String accountName, + String poolName, String volumeName, Context context); + + /** + * Perform a replication transfer + * + * Performs an adhoc replication transfer on a volume with volumeType Migration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 performReplicationTransfer(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Perform a replication transfer + * + * Performs an adhoc replication transfer on a volume with volumeType Migration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 performReplicationTransfer(String resourceGroupName, String accountName, String poolName, String volumeName, + Context context); + /** * Change pool for volume * 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 710f5eea907df..d329bee21ee7d 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 @@ -39,6 +39,18 @@ public final class AccountProperties { @JsonProperty(value = "disableShowmount", access = JsonProperty.Access.WRITE_ONLY) private Boolean disableShowmount; + /* + * Domain for NFSv4 user ID mapping. This property will be set for all NetApp accounts in the subscription and region and only affect non ldap NFSv4 volumes. + */ + @JsonProperty(value = "nfsV4IDDomain") + private String nfsV4IdDomain; + + /* + * This will have true value only if account is Multiple AD enabled. + */ + @JsonProperty(value = "isMultiAdEnabled", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isMultiAdEnabled; + /** * Creates an instance of AccountProperties class. */ @@ -104,6 +116,37 @@ public Boolean disableShowmount() { return this.disableShowmount; } + /** + * Get the nfsV4IdDomain property: Domain for NFSv4 user ID mapping. This property will be set for all NetApp + * accounts in the subscription and region and only affect non ldap NFSv4 volumes. + * + * @return the nfsV4IdDomain value. + */ + public String nfsV4IdDomain() { + return this.nfsV4IdDomain; + } + + /** + * Set the nfsV4IdDomain property: Domain for NFSv4 user ID mapping. This property will be set for all NetApp + * accounts in the subscription and region and only affect non ldap NFSv4 volumes. + * + * @param nfsV4IdDomain the nfsV4IdDomain value to set. + * @return the AccountProperties object itself. + */ + public AccountProperties withNfsV4IdDomain(String nfsV4IdDomain) { + this.nfsV4IdDomain = nfsV4IdDomain; + return this; + } + + /** + * Get the isMultiAdEnabled property: This will have true value only if account is Multiple AD enabled. + * + * @return the isMultiAdEnabled value. + */ + public Boolean isMultiAdEnabled() { + return this.isMultiAdEnabled; + } + /** * Validates the instance. * 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 new file mode 100644 index 0000000000000..b5c23c061dadb --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java @@ -0,0 +1,234 @@ +// 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.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.netapp.models.BackupType; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Backup under a Backup Vault. + */ +@Fluent +public final class BackupInner extends ProxyResource { + /* + * Backup Properties + */ + @JsonProperty(value = "properties", required = true) + private BackupProperties innerProperties = new BackupProperties(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of BackupInner class. + */ + public BackupInner() { + } + + /** + * Get the innerProperties property: Backup Properties. + * + * @return the innerProperties value. + */ + private BackupProperties 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; + } + + /** + * Get the backupId property: backupId + * + * UUID v4 used to identify the Backup. + * + * @return the backupId value. + */ + public String backupId() { + return this.innerProperties() == null ? null : this.innerProperties().backupId(); + } + + /** + * Get the creationDate property: creationDate + * + * The creation date of the backup. + * + * @return the creationDate value. + */ + public OffsetDateTime creationDate() { + return this.innerProperties() == null ? null : this.innerProperties().creationDate(); + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the size property: Size of backup in bytes. + * + * @return the size value. + */ + public Long size() { + return this.innerProperties() == null ? null : this.innerProperties().size(); + } + + /** + * Get the label property: Label for backup. + * + * @return the label value. + */ + public String label() { + return this.innerProperties() == null ? null : this.innerProperties().label(); + } + + /** + * Set the label property: Label for backup. + * + * @param label the label value to set. + * @return the BackupInner object itself. + */ + public BackupInner withLabel(String label) { + if (this.innerProperties() == null) { + this.innerProperties = new BackupProperties(); + } + this.innerProperties().withLabel(label); + return this; + } + + /** + * Get the backupType property: backupType + * + * Type of backup Manual or Scheduled. + * + * @return the backupType value. + */ + public BackupType backupType() { + return this.innerProperties() == null ? null : this.innerProperties().backupType(); + } + + /** + * Get the failureReason property: Failure reason. + * + * @return the failureReason value. + */ + public String failureReason() { + return this.innerProperties() == null ? null : this.innerProperties().failureReason(); + } + + /** + * Get the volumeResourceId property: ResourceId used to identify the Volume. + * + * @return the volumeResourceId value. + */ + public String volumeResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().volumeResourceId(); + } + + /** + * Set the volumeResourceId property: ResourceId used to identify the Volume. + * + * @param volumeResourceId the volumeResourceId value to set. + * @return the BackupInner object itself. + */ + public BackupInner withVolumeResourceId(String volumeResourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new BackupProperties(); + } + this.innerProperties().withVolumeResourceId(volumeResourceId); + return this; + } + + /** + * Get the useExistingSnapshot property: Manual backup an already existing snapshot. This will always be false for + * scheduled backups and true/false for manual backups. + * + * @return the useExistingSnapshot value. + */ + public Boolean useExistingSnapshot() { + return this.innerProperties() == null ? null : this.innerProperties().useExistingSnapshot(); + } + + /** + * Set the useExistingSnapshot property: Manual backup an already existing snapshot. This will always be false for + * scheduled backups and true/false for manual backups. + * + * @param useExistingSnapshot the useExistingSnapshot value to set. + * @return the BackupInner object itself. + */ + public BackupInner withUseExistingSnapshot(Boolean useExistingSnapshot) { + if (this.innerProperties() == null) { + this.innerProperties = new BackupProperties(); + } + this.innerProperties().withUseExistingSnapshot(useExistingSnapshot); + return this; + } + + /** + * Get the snapshotName property: The name of the snapshot. + * + * @return the snapshotName value. + */ + public String snapshotName() { + return this.innerProperties() == null ? null : this.innerProperties().snapshotName(); + } + + /** + * Set the snapshotName property: The name of the snapshot. + * + * @param snapshotName the snapshotName value to set. + * @return the BackupInner object itself. + */ + public BackupInner withSnapshotName(String snapshotName) { + if (this.innerProperties() == null) { + this.innerProperties = new BackupProperties(); + } + this.innerProperties().withSnapshotName(snapshotName); + return this; + } + + /** + * Get the backupPolicyResourceId property: ResourceId used to identify the backup policy. + * + * @return the backupPolicyResourceId value. + */ + public String backupPolicyResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().backupPolicyResourceId(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER.atError() + .log(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/BackupPatchProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPatchProperties.java new file mode 100644 index 0000000000000..c05f14b104ba0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPatchProperties.java @@ -0,0 +1,54 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** + * Backup patch properties. + */ +@Fluent +public final class BackupPatchProperties { + /* + * Label for backup + */ + @JsonProperty(value = "label") + private String label; + + /** + * Creates an instance of BackupPatchProperties class. + */ + public BackupPatchProperties() { + } + + /** + * Get the label property: Label for backup. + * + * @return the label value. + */ + public String label() { + return this.label; + } + + /** + * Set the label property: Label for backup. + * + * @param label the label value to set. + * @return the BackupPatchProperties object itself. + */ + public BackupPatchProperties withLabel(String label) { + this.label = label; + 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/fluent/models/BackupPolicyInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyInner.java index aa42a7ff02c82..a625c63f54805 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 @@ -222,8 +222,9 @@ public List volumeBackups() { */ public void validate() { if (innerProperties() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property innerProperties in model BackupPolicyInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model BackupPolicyInner")); } else { innerProperties().validate(); } 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 new file mode 100644 index 0000000000000..74ae0a6446363 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java @@ -0,0 +1,261 @@ +// 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.BackupType; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Backup properties. + */ +@Fluent +public final class BackupProperties { + /* + * backupId + * + * UUID v4 used to identify the Backup + */ + @JsonProperty(value = "backupId", access = JsonProperty.Access.WRITE_ONLY) + private String backupId; + + /* + * creationDate + * + * The creation date of the backup + */ + @JsonProperty(value = "creationDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime creationDate; + + /* + * Azure lifecycle management + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * Size of backup in bytes + */ + @JsonProperty(value = "size", access = JsonProperty.Access.WRITE_ONLY) + private Long size; + + /* + * Label for backup + */ + @JsonProperty(value = "label") + private String label; + + /* + * backupType + * + * Type of backup Manual or Scheduled + */ + @JsonProperty(value = "backupType", access = JsonProperty.Access.WRITE_ONLY) + private BackupType backupType; + + /* + * Failure reason + */ + @JsonProperty(value = "failureReason", access = JsonProperty.Access.WRITE_ONLY) + private String failureReason; + + /* + * ResourceId used to identify the Volume + */ + @JsonProperty(value = "volumeResourceId", required = true) + private String volumeResourceId; + + /* + * Manual backup an already existing snapshot. This will always be false for scheduled backups and true/false for manual backups + */ + @JsonProperty(value = "useExistingSnapshot") + private Boolean useExistingSnapshot; + + /* + * The name of the snapshot + */ + @JsonProperty(value = "snapshotName") + private String snapshotName; + + /* + * ResourceId used to identify the backup policy + */ + @JsonProperty(value = "backupPolicyResourceId", access = JsonProperty.Access.WRITE_ONLY) + private String backupPolicyResourceId; + + /** + * Creates an instance of BackupProperties class. + */ + public BackupProperties() { + } + + /** + * Get the backupId property: backupId + * + * UUID v4 used to identify the Backup. + * + * @return the backupId value. + */ + public String backupId() { + return this.backupId; + } + + /** + * Get the creationDate property: creationDate + * + * The creation date of the backup. + * + * @return the creationDate value. + */ + public OffsetDateTime creationDate() { + return this.creationDate; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the size property: Size of backup in bytes. + * + * @return the size value. + */ + public Long size() { + return this.size; + } + + /** + * Get the label property: Label for backup. + * + * @return the label value. + */ + public String label() { + return this.label; + } + + /** + * Set the label property: Label for backup. + * + * @param label the label value to set. + * @return the BackupProperties object itself. + */ + public BackupProperties withLabel(String label) { + this.label = label; + return this; + } + + /** + * Get the backupType property: backupType + * + * Type of backup Manual or Scheduled. + * + * @return the backupType value. + */ + public BackupType backupType() { + return this.backupType; + } + + /** + * Get the failureReason property: Failure reason. + * + * @return the failureReason value. + */ + public String failureReason() { + return this.failureReason; + } + + /** + * Get the volumeResourceId property: ResourceId used to identify the Volume. + * + * @return the volumeResourceId value. + */ + public String volumeResourceId() { + return this.volumeResourceId; + } + + /** + * Set the volumeResourceId property: ResourceId used to identify the Volume. + * + * @param volumeResourceId the volumeResourceId value to set. + * @return the BackupProperties object itself. + */ + public BackupProperties withVolumeResourceId(String volumeResourceId) { + this.volumeResourceId = volumeResourceId; + return this; + } + + /** + * Get the useExistingSnapshot property: Manual backup an already existing snapshot. This will always be false for + * scheduled backups and true/false for manual backups. + * + * @return the useExistingSnapshot value. + */ + public Boolean useExistingSnapshot() { + return this.useExistingSnapshot; + } + + /** + * Set the useExistingSnapshot property: Manual backup an already existing snapshot. This will always be false for + * scheduled backups and true/false for manual backups. + * + * @param useExistingSnapshot the useExistingSnapshot value to set. + * @return the BackupProperties object itself. + */ + public BackupProperties withUseExistingSnapshot(Boolean useExistingSnapshot) { + this.useExistingSnapshot = useExistingSnapshot; + return this; + } + + /** + * Get the snapshotName property: The name of the snapshot. + * + * @return the snapshotName value. + */ + public String snapshotName() { + return this.snapshotName; + } + + /** + * Set the snapshotName property: The name of the snapshot. + * + * @param snapshotName the snapshotName value to set. + * @return the BackupProperties object itself. + */ + public BackupProperties withSnapshotName(String snapshotName) { + this.snapshotName = snapshotName; + return this; + } + + /** + * Get the backupPolicyResourceId property: ResourceId used to identify the backup policy. + * + * @return the backupPolicyResourceId value. + */ + public String backupPolicyResourceId() { + return this.backupPolicyResourceId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (volumeResourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property volumeResourceId in model BackupProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(BackupProperties.class); +} 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 new file mode 100644 index 0000000000000..ff231536d3d4c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java @@ -0,0 +1,165 @@ +// 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.Immutable; +import com.azure.resourcemanager.netapp.models.MirrorState; +import com.azure.resourcemanager.netapp.models.RelationshipStatus; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Backup status. + */ +@Immutable +public final class BackupStatusInner { + /* + * Backup health status + */ + @JsonProperty(value = "healthy", access = JsonProperty.Access.WRITE_ONLY) + private Boolean healthy; + + /* + * Status of the backup mirror relationship + */ + @JsonProperty(value = "relationshipStatus", access = JsonProperty.Access.WRITE_ONLY) + private RelationshipStatus relationshipStatus; + + /* + * The status of the backup + */ + @JsonProperty(value = "mirrorState", access = JsonProperty.Access.WRITE_ONLY) + private MirrorState mirrorState; + + /* + * Reason for the unhealthy backup relationship + */ + @JsonProperty(value = "unhealthyReason", access = JsonProperty.Access.WRITE_ONLY) + private String unhealthyReason; + + /* + * Displays error message if the backup is in an error state + */ + @JsonProperty(value = "errorMessage", access = JsonProperty.Access.WRITE_ONLY) + private String errorMessage; + + /* + * Displays the last transfer size + */ + @JsonProperty(value = "lastTransferSize", access = JsonProperty.Access.WRITE_ONLY) + private Long lastTransferSize; + + /* + * Displays the last transfer type + */ + @JsonProperty(value = "lastTransferType", access = JsonProperty.Access.WRITE_ONLY) + private String lastTransferType; + + /* + * Displays the total bytes transferred + */ + @JsonProperty(value = "totalTransferBytes", access = JsonProperty.Access.WRITE_ONLY) + private Long totalTransferBytes; + + /* + * Displays the total number of bytes transferred for the ongoing operation + */ + @JsonProperty(value = "transferProgressBytes", access = JsonProperty.Access.WRITE_ONLY) + private Long transferProgressBytes; + + /** + * Creates an instance of BackupStatusInner class. + */ + public BackupStatusInner() { + } + + /** + * Get the healthy property: Backup health status. + * + * @return the healthy value. + */ + public Boolean healthy() { + return this.healthy; + } + + /** + * Get the relationshipStatus property: Status of the backup mirror relationship. + * + * @return the relationshipStatus value. + */ + public RelationshipStatus relationshipStatus() { + return this.relationshipStatus; + } + + /** + * Get the mirrorState property: The status of the backup. + * + * @return the mirrorState value. + */ + public MirrorState mirrorState() { + return this.mirrorState; + } + + /** + * Get the unhealthyReason property: Reason for the unhealthy backup relationship. + * + * @return the unhealthyReason value. + */ + public String unhealthyReason() { + return this.unhealthyReason; + } + + /** + * Get the errorMessage property: Displays error message if the backup is in an error state. + * + * @return the errorMessage value. + */ + public String errorMessage() { + return this.errorMessage; + } + + /** + * Get the lastTransferSize property: Displays the last transfer size. + * + * @return the lastTransferSize value. + */ + public Long lastTransferSize() { + return this.lastTransferSize; + } + + /** + * Get the lastTransferType property: Displays the last transfer type. + * + * @return the lastTransferType value. + */ + public String lastTransferType() { + return this.lastTransferType; + } + + /** + * Get the totalTransferBytes property: Displays the total bytes transferred. + * + * @return the totalTransferBytes value. + */ + public Long totalTransferBytes() { + return this.totalTransferBytes; + } + + /** + * Get the transferProgressBytes property: Displays the total number of bytes transferred for the ongoing operation. + * + * @return the transferProgressBytes value. + */ + public Long transferProgressBytes() { + return this.transferProgressBytes; + } + + /** + * 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/fluent/models/BackupVaultInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultInner.java new file mode 100644 index 0000000000000..c8c572398b54e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultInner.java @@ -0,0 +1,91 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * Backup Vault information. + */ +@Fluent +public final class BackupVaultInner extends Resource { + /* + * Backup Vault Properties + */ + @JsonProperty(value = "properties") + private BackupVaultProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of BackupVaultInner class. + */ + public BackupVaultInner() { + } + + /** + * Get the innerProperties property: Backup Vault Properties. + * + * @return the innerProperties value. + */ + private BackupVaultProperties 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 BackupVaultInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public BackupVaultInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * 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/BackupVaultProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultProperties.java new file mode 100644 index 0000000000000..c7c4463e55202 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultProperties.java @@ -0,0 +1,43 @@ +// 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.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Backup Vault properties. + */ +@Immutable +public final class BackupVaultProperties { + /* + * Azure lifecycle management + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * Creates an instance of BackupVaultProperties class. + */ + public BackupVaultProperties() { + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * 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/fluent/models/CapacityPoolInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CapacityPoolInner.java index 1859eec11cc4a..209e2648a14b2 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 @@ -103,7 +103,7 @@ public String poolId() { * Get the size property: size * * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of - * 4398046511104). + * 1099511627776). * * @return the size value. */ @@ -115,7 +115,7 @@ public long size() { * Set the size property: size * * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of - * 4398046511104). + * 1099511627776). * * @param size the size value to set. * @return the CapacityPoolInner object itself. @@ -264,8 +264,9 @@ public CapacityPoolInner withEncryptionType(EncryptionType encryptionType) { */ public void validate() { if (innerProperties() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property innerProperties in model CapacityPoolInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model CapacityPoolInner")); } else { innerProperties().validate(); } 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 1ddaac212ac13..7f89ebe959974 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 @@ -14,23 +14,19 @@ @Fluent public final class CheckAvailabilityResponseInner { /* - * true indicates name is valid and available. false indicates the name is invalid, - * unavailable, or both. + * true indicates name is valid and available. false indicates the name is invalid, unavailable, or both. */ @JsonProperty(value = "isAvailable") private Boolean isAvailable; /* - * Invalid indicates the name provided does not match Azure App Service naming requirements. - * AlreadyExists indicates that the name is already in use and is therefore unavailable. + * Invalid indicates the name provided does not match Azure App Service naming requirements. AlreadyExists indicates that the name is already in use and is therefore unavailable. */ @JsonProperty(value = "reason") private InAvailabilityReasonType reason; /* - * If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource - * naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that resource - * name is already in use, and direct them to select a different name. + * If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that resource name is already in use, and direct them to select a different name. */ @JsonProperty(value = "message") private String message; @@ -65,8 +61,8 @@ public CheckAvailabilityResponseInner withIsAvailable(Boolean isAvailable) { /** * Get the reason property: <code>Invalid</code> indicates the name provided does not match Azure App - * Service naming requirements. <code>AlreadyExists</code> indicates that the name is already in use - * and is therefore unavailable. + * Service naming requirements. <code>AlreadyExists</code> indicates that the name is already in use and + * is therefore unavailable. * * @return the reason value. */ @@ -76,8 +72,8 @@ public InAvailabilityReasonType reason() { /** * Set the reason property: <code>Invalid</code> indicates the name provided does not match Azure App - * Service naming requirements. <code>AlreadyExists</code> indicates that the name is already in use - * and is therefore unavailable. + * Service naming requirements. <code>AlreadyExists</code> indicates that the name is already in use and + * is therefore unavailable. * * @param reason the reason value to set. * @return the CheckAvailabilityResponseInner object itself. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ClusterPeerCommandResponseInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ClusterPeerCommandResponseInner.java new file mode 100644 index 0000000000000..d5f1bb73508a1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ClusterPeerCommandResponseInner.java @@ -0,0 +1,58 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about cluster peering process. + */ +@Fluent +public final class ClusterPeerCommandResponseInner { + /* + * A command that needs to be run on the external ONTAP to accept cluster peering. Will only be present if clusterPeeringStatus is pending + */ + @JsonProperty(value = "peerAcceptCommand") + private String peerAcceptCommand; + + /** + * Creates an instance of ClusterPeerCommandResponseInner class. + */ + public ClusterPeerCommandResponseInner() { + } + + /** + * Get the peerAcceptCommand property: A command that needs to be run on the external ONTAP to accept cluster + * peering. Will only be present if <code>clusterPeeringStatus</code> is + * <code>pending</code>. + * + * @return the peerAcceptCommand value. + */ + public String peerAcceptCommand() { + return this.peerAcceptCommand; + } + + /** + * Set the peerAcceptCommand property: A command that needs to be run on the external ONTAP to accept cluster + * peering. Will only be present if <code>clusterPeeringStatus</code> is + * <code>pending</code>. + * + * @param peerAcceptCommand the peerAcceptCommand value to set. + * @return the ClusterPeerCommandResponseInner object itself. + */ + public ClusterPeerCommandResponseInner withPeerAcceptCommand(String peerAcceptCommand) { + this.peerAcceptCommand = peerAcceptCommand; + 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/fluent/models/MountTargetProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/MountTargetProperties.java index 90bc467cfaaa7..8137ae2fb8ce3 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 @@ -128,8 +128,9 @@ public MountTargetProperties withSmbServerFqdn(String smbServerFqdn) { */ public void validate() { if (fileSystemId() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property fileSystemId in model MountTargetProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property fileSystemId in model MountTargetProperties")); } } 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 d9137b3416705..df8933d9f35d1 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 @@ -179,6 +179,40 @@ public Boolean disableShowmount() { return this.innerProperties() == null ? null : this.innerProperties().disableShowmount(); } + /** + * Get the nfsV4IdDomain property: Domain for NFSv4 user ID mapping. This property will be set for all NetApp + * accounts in the subscription and region and only affect non ldap NFSv4 volumes. + * + * @return the nfsV4IdDomain value. + */ + public String nfsV4IdDomain() { + return this.innerProperties() == null ? null : this.innerProperties().nfsV4IdDomain(); + } + + /** + * Set the nfsV4IdDomain property: Domain for NFSv4 user ID mapping. This property will be set for all NetApp + * accounts in the subscription and region and only affect non ldap NFSv4 volumes. + * + * @param nfsV4IdDomain the nfsV4IdDomain value to set. + * @return the NetAppAccountInner object itself. + */ + public NetAppAccountInner withNfsV4IdDomain(String nfsV4IdDomain) { + if (this.innerProperties() == null) { + this.innerProperties = new AccountProperties(); + } + this.innerProperties().withNfsV4IdDomain(nfsV4IdDomain); + return this; + } + + /** + * Get the isMultiAdEnabled property: This will have true value only if account is Multiple AD enabled. + * + * @return the isMultiAdEnabled value. + */ + public Boolean isMultiAdEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().isMultiAdEnabled(); + } + /** * Validates the instance. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetworkSiblingSetInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetworkSiblingSetInner.java index ce34234fe3efd..adee862e51f03 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetworkSiblingSetInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetworkSiblingSetInner.java @@ -29,9 +29,7 @@ public final class NetworkSiblingSetInner { /* * Subnet resource Id * - * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example - * /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/ - * subnets/{mySubnet} + * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet} */ @JsonProperty(value = "subnetId") private String subnetId; 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 13021a3c33ca0..bd305b8e9549f 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 @@ -16,8 +16,7 @@ public final class PoolPatchProperties { /* * size * - * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of - * 4398046511104). + * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of 4398046511104). */ @JsonProperty(value = "size") private Long size; 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 1389b2a2fde21..85147581fc5b3 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 @@ -27,8 +27,7 @@ public final class PoolProperties { /* * size * - * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of - * 4398046511104). + * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of 1099511627776). */ @JsonProperty(value = "size", required = true) private long size; @@ -74,8 +73,7 @@ public final class PoolProperties { /* * encryptionType * - * Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. - * This value can only be set when creating new pool. + * Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool. */ @JsonProperty(value = "encryptionType") private EncryptionType encryptionType; @@ -101,7 +99,7 @@ public String poolId() { * Get the size property: size * * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of - * 4398046511104). + * 1099511627776). * * @return the size value. */ @@ -113,7 +111,7 @@ public long size() { * Set the size property: size * * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of - * 4398046511104). + * 1099511627776). * * @param size the size value to set. * @return the PoolProperties object itself. @@ -247,8 +245,8 @@ public PoolProperties withEncryptionType(EncryptionType encryptionType) { */ public void validate() { if (serviceLevel() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property serviceLevel in model PoolProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property serviceLevel in model PoolProperties")); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoResourceInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoResourceInner.java new file mode 100644 index 0000000000000..2f692008c6fe0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoResourceInner.java @@ -0,0 +1,122 @@ +// 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.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem; +import com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Information regarding regionInfo Item. + */ +@Fluent +public final class RegionInfoResourceInner extends ProxyResource { + /* + * regionInfo properties + */ + @JsonProperty(value = "properties") + private RegionInfoInner innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of RegionInfoResourceInner class. + */ + public RegionInfoResourceInner() { + } + + /** + * Get the innerProperties property: regionInfo properties. + * + * @return the innerProperties value. + */ + private RegionInfoInner 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; + } + + /** + * Get the storageToNetworkProximity property: Storage to Network Proximity + * + * Provides storage to network proximity information in the region. + * + * @return the storageToNetworkProximity value. + */ + public RegionStorageToNetworkProximity storageToNetworkProximity() { + return this.innerProperties() == null ? null : this.innerProperties().storageToNetworkProximity(); + } + + /** + * Set the storageToNetworkProximity property: Storage to Network Proximity + * + * Provides storage to network proximity information in the region. + * + * @param storageToNetworkProximity the storageToNetworkProximity value to set. + * @return the RegionInfoResourceInner object itself. + */ + public RegionInfoResourceInner + withStorageToNetworkProximity(RegionStorageToNetworkProximity storageToNetworkProximity) { + if (this.innerProperties() == null) { + this.innerProperties = new RegionInfoInner(); + } + this.innerProperties().withStorageToNetworkProximity(storageToNetworkProximity); + return this; + } + + /** + * Get the availabilityZoneMappings property: Logical availability zone mappings. + * + * Provides logical availability zone mappings for the subscription for a region. + * + * @return the availabilityZoneMappings value. + */ + public List availabilityZoneMappings() { + return this.innerProperties() == null ? null : this.innerProperties().availabilityZoneMappings(); + } + + /** + * Set the availabilityZoneMappings property: Logical availability zone mappings. + * + * Provides logical availability zone mappings for the subscription for a region. + * + * @param availabilityZoneMappings the availabilityZoneMappings value to set. + * @return the RegionInfoResourceInner object itself. + */ + public RegionInfoResourceInner + withAvailabilityZoneMappings(List availabilityZoneMappings) { + if (this.innerProperties() == null) { + this.innerProperties = new RegionInfoInner(); + } + this.innerProperties().withAvailabilityZoneMappings(availabilityZoneMappings); + 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/ReplicationInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationInner.java index afd8aeadd33b5..d294b2222cc6d 100644 --- 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 @@ -15,6 +15,12 @@ */ @Fluent public final class ReplicationInner { + /* + * UUID v4 used to identify the replication. + */ + @JsonProperty(value = "replicationId", access = JsonProperty.Access.WRITE_ONLY) + private String replicationId; + /* * Indicates whether the local volume is the source or destination for the Volume Replication */ @@ -45,6 +51,15 @@ public final class ReplicationInner { public ReplicationInner() { } + /** + * Get the replicationId property: UUID v4 used to identify the replication. + * + * @return the replicationId value. + */ + public String replicationId() { + return this.replicationId; + } + /** * Get the endpointType property: Indicates whether the local volume is the source or destination for the Volume * Replication. @@ -134,8 +149,9 @@ public ReplicationInner withRemoteVolumeRegion(String remoteVolumeRegion) { */ public void validate() { if (remoteVolumeResourceId() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property remoteVolumeResourceId in model ReplicationInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property remoteVolumeResourceId in model ReplicationInner")); } } 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 f5648d1b23563..95d2773766bc6 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 @@ -116,8 +116,8 @@ public String provisioningState() { */ public void validate() { if (location() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property location in model SnapshotInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property location in model SnapshotInner")); } if (innerProperties() != null) { innerProperties().validate(); 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 fd67da6ed9e9a..994407010b3bb 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 @@ -220,8 +220,9 @@ public String provisioningState() { */ public void validate() { if (innerProperties() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property innerProperties in model SnapshotPolicyInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model SnapshotPolicyInner")); } else { innerProperties().validate(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SvmPeerCommandResponseInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SvmPeerCommandResponseInner.java new file mode 100644 index 0000000000000..0cda6fe4ad4e9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SvmPeerCommandResponseInner.java @@ -0,0 +1,56 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about SVM peering process. + */ +@Fluent +public final class SvmPeerCommandResponseInner { + /* + * A command that needs to be run on the external ONTAP to accept SVM peering. Will only be present if svmPeeringStatus is pending + */ + @JsonProperty(value = "svmPeeringCommand") + private String svmPeeringCommand; + + /** + * Creates an instance of SvmPeerCommandResponseInner class. + */ + public SvmPeerCommandResponseInner() { + } + + /** + * Get the svmPeeringCommand property: A command that needs to be run on the external ONTAP to accept SVM peering. + * Will only be present if <code>svmPeeringStatus</code> is <code>pending</code>. + * + * @return the svmPeeringCommand value. + */ + public String svmPeeringCommand() { + return this.svmPeeringCommand; + } + + /** + * Set the svmPeeringCommand property: A command that needs to be run on the external ONTAP to accept SVM peering. + * Will only be present if <code>svmPeeringStatus</code> is <code>pending</code>. + * + * @param svmPeeringCommand the svmPeeringCommand value to set. + * @return the SvmPeerCommandResponseInner object itself. + */ + public SvmPeerCommandResponseInner withSvmPeeringCommand(String svmPeeringCommand) { + this.svmPeeringCommand = svmPeeringCommand; + 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/fluent/models/VolumeInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java index fc995c0e48270..11ae9142e9960 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 @@ -8,6 +8,7 @@ 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.AcceptGrowCapacityPoolForShortTermCloneSplit; import com.azure.resourcemanager.netapp.models.AvsDataStore; import com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy; import com.azure.resourcemanager.netapp.models.EnableSubvolumes; @@ -19,6 +20,7 @@ import com.azure.resourcemanager.netapp.models.ServiceLevel; import com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration; import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; +import com.azure.resourcemanager.netapp.models.VolumeLanguage; import com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy; import com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity; @@ -288,7 +290,7 @@ public String provisioningState() { /** * Get the snapshotId property: Snapshot ID * - * UUID v4 or resource identifier used to identify the Snapshot. + * Resource identifier used to identify the Snapshot. * * @return the snapshotId value. */ @@ -299,7 +301,7 @@ public String snapshotId() { /** * Set the snapshotId property: Snapshot ID * - * UUID v4 or resource identifier used to identify the Snapshot. + * Resource identifier used to identify the Snapshot. * * @param snapshotId the snapshotId value to set. * @return the VolumeInner object itself. @@ -340,7 +342,7 @@ public VolumeInner withDeleteBaseSnapshot(Boolean deleteBaseSnapshot) { /** * Get the backupId property: Backup ID * - * UUID v4 or resource identifier used to identify the Backup. + * Resource identifier used to identify the Backup. * * @return the backupId value. */ @@ -351,7 +353,7 @@ public String backupId() { /** * Set the backupId property: Backup ID * - * UUID v4 or resource identifier used to identify the Backup. + * Resource identifier used to identify the Backup. * * @param backupId the backupId value to set. * @return the VolumeInner object itself. @@ -462,7 +464,7 @@ public List mountTargets() { /** * Get the volumeType property: What type of volume is this. For destination volumes in Cross Region Replication, - * set type to DataProtection. + * set type to DataProtection. For creating clone volume, set type to ShortTermClone. * * @return the volumeType value. */ @@ -472,7 +474,7 @@ public String volumeType() { /** * Set the volumeType property: What type of volume is this. For destination volumes in Cross Region Replication, - * set type to DataProtection. + * set type to DataProtection. For creating clone volume, set type to ShortTermClone. * * @param volumeType the volumeType value to set. * @return the VolumeInner object itself. @@ -512,6 +514,42 @@ public VolumeInner withDataProtection(VolumePropertiesDataProtection dataProtect return this; } + /** + * Get the acceptGrowCapacityPoolForShortTermCloneSplit property: acceptGrowCapacityPoolForShortTermCloneSplit + * + * While auto splitting the short term clone volume, if the parent pool does not have enough space to accommodate + * the volume after split, it will be automatically resized, which will lead to increased billing. To accept + * capacity pool size auto grow and create a short term clone volume, set the property as accepted. + * + * @return the acceptGrowCapacityPoolForShortTermCloneSplit value. + */ + public AcceptGrowCapacityPoolForShortTermCloneSplit acceptGrowCapacityPoolForShortTermCloneSplit() { + return this.innerProperties() == null + ? null + : this.innerProperties().acceptGrowCapacityPoolForShortTermCloneSplit(); + } + + /** + * Set the acceptGrowCapacityPoolForShortTermCloneSplit property: acceptGrowCapacityPoolForShortTermCloneSplit + * + * While auto splitting the short term clone volume, if the parent pool does not have enough space to accommodate + * the volume after split, it will be automatically resized, which will lead to increased billing. To accept + * capacity pool size auto grow and create a short term clone volume, set the property as accepted. + * + * @param acceptGrowCapacityPoolForShortTermCloneSplit the acceptGrowCapacityPoolForShortTermCloneSplit value to + * set. + * @return the VolumeInner object itself. + */ + public VolumeInner withAcceptGrowCapacityPoolForShortTermCloneSplit( + AcceptGrowCapacityPoolForShortTermCloneSplit acceptGrowCapacityPoolForShortTermCloneSplit) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties() + .withAcceptGrowCapacityPoolForShortTermCloneSplit(acceptGrowCapacityPoolForShortTermCloneSplit); + return this; + } + /** * Get the isRestoring property: Restoring. * @@ -586,8 +624,8 @@ public VolumeInner withKerberosEnabled(Boolean kerberosEnabled) { } /** - * Get the securityStyle property: The security style of volume, default unix, defaults to ntfs for dual protocol - * or CIFS protocol. + * Get the securityStyle property: The security style of volume, default unix, defaults to ntfs for dual protocol or + * CIFS protocol. * * @return the securityStyle value. */ @@ -596,8 +634,8 @@ public SecurityStyle securityStyle() { } /** - * Set the securityStyle property: The security style of volume, default unix, defaults to ntfs for dual protocol - * or CIFS protocol. + * Set the securityStyle property: The security style of volume, default unix, defaults to ntfs for dual protocol or + * CIFS protocol. * * @param securityStyle the securityStyle value to set. * @return the VolumeInner object itself. @@ -873,9 +911,9 @@ public VolumeInner withCoolnessPeriod(Integer coolnessPeriod) { } /** - * Get the coolAccessRetrievalPolicy property: coolAccessRetrievalPolicy determines the data retrieval behavior - * from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible - * values for this field are: + * Get the coolAccessRetrievalPolicy property: coolAccessRetrievalPolicy determines the data retrieval behavior from + * the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values + * for this field are: * Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. * OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random * reads. @@ -888,9 +926,9 @@ public CoolAccessRetrievalPolicy coolAccessRetrievalPolicy() { } /** - * Set the coolAccessRetrievalPolicy property: coolAccessRetrievalPolicy determines the data retrieval behavior - * from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible - * values for this field are: + * Set the coolAccessRetrievalPolicy property: coolAccessRetrievalPolicy determines the data retrieval behavior from + * the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values + * for this field are: * Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. * OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random * reads. @@ -1090,8 +1128,7 @@ public String volumeGroupName() { } /** - * Get the capacityPoolResourceId property: Pool Resource Id used in case of creating a volume through volume - * group. + * Get the capacityPoolResourceId property: Pool Resource Id used in case of creating a volume through volume group. * * @return the capacityPoolResourceId value. */ @@ -1100,8 +1137,7 @@ public String capacityPoolResourceId() { } /** - * Set the capacityPoolResourceId property: Pool Resource Id used in case of creating a volume through volume - * group. + * Set the capacityPoolResourceId property: Pool Resource Id used in case of creating a volume through volume group. * * @param capacityPoolResourceId the capacityPoolResourceId value to set. * @return the VolumeInner object itself. @@ -1281,6 +1317,44 @@ public String originatingResourceId() { return this.innerProperties() == null ? null : this.innerProperties().originatingResourceId(); } + /** + * Get the inheritedSizeInBytes property: inheritedSizeInBytes + * + * Space shared by short term clone volume with parent volume in bytes. + * + * @return the inheritedSizeInBytes value. + */ + public Long inheritedSizeInBytes() { + return this.innerProperties() == null ? null : this.innerProperties().inheritedSizeInBytes(); + } + + /** + * Get the language property: VolumeLanguage + * + * Language supported for volume. + * + * @return the language value. + */ + public VolumeLanguage language() { + return this.innerProperties() == null ? null : this.innerProperties().language(); + } + + /** + * Set the language property: VolumeLanguage + * + * Language supported for volume. + * + * @param language the language value to set. + * @return the VolumeInner object itself. + */ + public VolumeInner withLanguage(VolumeLanguage language) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withLanguage(language); + return this; + } + /** * Validates the instance. * @@ -1288,8 +1362,8 @@ public String originatingResourceId() { */ public void validate() { if (innerProperties() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property innerProperties in model VolumeInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property innerProperties in model VolumeInner")); } else { innerProperties().validate(); } 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 708583fc96e14..7fc0546664d0c 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 @@ -29,9 +29,7 @@ public final class VolumePatchProperties { /* * usageThreshold * - * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum - * size is 100 GiB. Upper limit is 100TiB, 500Tib for LargeVolume or 2400Tib for LargeVolume on exceptional basis. - * Specified in bytes. + * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB, 500Tib for LargeVolume or 2400Tib for LargeVolume on exceptional basis. Specified in bytes. */ @JsonProperty(value = "usageThreshold") private Long usageThreshold; @@ -45,8 +43,7 @@ public final class VolumePatchProperties { private VolumePatchPropertiesExportPolicy exportPolicy; /* - * Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for - * manual qosType volume + * Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume */ @JsonProperty(value = "throughputMibps") private Float throughputMibps; @@ -78,11 +75,7 @@ public final class VolumePatchProperties { private Long defaultGroupQuotaInKiBs; /* - * UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set - * group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), - * write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other - * users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other - * users. + * UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. */ @JsonProperty(value = "unixPermissions") private String unixPermissions; @@ -100,19 +93,16 @@ public final class VolumePatchProperties { private Integer coolnessPeriod; /* - * coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on - * the read pattern for cool access enabled volumes. The possible values for this field are: - * Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. - * OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random - * reads. - * Never - No client-driven data is pulled from cool tier to standard storage. + * coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values for this field are: + * Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. + * OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random reads. + * Never - No client-driven data is pulled from cool tier to standard storage. */ @JsonProperty(value = "coolAccessRetrievalPolicy") private CoolAccessRetrievalPolicy coolAccessRetrievalPolicy; /* - * If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the - * volume's snapshots. + * If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots. */ @JsonProperty(value = "snapshotDirectoryVisible") private Boolean snapshotDirectoryVisible; @@ -396,9 +386,9 @@ public VolumePatchProperties withCoolnessPeriod(Integer coolnessPeriod) { } /** - * Get the coolAccessRetrievalPolicy property: coolAccessRetrievalPolicy determines the data retrieval behavior - * from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible - * values for this field are: + * Get the coolAccessRetrievalPolicy property: coolAccessRetrievalPolicy determines the data retrieval behavior from + * the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values + * for this field are: * Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. * OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random * reads. @@ -411,9 +401,9 @@ public CoolAccessRetrievalPolicy coolAccessRetrievalPolicy() { } /** - * Set the coolAccessRetrievalPolicy property: coolAccessRetrievalPolicy determines the data retrieval behavior - * from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible - * values for this field are: + * Set the coolAccessRetrievalPolicy property: coolAccessRetrievalPolicy determines the data retrieval behavior from + * the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values + * for this field are: * Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. * OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random * reads. 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 2d78dc5274e54..d685f9f082070 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 @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit; import com.azure.resourcemanager.netapp.models.AvsDataStore; import com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy; import com.azure.resourcemanager.netapp.models.EnableSubvolumes; @@ -17,6 +18,7 @@ import com.azure.resourcemanager.netapp.models.ServiceLevel; import com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration; import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; +import com.azure.resourcemanager.netapp.models.VolumeLanguage; import com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy; import com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity; @@ -55,9 +57,7 @@ public final class VolumeProperties { /* * usageThreshold * - * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum - * size is 100 GiB. Upper limit is 100TiB, 500Tib for LargeVolume or 2400Tib for LargeVolume on exceptional basis. - * Specified in bytes. + * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB, 500Tib for LargeVolume or 2400Tib for LargeVolume on exceptional basis. Specified in bytes. */ @JsonProperty(value = "usageThreshold", required = true) private long usageThreshold; @@ -87,14 +87,13 @@ public final class VolumeProperties { /* * Snapshot ID * - * UUID v4 or resource identifier used to identify the Snapshot. + * Resource identifier used to identify the Snapshot. */ @JsonProperty(value = "snapshotId") private String snapshotId; /* - * If enabled (true) the snapshot the volume was created from will be automatically deleted after the volume create - * operation has finished. Defaults to false + * If enabled (true) the snapshot the volume was created from will be automatically deleted after the volume create operation has finished. Defaults to false */ @JsonProperty(value = "deleteBaseSnapshot") private Boolean deleteBaseSnapshot; @@ -102,7 +101,7 @@ public final class VolumeProperties { /* * Backup ID * - * UUID v4 or resource identifier used to identify the Backup. + * Resource identifier used to identify the Backup. */ @JsonProperty(value = "backupId") private String backupId; @@ -154,7 +153,7 @@ public final class VolumeProperties { private List mountTargets; /* - * What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection + * What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection. For creating clone volume, set type to ShortTermClone */ @JsonProperty(value = "volumeType") private String volumeType; @@ -167,6 +166,14 @@ public final class VolumeProperties { @JsonProperty(value = "dataProtection") private VolumePropertiesDataProtection dataProtection; + /* + * acceptGrowCapacityPoolForShortTermCloneSplit + * + * While auto splitting the short term clone volume, if the parent pool does not have enough space to accommodate the volume after split, it will be automatically resized, which will lead to increased billing. To accept capacity pool size auto grow and create a short term clone volume, set the property as accepted. + */ + @JsonProperty(value = "acceptGrowCapacityPoolForShortTermCloneSplit") + private AcceptGrowCapacityPoolForShortTermCloneSplit acceptGrowCapacityPoolForShortTermCloneSplit; + /* * Restoring */ @@ -174,8 +181,7 @@ public final class VolumeProperties { private Boolean isRestoring; /* - * If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the - * volume's snapshots (defaults to true). + * If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots (defaults to true). */ @JsonProperty(value = "snapshotDirectoryVisible") private Boolean snapshotDirectoryVisible; @@ -193,8 +199,7 @@ public final class VolumeProperties { private SecurityStyle securityStyle; /* - * Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger - * version 2020-08-01 or later + * Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later */ @JsonProperty(value = "smbEncryption") private Boolean smbEncryption; @@ -222,8 +227,7 @@ public final class VolumeProperties { private Boolean smbContinuouslyAvailable; /* - * Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for - * manual qosType volume + * Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume */ @JsonProperty(value = "throughputMibps") private Float throughputMibps; @@ -235,15 +239,13 @@ public final class VolumeProperties { private Float actualThroughputMibps; /* - * Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = - * 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault' + * Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault' */ @JsonProperty(value = "encryptionKeySource") private EncryptionKeySource encryptionKeySource; /* - * The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable - * if encryptionKeySource = 'Microsoft.KeyVault'. + * The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. */ @JsonProperty(value = "keyVaultPrivateEndpointResourceId") private String keyVaultPrivateEndpointResourceId; @@ -267,37 +269,28 @@ public final class VolumeProperties { private Integer coolnessPeriod; /* - * coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on - * the read pattern for cool access enabled volumes. The possible values for this field are: - * Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. - * OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random - * reads. - * Never - No client-driven data is pulled from cool tier to standard storage. + * coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values for this field are: + * Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. + * OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random reads. + * Never - No client-driven data is pulled from cool tier to standard storage. */ @JsonProperty(value = "coolAccessRetrievalPolicy") private CoolAccessRetrievalPolicy coolAccessRetrievalPolicy; /* - * UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set - * group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), - * write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other - * users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other - * users. + * UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. */ @JsonProperty(value = "unixPermissions") private String unixPermissions; /* - * When a volume is being restored from another volume's snapshot, will show the percentage completion of this - * cloning process. When this value is empty/null there is no cloning process currently happening on this volume. - * This value will update every 5 minutes during cloning. + * When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no cloning process currently happening on this volume. This value will update every 5 minutes during cloning. */ @JsonProperty(value = "cloneProgress", access = JsonProperty.Access.WRITE_ONLY) private Integer cloneProgress; /* - * Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present - * on the volume. + * Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present on the volume. */ @JsonProperty(value = "fileAccessLogs", access = JsonProperty.Access.WRITE_ONLY) private FileAccessLogs fileAccessLogs; @@ -337,8 +330,7 @@ public final class VolumeProperties { private Long defaultGroupQuotaInKiBs; /* - * Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed if - * volume quota is more than 4TiB. + * Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed if volume quota is more than 4TiB. */ @JsonProperty(value = "maximumNumberOfFiles", access = JsonProperty.Access.WRITE_ONLY) private Long maximumNumberOfFiles; @@ -368,8 +360,7 @@ public final class VolumeProperties { private String t2Network; /* - * Volume spec name is the application specific designation or identifier for the particular volume in a volume - * group for e.g. data, log + * Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log */ @JsonProperty(value = "volumeSpecName") private String volumeSpecName; @@ -397,8 +388,7 @@ public final class VolumeProperties { /* * Provisioned Availability Zone * - * The availability zone where the volume is provisioned. This refers to the logical availability zone where the - * volume resides. + * The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. */ @JsonProperty(value = "provisionedAvailabilityZone", access = JsonProperty.Access.WRITE_ONLY) private String provisionedAvailabilityZone; @@ -419,6 +409,22 @@ public final class VolumeProperties { @JsonProperty(value = "originatingResourceId", access = JsonProperty.Access.WRITE_ONLY) private String originatingResourceId; + /* + * inheritedSizeInBytes + * + * Space shared by short term clone volume with parent volume in bytes. + */ + @JsonProperty(value = "inheritedSizeInBytes", access = JsonProperty.Access.WRITE_ONLY) + private Long inheritedSizeInBytes; + + /* + * VolumeLanguage + * + * Language supported for volume. + */ + @JsonProperty(value = "language") + private VolumeLanguage language; + /** * Creates an instance of VolumeProperties class. */ @@ -572,7 +578,7 @@ public String provisioningState() { /** * Get the snapshotId property: Snapshot ID * - * UUID v4 or resource identifier used to identify the Snapshot. + * Resource identifier used to identify the Snapshot. * * @return the snapshotId value. */ @@ -583,7 +589,7 @@ public String snapshotId() { /** * Set the snapshotId property: Snapshot ID * - * UUID v4 or resource identifier used to identify the Snapshot. + * Resource identifier used to identify the Snapshot. * * @param snapshotId the snapshotId value to set. * @return the VolumeProperties object itself. @@ -618,7 +624,7 @@ public VolumeProperties withDeleteBaseSnapshot(Boolean deleteBaseSnapshot) { /** * Get the backupId property: Backup ID * - * UUID v4 or resource identifier used to identify the Backup. + * Resource identifier used to identify the Backup. * * @return the backupId value. */ @@ -629,7 +635,7 @@ public String backupId() { /** * Set the backupId property: Backup ID * - * UUID v4 or resource identifier used to identify the Backup. + * Resource identifier used to identify the Backup. * * @param backupId the backupId value to set. * @return the VolumeProperties object itself. @@ -731,7 +737,7 @@ public List mountTargets() { /** * Get the volumeType property: What type of volume is this. For destination volumes in Cross Region Replication, - * set type to DataProtection. + * set type to DataProtection. For creating clone volume, set type to ShortTermClone. * * @return the volumeType value. */ @@ -741,7 +747,7 @@ public String volumeType() { /** * Set the volumeType property: What type of volume is this. For destination volumes in Cross Region Replication, - * set type to DataProtection. + * set type to DataProtection. For creating clone volume, set type to ShortTermClone. * * @param volumeType the volumeType value to set. * @return the VolumeProperties object itself. @@ -775,6 +781,36 @@ public VolumeProperties withDataProtection(VolumePropertiesDataProtection dataPr return this; } + /** + * Get the acceptGrowCapacityPoolForShortTermCloneSplit property: acceptGrowCapacityPoolForShortTermCloneSplit + * + * While auto splitting the short term clone volume, if the parent pool does not have enough space to accommodate + * the volume after split, it will be automatically resized, which will lead to increased billing. To accept + * capacity pool size auto grow and create a short term clone volume, set the property as accepted. + * + * @return the acceptGrowCapacityPoolForShortTermCloneSplit value. + */ + public AcceptGrowCapacityPoolForShortTermCloneSplit acceptGrowCapacityPoolForShortTermCloneSplit() { + return this.acceptGrowCapacityPoolForShortTermCloneSplit; + } + + /** + * Set the acceptGrowCapacityPoolForShortTermCloneSplit property: acceptGrowCapacityPoolForShortTermCloneSplit + * + * While auto splitting the short term clone volume, if the parent pool does not have enough space to accommodate + * the volume after split, it will be automatically resized, which will lead to increased billing. To accept + * capacity pool size auto grow and create a short term clone volume, set the property as accepted. + * + * @param acceptGrowCapacityPoolForShortTermCloneSplit the acceptGrowCapacityPoolForShortTermCloneSplit value to + * set. + * @return the VolumeProperties object itself. + */ + public VolumeProperties withAcceptGrowCapacityPoolForShortTermCloneSplit( + AcceptGrowCapacityPoolForShortTermCloneSplit acceptGrowCapacityPoolForShortTermCloneSplit) { + this.acceptGrowCapacityPoolForShortTermCloneSplit = acceptGrowCapacityPoolForShortTermCloneSplit; + return this; + } + /** * Get the isRestoring property: Restoring. * @@ -840,8 +876,8 @@ public VolumeProperties withKerberosEnabled(Boolean kerberosEnabled) { } /** - * Get the securityStyle property: The security style of volume, default unix, defaults to ntfs for dual protocol - * or CIFS protocol. + * Get the securityStyle property: The security style of volume, default unix, defaults to ntfs for dual protocol or + * CIFS protocol. * * @return the securityStyle value. */ @@ -850,8 +886,8 @@ public SecurityStyle securityStyle() { } /** - * Set the securityStyle property: The security style of volume, default unix, defaults to ntfs for dual protocol - * or CIFS protocol. + * Set the securityStyle property: The security style of volume, default unix, defaults to ntfs for dual protocol or + * CIFS protocol. * * @param securityStyle the securityStyle value to set. * @return the VolumeProperties object itself. @@ -1094,9 +1130,9 @@ public VolumeProperties withCoolnessPeriod(Integer coolnessPeriod) { } /** - * Get the coolAccessRetrievalPolicy property: coolAccessRetrievalPolicy determines the data retrieval behavior - * from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible - * values for this field are: + * Get the coolAccessRetrievalPolicy property: coolAccessRetrievalPolicy determines the data retrieval behavior from + * the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values + * for this field are: * Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. * OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random * reads. @@ -1109,9 +1145,9 @@ public CoolAccessRetrievalPolicy coolAccessRetrievalPolicy() { } /** - * Set the coolAccessRetrievalPolicy property: coolAccessRetrievalPolicy determines the data retrieval behavior - * from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible - * values for this field are: + * Set the coolAccessRetrievalPolicy property: coolAccessRetrievalPolicy determines the data retrieval behavior from + * the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values + * for this field are: * Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. * OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random * reads. @@ -1293,8 +1329,7 @@ public String volumeGroupName() { } /** - * Get the capacityPoolResourceId property: Pool Resource Id used in case of creating a volume through volume - * group. + * Get the capacityPoolResourceId property: Pool Resource Id used in case of creating a volume through volume group. * * @return the capacityPoolResourceId value. */ @@ -1303,8 +1338,7 @@ public String capacityPoolResourceId() { } /** - * Set the capacityPoolResourceId property: Pool Resource Id used in case of creating a volume through volume - * group. + * Set the capacityPoolResourceId property: Pool Resource Id used in case of creating a volume through volume group. * * @param capacityPoolResourceId the capacityPoolResourceId value to set. * @return the VolumeProperties object itself. @@ -1466,6 +1500,41 @@ public String originatingResourceId() { return this.originatingResourceId; } + /** + * Get the inheritedSizeInBytes property: inheritedSizeInBytes + * + * Space shared by short term clone volume with parent volume in bytes. + * + * @return the inheritedSizeInBytes value. + */ + public Long inheritedSizeInBytes() { + return this.inheritedSizeInBytes; + } + + /** + * Get the language property: VolumeLanguage + * + * Language supported for volume. + * + * @return the language value. + */ + public VolumeLanguage language() { + return this.language; + } + + /** + * Set the language property: VolumeLanguage + * + * Language supported for volume. + * + * @param language the language value to set. + * @return the VolumeProperties object itself. + */ + public VolumeProperties withLanguage(VolumeLanguage language) { + this.language = language; + return this; + } + /** * Validates the instance. * @@ -1473,15 +1542,15 @@ public String originatingResourceId() { */ public void validate() { if (creationToken() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property creationToken in model VolumeProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property creationToken in model VolumeProperties")); } if (exportPolicy() != null) { exportPolicy().validate(); } if (subnetId() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property subnetId in model VolumeProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property subnetId in model VolumeProperties")); } if (mountTargets() != null) { mountTargets().forEach(e -> e.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 index 6691130e515b2..e1be124cd4da5 100644 --- 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 @@ -35,8 +35,7 @@ public final class VolumeQuotaRulesProperties { 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 + * 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; 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 57e5d6d92363f..8f5b7aef69c4a 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 @@ -35,6 +35,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.netapp.fluent.AccountsClient; import com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner; +import com.azure.resourcemanager.netapp.models.ChangeKeyVault; +import com.azure.resourcemanager.netapp.models.EncryptionMigrationRequest; import com.azure.resourcemanager.netapp.models.NetAppAccountList; import com.azure.resourcemanager.netapp.models.NetAppAccountPatch; import java.nio.ByteBuffer; @@ -136,6 +138,36 @@ Mono>> renewCredentials(@HostParam("$host") String end @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/migrateEncryption") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> migrateEncryptionKey(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") EncryptionMigrationRequest body, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/getKeyVaultStatus") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> getChangeKeyVaultInformation(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/changeKeyVault") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> changeKeyVault(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ChangeKeyVault body, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -1492,6 +1524,841 @@ public void renewCredentials(String resourceGroupName, String accountName, Conte renewCredentialsAsync(resourceGroupName, accountName, context).block(); } + /** + * Migrate volumes encryption key source. + * + * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). + * Operation fails if targeted volumes share encryption sibling set with volumes from another account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body The required parameters to perform encryption migration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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>> migrateEncryptionKeyWithResponseAsync(String resourceGroupName, + String accountName, EncryptionMigrationRequest 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 (body != null) { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.migrateEncryptionKey(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Migrate volumes encryption key source. + * + * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). + * Operation fails if targeted volumes share encryption sibling set with volumes from another account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body The required parameters to perform encryption migration. + * @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>> migrateEncryptionKeyWithResponseAsync(String resourceGroupName, + String accountName, EncryptionMigrationRequest 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 (body != null) { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.migrateEncryptionKey(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Migrate volumes encryption key source. + * + * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). + * Operation fails if targeted volumes share encryption sibling set with volumes from another account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body The required parameters to perform encryption migration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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> beginMigrateEncryptionKeyAsync(String resourceGroupName, + String accountName, EncryptionMigrationRequest body) { + Mono>> mono + = migrateEncryptionKeyWithResponseAsync(resourceGroupName, accountName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Migrate volumes encryption key source. + * + * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). + * Operation fails if targeted volumes share encryption sibling set with volumes from another account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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> beginMigrateEncryptionKeyAsync(String resourceGroupName, + String accountName) { + final EncryptionMigrationRequest body = null; + Mono>> mono + = migrateEncryptionKeyWithResponseAsync(resourceGroupName, accountName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Migrate volumes encryption key source. + * + * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). + * Operation fails if targeted volumes share encryption sibling set with volumes from another account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body The required parameters to perform encryption migration. + * @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> beginMigrateEncryptionKeyAsync(String resourceGroupName, + String accountName, EncryptionMigrationRequest body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = migrateEncryptionKeyWithResponseAsync(resourceGroupName, accountName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Migrate volumes encryption key source. + * + * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). + * Operation fails if targeted volumes share encryption sibling set with volumes from another account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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> beginMigrateEncryptionKey(String resourceGroupName, String accountName) { + final EncryptionMigrationRequest body = null; + return this.beginMigrateEncryptionKeyAsync(resourceGroupName, accountName, body).getSyncPoller(); + } + + /** + * Migrate volumes encryption key source. + * + * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). + * Operation fails if targeted volumes share encryption sibling set with volumes from another account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body The required parameters to perform encryption migration. + * @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> beginMigrateEncryptionKey(String resourceGroupName, String accountName, + EncryptionMigrationRequest body, Context context) { + return this.beginMigrateEncryptionKeyAsync(resourceGroupName, accountName, body, context).getSyncPoller(); + } + + /** + * Migrate volumes encryption key source. + * + * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). + * Operation fails if targeted volumes share encryption sibling set with volumes from another account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body The required parameters to perform encryption migration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 migrateEncryptionKeyAsync(String resourceGroupName, String accountName, + EncryptionMigrationRequest body) { + return beginMigrateEncryptionKeyAsync(resourceGroupName, accountName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Migrate volumes encryption key source. + * + * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). + * Operation fails if targeted volumes share encryption sibling set with volumes from another account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 migrateEncryptionKeyAsync(String resourceGroupName, String accountName) { + final EncryptionMigrationRequest body = null; + return beginMigrateEncryptionKeyAsync(resourceGroupName, accountName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Migrate volumes encryption key source. + * + * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). + * Operation fails if targeted volumes share encryption sibling set with volumes from another account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body The required parameters to perform encryption migration. + * @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 migrateEncryptionKeyAsync(String resourceGroupName, String accountName, + EncryptionMigrationRequest body, Context context) { + return beginMigrateEncryptionKeyAsync(resourceGroupName, accountName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Migrate volumes encryption key source. + * + * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). + * Operation fails if targeted volumes share encryption sibling set with volumes from another account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 migrateEncryptionKey(String resourceGroupName, String accountName) { + final EncryptionMigrationRequest body = null; + migrateEncryptionKeyAsync(resourceGroupName, accountName, body).block(); + } + + /** + * Migrate volumes encryption key source. + * + * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). + * Operation fails if targeted volumes share encryption sibling set with volumes from another account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body The required parameters to perform encryption migration. + * @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 migrateEncryptionKey(String resourceGroupName, String accountName, EncryptionMigrationRequest body, + Context context) { + migrateEncryptionKeyAsync(resourceGroupName, accountName, body, context).block(); + } + + /** + * Get information about how volumes under NetApp account are encrypted. + * + * Contains data from encryption.keyVaultProperties as well as information about which private endpoint is used by + * each encryption sibling set. Response from this endpoint can be modified and used as request body for POST + * request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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>> getChangeKeyVaultInformationWithResponseAsync(String resourceGroupName, + String accountName) { + 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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getChangeKeyVaultInformation(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, accountName, this.client.getApiVersion(), accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get information about how volumes under NetApp account are encrypted. + * + * Contains data from encryption.keyVaultProperties as well as information about which private endpoint is used by + * each encryption sibling set. Response from this endpoint can be modified and used as request body for POST + * request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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>> getChangeKeyVaultInformationWithResponseAsync(String resourceGroupName, + String accountName, 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.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getChangeKeyVaultInformation(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, this.client.getApiVersion(), accept, context); + } + + /** + * Get information about how volumes under NetApp account are encrypted. + * + * Contains data from encryption.keyVaultProperties as well as information about which private endpoint is used by + * each encryption sibling set. Response from this endpoint can be modified and used as request body for POST + * request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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> beginGetChangeKeyVaultInformationAsync(String resourceGroupName, + String accountName) { + Mono>> mono + = getChangeKeyVaultInformationWithResponseAsync(resourceGroupName, accountName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Get information about how volumes under NetApp account are encrypted. + * + * Contains data from encryption.keyVaultProperties as well as information about which private endpoint is used by + * each encryption sibling set. Response from this endpoint can be modified and used as request body for POST + * request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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> beginGetChangeKeyVaultInformationAsync(String resourceGroupName, + String accountName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = getChangeKeyVaultInformationWithResponseAsync(resourceGroupName, accountName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Get information about how volumes under NetApp account are encrypted. + * + * Contains data from encryption.keyVaultProperties as well as information about which private endpoint is used by + * each encryption sibling set. Response from this endpoint can be modified and used as request body for POST + * request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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> beginGetChangeKeyVaultInformation(String resourceGroupName, + String accountName) { + return this.beginGetChangeKeyVaultInformationAsync(resourceGroupName, accountName).getSyncPoller(); + } + + /** + * Get information about how volumes under NetApp account are encrypted. + * + * Contains data from encryption.keyVaultProperties as well as information about which private endpoint is used by + * each encryption sibling set. Response from this endpoint can be modified and used as request body for POST + * request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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> beginGetChangeKeyVaultInformation(String resourceGroupName, + String accountName, Context context) { + return this.beginGetChangeKeyVaultInformationAsync(resourceGroupName, accountName, context).getSyncPoller(); + } + + /** + * Get information about how volumes under NetApp account are encrypted. + * + * Contains data from encryption.keyVaultProperties as well as information about which private endpoint is used by + * each encryption sibling set. Response from this endpoint can be modified and used as request body for POST + * request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 getChangeKeyVaultInformationAsync(String resourceGroupName, String accountName) { + return beginGetChangeKeyVaultInformationAsync(resourceGroupName, accountName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Get information about how volumes under NetApp account are encrypted. + * + * Contains data from encryption.keyVaultProperties as well as information about which private endpoint is used by + * each encryption sibling set. Response from this endpoint can be modified and used as request body for POST + * request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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 getChangeKeyVaultInformationAsync(String resourceGroupName, String accountName, + Context context) { + return beginGetChangeKeyVaultInformationAsync(resourceGroupName, accountName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Get information about how volumes under NetApp account are encrypted. + * + * Contains data from encryption.keyVaultProperties as well as information about which private endpoint is used by + * each encryption sibling set. Response from this endpoint can be modified and used as request body for POST + * request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 getChangeKeyVaultInformation(String resourceGroupName, String accountName) { + getChangeKeyVaultInformationAsync(resourceGroupName, accountName).block(); + } + + /** + * Get information about how volumes under NetApp account are encrypted. + * + * Contains data from encryption.keyVaultProperties as well as information about which private endpoint is used by + * each encryption sibling set. Response from this endpoint can be modified and used as request body for POST + * request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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 getChangeKeyVaultInformation(String resourceGroupName, String accountName, Context context) { + getChangeKeyVaultInformationAsync(resourceGroupName, accountName, context).block(); + } + + /** + * Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + * + * Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports MHSM to Key + * Vault, Key Vault to MHSM, MHSM to MHSM and Key Vault to Key Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body The required parameters to perform encryption migration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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>> changeKeyVaultWithResponseAsync(String resourceGroupName, + String accountName, ChangeKeyVault 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 (body != null) { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.changeKeyVault(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + * + * Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports MHSM to Key + * Vault, Key Vault to MHSM, MHSM to MHSM and Key Vault to Key Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body The required parameters to perform encryption migration. + * @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>> changeKeyVaultWithResponseAsync(String resourceGroupName, + String accountName, ChangeKeyVault 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 (body != null) { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.changeKeyVault(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + accountName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + * + * Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports MHSM to Key + * Vault, Key Vault to MHSM, MHSM to MHSM and Key Vault to Key Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body The required parameters to perform encryption migration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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> beginChangeKeyVaultAsync(String resourceGroupName, String accountName, + ChangeKeyVault body) { + Mono>> mono = changeKeyVaultWithResponseAsync(resourceGroupName, accountName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + * + * Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports MHSM to Key + * Vault, Key Vault to MHSM, MHSM to MHSM and Key Vault to Key Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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> beginChangeKeyVaultAsync(String resourceGroupName, String accountName) { + final ChangeKeyVault body = null; + Mono>> mono = changeKeyVaultWithResponseAsync(resourceGroupName, accountName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + * + * Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports MHSM to Key + * Vault, Key Vault to MHSM, MHSM to MHSM and Key Vault to Key Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body The required parameters to perform encryption migration. + * @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> beginChangeKeyVaultAsync(String resourceGroupName, String accountName, + ChangeKeyVault body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = changeKeyVaultWithResponseAsync(resourceGroupName, accountName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + * + * Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports MHSM to Key + * Vault, Key Vault to MHSM, MHSM to MHSM and Key Vault to Key Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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> beginChangeKeyVault(String resourceGroupName, String accountName) { + final ChangeKeyVault body = null; + return this.beginChangeKeyVaultAsync(resourceGroupName, accountName, body).getSyncPoller(); + } + + /** + * Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + * + * Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports MHSM to Key + * Vault, Key Vault to MHSM, MHSM to MHSM and Key Vault to Key Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body The required parameters to perform encryption migration. + * @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> beginChangeKeyVault(String resourceGroupName, String accountName, + ChangeKeyVault body, Context context) { + return this.beginChangeKeyVaultAsync(resourceGroupName, accountName, body, context).getSyncPoller(); + } + + /** + * Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + * + * Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports MHSM to Key + * Vault, Key Vault to MHSM, MHSM to MHSM and Key Vault to Key Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body The required parameters to perform encryption migration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 changeKeyVaultAsync(String resourceGroupName, String accountName, ChangeKeyVault body) { + return beginChangeKeyVaultAsync(resourceGroupName, accountName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + * + * Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports MHSM to Key + * Vault, Key Vault to MHSM, MHSM to MHSM and Key Vault to Key Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 changeKeyVaultAsync(String resourceGroupName, String accountName) { + final ChangeKeyVault body = null; + return beginChangeKeyVaultAsync(resourceGroupName, accountName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + * + * Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports MHSM to Key + * Vault, Key Vault to MHSM, MHSM to MHSM and Key Vault to Key Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body The required parameters to perform encryption migration. + * @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 changeKeyVaultAsync(String resourceGroupName, String accountName, ChangeKeyVault body, + Context context) { + return beginChangeKeyVaultAsync(resourceGroupName, accountName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + * + * Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports MHSM to Key + * Vault, Key Vault to MHSM, MHSM to MHSM and Key Vault to Key Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 changeKeyVault(String resourceGroupName, String accountName) { + final ChangeKeyVault body = null; + changeKeyVaultAsync(resourceGroupName, accountName, body).block(); + } + + /** + * Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + * + * Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports MHSM to Key + * Vault, Key Vault to MHSM, MHSM to MHSM and Key Vault to Key Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body The required parameters to perform encryption migration. + * @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 changeKeyVault(String resourceGroupName, String accountName, ChangeKeyVault body, Context context) { + changeKeyVaultAsync(resourceGroupName, accountName, body, context).block(); + } + /** * Get the next page of items. * 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 15aebb81243ba..099bd2357e0b8 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 @@ -12,6 +12,8 @@ import com.azure.resourcemanager.netapp.fluent.AccountsClient; import com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner; import com.azure.resourcemanager.netapp.models.Accounts; +import com.azure.resourcemanager.netapp.models.ChangeKeyVault; +import com.azure.resourcemanager.netapp.models.EncryptionMigrationRequest; import com.azure.resourcemanager.netapp.models.NetAppAccount; public final class AccountsImpl implements Accounts { @@ -84,6 +86,31 @@ public void renewCredentials(String resourceGroupName, String accountName, Conte this.serviceClient().renewCredentials(resourceGroupName, accountName, context); } + public void migrateEncryptionKey(String resourceGroupName, String accountName) { + this.serviceClient().migrateEncryptionKey(resourceGroupName, accountName); + } + + public void migrateEncryptionKey(String resourceGroupName, String accountName, EncryptionMigrationRequest body, + Context context) { + this.serviceClient().migrateEncryptionKey(resourceGroupName, accountName, body, context); + } + + public void getChangeKeyVaultInformation(String resourceGroupName, String accountName) { + this.serviceClient().getChangeKeyVaultInformation(resourceGroupName, accountName); + } + + public void getChangeKeyVaultInformation(String resourceGroupName, String accountName, Context context) { + this.serviceClient().getChangeKeyVaultInformation(resourceGroupName, accountName, context); + } + + public void changeKeyVault(String resourceGroupName, String accountName) { + this.serviceClient().changeKeyVault(resourceGroupName, accountName); + } + + public void changeKeyVault(String resourceGroupName, String accountName, ChangeKeyVault body, Context context) { + this.serviceClient().changeKeyVault(resourceGroupName, accountName, body, context); + } + public NetAppAccount getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { 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 new file mode 100644 index 0000000000000..89412ac1a3174 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupImpl.java @@ -0,0 +1,201 @@ +// 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.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.BackupInner; +import com.azure.resourcemanager.netapp.models.Backup; +import com.azure.resourcemanager.netapp.models.BackupPatch; +import com.azure.resourcemanager.netapp.models.BackupType; +import java.time.OffsetDateTime; + +public final class BackupImpl implements Backup, Backup.Definition, Backup.Update { + private BackupInner 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 SystemData systemData() { + return this.innerModel().systemData(); + } + + public String backupId() { + return this.innerModel().backupId(); + } + + public OffsetDateTime creationDate() { + return this.innerModel().creationDate(); + } + + public String provisioningState() { + return this.innerModel().provisioningState(); + } + + public Long size() { + return this.innerModel().size(); + } + + public String label() { + return this.innerModel().label(); + } + + public BackupType backupType() { + return this.innerModel().backupType(); + } + + public String failureReason() { + return this.innerModel().failureReason(); + } + + public String volumeResourceId() { + return this.innerModel().volumeResourceId(); + } + + public Boolean useExistingSnapshot() { + return this.innerModel().useExistingSnapshot(); + } + + public String snapshotName() { + return this.innerModel().snapshotName(); + } + + public String backupPolicyResourceId() { + return this.innerModel().backupPolicyResourceId(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public BackupInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String backupVaultName; + + private String backupName; + + private BackupPatch updateBody; + + public BackupImpl withExistingBackupVault(String resourceGroupName, String accountName, String backupVaultName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + this.backupVaultName = backupVaultName; + return this; + } + + public Backup create() { + this.innerObject = serviceManager.serviceClient() + .getBackups() + .create(resourceGroupName, accountName, backupVaultName, backupName, this.innerModel(), Context.NONE); + return this; + } + + public Backup create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getBackups() + .create(resourceGroupName, accountName, backupVaultName, backupName, this.innerModel(), context); + return this; + } + + BackupImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new BackupInner(); + this.serviceManager = serviceManager; + this.backupName = name; + } + + public BackupImpl update() { + this.updateBody = new BackupPatch(); + return this; + } + + public Backup apply() { + this.innerObject = serviceManager.serviceClient() + .getBackups() + .update(resourceGroupName, accountName, backupVaultName, backupName, updateBody, Context.NONE); + return this; + } + + public Backup apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getBackups() + .update(resourceGroupName, accountName, backupVaultName, backupName, updateBody, context); + return this; + } + + BackupImpl(BackupInner innerObject, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); + this.backupVaultName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "backupVaults"); + this.backupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "backups"); + } + + public Backup refresh() { + this.innerObject = serviceManager.serviceClient() + .getBackups() + .getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, Context.NONE) + .getValue(); + return this; + } + + public Backup refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getBackups() + .getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, context) + .getValue(); + return this; + } + + public BackupImpl withVolumeResourceId(String volumeResourceId) { + this.innerModel().withVolumeResourceId(volumeResourceId); + return this; + } + + public BackupImpl withLabel(String label) { + if (isInCreateMode()) { + this.innerModel().withLabel(label); + return this; + } else { + this.updateBody.withLabel(label); + return this; + } + } + + public BackupImpl withUseExistingSnapshot(Boolean useExistingSnapshot) { + this.innerModel().withUseExistingSnapshot(useExistingSnapshot); + return this; + } + + public BackupImpl withSnapshotName(String snapshotName) { + this.innerModel().withSnapshotName(snapshotName); + 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/BackupPolicyImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPolicyImpl.java index d73207fe46165..c3c088a90ceaa 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 @@ -125,14 +125,16 @@ public BackupPolicyImpl withExistingNetAppAccount(String resourceGroupName, Stri } public BackupPolicy create() { - this.innerObject = serviceManager.serviceClient().getBackupPolicies().create(resourceGroupName, accountName, - backupPolicyName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getBackupPolicies() + .create(resourceGroupName, accountName, backupPolicyName, this.innerModel(), Context.NONE); return this; } public BackupPolicy create(Context context) { - this.innerObject = serviceManager.serviceClient().getBackupPolicies().create(resourceGroupName, accountName, - backupPolicyName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getBackupPolicies() + .create(resourceGroupName, accountName, backupPolicyName, this.innerModel(), context); return this; } @@ -148,14 +150,16 @@ public BackupPolicyImpl update() { } public BackupPolicy apply() { - this.innerObject = serviceManager.serviceClient().getBackupPolicies().update(resourceGroupName, accountName, - backupPolicyName, updateBody, Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getBackupPolicies() + .update(resourceGroupName, accountName, backupPolicyName, updateBody, Context.NONE); return this; } public BackupPolicy apply(Context context) { - this.innerObject = serviceManager.serviceClient().getBackupPolicies().update(resourceGroupName, accountName, - backupPolicyName, updateBody, context); + this.innerObject = serviceManager.serviceClient() + .getBackupPolicies() + .update(resourceGroupName, accountName, backupPolicyName, updateBody, context); return this; } @@ -169,14 +173,18 @@ public BackupPolicy apply(Context context) { } public BackupPolicy refresh() { - this.innerObject = serviceManager.serviceClient().getBackupPolicies() - .getWithResponse(resourceGroupName, accountName, backupPolicyName, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getBackupPolicies() + .getWithResponse(resourceGroupName, accountName, backupPolicyName, Context.NONE) + .getValue(); return this; } public BackupPolicy refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getBackupPolicies() - .getWithResponse(resourceGroupName, accountName, backupPolicyName, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getBackupPolicies() + .getWithResponse(resourceGroupName, accountName, backupPolicyName, context) + .getValue(); return this; } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupStatusImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupStatusImpl.java new file mode 100644 index 0000000000000..df32a32dcbb76 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupStatusImpl.java @@ -0,0 +1,66 @@ +// 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.BackupStatusInner; +import com.azure.resourcemanager.netapp.models.BackupStatus; +import com.azure.resourcemanager.netapp.models.MirrorState; +import com.azure.resourcemanager.netapp.models.RelationshipStatus; + +public final class BackupStatusImpl implements BackupStatus { + private BackupStatusInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + BackupStatusImpl(BackupStatusInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public Boolean healthy() { + return this.innerModel().healthy(); + } + + public RelationshipStatus relationshipStatus() { + return this.innerModel().relationshipStatus(); + } + + public MirrorState mirrorState() { + return this.innerModel().mirrorState(); + } + + public String unhealthyReason() { + return this.innerModel().unhealthyReason(); + } + + public String errorMessage() { + return this.innerModel().errorMessage(); + } + + public Long lastTransferSize() { + return this.innerModel().lastTransferSize(); + } + + public String lastTransferType() { + return this.innerModel().lastTransferType(); + } + + public Long totalTransferBytes() { + return this.innerModel().totalTransferBytes(); + } + + public Long transferProgressBytes() { + return this.innerModel().transferProgressBytes(); + } + + public BackupStatusInner 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/BackupVaultImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultImpl.java new file mode 100644 index 0000000000000..3068030711125 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultImpl.java @@ -0,0 +1,174 @@ +// 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.BackupVaultInner; +import com.azure.resourcemanager.netapp.models.BackupVault; +import com.azure.resourcemanager.netapp.models.BackupVaultPatch; +import java.util.Collections; +import java.util.Map; + +public final class BackupVaultImpl implements BackupVault, BackupVault.Definition, BackupVault.Update { + private BackupVaultInner 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 String provisioningState() { + return this.innerModel().provisioningState(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public BackupVaultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String backupVaultName; + + private BackupVaultPatch updateBody; + + public BackupVaultImpl withExistingNetAppAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + public BackupVault create() { + this.innerObject = serviceManager.serviceClient() + .getBackupVaults() + .createOrUpdate(resourceGroupName, accountName, backupVaultName, this.innerModel(), Context.NONE); + return this; + } + + public BackupVault create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getBackupVaults() + .createOrUpdate(resourceGroupName, accountName, backupVaultName, this.innerModel(), context); + return this; + } + + BackupVaultImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new BackupVaultInner(); + this.serviceManager = serviceManager; + this.backupVaultName = name; + } + + public BackupVaultImpl update() { + this.updateBody = new BackupVaultPatch(); + return this; + } + + public BackupVault apply() { + this.innerObject = serviceManager.serviceClient() + .getBackupVaults() + .update(resourceGroupName, accountName, backupVaultName, updateBody, Context.NONE); + return this; + } + + public BackupVault apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getBackupVaults() + .update(resourceGroupName, accountName, backupVaultName, updateBody, context); + return this; + } + + BackupVaultImpl(BackupVaultInner innerObject, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); + this.backupVaultName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "backupVaults"); + } + + public BackupVault refresh() { + this.innerObject = serviceManager.serviceClient() + .getBackupVaults() + .getWithResponse(resourceGroupName, accountName, backupVaultName, Context.NONE) + .getValue(); + return this; + } + + public BackupVault refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getBackupVaults() + .getWithResponse(resourceGroupName, accountName, backupVaultName, context) + .getValue(); + return this; + } + + public BackupVaultImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public BackupVaultImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public BackupVaultImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + 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/BackupVaultsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsClientImpl.java new file mode 100644 index 0000000000000..0d00e47f6d93a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsClientImpl.java @@ -0,0 +1,1270 @@ +// 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.BackupVaultsClient; +import com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner; +import com.azure.resourcemanager.netapp.models.BackupVaultPatch; +import com.azure.resourcemanager.netapp.models.BackupVaultsList; +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 BackupVaultsClient. + */ +public final class BackupVaultsClientImpl implements BackupVaultsClient { + /** + * The proxy service used to perform REST calls. + */ + private final BackupVaultsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of BackupVaultsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BackupVaultsClientImpl(NetAppManagementClientImpl client) { + this.service + = RestProxy.create(BackupVaultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientBackupVaults to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "NetAppManagementClie") + public interface BackupVaultsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNetAppAccount(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @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}/backupVaults/{backupVaultName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @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}/backupVaults/{backupVaultName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BackupVaultInner body, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}") + @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("backupVaultName") String backupVaultName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BackupVaultPatch body, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}") + @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("backupVaultName") String backupVaultName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNetAppAccountNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Describe all Backup Vaults + * + * List and describe all Backup Vaults in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 Backup Vaults along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNetAppAccountSinglePageAsync(String resourceGroupName, + String accountName) { + 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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByNetAppAccount(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Describe all Backup Vaults + * + * List and describe all Backup Vaults in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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 Backup Vaults along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNetAppAccountSinglePageAsync(String resourceGroupName, + String accountName, 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.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByNetAppAccount(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + accountName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Describe all Backup Vaults + * + * List and describe all Backup Vaults in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 Backup Vaults as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNetAppAccountAsync(String resourceGroupName, String accountName) { + return new PagedFlux<>(() -> listByNetAppAccountSinglePageAsync(resourceGroupName, accountName), + nextLink -> listByNetAppAccountNextSinglePageAsync(nextLink)); + } + + /** + * Describe all Backup Vaults + * + * List and describe all Backup Vaults in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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 Backup Vaults as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNetAppAccountAsync(String resourceGroupName, String accountName, + Context context) { + return new PagedFlux<>(() -> listByNetAppAccountSinglePageAsync(resourceGroupName, accountName, context), + nextLink -> listByNetAppAccountNextSinglePageAsync(nextLink, context)); + } + + /** + * Describe all Backup Vaults + * + * List and describe all Backup Vaults in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 Backup Vaults as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNetAppAccount(String resourceGroupName, String accountName) { + return new PagedIterable<>(listByNetAppAccountAsync(resourceGroupName, accountName)); + } + + /** + * Describe all Backup Vaults + * + * List and describe all Backup Vaults in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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 Backup Vaults as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNetAppAccount(String resourceGroupName, String accountName, + Context context) { + return new PagedIterable<>(listByNetAppAccountAsync(resourceGroupName, accountName, context)); + } + + /** + * Describe the Backup Vault + * + * Get the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Backup Vault along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName) { + 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 (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName 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, backupVaultName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Describe the Backup Vault + * + * Get the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Backup Vault along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName, 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 (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName 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, + backupVaultName, this.client.getApiVersion(), accept, context); + } + + /** + * Describe the Backup Vault + * + * Get the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Backup Vault on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String accountName, String backupVaultName) { + return getWithResponseAsync(resourceGroupName, accountName, backupVaultName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Describe the Backup Vault + * + * Get the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String accountName, + String backupVaultName, Context context) { + return getWithResponseAsync(resourceGroupName, accountName, backupVaultName, context).block(); + } + + /** + * Describe the Backup Vault + * + * Get the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupVaultInner get(String resourceGroupName, String accountName, String backupVaultName) { + return getWithResponse(resourceGroupName, accountName, backupVaultName, Context.NONE).getValue(); + } + + /** + * Create or Update a Backup Vault + * + * Create or update the specified Backup Vault in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body BackupVault 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 backup Vault information along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, String backupVaultName, BackupVaultInner 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 (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, backupVaultName, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or Update a Backup Vault + * + * Create or update the specified Backup Vault in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body BackupVault 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 backup Vault information along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, String backupVaultName, BackupVaultInner 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 (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + accountName, backupVaultName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Create or Update a Backup Vault + * + * Create or update the specified Backup Vault in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body BackupVault 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 backup Vault information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BackupVaultInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, String backupVaultName, BackupVaultInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, backupVaultName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BackupVaultInner.class, BackupVaultInner.class, this.client.getContext()); + } + + /** + * Create or Update a Backup Vault + * + * Create or update the specified Backup Vault in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body BackupVault 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 backup Vault information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BackupVaultInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, String backupVaultName, BackupVaultInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, backupVaultName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BackupVaultInner.class, BackupVaultInner.class, context); + } + + /** + * Create or Update a Backup Vault + * + * Create or update the specified Backup Vault in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body BackupVault 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 backup Vault information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BackupVaultInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String backupVaultName, BackupVaultInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, accountName, backupVaultName, body).getSyncPoller(); + } + + /** + * Create or Update a Backup Vault + * + * Create or update the specified Backup Vault in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body BackupVault 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 backup Vault information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BackupVaultInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String backupVaultName, BackupVaultInner body, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, accountName, backupVaultName, body, context) + .getSyncPoller(); + } + + /** + * Create or Update a Backup Vault + * + * Create or update the specified Backup Vault in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body BackupVault 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 backup Vault information on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String accountName, + String backupVaultName, BackupVaultInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, backupVaultName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or Update a Backup Vault + * + * Create or update the specified Backup Vault in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body BackupVault 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 backup Vault information on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String accountName, + String backupVaultName, BackupVaultInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, backupVaultName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or Update a Backup Vault + * + * Create or update the specified Backup Vault in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body BackupVault 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 backup Vault information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupVaultInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + BackupVaultInner body) { + return createOrUpdateAsync(resourceGroupName, accountName, backupVaultName, body).block(); + } + + /** + * Create or Update a Backup Vault + * + * Create or update the specified Backup Vault in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body BackupVault 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 backup Vault information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupVaultInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + BackupVaultInner body, Context context) { + return createOrUpdateAsync(resourceGroupName, accountName, backupVaultName, body, context).block(); + } + + /** + * Update NetApp Backup Vault + * + * Patch the specified NetApp Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body Backup Vault 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 backup Vault information along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName, BackupVaultPatch 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 (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName 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, backupVaultName, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update NetApp Backup Vault + * + * Patch the specified NetApp Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body Backup Vault 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 backup Vault information along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName, BackupVaultPatch 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 (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName 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, backupVaultName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Update NetApp Backup Vault + * + * Patch the specified NetApp Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body Backup Vault 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 backup Vault information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BackupVaultInner> beginUpdateAsync(String resourceGroupName, + String accountName, String backupVaultName, BackupVaultPatch body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, accountName, backupVaultName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BackupVaultInner.class, BackupVaultInner.class, this.client.getContext()); + } + + /** + * Update NetApp Backup Vault + * + * Patch the specified NetApp Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body Backup Vault 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 backup Vault information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BackupVaultInner> beginUpdateAsync(String resourceGroupName, + String accountName, String backupVaultName, BackupVaultPatch body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, accountName, backupVaultName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BackupVaultInner.class, BackupVaultInner.class, context); + } + + /** + * Update NetApp Backup Vault + * + * Patch the specified NetApp Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body Backup Vault 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 backup Vault information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BackupVaultInner> beginUpdate(String resourceGroupName, + String accountName, String backupVaultName, BackupVaultPatch body) { + return this.beginUpdateAsync(resourceGroupName, accountName, backupVaultName, body).getSyncPoller(); + } + + /** + * Update NetApp Backup Vault + * + * Patch the specified NetApp Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body Backup Vault 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 backup Vault information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BackupVaultInner> beginUpdate(String resourceGroupName, + String accountName, String backupVaultName, BackupVaultPatch body, Context context) { + return this.beginUpdateAsync(resourceGroupName, accountName, backupVaultName, body, context).getSyncPoller(); + } + + /** + * Update NetApp Backup Vault + * + * Patch the specified NetApp Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body Backup Vault 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 backup Vault information on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String accountName, String backupVaultName, + BackupVaultPatch body) { + return beginUpdateAsync(resourceGroupName, accountName, backupVaultName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update NetApp Backup Vault + * + * Patch the specified NetApp Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body Backup Vault 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 backup Vault information on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String accountName, String backupVaultName, + BackupVaultPatch body, Context context) { + return beginUpdateAsync(resourceGroupName, accountName, backupVaultName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update NetApp Backup Vault + * + * Patch the specified NetApp Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body Backup Vault 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 backup Vault information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupVaultInner update(String resourceGroupName, String accountName, String backupVaultName, + BackupVaultPatch body) { + return updateAsync(resourceGroupName, accountName, backupVaultName, body).block(); + } + + /** + * Update NetApp Backup Vault + * + * Patch the specified NetApp Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param body Backup Vault 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 backup Vault information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupVaultInner update(String resourceGroupName, String accountName, String backupVaultName, + BackupVaultPatch body, Context context) { + return updateAsync(resourceGroupName, accountName, backupVaultName, body, context).block(); + } + + /** + * Delete NetApp Backup Vault + * + * Delete the specified Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 backupVaultName) { + 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 (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, backupVaultName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete NetApp Backup Vault + * + * Delete the specified Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @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 backupVaultName, 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 (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + accountName, backupVaultName, this.client.getApiVersion(), accept, context); + } + + /** + * Delete NetApp Backup Vault + * + * Delete the specified Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 backupVaultName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, backupVaultName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete NetApp Backup Vault + * + * Delete the specified Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @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 backupVaultName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, backupVaultName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete NetApp Backup Vault + * + * Delete the specified Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 backupVaultName) { + return this.beginDeleteAsync(resourceGroupName, accountName, backupVaultName).getSyncPoller(); + } + + /** + * Delete NetApp Backup Vault + * + * Delete the specified Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @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 backupVaultName, Context context) { + return this.beginDeleteAsync(resourceGroupName, accountName, backupVaultName, context).getSyncPoller(); + } + + /** + * Delete NetApp Backup Vault + * + * Delete the specified Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 backupVaultName) { + return beginDeleteAsync(resourceGroupName, accountName, backupVaultName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete NetApp Backup Vault + * + * Delete the specified Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @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 backupVaultName, + Context context) { + return beginDeleteAsync(resourceGroupName, accountName, backupVaultName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete NetApp Backup Vault + * + * Delete the specified Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 backupVaultName) { + deleteAsync(resourceGroupName, accountName, backupVaultName).block(); + } + + /** + * Delete NetApp Backup Vault + * + * Delete the specified Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @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 backupVaultName, Context context) { + deleteAsync(resourceGroupName, accountName, backupVaultName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 Backup Vaults along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNetAppAccountNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByNetAppAccountNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @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 Backup Vaults along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNetAppAccountNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByNetAppAccountNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsImpl.java new file mode 100644 index 0000000000000..cd001ed5041fc --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsImpl.java @@ -0,0 +1,159 @@ +// 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.BackupVaultsClient; +import com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner; +import com.azure.resourcemanager.netapp.models.BackupVault; +import com.azure.resourcemanager.netapp.models.BackupVaults; + +public final class BackupVaultsImpl implements BackupVaults { + private static final ClientLogger LOGGER = new ClientLogger(BackupVaultsImpl.class); + + private final BackupVaultsClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public BackupVaultsImpl(BackupVaultsClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByNetAppAccount(String resourceGroupName, String accountName) { + PagedIterable inner + = this.serviceClient().listByNetAppAccount(resourceGroupName, accountName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BackupVaultImpl(inner1, this.manager())); + } + + public PagedIterable listByNetAppAccount(String resourceGroupName, String accountName, + Context context) { + PagedIterable inner + = this.serviceClient().listByNetAppAccount(resourceGroupName, accountName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BackupVaultImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String accountName, String backupVaultName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, accountName, backupVaultName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new BackupVaultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BackupVault get(String resourceGroupName, String accountName, String backupVaultName) { + BackupVaultInner inner = this.serviceClient().get(resourceGroupName, accountName, backupVaultName); + if (inner != null) { + return new BackupVaultImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String backupVaultName) { + this.serviceClient().delete(resourceGroupName, accountName, backupVaultName); + } + + public void delete(String resourceGroupName, String accountName, String backupVaultName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, backupVaultName, context); + } + + public BackupVault getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.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 backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "backupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, backupVaultName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.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 backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "backupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, backupVaultName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.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 backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "backupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); + } + this.delete(resourceGroupName, accountName, backupVaultName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.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 backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "backupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); + } + this.delete(resourceGroupName, accountName, backupVaultName, context); + } + + private BackupVaultsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public BackupVaultImpl define(String name) { + return new BackupVaultImpl(name, this.manager()); + } +} 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 1a4b628275469..fcedd54396d45 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 @@ -4,25 +4,42 @@ 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.BackupsClient; +import com.azure.resourcemanager.netapp.fluent.models.BackupInner; +import com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner; import com.azure.resourcemanager.netapp.fluent.models.RestoreStatusInner; +import com.azure.resourcemanager.netapp.models.BackupPatch; +import com.azure.resourcemanager.netapp.models.BackupsList; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -57,20 +74,89 @@ public final class BackupsClientImpl implements BackupsClient { @ServiceInterface(name = "NetAppManagementClie") public interface BackupsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/restoreStatus") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/latestBackupStatus/current") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getVolumeRestoreStatus(@HostParam("$host") String endpoint, + Mono> getLatestStatus(@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}/latestRestoreStatus/current") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getVolumeLatestRestoreStatus(@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}/backupVaults/{backupVaultName}/backups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByVault(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @QueryParam("$filter") String filter, + @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}/backupVaults/{backupVaultName}/backups/{backupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @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}/backupVaults/{backupVaultName}/backups/{backupName}") + @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("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BackupInner body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}/backups/{backupName}") + @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("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BackupPatch body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}/backups/{backupName}") + @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("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByVaultNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Get volume's restore status + * Get the latest backup status of a volume * - * Get the status of the restore for a volume. + * Get the latest status of the backup for a volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -79,11 +165,11 @@ Mono> getVolumeRestoreStatus(@HostParam("$host") St * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 restore for a volume along with {@link Response} on successful completion of + * @return the latest status of the backup for a volume along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getVolumeRestoreStatusWithResponseAsync(String resourceGroupName, + private Mono> getLatestStatusWithResponseAsync(String resourceGroupName, String accountName, String poolName, String volumeName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -108,16 +194,15 @@ private Mono> getVolumeRestoreStatusWithResponseAsy } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.getVolumeRestoreStatus(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.getLatestStatus(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 volume's restore status + * Get the latest backup status of a volume * - * Get the status of the restore for a volume. + * Get the latest status of the backup for a volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -127,11 +212,11 @@ private Mono> getVolumeRestoreStatusWithResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 restore for a volume along with {@link Response} on successful completion of + * @return the latest status of the backup for a volume along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getVolumeRestoreStatusWithResponseAsync(String resourceGroupName, + private Mono> getLatestStatusWithResponseAsync(String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -156,14 +241,14 @@ private Mono> getVolumeRestoreStatusWithResponseAsy } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getVolumeRestoreStatus(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), accept, context); + return service.getLatestStatus(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + accountName, poolName, volumeName, this.client.getApiVersion(), accept, context); } /** - * Get volume's restore status + * Get the latest backup status of a volume * - * Get the status of the restore for a volume. + * Get the latest status of the backup for a volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -172,19 +257,19 @@ private Mono> getVolumeRestoreStatusWithResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 restore for a volume on successful completion of {@link Mono}. + * @return the latest status of the backup for a volume on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getVolumeRestoreStatusAsync(String resourceGroupName, String accountName, - String poolName, String volumeName) { - return getVolumeRestoreStatusWithResponseAsync(resourceGroupName, accountName, poolName, volumeName) + private Mono getLatestStatusAsync(String resourceGroupName, String accountName, String poolName, + String volumeName) { + return getLatestStatusWithResponseAsync(resourceGroupName, accountName, poolName, volumeName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get volume's restore status + * Get the latest backup status of a volume * - * Get the status of the restore for a volume. + * Get the latest status of the backup for a volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -194,19 +279,18 @@ private Mono getVolumeRestoreStatusAsync(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 restore for a volume along with {@link Response}. + * @return the latest status of the backup for a volume along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getVolumeRestoreStatusWithResponse(String resourceGroupName, String accountName, + public Response getLatestStatusWithResponse(String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return getVolumeRestoreStatusWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context) - .block(); + return getLatestStatusWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); } /** - * Get volume's restore status + * Get the latest backup status of a volume * - * Get the status of the restore for a volume. + * Get the latest status of the backup for a volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -215,12 +299,1464 @@ public Response getVolumeRestoreStatusWithResponse(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 restore for a volume. + * @return the latest status of the backup for a volume. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RestoreStatusInner getVolumeRestoreStatus(String resourceGroupName, String accountName, String poolName, + public BackupStatusInner getLatestStatus(String resourceGroupName, String accountName, String poolName, String volumeName) { - return getVolumeRestoreStatusWithResponse(resourceGroupName, accountName, poolName, volumeName, Context.NONE) + return getLatestStatusWithResponse(resourceGroupName, accountName, poolName, volumeName, Context.NONE) .getValue(); } + + /** + * Get the latest restore status of a volume + * + * Get the latest status of the restore for a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 latest status of the restore for a volume along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getVolumeLatestRestoreStatusWithResponseAsync(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.getVolumeLatestRestoreStatus(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 latest restore status of a volume + * + * Get the latest status of the restore for a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 latest status of the restore for a volume along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getVolumeLatestRestoreStatusWithResponseAsync(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.getVolumeLatestRestoreStatus(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), accept, context); + } + + /** + * Get the latest restore status of a volume + * + * Get the latest status of the restore for a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 latest status of the restore for a volume on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getVolumeLatestRestoreStatusAsync(String resourceGroupName, String accountName, + String poolName, String volumeName) { + return getVolumeLatestRestoreStatusWithResponseAsync(resourceGroupName, accountName, poolName, volumeName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the latest restore status of a volume + * + * Get the latest status of the restore for a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 latest status of the restore for a volume along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getVolumeLatestRestoreStatusWithResponse(String resourceGroupName, + String accountName, String poolName, String volumeName, Context context) { + return getVolumeLatestRestoreStatusWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, + context).block(); + } + + /** + * Get the latest restore status of a volume + * + * Get the latest status of the restore for a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 latest status of the restore for a volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RestoreStatusInner getVolumeLatestRestoreStatus(String resourceGroupName, String accountName, + String poolName, String volumeName) { + return getVolumeLatestRestoreStatusWithResponse(resourceGroupName, accountName, poolName, volumeName, + Context.NONE).getValue(); + } + + /** + * List Backups + * + * List all backups Under a Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param filter An option to specify the VolumeResourceId. If present, then only returns the backups under the + * specified 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 Backups along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByVaultSinglePageAsync(String resourceGroupName, String accountName, + String backupVaultName, String filter) { + 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 (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByVault(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, backupVaultName, filter, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Backups + * + * List all backups Under a Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param filter An option to specify the VolumeResourceId. If present, then only returns the backups under the + * specified 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 Backups along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByVaultSinglePageAsync(String resourceGroupName, String accountName, + String backupVaultName, String filter, 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 (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByVault(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, + backupVaultName, filter, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List Backups + * + * List all backups Under a Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param filter An option to specify the VolumeResourceId. If present, then only returns the backups under the + * specified 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 Backups as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByVaultAsync(String resourceGroupName, String accountName, + String backupVaultName, String filter) { + return new PagedFlux<>( + () -> listByVaultSinglePageAsync(resourceGroupName, accountName, backupVaultName, filter), + nextLink -> listByVaultNextSinglePageAsync(nextLink)); + } + + /** + * List Backups + * + * List all backups Under a Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 Backups as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByVaultAsync(String resourceGroupName, String accountName, + String backupVaultName) { + final String filter = null; + return new PagedFlux<>( + () -> listByVaultSinglePageAsync(resourceGroupName, accountName, backupVaultName, filter), + nextLink -> listByVaultNextSinglePageAsync(nextLink)); + } + + /** + * List Backups + * + * List all backups Under a Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param filter An option to specify the VolumeResourceId. If present, then only returns the backups under the + * specified 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 Backups as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByVaultAsync(String resourceGroupName, String accountName, + String backupVaultName, String filter, Context context) { + return new PagedFlux<>( + () -> listByVaultSinglePageAsync(resourceGroupName, accountName, backupVaultName, filter, context), + nextLink -> listByVaultNextSinglePageAsync(nextLink, context)); + } + + /** + * List Backups + * + * List all backups Under a Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 Backups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByVault(String resourceGroupName, String accountName, + String backupVaultName) { + final String filter = null; + return new PagedIterable<>(listByVaultAsync(resourceGroupName, accountName, backupVaultName, filter)); + } + + /** + * List Backups + * + * List all backups Under a Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param filter An option to specify the VolumeResourceId. If present, then only returns the backups under the + * specified 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 Backups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByVault(String resourceGroupName, String accountName, String backupVaultName, + String filter, Context context) { + return new PagedIterable<>(listByVaultAsync(resourceGroupName, accountName, backupVaultName, filter, context)); + } + + /** + * Describe the Backup under Backup Vault + * + * Get the specified Backup under Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Backup under Backup Vault along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName, String backupName) { + 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 (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName 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, backupVaultName, backupName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Describe the Backup under Backup Vault + * + * Get the specified Backup under Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Backup under Backup Vault along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName, String backupName, 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 (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName 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, + backupVaultName, backupName, this.client.getApiVersion(), accept, context); + } + + /** + * Describe the Backup under Backup Vault + * + * Get the specified Backup under Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Backup under Backup Vault on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String accountName, String backupVaultName, + String backupName) { + return getWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Describe the Backup under Backup Vault + * + * Get the specified Backup under Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Backup under Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String accountName, String backupVaultName, + String backupName, Context context) { + return getWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, context).block(); + } + + /** + * Describe the Backup under Backup Vault + * + * Get the specified Backup under Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Backup under Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupInner get(String resourceGroupName, String accountName, String backupVaultName, String backupName) { + return getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, Context.NONE).getValue(); + } + + /** + * Create a backup + * + * Create a backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName, String backupName, BackupInner 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 (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName 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, backupVaultName, backupName, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a backup + * + * Create a backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName, String backupName, BackupInner 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 (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName 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, backupVaultName, backupName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Create a backup + * + * Create a backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BackupInner> beginCreateAsync(String resourceGroupName, + String accountName, String backupVaultName, String backupName, BackupInner body) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BackupInner.class, BackupInner.class, this.client.getContext()); + } + + /** + * Create a backup + * + * Create a backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BackupInner> beginCreateAsync(String resourceGroupName, + String accountName, String backupVaultName, String backupName, BackupInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BackupInner.class, BackupInner.class, context); + } + + /** + * Create a backup + * + * Create a backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BackupInner> beginCreate(String resourceGroupName, String accountName, + String backupVaultName, String backupName, BackupInner body) { + return this.beginCreateAsync(resourceGroupName, accountName, backupVaultName, backupName, body).getSyncPoller(); + } + + /** + * Create a backup + * + * Create a backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BackupInner> beginCreate(String resourceGroupName, String accountName, + String backupVaultName, String backupName, BackupInner body, Context context) { + return this.beginCreateAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context) + .getSyncPoller(); + } + + /** + * Create a backup + * + * Create a backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String accountName, String backupVaultName, + String backupName, BackupInner body) { + return beginCreateAsync(resourceGroupName, accountName, backupVaultName, backupName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a backup + * + * Create a backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String accountName, String backupVaultName, + String backupName, BackupInner body, Context context) { + return beginCreateAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a backup + * + * Create a backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupInner create(String resourceGroupName, String accountName, String backupVaultName, String backupName, + BackupInner body) { + return createAsync(resourceGroupName, accountName, backupVaultName, backupName, body).block(); + } + + /** + * Create a backup + * + * Create a backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupInner create(String resourceGroupName, String accountName, String backupVaultName, String backupName, + BackupInner body, Context context) { + return createAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context).block(); + } + + /** + * Patch a backup + * + * Patch a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName, String backupName, BackupPatch 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 (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + accountName, backupVaultName, backupName, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch a backup + * + * Patch a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName, String backupName, BackupPatch 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 (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + accountName, backupVaultName, backupName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Patch a backup + * + * Patch a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BackupInner> beginUpdateAsync(String resourceGroupName, + String accountName, String backupVaultName, String backupName, BackupPatch body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BackupInner.class, BackupInner.class, this.client.getContext()); + } + + /** + * Patch a backup + * + * Patch a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of backup under a Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BackupInner> beginUpdateAsync(String resourceGroupName, + String accountName, String backupVaultName, String backupName) { + final BackupPatch body = null; + Mono>> mono + = updateWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BackupInner.class, BackupInner.class, this.client.getContext()); + } + + /** + * Patch a backup + * + * Patch a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BackupInner> beginUpdateAsync(String resourceGroupName, + String accountName, String backupVaultName, String backupName, BackupPatch body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BackupInner.class, BackupInner.class, context); + } + + /** + * Patch a backup + * + * Patch a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of backup under a Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BackupInner> beginUpdate(String resourceGroupName, String accountName, + String backupVaultName, String backupName) { + final BackupPatch body = null; + return this.beginUpdateAsync(resourceGroupName, accountName, backupVaultName, backupName, body).getSyncPoller(); + } + + /** + * Patch a backup + * + * Patch a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BackupInner> beginUpdate(String resourceGroupName, String accountName, + String backupVaultName, String backupName, BackupPatch body, Context context) { + return this.beginUpdateAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context) + .getSyncPoller(); + } + + /** + * Patch a backup + * + * Patch a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String accountName, String backupVaultName, + String backupName, BackupPatch body) { + return beginUpdateAsync(resourceGroupName, accountName, backupVaultName, backupName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch a backup + * + * Patch a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup under a Backup Vault on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String accountName, String backupVaultName, + String backupName) { + final BackupPatch body = null; + return beginUpdateAsync(resourceGroupName, accountName, backupVaultName, backupName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch a backup + * + * Patch a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String accountName, String backupVaultName, + String backupName, BackupPatch body, Context context) { + return beginUpdateAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch a backup + * + * Patch a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup under a Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupInner update(String resourceGroupName, String accountName, String backupVaultName, String backupName) { + final BackupPatch body = null; + return updateAsync(resourceGroupName, accountName, backupVaultName, backupName, body).block(); + } + + /** + * Patch a backup + * + * Patch a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Backup 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 backup under a Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupInner update(String resourceGroupName, String accountName, String backupVaultName, String backupName, + BackupPatch body, Context context) { + return updateAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context).block(); + } + + /** + * Delete backup + * + * Delete a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 backupVaultName, String backupName) { + 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 (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + accountName, backupVaultName, backupName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete backup + * + * Delete a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @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 backupVaultName, String backupName, 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 (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + accountName, backupVaultName, backupName, this.client.getApiVersion(), accept, context); + } + + /** + * Delete backup + * + * Delete a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 backupVaultName, String backupName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete backup + * + * Delete a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @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 backupVaultName, String backupName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete backup + * + * Delete a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 backupVaultName, String backupName) { + return this.beginDeleteAsync(resourceGroupName, accountName, backupVaultName, backupName).getSyncPoller(); + } + + /** + * Delete backup + * + * Delete a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @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 backupVaultName, String backupName, Context context) { + return this.beginDeleteAsync(resourceGroupName, accountName, backupVaultName, backupName, context) + .getSyncPoller(); + } + + /** + * Delete backup + * + * Delete a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 backupVaultName, + String backupName) { + return beginDeleteAsync(resourceGroupName, accountName, backupVaultName, backupName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete backup + * + * Delete a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @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 backupVaultName, + String backupName, Context context) { + return beginDeleteAsync(resourceGroupName, accountName, backupVaultName, backupName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete backup + * + * Delete a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 backupVaultName, String backupName) { + deleteAsync(resourceGroupName, accountName, backupVaultName, backupName).block(); + } + + /** + * Delete backup + * + * Delete a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @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 backupVaultName, String backupName, + Context context) { + deleteAsync(resourceGroupName, accountName, backupVaultName, backupName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 Backups along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByVaultNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByVaultNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @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 Backups along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByVaultNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByVaultNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } } diff --git a/sdk/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 de38c88687adb..a399179cbbe03 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 @@ -4,13 +4,18 @@ 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.BackupsClient; +import com.azure.resourcemanager.netapp.fluent.models.BackupInner; +import com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner; import com.azure.resourcemanager.netapp.fluent.models.RestoreStatusInner; +import com.azure.resourcemanager.netapp.models.Backup; import com.azure.resourcemanager.netapp.models.Backups; +import com.azure.resourcemanager.netapp.models.BackupStatus; import com.azure.resourcemanager.netapp.models.RestoreStatus; public final class BackupsImpl implements Backups { @@ -25,10 +30,33 @@ public BackupsImpl(BackupsClient innerClient, com.azure.resourcemanager.netapp.N this.serviceManager = serviceManager; } - public Response getVolumeRestoreStatusWithResponse(String resourceGroupName, String accountName, + public Response getLatestStatusWithResponse(String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - Response inner = this.serviceClient().getVolumeRestoreStatusWithResponse(resourceGroupName, - accountName, poolName, volumeName, context); + Response inner = this.serviceClient() + .getLatestStatusWithResponse(resourceGroupName, accountName, poolName, volumeName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new BackupStatusImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BackupStatus getLatestStatus(String resourceGroupName, String accountName, String poolName, + String volumeName) { + BackupStatusInner inner + = this.serviceClient().getLatestStatus(resourceGroupName, accountName, poolName, volumeName); + if (inner != null) { + return new BackupStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getVolumeLatestRestoreStatusWithResponse(String resourceGroupName, + String accountName, String poolName, String volumeName, Context context) { + Response inner = this.serviceClient() + .getVolumeLatestRestoreStatusWithResponse(resourceGroupName, accountName, poolName, volumeName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new RestoreStatusImpl(inner.getValue(), this.manager())); @@ -37,10 +65,10 @@ public Response getVolumeRestoreStatusWithResponse(String resourc } } - public RestoreStatus getVolumeRestoreStatus(String resourceGroupName, String accountName, String poolName, + public RestoreStatus getVolumeLatestRestoreStatus(String resourceGroupName, String accountName, String poolName, String volumeName) { RestoreStatusInner inner - = this.serviceClient().getVolumeRestoreStatus(resourceGroupName, accountName, poolName, volumeName); + = this.serviceClient().getVolumeLatestRestoreStatus(resourceGroupName, accountName, poolName, volumeName); if (inner != null) { return new RestoreStatusImpl(inner, this.manager()); } else { @@ -48,6 +76,146 @@ public RestoreStatus getVolumeRestoreStatus(String resourceGroupName, String acc } } + public PagedIterable listByVault(String resourceGroupName, String accountName, String backupVaultName) { + PagedIterable inner + = this.serviceClient().listByVault(resourceGroupName, accountName, backupVaultName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BackupImpl(inner1, this.manager())); + } + + public PagedIterable listByVault(String resourceGroupName, String accountName, String backupVaultName, + String filter, Context context) { + PagedIterable inner + = this.serviceClient().listByVault(resourceGroupName, accountName, backupVaultName, filter, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BackupImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String accountName, String backupVaultName, + String backupName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new BackupImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Backup get(String resourceGroupName, String accountName, String backupVaultName, String backupName) { + BackupInner inner = this.serviceClient().get(resourceGroupName, accountName, backupVaultName, backupName); + if (inner != null) { + return new BackupImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName) { + this.serviceClient().delete(resourceGroupName, accountName, backupVaultName, backupName); + } + + public void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName, + Context context) { + this.serviceClient().delete(resourceGroupName, accountName, backupVaultName, backupName, context); + } + + public Backup getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.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 backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "backupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); + } + String backupName = ResourceManagerUtils.getValueFromIdByName(id, "backups"); + if (backupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backups'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.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 backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "backupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); + } + String backupName = ResourceManagerUtils.getValueFromIdByName(id, "backups"); + if (backupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backups'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.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 backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "backupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); + } + String backupName = ResourceManagerUtils.getValueFromIdByName(id, "backups"); + if (backupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backups'.", id))); + } + this.delete(resourceGroupName, accountName, backupVaultName, backupName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.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 backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "backupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); + } + String backupName = ResourceManagerUtils.getValueFromIdByName(id, "backups"); + if (backupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backups'.", id))); + } + this.delete(resourceGroupName, accountName, backupVaultName, backupName, context); + } + private BackupsClient serviceClient() { return this.innerClient; } @@ -55,4 +223,8 @@ private BackupsClient serviceClient() { private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { return this.serviceManager; } + + public BackupImpl define(String name) { + return new BackupImpl(name, this.manager()); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsClientImpl.java new file mode 100644 index 0000000000000..e9012e2f9aa64 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsClientImpl.java @@ -0,0 +1,322 @@ +// 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.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.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.BackupsUnderAccountsClient; +import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; +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 BackupsUnderAccountsClient. + */ +public final class BackupsUnderAccountsClientImpl implements BackupsUnderAccountsClient { + /** + * The proxy service used to perform REST calls. + */ + private final BackupsUnderAccountsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of BackupsUnderAccountsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BackupsUnderAccountsClientImpl(NetAppManagementClientImpl client) { + this.service = RestProxy.create(BackupsUnderAccountsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientBackupsUnderAccounts to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "NetAppManagementClie") + public interface BackupsUnderAccountsService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/migrateBackups") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> migrateBackups(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BackupsMigrationRequest body, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Create a new migrate request for backups under account + * + * Migrate the backups under a NetApp account to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body Migrate backups under an account payload 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>> migrateBackupsWithResponseAsync(String resourceGroupName, + String accountName, BackupsMigrationRequest 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 (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.migrateBackups(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a new migrate request for backups under account + * + * Migrate the backups under a NetApp account to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body Migrate backups under an account payload 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>> migrateBackupsWithResponseAsync(String resourceGroupName, + String accountName, BackupsMigrationRequest 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 (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.migrateBackups(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + accountName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Create a new migrate request for backups under account + * + * Migrate the backups under a NetApp account to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body Migrate backups under an account payload 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> beginMigrateBackupsAsync(String resourceGroupName, String accountName, + BackupsMigrationRequest body) { + Mono>> mono = migrateBackupsWithResponseAsync(resourceGroupName, accountName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Create a new migrate request for backups under account + * + * Migrate the backups under a NetApp account to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body Migrate backups under an account payload 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> beginMigrateBackupsAsync(String resourceGroupName, String accountName, + BackupsMigrationRequest body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = migrateBackupsWithResponseAsync(resourceGroupName, accountName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Create a new migrate request for backups under account + * + * Migrate the backups under a NetApp account to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body Migrate backups under an account payload 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> beginMigrateBackups(String resourceGroupName, String accountName, + BackupsMigrationRequest body) { + return this.beginMigrateBackupsAsync(resourceGroupName, accountName, body).getSyncPoller(); + } + + /** + * Create a new migrate request for backups under account + * + * Migrate the backups under a NetApp account to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body Migrate backups under an account payload 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> beginMigrateBackups(String resourceGroupName, String accountName, + BackupsMigrationRequest body, Context context) { + return this.beginMigrateBackupsAsync(resourceGroupName, accountName, body, context).getSyncPoller(); + } + + /** + * Create a new migrate request for backups under account + * + * Migrate the backups under a NetApp account to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body Migrate backups under an account payload 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 migrateBackupsAsync(String resourceGroupName, String accountName, BackupsMigrationRequest body) { + return beginMigrateBackupsAsync(resourceGroupName, accountName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a new migrate request for backups under account + * + * Migrate the backups under a NetApp account to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body Migrate backups under an account payload 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 migrateBackupsAsync(String resourceGroupName, String accountName, BackupsMigrationRequest body, + Context context) { + return beginMigrateBackupsAsync(resourceGroupName, accountName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a new migrate request for backups under account + * + * Migrate the backups under a NetApp account to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body Migrate backups under an account payload 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 migrateBackups(String resourceGroupName, String accountName, BackupsMigrationRequest body) { + migrateBackupsAsync(resourceGroupName, accountName, body).block(); + } + + /** + * Create a new migrate request for backups under account + * + * Migrate the backups under a NetApp account to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body Migrate backups under an account payload 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 migrateBackups(String resourceGroupName, String accountName, BackupsMigrationRequest body, + Context context) { + migrateBackupsAsync(resourceGroupName, accountName, body, context).block(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsImpl.java new file mode 100644 index 0000000000000..573f5a53ff736 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsImpl.java @@ -0,0 +1,42 @@ +// 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.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient; +import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; +import com.azure.resourcemanager.netapp.models.BackupsUnderAccounts; + +public final class BackupsUnderAccountsImpl implements BackupsUnderAccounts { + private static final ClientLogger LOGGER = new ClientLogger(BackupsUnderAccountsImpl.class); + + private final BackupsUnderAccountsClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public BackupsUnderAccountsImpl(BackupsUnderAccountsClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void migrateBackups(String resourceGroupName, String accountName, BackupsMigrationRequest body) { + this.serviceClient().migrateBackups(resourceGroupName, accountName, body); + } + + public void migrateBackups(String resourceGroupName, String accountName, BackupsMigrationRequest body, + Context context) { + this.serviceClient().migrateBackups(resourceGroupName, accountName, body, context); + } + + private BackupsUnderAccountsClient serviceClient() { + return this.innerClient; + } + + 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/BackupsUnderBackupVaultsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsClientImpl.java new file mode 100644 index 0000000000000..031b6e07fde35 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsClientImpl.java @@ -0,0 +1,363 @@ +// 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.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.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.BackupsUnderBackupVaultsClient; +import com.azure.resourcemanager.netapp.models.BackupRestoreFiles; +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 BackupsUnderBackupVaultsClient. + */ +public final class BackupsUnderBackupVaultsClientImpl implements BackupsUnderBackupVaultsClient { + /** + * The proxy service used to perform REST calls. + */ + private final BackupsUnderBackupVaultsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of BackupsUnderBackupVaultsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BackupsUnderBackupVaultsClientImpl(NetAppManagementClientImpl client) { + this.service = RestProxy.create(BackupsUnderBackupVaultsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientBackupsUnderBackupVaults to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "NetAppManagementClie") + public interface BackupsUnderBackupVaultsService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}/backups/{backupName}/restoreFiles") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> restoreFiles(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BackupRestoreFiles body, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Create a new Backup Restore Files request + * + * Restore the specified files from the specified backup to the active filesystem. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Restore payload 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>> restoreFilesWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName, String backupName, BackupRestoreFiles 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 (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName 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.restoreFiles(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, backupVaultName, backupName, this.client.getApiVersion(), body, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a new Backup Restore Files request + * + * Restore the specified files from the specified backup to the active filesystem. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Restore payload 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>> restoreFilesWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName, String backupName, BackupRestoreFiles 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 (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName 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.restoreFiles(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + accountName, backupVaultName, backupName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Create a new Backup Restore Files request + * + * Restore the specified files from the specified backup to the active filesystem. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Restore payload 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> beginRestoreFilesAsync(String resourceGroupName, String accountName, + String backupVaultName, String backupName, BackupRestoreFiles body) { + Mono>> mono + = restoreFilesWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Create a new Backup Restore Files request + * + * Restore the specified files from the specified backup to the active filesystem. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Restore payload 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> beginRestoreFilesAsync(String resourceGroupName, String accountName, + String backupVaultName, String backupName, BackupRestoreFiles body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = restoreFilesWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Create a new Backup Restore Files request + * + * Restore the specified files from the specified backup to the active filesystem. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Restore payload 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> beginRestoreFiles(String resourceGroupName, String accountName, + String backupVaultName, String backupName, BackupRestoreFiles body) { + return this.beginRestoreFilesAsync(resourceGroupName, accountName, backupVaultName, backupName, body) + .getSyncPoller(); + } + + /** + * Create a new Backup Restore Files request + * + * Restore the specified files from the specified backup to the active filesystem. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Restore payload 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> beginRestoreFiles(String resourceGroupName, String accountName, + String backupVaultName, String backupName, BackupRestoreFiles body, Context context) { + return this.beginRestoreFilesAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context) + .getSyncPoller(); + } + + /** + * Create a new Backup Restore Files request + * + * Restore the specified files from the specified backup to the active filesystem. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Restore payload 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 restoreFilesAsync(String resourceGroupName, String accountName, String backupVaultName, + String backupName, BackupRestoreFiles body) { + return beginRestoreFilesAsync(resourceGroupName, accountName, backupVaultName, backupName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a new Backup Restore Files request + * + * Restore the specified files from the specified backup to the active filesystem. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Restore payload 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 restoreFilesAsync(String resourceGroupName, String accountName, String backupVaultName, + String backupName, BackupRestoreFiles body, Context context) { + return beginRestoreFilesAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a new Backup Restore Files request + * + * Restore the specified files from the specified backup to the active filesystem. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Restore payload 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 restoreFiles(String resourceGroupName, String accountName, String backupVaultName, String backupName, + BackupRestoreFiles body) { + restoreFilesAsync(resourceGroupName, accountName, backupVaultName, backupName, body).block(); + } + + /** + * Create a new Backup Restore Files request + * + * Restore the specified files from the specified backup to the active filesystem. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Restore payload 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 restoreFiles(String resourceGroupName, String accountName, String backupVaultName, String backupName, + BackupRestoreFiles body, Context context) { + restoreFilesAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context).block(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsImpl.java new file mode 100644 index 0000000000000..e82e4f5723b4b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsImpl.java @@ -0,0 +1,43 @@ +// 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.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient; +import com.azure.resourcemanager.netapp.models.BackupRestoreFiles; +import com.azure.resourcemanager.netapp.models.BackupsUnderBackupVaults; + +public final class BackupsUnderBackupVaultsImpl implements BackupsUnderBackupVaults { + private static final ClientLogger LOGGER = new ClientLogger(BackupsUnderBackupVaultsImpl.class); + + private final BackupsUnderBackupVaultsClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public BackupsUnderBackupVaultsImpl(BackupsUnderBackupVaultsClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void restoreFiles(String resourceGroupName, String accountName, String backupVaultName, String backupName, + BackupRestoreFiles body) { + this.serviceClient().restoreFiles(resourceGroupName, accountName, backupVaultName, backupName, body); + } + + public void restoreFiles(String resourceGroupName, String accountName, String backupVaultName, String backupName, + BackupRestoreFiles body, Context context) { + this.serviceClient().restoreFiles(resourceGroupName, accountName, backupVaultName, backupName, body, context); + } + + private BackupsUnderBackupVaultsClient serviceClient() { + return this.innerClient; + } + + 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/BackupsUnderVolumesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesClientImpl.java new file mode 100644 index 0000000000000..d7e17e88cb6b0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesClientImpl.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.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.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.BackupsUnderVolumesClient; +import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; +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 BackupsUnderVolumesClient. + */ +public final class BackupsUnderVolumesClientImpl implements BackupsUnderVolumesClient { + /** + * The proxy service used to perform REST calls. + */ + private final BackupsUnderVolumesService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of BackupsUnderVolumesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BackupsUnderVolumesClientImpl(NetAppManagementClientImpl client) { + this.service = RestProxy.create(BackupsUnderVolumesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientBackupsUnderVolumes to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "NetAppManagementClie") + public interface BackupsUnderVolumesService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/migrateBackups") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> migrateBackups(@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, @BodyParam("application/json") BackupsMigrationRequest body, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Create a new migrate request for backups under volume + * + * Migrate the backups under volume to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Migrate backups under volume payload 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>> migrateBackupsWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, BackupsMigrationRequest 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(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.migrateBackups(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a new migrate request for backups under volume + * + * Migrate the backups under volume to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Migrate backups under volume payload 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>> migrateBackupsWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, BackupsMigrationRequest 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(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.migrateBackups(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Create a new migrate request for backups under volume + * + * Migrate the backups under volume to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Migrate backups under volume payload 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> beginMigrateBackupsAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, BackupsMigrationRequest body) { + Mono>> mono + = migrateBackupsWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Create a new migrate request for backups under volume + * + * Migrate the backups under volume to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Migrate backups under volume payload 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> beginMigrateBackupsAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, BackupsMigrationRequest body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = migrateBackupsWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Create a new migrate request for backups under volume + * + * Migrate the backups under volume to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Migrate backups under volume payload 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> beginMigrateBackups(String resourceGroupName, String accountName, + String poolName, String volumeName, BackupsMigrationRequest body) { + return this.beginMigrateBackupsAsync(resourceGroupName, accountName, poolName, volumeName, body) + .getSyncPoller(); + } + + /** + * Create a new migrate request for backups under volume + * + * Migrate the backups under volume to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Migrate backups under volume payload 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> beginMigrateBackups(String resourceGroupName, String accountName, + String poolName, String volumeName, BackupsMigrationRequest body, Context context) { + return this.beginMigrateBackupsAsync(resourceGroupName, accountName, poolName, volumeName, body, context) + .getSyncPoller(); + } + + /** + * Create a new migrate request for backups under volume + * + * Migrate the backups under volume to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Migrate backups under volume payload 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 migrateBackupsAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, BackupsMigrationRequest body) { + return beginMigrateBackupsAsync(resourceGroupName, accountName, poolName, volumeName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a new migrate request for backups under volume + * + * Migrate the backups under volume to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Migrate backups under volume payload 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 migrateBackupsAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, BackupsMigrationRequest body, Context context) { + return beginMigrateBackupsAsync(resourceGroupName, accountName, poolName, volumeName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a new migrate request for backups under volume + * + * Migrate the backups under volume to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Migrate backups under volume payload 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 migrateBackups(String resourceGroupName, String accountName, String poolName, String volumeName, + BackupsMigrationRequest body) { + migrateBackupsAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); + } + + /** + * Create a new migrate request for backups under volume + * + * Migrate the backups under volume to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Migrate backups under volume payload 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 migrateBackups(String resourceGroupName, String accountName, String poolName, String volumeName, + BackupsMigrationRequest body, Context context) { + migrateBackupsAsync(resourceGroupName, accountName, poolName, volumeName, body, context).block(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesImpl.java new file mode 100644 index 0000000000000..76adfeecb3110 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesImpl.java @@ -0,0 +1,43 @@ +// 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.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient; +import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; +import com.azure.resourcemanager.netapp.models.BackupsUnderVolumes; + +public final class BackupsUnderVolumesImpl implements BackupsUnderVolumes { + private static final ClientLogger LOGGER = new ClientLogger(BackupsUnderVolumesImpl.class); + + private final BackupsUnderVolumesClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public BackupsUnderVolumesImpl(BackupsUnderVolumesClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void migrateBackups(String resourceGroupName, String accountName, String poolName, String volumeName, + BackupsMigrationRequest body) { + this.serviceClient().migrateBackups(resourceGroupName, accountName, poolName, volumeName, body); + } + + public void migrateBackups(String resourceGroupName, String accountName, String poolName, String volumeName, + BackupsMigrationRequest body, Context context) { + this.serviceClient().migrateBackups(resourceGroupName, accountName, poolName, volumeName, body, context); + } + + private BackupsUnderVolumesClient serviceClient() { + return this.innerClient; + } + + 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/CapacityPoolImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CapacityPoolImpl.java index 4e78156d6621d..ec6c998cf8c3f 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 @@ -125,14 +125,16 @@ public CapacityPoolImpl withExistingNetAppAccount(String resourceGroupName, Stri } public CapacityPool create() { - this.innerObject = serviceManager.serviceClient().getPools().createOrUpdate(resourceGroupName, accountName, - poolName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getPools() + .createOrUpdate(resourceGroupName, accountName, poolName, this.innerModel(), Context.NONE); return this; } public CapacityPool create(Context context) { - this.innerObject = serviceManager.serviceClient().getPools().createOrUpdate(resourceGroupName, accountName, - poolName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getPools() + .createOrUpdate(resourceGroupName, accountName, poolName, this.innerModel(), context); return this; } @@ -148,14 +150,16 @@ public CapacityPoolImpl update() { } public CapacityPool apply() { - this.innerObject = serviceManager.serviceClient().getPools().update(resourceGroupName, accountName, poolName, - updateBody, Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getPools() + .update(resourceGroupName, accountName, poolName, updateBody, Context.NONE); return this; } public CapacityPool apply(Context context) { - this.innerObject = serviceManager.serviceClient().getPools().update(resourceGroupName, accountName, poolName, - updateBody, context); + this.innerObject = serviceManager.serviceClient() + .getPools() + .update(resourceGroupName, accountName, poolName, updateBody, context); return this; } @@ -169,14 +173,18 @@ public CapacityPool apply(Context context) { } public CapacityPool refresh() { - this.innerObject = serviceManager.serviceClient().getPools() - .getWithResponse(resourceGroupName, accountName, poolName, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getPools() + .getWithResponse(resourceGroupName, accountName, poolName, Context.NONE) + .getValue(); return this; } public CapacityPool refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getPools() - .getWithResponse(resourceGroupName, accountName, poolName, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getPools() + .getWithResponse(resourceGroupName, accountName, poolName, context) + .getValue(); return this; } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ClusterPeerCommandResponseImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ClusterPeerCommandResponseImpl.java new file mode 100644 index 0000000000000..f1cefd3d6eb25 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ClusterPeerCommandResponseImpl.java @@ -0,0 +1,32 @@ +// 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.ClusterPeerCommandResponseInner; +import com.azure.resourcemanager.netapp.models.ClusterPeerCommandResponse; + +public final class ClusterPeerCommandResponseImpl implements ClusterPeerCommandResponse { + private ClusterPeerCommandResponseInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + ClusterPeerCommandResponseImpl(ClusterPeerCommandResponseInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String peerAcceptCommand() { + return this.innerModel().peerAcceptCommand(); + } + + public ClusterPeerCommandResponseInner 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/NetAppAccountImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java index fdb3b357eb5af..c8b8e3121e516 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 @@ -10,6 +10,8 @@ import com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner; import com.azure.resourcemanager.netapp.models.AccountEncryption; import com.azure.resourcemanager.netapp.models.ActiveDirectory; +import com.azure.resourcemanager.netapp.models.ChangeKeyVault; +import com.azure.resourcemanager.netapp.models.EncryptionMigrationRequest; import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; import com.azure.resourcemanager.netapp.models.NetAppAccount; import com.azure.resourcemanager.netapp.models.NetAppAccountPatch; @@ -80,6 +82,14 @@ public Boolean disableShowmount() { return this.innerModel().disableShowmount(); } + public String nfsV4IdDomain() { + return this.innerModel().nfsV4IdDomain(); + } + + public Boolean isMultiAdEnabled() { + return this.innerModel().isMultiAdEnabled(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -112,14 +122,16 @@ public NetAppAccountImpl withExistingResourceGroup(String resourceGroupName) { } public NetAppAccount create() { - this.innerObject = serviceManager.serviceClient().getAccounts().createOrUpdate(resourceGroupName, accountName, - this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getAccounts() + .createOrUpdate(resourceGroupName, accountName, this.innerModel(), Context.NONE); return this; } public NetAppAccount create(Context context) { - this.innerObject = serviceManager.serviceClient().getAccounts().createOrUpdate(resourceGroupName, accountName, - this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getAccounts() + .createOrUpdate(resourceGroupName, accountName, this.innerModel(), context); return this; } @@ -135,8 +147,9 @@ public NetAppAccountImpl update() { } public NetAppAccount apply() { - this.innerObject = serviceManager.serviceClient().getAccounts().update(resourceGroupName, accountName, - updateBody, Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getAccounts() + .update(resourceGroupName, accountName, updateBody, Context.NONE); return this; } @@ -155,14 +168,18 @@ public NetAppAccount apply(Context context) { } public NetAppAccount refresh() { - this.innerObject = serviceManager.serviceClient().getAccounts() - .getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getAccounts() + .getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE) + .getValue(); return this; } public NetAppAccount refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getAccounts() - .getByResourceGroupWithResponse(resourceGroupName, accountName, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getAccounts() + .getByResourceGroupWithResponse(resourceGroupName, accountName, context) + .getValue(); return this; } @@ -174,6 +191,30 @@ public void renewCredentials(Context context) { serviceManager.accounts().renewCredentials(resourceGroupName, accountName, context); } + public void migrateEncryptionKey() { + serviceManager.accounts().migrateEncryptionKey(resourceGroupName, accountName); + } + + public void migrateEncryptionKey(EncryptionMigrationRequest body, Context context) { + serviceManager.accounts().migrateEncryptionKey(resourceGroupName, accountName, body, context); + } + + public void getChangeKeyVaultInformation() { + serviceManager.accounts().getChangeKeyVaultInformation(resourceGroupName, accountName); + } + + public void getChangeKeyVaultInformation(Context context) { + serviceManager.accounts().getChangeKeyVaultInformation(resourceGroupName, accountName, context); + } + + public void changeKeyVault() { + serviceManager.accounts().changeKeyVault(resourceGroupName, accountName); + } + + public void changeKeyVault(ChangeKeyVault body, Context context) { + serviceManager.accounts().changeKeyVault(resourceGroupName, accountName, body, context); + } + public NetAppAccountImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -224,6 +265,16 @@ public NetAppAccountImpl withEncryption(AccountEncryption encryption) { } } + public NetAppAccountImpl withNfsV4IdDomain(String nfsV4IdDomain) { + if (isInCreateMode()) { + this.innerModel().withNfsV4IdDomain(nfsV4IdDomain); + return this; + } else { + this.updateBody.withNfsV4IdDomain(nfsV4IdDomain); + 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/NetAppManagementClientBuilder.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientBuilder.java index fac144c537095..23e6128f35f26 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 @@ -123,11 +123,13 @@ public NetAppManagementClientBuilder serializerAdapter(SerializerAdapter seriali public NetAppManagementClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = (pipeline != null) ? pipeline + HttpPipeline localPipeline = (pipeline != null) + ? pipeline : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); Duration localDefaultPollInterval = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) + ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); NetAppManagementClientImpl client = new NetAppManagementClientImpl(localPipeline, localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); 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 0e910a62a1aba..66b21d775e74f 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.netapp.implementation; import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpResponse; @@ -12,8 +13,8 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.exception.ManagementError; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; @@ -25,8 +26,13 @@ import com.azure.resourcemanager.netapp.fluent.AccountsClient; import com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient; import com.azure.resourcemanager.netapp.fluent.BackupsClient; +import com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient; +import com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient; +import com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient; +import com.azure.resourcemanager.netapp.fluent.BackupVaultsClient; import com.azure.resourcemanager.netapp.fluent.NetAppManagementClient; import com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient; +import com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient; import com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient; import com.azure.resourcemanager.netapp.fluent.OperationsClient; import com.azure.resourcemanager.netapp.fluent.PoolsClient; @@ -176,6 +182,20 @@ public NetAppResourceQuotaLimitsClient getNetAppResourceQuotaLimits() { return this.netAppResourceQuotaLimits; } + /** + * The NetAppResourceRegionInfosClient object to access its operations. + */ + private final NetAppResourceRegionInfosClient netAppResourceRegionInfos; + + /** + * Gets the NetAppResourceRegionInfosClient object to access its operations. + * + * @return the NetAppResourceRegionInfosClient object. + */ + public NetAppResourceRegionInfosClient getNetAppResourceRegionInfos() { + return this.netAppResourceRegionInfos; + } + /** * The AccountsClient object to access its operations. */ @@ -246,20 +266,6 @@ public SnapshotPoliciesClient getSnapshotPolicies() { return this.snapshotPolicies; } - /** - * The BackupsClient object to access its operations. - */ - private final BackupsClient backups; - - /** - * Gets the BackupsClient object to access its operations. - * - * @return the BackupsClient object. - */ - public BackupsClient getBackups() { - return this.backups; - } - /** * The BackupPoliciesClient object to access its operations. */ @@ -316,6 +322,76 @@ public SubvolumesClient getSubvolumes() { return this.subvolumes; } + /** + * The BackupsClient object to access its operations. + */ + private final BackupsClient backups; + + /** + * Gets the BackupsClient object to access its operations. + * + * @return the BackupsClient object. + */ + public BackupsClient getBackups() { + return this.backups; + } + + /** + * The BackupVaultsClient object to access its operations. + */ + private final BackupVaultsClient backupVaults; + + /** + * Gets the BackupVaultsClient object to access its operations. + * + * @return the BackupVaultsClient object. + */ + public BackupVaultsClient getBackupVaults() { + return this.backupVaults; + } + + /** + * The BackupsUnderBackupVaultsClient object to access its operations. + */ + private final BackupsUnderBackupVaultsClient backupsUnderBackupVaults; + + /** + * Gets the BackupsUnderBackupVaultsClient object to access its operations. + * + * @return the BackupsUnderBackupVaultsClient object. + */ + public BackupsUnderBackupVaultsClient getBackupsUnderBackupVaults() { + return this.backupsUnderBackupVaults; + } + + /** + * The BackupsUnderVolumesClient object to access its operations. + */ + private final BackupsUnderVolumesClient backupsUnderVolumes; + + /** + * Gets the BackupsUnderVolumesClient object to access its operations. + * + * @return the BackupsUnderVolumesClient object. + */ + public BackupsUnderVolumesClient getBackupsUnderVolumes() { + return this.backupsUnderVolumes; + } + + /** + * The BackupsUnderAccountsClient object to access its operations. + */ + private final BackupsUnderAccountsClient backupsUnderAccounts; + + /** + * Gets the BackupsUnderAccountsClient object to access its operations. + * + * @return the BackupsUnderAccountsClient object. + */ + public BackupsUnderAccountsClient getBackupsUnderAccounts() { + return this.backupsUnderAccounts; + } + /** * Initializes an instance of NetAppManagementClient client. * @@ -333,20 +409,25 @@ public SubvolumesClient getSubvolumes() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-07-01"; + this.apiVersion = "2023-11-01-preview"; this.operations = new OperationsClientImpl(this); this.netAppResources = new NetAppResourcesClientImpl(this); this.netAppResourceQuotaLimits = new NetAppResourceQuotaLimitsClientImpl(this); + this.netAppResourceRegionInfos = new NetAppResourceRegionInfosClientImpl(this); this.accounts = new AccountsClientImpl(this); this.pools = new PoolsClientImpl(this); this.volumes = new VolumesClientImpl(this); this.snapshots = new SnapshotsClientImpl(this); this.snapshotPolicies = new SnapshotPoliciesClientImpl(this); - this.backups = new BackupsClientImpl(this); this.backupPolicies = new BackupPoliciesClientImpl(this); this.volumeQuotaRules = new VolumeQuotaRulesClientImpl(this); this.volumeGroups = new VolumeGroupsClientImpl(this); this.subvolumes = new SubvolumesClientImpl(this); + this.backups = new BackupsClientImpl(this); + this.backupVaults = new BackupVaultsClientImpl(this); + this.backupsUnderBackupVaults = new BackupsUnderBackupVaultsClientImpl(this); + this.backupsUnderVolumes = new BackupsUnderVolumesClientImpl(this); + this.backupsUnderAccounts = new BackupsUnderAccountsClientImpl(this); } /** @@ -409,8 +490,8 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, if (errorBody != null) { // try to deserialize error body to ManagementError try { - managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class, - SerializerEncoding.JSON); + managementError = this.getSerializerAdapter() + .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } @@ -451,7 +532,7 @@ public int getStatusCode() { } public String getHeaderValue(String s) { - return httpHeaders.getValue(s); + return httpHeaders.getValue(HttpHeaderName.fromString(s)); } public HttpHeaders getHeaders() { diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosClientImpl.java new file mode 100644 index 0000000000000..c97dfe9209b42 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosClientImpl.java @@ -0,0 +1,390 @@ +// 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.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient; +import com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner; +import com.azure.resourcemanager.netapp.models.RegionInfosList; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in NetAppResourceRegionInfosClient. + */ +public final class NetAppResourceRegionInfosClientImpl implements NetAppResourceRegionInfosClient { + /** + * The proxy service used to perform REST calls. + */ + private final NetAppResourceRegionInfosService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of NetAppResourceRegionInfosClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + NetAppResourceRegionInfosClientImpl(NetAppManagementClientImpl client) { + this.service = RestProxy.create(NetAppResourceRegionInfosService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientNetAppResourceRegionInfos to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "NetAppManagementClie") + public interface NetAppResourceRegionInfosService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/regionInfos") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/regionInfos/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Describes region specific information. + * + * Provides region specific information. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of regionInfo resources along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location) { + 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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), location, + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Describes region specific information. + * + * Provides region specific information. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of regionInfo resources along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location, 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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), location, this.client.getApiVersion(), + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Describes region specific information. + * + * Provides region specific information. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of regionInfo resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location) { + return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Describes region specific information. + * + * Provides region specific information. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of regionInfo resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(location, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Describes region specific information. + * + * Provides region specific information. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of regionInfo resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location) { + return new PagedIterable<>(listAsync(location)); + } + + /** + * Describes region specific information. + * + * Provides region specific information. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of regionInfo resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location, Context context) { + return new PagedIterable<>(listAsync(location, context)); + } + + /** + * Describes region specific information. + * + * Provides storage to network proximity and logical zone mapping information. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding regionInfo Item along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location) { + 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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, + this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Describes region specific information. + * + * Provides storage to network proximity and logical zone mapping information. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding regionInfo Item along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, 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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location 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(), location, + this.client.getApiVersion(), accept, context); + } + + /** + * Describes region specific information. + * + * Provides storage to network proximity and logical zone mapping information. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding regionInfo Item on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String location) { + return getWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Describes region specific information. + * + * Provides storage to network proximity and logical zone mapping information. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding regionInfo Item along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, Context context) { + return getWithResponseAsync(location, context).block(); + } + + /** + * Describes region specific information. + * + * Provides storage to network proximity and logical zone mapping information. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding regionInfo Item. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegionInfoResourceInner get(String location) { + return getWithResponse(location, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 regionInfo resources along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @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 regionInfo resources along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosImpl.java new file mode 100644 index 0000000000000..9ef546fe34a08 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosImpl.java @@ -0,0 +1,66 @@ +// 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.NetAppResourceRegionInfosClient; +import com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner; +import com.azure.resourcemanager.netapp.models.NetAppResourceRegionInfos; +import com.azure.resourcemanager.netapp.models.RegionInfoResource; + +public final class NetAppResourceRegionInfosImpl implements NetAppResourceRegionInfos { + private static final ClientLogger LOGGER = new ClientLogger(NetAppResourceRegionInfosImpl.class); + + private final NetAppResourceRegionInfosClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public NetAppResourceRegionInfosImpl(NetAppResourceRegionInfosClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String location) { + PagedIterable inner = this.serviceClient().list(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RegionInfoResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String location, Context context) { + PagedIterable inner = this.serviceClient().list(location, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RegionInfoResourceImpl(inner1, this.manager())); + } + + public Response getWithResponse(String location, Context context) { + Response inner = this.serviceClient().getWithResponse(location, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RegionInfoResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RegionInfoResource get(String location) { + RegionInfoResourceInner inner = this.serviceClient().get(location); + if (inner != null) { + return new RegionInfoResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + private NetAppResourceRegionInfosClient serviceClient() { + return this.innerClient; + } + + 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/NetAppResourcesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesClientImpl.java index 063a946a636c2..e10f3c074c499 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 @@ -65,8 +65,8 @@ public final class NetAppResourcesClientImpl implements NetAppResourcesClient { } /** - * The interface defining all the services for NetAppManagementClientNetAppResources to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for NetAppManagementClientNetAppResources to be used by the proxy service + * to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "NetAppManagementClie") diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RegionInfoResourceImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RegionInfoResourceImpl.java new file mode 100644 index 0000000000000..75b06404841db --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RegionInfoResourceImpl.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.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner; +import com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem; +import com.azure.resourcemanager.netapp.models.RegionInfoResource; +import com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity; +import java.util.Collections; +import java.util.List; + +public final class RegionInfoResourceImpl implements RegionInfoResource { + private RegionInfoResourceInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + RegionInfoResourceImpl(RegionInfoResourceInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public RegionStorageToNetworkProximity storageToNetworkProximity() { + return this.innerModel().storageToNetworkProximity(); + } + + public List availabilityZoneMappings() { + List inner = this.innerModel().availabilityZoneMappings(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public RegionInfoResourceInner 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/ReplicationImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationImpl.java index a541643c1e0e8..371b33d316972 100644 --- 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 @@ -19,6 +19,10 @@ public final class ReplicationImpl implements Replication { this.serviceManager = serviceManager; } + public String replicationId() { + return this.innerModel().replicationId(); + } + public EndpointType endpointType() { return this.innerModel().endpointType(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ResourceManagerUtils.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ResourceManagerUtils.java index ee1578ed17669..7e5ec6e67acb9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ResourceManagerUtils.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ResourceManagerUtils.java @@ -41,7 +41,6 @@ static String getValueFromIdByName(String id, String name) { } } return null; - } static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { @@ -75,7 +74,6 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } } return null; - } static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotImpl.java index e9b8345645f51..3f3141bb567d5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotImpl.java @@ -90,14 +90,17 @@ public SnapshotImpl withExistingVolume(String resourceGroupName, String accountN } public Snapshot create() { - this.innerObject = serviceManager.serviceClient().getSnapshots().create(resourceGroupName, accountName, - poolName, volumeName, snapshotName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getSnapshots() + .create(resourceGroupName, accountName, poolName, volumeName, snapshotName, this.innerModel(), + Context.NONE); return this; } public Snapshot create(Context context) { - this.innerObject = serviceManager.serviceClient().getSnapshots().create(resourceGroupName, accountName, - poolName, volumeName, snapshotName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getSnapshots() + .create(resourceGroupName, accountName, poolName, volumeName, snapshotName, this.innerModel(), context); return this; } @@ -108,26 +111,29 @@ public Snapshot create(Context context) { } public Snapshot refresh() { - this.innerObject = serviceManager.serviceClient().getSnapshots() + this.innerObject = serviceManager.serviceClient() + .getSnapshots() .getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, Context.NONE) .getValue(); return this; } public Snapshot refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getSnapshots() - .getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getSnapshots() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, context) + .getValue(); return this; } public void restoreFiles(SnapshotRestoreFiles body) { - serviceManager.snapshots().restoreFiles(resourceGroupName, accountName, poolName, volumeName, snapshotName, - body); + serviceManager.snapshots() + .restoreFiles(resourceGroupName, accountName, poolName, volumeName, snapshotName, body); } public void restoreFiles(SnapshotRestoreFiles body, Context context) { - serviceManager.snapshots().restoreFiles(resourceGroupName, accountName, poolName, volumeName, snapshotName, - body, context); + serviceManager.snapshots() + .restoreFiles(resourceGroupName, accountName, poolName, volumeName, snapshotName, body, context); } public SnapshotImpl withRegion(Region location) { 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 a025eaee9a966..c07a1157d430a 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 @@ -114,14 +114,16 @@ public SnapshotPolicyImpl withExistingNetAppAccount(String resourceGroupName, St } public SnapshotPolicy create() { - this.innerObject = serviceManager.serviceClient().getSnapshotPolicies() + this.innerObject = serviceManager.serviceClient() + .getSnapshotPolicies() .createWithResponse(resourceGroupName, accountName, snapshotPolicyName, this.innerModel(), Context.NONE) .getValue(); return this; } public SnapshotPolicy create(Context context) { - this.innerObject = serviceManager.serviceClient().getSnapshotPolicies() + this.innerObject = serviceManager.serviceClient() + .getSnapshotPolicies() .createWithResponse(resourceGroupName, accountName, snapshotPolicyName, this.innerModel(), context) .getValue(); return this; @@ -139,14 +141,16 @@ public SnapshotPolicyImpl update() { } public SnapshotPolicy apply() { - this.innerObject = serviceManager.serviceClient().getSnapshotPolicies().update(resourceGroupName, accountName, - snapshotPolicyName, updateBody, Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getSnapshotPolicies() + .update(resourceGroupName, accountName, snapshotPolicyName, updateBody, Context.NONE); return this; } public SnapshotPolicy apply(Context context) { - this.innerObject = serviceManager.serviceClient().getSnapshotPolicies().update(resourceGroupName, accountName, - snapshotPolicyName, updateBody, context); + this.innerObject = serviceManager.serviceClient() + .getSnapshotPolicies() + .update(resourceGroupName, accountName, snapshotPolicyName, updateBody, context); return this; } @@ -160,14 +164,18 @@ public SnapshotPolicy apply(Context context) { } public SnapshotPolicy refresh() { - this.innerObject = serviceManager.serviceClient().getSnapshotPolicies() - .getWithResponse(resourceGroupName, accountName, snapshotPolicyName, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getSnapshotPolicies() + .getWithResponse(resourceGroupName, accountName, snapshotPolicyName, Context.NONE) + .getValue(); return this; } public SnapshotPolicy refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getSnapshotPolicies() - .getWithResponse(resourceGroupName, accountName, snapshotPolicyName, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getSnapshotPolicies() + .getWithResponse(resourceGroupName, accountName, snapshotPolicyName, context) + .getValue(); return this; } 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 9a6933c57e2ab..1c89cacfea377 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 @@ -740,7 +740,8 @@ private Mono createAsync(String resourceGroupName, String account private Mono createAsync(String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName, SnapshotInner body, Context context) { return beginCreateAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body, context) - .last().flatMap(this.client::getLroFinalResultOrError); + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1038,7 +1039,8 @@ private Mono updateAsync(String resourceGroupName, String account private Mono updateAsync(String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName, Object body, Context context) { return beginUpdateAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body, context) - .last().flatMap(this.client::getLroFinalResultOrError); + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1621,7 +1623,8 @@ private Mono restoreFilesAsync(String resourceGroupName, String accountNam private Mono restoreFilesAsync(String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName, SnapshotRestoreFiles body, Context context) { return beginRestoreFilesAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body, context) - .last().flatMap(this.client::getLroFinalResultOrError); + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** 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 1de9c3795758a..63b730ed62152 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 @@ -44,8 +44,8 @@ public PagedIterable list(String resourceGroupName, String accountName public Response getWithResponse(String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName, Context context) { - Response inner = this.serviceClient().getWithResponse(resourceGroupName, accountName, poolName, - volumeName, snapshotName, context); + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SnapshotImpl(inner.getValue(), this.manager())); @@ -78,8 +78,8 @@ public Snapshot update(String resourceGroupName, String accountName, String pool public Snapshot update(String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName, Object body, Context context) { - SnapshotInner inner = this.serviceClient().update(resourceGroupName, accountName, poolName, volumeName, - snapshotName, body, context); + SnapshotInner inner = this.serviceClient() + .update(resourceGroupName, accountName, poolName, volumeName, snapshotName, body, context); if (inner != null) { return new SnapshotImpl(inner, this.manager()); } else { @@ -104,8 +104,8 @@ public void restoreFiles(String resourceGroupName, String accountName, String po public void restoreFiles(String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName, SnapshotRestoreFiles body, Context context) { - this.serviceClient().restoreFiles(resourceGroupName, accountName, poolName, volumeName, snapshotName, body, - context); + this.serviceClient() + .restoreFiles(resourceGroupName, accountName, poolName, volumeName, snapshotName, body, context); } public Snapshot getById(String id) { 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 e0f3f45c2165c..d686b73f0bb76 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 @@ -82,14 +82,17 @@ public SubvolumeInfoImpl withExistingVolume(String resourceGroupName, String acc } public SubvolumeInfo create() { - this.innerObject = serviceManager.serviceClient().getSubvolumes().create(resourceGroupName, accountName, - poolName, volumeName, subvolumeName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getSubvolumes() + .create(resourceGroupName, accountName, poolName, volumeName, subvolumeName, this.innerModel(), + Context.NONE); return this; } public SubvolumeInfo create(Context context) { - this.innerObject = serviceManager.serviceClient().getSubvolumes().create(resourceGroupName, accountName, - poolName, volumeName, subvolumeName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getSubvolumes() + .create(resourceGroupName, accountName, poolName, volumeName, subvolumeName, this.innerModel(), context); return this; } @@ -105,14 +108,16 @@ public SubvolumeInfoImpl update() { } public SubvolumeInfo apply() { - this.innerObject = serviceManager.serviceClient().getSubvolumes().update(resourceGroupName, accountName, - poolName, volumeName, subvolumeName, updateBody, Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getSubvolumes() + .update(resourceGroupName, accountName, poolName, volumeName, subvolumeName, updateBody, Context.NONE); return this; } public SubvolumeInfo apply(Context context) { - this.innerObject = serviceManager.serviceClient().getSubvolumes().update(resourceGroupName, accountName, - poolName, volumeName, subvolumeName, updateBody, context); + this.innerObject = serviceManager.serviceClient() + .getSubvolumes() + .update(resourceGroupName, accountName, poolName, volumeName, subvolumeName, updateBody, context); return this; } @@ -128,26 +133,29 @@ public SubvolumeInfo apply(Context context) { } public SubvolumeInfo refresh() { - this.innerObject = serviceManager.serviceClient().getSubvolumes() + this.innerObject = serviceManager.serviceClient() + .getSubvolumes() .getWithResponse(resourceGroupName, accountName, poolName, volumeName, subvolumeName, Context.NONE) .getValue(); return this; } public SubvolumeInfo refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getSubvolumes() - .getWithResponse(resourceGroupName, accountName, poolName, volumeName, subvolumeName, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getSubvolumes() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, subvolumeName, context) + .getValue(); return this; } public SubvolumeModel getMetadata() { - return serviceManager.subvolumes().getMetadata(resourceGroupName, accountName, poolName, volumeName, - subvolumeName); + return serviceManager.subvolumes() + .getMetadata(resourceGroupName, accountName, poolName, volumeName, subvolumeName); } public SubvolumeModel getMetadata(Context context) { - return serviceManager.subvolumes().getMetadata(resourceGroupName, accountName, poolName, volumeName, - subvolumeName, context); + return serviceManager.subvolumes() + .getMetadata(resourceGroupName, accountName, poolName, volumeName, subvolumeName, context); } public SubvolumeInfoImpl withPath(String path) { 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 b346b9d8b2bb1..1f8d43783661b 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 @@ -751,7 +751,8 @@ private Mono createAsync(String resourceGroupName, String ac private Mono createAsync(String resourceGroupName, String accountName, String poolName, String volumeName, String subvolumeName, SubvolumeInfoInner body, Context context) { return beginCreateAsync(resourceGroupName, accountName, poolName, volumeName, subvolumeName, body, context) - .last().flatMap(this.client::getLroFinalResultOrError); + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1055,7 +1056,8 @@ private Mono updateAsync(String resourceGroupName, String ac private Mono updateAsync(String resourceGroupName, String accountName, String poolName, String volumeName, String subvolumeName, SubvolumePatchRequest body, Context context) { return beginUpdateAsync(resourceGroupName, accountName, poolName, volumeName, subvolumeName, body, context) - .last().flatMap(this.client::getLroFinalResultOrError); + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1620,7 +1622,8 @@ private Mono getMetadataAsync(String resourceGroupName, Str private Mono getMetadataAsync(String resourceGroupName, String accountName, String poolName, String volumeName, String subvolumeName, Context context) { return beginGetMetadataAsync(resourceGroupName, accountName, poolName, volumeName, subvolumeName, context) - .last().flatMap(this.client::getLroFinalResultOrError); + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** 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 bf88658f1e6de..cca6c8a7360be 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 @@ -45,8 +45,8 @@ public PagedIterable listByVolume(String resourceGroupName, Strin public Response getWithResponse(String resourceGroupName, String accountName, String poolName, String volumeName, String subvolumeName, Context context) { - Response inner = this.serviceClient().getWithResponse(resourceGroupName, accountName, - poolName, volumeName, subvolumeName, context); + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, subvolumeName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SubvolumeInfoImpl(inner.getValue(), this.manager())); @@ -89,8 +89,8 @@ public SubvolumeModel getMetadata(String resourceGroupName, String accountName, public SubvolumeModel getMetadata(String resourceGroupName, String accountName, String poolName, String volumeName, String subvolumeName, Context context) { - SubvolumeModelInner inner = this.serviceClient().getMetadata(resourceGroupName, accountName, poolName, - volumeName, subvolumeName, context); + SubvolumeModelInner inner = this.serviceClient() + .getMetadata(resourceGroupName, accountName, poolName, volumeName, subvolumeName, context); if (inner != null) { return new SubvolumeModelImpl(inner, this.manager()); } else { diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SvmPeerCommandResponseImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SvmPeerCommandResponseImpl.java new file mode 100644 index 0000000000000..84032e28c012d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SvmPeerCommandResponseImpl.java @@ -0,0 +1,32 @@ +// 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.SvmPeerCommandResponseInner; +import com.azure.resourcemanager.netapp.models.SvmPeerCommandResponse; + +public final class SvmPeerCommandResponseImpl implements SvmPeerCommandResponse { + private SvmPeerCommandResponseInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + SvmPeerCommandResponseImpl(SvmPeerCommandResponseInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String svmPeeringCommand() { + return this.innerModel().svmPeeringCommand(); + } + + public SvmPeerCommandResponseInner 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/VolumeGroupDetailsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupDetailsImpl.java index fd96ea6e02089..a5288a88c97f1 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 @@ -86,14 +86,16 @@ public VolumeGroupDetailsImpl withExistingNetAppAccount(String resourceGroupName } public VolumeGroupDetails create() { - this.innerObject = serviceManager.serviceClient().getVolumeGroups().create(resourceGroupName, accountName, - volumeGroupName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getVolumeGroups() + .create(resourceGroupName, accountName, volumeGroupName, this.innerModel(), Context.NONE); return this; } public VolumeGroupDetails create(Context context) { - this.innerObject = serviceManager.serviceClient().getVolumeGroups().create(resourceGroupName, accountName, - volumeGroupName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getVolumeGroups() + .create(resourceGroupName, accountName, volumeGroupName, this.innerModel(), context); return this; } @@ -104,14 +106,18 @@ public VolumeGroupDetails create(Context context) { } public VolumeGroupDetails refresh() { - this.innerObject = serviceManager.serviceClient().getVolumeGroups() - .getWithResponse(resourceGroupName, accountName, volumeGroupName, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getVolumeGroups() + .getWithResponse(resourceGroupName, accountName, volumeGroupName, Context.NONE) + .getValue(); return this; } public VolumeGroupDetails refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getVolumeGroups() - .getWithResponse(resourceGroupName, accountName, volumeGroupName, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getVolumeGroups() + .getWithResponse(resourceGroupName, accountName, volumeGroupName, context) + .getValue(); return this; } 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 93dd5c63a1b9f..b0d8190a32d34 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 @@ -65,8 +65,8 @@ public final class VolumeGroupsClientImpl implements VolumeGroupsClient { } /** - * The interface defining all the services for NetAppManagementClientVolumeGroups to be used by the proxy service - * to perform REST calls. + * The interface defining all the services for NetAppManagementClientVolumeGroups to be used by the proxy service to + * perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "NetAppManagementClie") 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 febbb86c09383..61fbfc0c170da 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 @@ -10,10 +10,12 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.netapp.fluent.models.MountTargetProperties; import com.azure.resourcemanager.netapp.fluent.models.VolumeInner; +import com.azure.resourcemanager.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit; import com.azure.resourcemanager.netapp.models.AuthorizeRequest; import com.azure.resourcemanager.netapp.models.AvsDataStore; import com.azure.resourcemanager.netapp.models.BreakFileLocksRequest; import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; +import com.azure.resourcemanager.netapp.models.ClusterPeerCommandResponse; import com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy; import com.azure.resourcemanager.netapp.models.EnableSubvolumes; import com.azure.resourcemanager.netapp.models.EncryptionKeySource; @@ -21,6 +23,7 @@ import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest; import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserResponse; import com.azure.resourcemanager.netapp.models.NetworkFeatures; +import com.azure.resourcemanager.netapp.models.PeerClusterForVolumeMigrationRequest; import com.azure.resourcemanager.netapp.models.PlacementKeyValuePairs; import com.azure.resourcemanager.netapp.models.PoolChangeRequest; import com.azure.resourcemanager.netapp.models.ReestablishReplicationRequest; @@ -30,7 +33,9 @@ import com.azure.resourcemanager.netapp.models.ServiceLevel; import com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration; import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; +import com.azure.resourcemanager.netapp.models.SvmPeerCommandResponse; import com.azure.resourcemanager.netapp.models.Volume; +import com.azure.resourcemanager.netapp.models.VolumeLanguage; import com.azure.resourcemanager.netapp.models.VolumePatch; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy; @@ -171,6 +176,10 @@ public VolumePropertiesDataProtection dataProtection() { return this.innerModel().dataProtection(); } + public AcceptGrowCapacityPoolForShortTermCloneSplit acceptGrowCapacityPoolForShortTermCloneSplit() { + return this.innerModel().acceptGrowCapacityPoolForShortTermCloneSplit(); + } + public Boolean isRestoring() { return this.innerModel().isRestoring(); } @@ -325,6 +334,14 @@ public String originatingResourceId() { return this.innerModel().originatingResourceId(); } + public Long inheritedSizeInBytes() { + return this.innerModel().inheritedSizeInBytes(); + } + + public VolumeLanguage language() { + return this.innerModel().language(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -363,14 +380,16 @@ public VolumeImpl withExistingCapacityPool(String resourceGroupName, String acco } public Volume create() { - this.innerObject = serviceManager.serviceClient().getVolumes().createOrUpdate(resourceGroupName, accountName, - poolName, volumeName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getVolumes() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, this.innerModel(), Context.NONE); return this; } public Volume create(Context context) { - this.innerObject = serviceManager.serviceClient().getVolumes().createOrUpdate(resourceGroupName, accountName, - poolName, volumeName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getVolumes() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, this.innerModel(), context); return this; } @@ -386,14 +405,16 @@ public VolumeImpl update() { } public Volume apply() { - this.innerObject = serviceManager.serviceClient().getVolumes().update(resourceGroupName, accountName, poolName, - volumeName, updateBody, Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getVolumes() + .update(resourceGroupName, accountName, poolName, volumeName, updateBody, Context.NONE); return this; } public Volume apply(Context context) { - this.innerObject = serviceManager.serviceClient().getVolumes().update(resourceGroupName, accountName, poolName, - volumeName, updateBody, context); + this.innerObject = serviceManager.serviceClient() + .getVolumes() + .update(resourceGroupName, accountName, poolName, volumeName, updateBody, context); return this; } @@ -407,14 +428,18 @@ public Volume apply(Context context) { } public Volume refresh() { - this.innerObject = serviceManager.serviceClient().getVolumes() - .getWithResponse(resourceGroupName, accountName, poolName, volumeName, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getVolumes() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, Context.NONE) + .getValue(); return this; } public Volume refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getVolumes() - .getWithResponse(resourceGroupName, accountName, poolName, volumeName, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getVolumes() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, context) + .getValue(); return this; } @@ -423,8 +448,8 @@ public Volume populateAvailabilityZone() { } public Volume populateAvailabilityZone(Context context) { - return serviceManager.volumes().populateAvailabilityZone(resourceGroupName, accountName, poolName, volumeName, - context); + return serviceManager.volumes() + .populateAvailabilityZone(resourceGroupName, accountName, poolName, volumeName, context); } public void revert(VolumeRevert body) { @@ -443,6 +468,14 @@ public void resetCifsPassword(Context context) { serviceManager.volumes().resetCifsPassword(resourceGroupName, accountName, poolName, volumeName, context); } + public void splitCloneFromParent() { + serviceManager.volumes().splitCloneFromParent(resourceGroupName, accountName, poolName, volumeName); + } + + public void splitCloneFromParent(Context context) { + serviceManager.volumes().splitCloneFromParent(resourceGroupName, accountName, poolName, volumeName, context); + } + public void breakFileLocks() { serviceManager.volumes().breakFileLocks(resourceGroupName, accountName, poolName, volumeName); } @@ -452,14 +485,14 @@ public void breakFileLocks(BreakFileLocksRequest body, Context context) { } public GetGroupIdListForLdapUserResponse listGetGroupIdListForLdapUser(GetGroupIdListForLdapUserRequest body) { - return serviceManager.volumes().listGetGroupIdListForLdapUser(resourceGroupName, accountName, poolName, - volumeName, body); + return serviceManager.volumes() + .listGetGroupIdListForLdapUser(resourceGroupName, accountName, poolName, volumeName, body); } public GetGroupIdListForLdapUserResponse listGetGroupIdListForLdapUser(GetGroupIdListForLdapUserRequest body, Context context) { - return serviceManager.volumes().listGetGroupIdListForLdapUser(resourceGroupName, accountName, poolName, - volumeName, body, context); + return serviceManager.volumes() + .listGetGroupIdListForLdapUser(resourceGroupName, accountName, poolName, volumeName, body, context); } public void breakReplication() { @@ -475,8 +508,8 @@ public void reestablishReplication(ReestablishReplicationRequest body) { } public void reestablishReplication(ReestablishReplicationRequest body, Context context) { - serviceManager.volumes().reestablishReplication(resourceGroupName, accountName, poolName, volumeName, body, - context); + serviceManager.volumes() + .reestablishReplication(resourceGroupName, accountName, poolName, volumeName, body, context); } public PagedIterable listReplications() { @@ -508,8 +541,8 @@ public void authorizeReplication(AuthorizeRequest body) { } public void authorizeReplication(AuthorizeRequest body, Context context) { - serviceManager.volumes().authorizeReplication(resourceGroupName, accountName, poolName, volumeName, body, - context); + serviceManager.volumes() + .authorizeReplication(resourceGroupName, accountName, poolName, volumeName, body, context); } public void reInitializeReplication() { @@ -520,6 +553,44 @@ public void reInitializeReplication(Context context) { serviceManager.volumes().reInitializeReplication(resourceGroupName, accountName, poolName, volumeName, context); } + public ClusterPeerCommandResponse peerClusterForOnPremMigration(PeerClusterForVolumeMigrationRequest body) { + return serviceManager.volumes() + .peerClusterForOnPremMigration(resourceGroupName, accountName, poolName, volumeName, body); + } + + public ClusterPeerCommandResponse peerClusterForOnPremMigration(PeerClusterForVolumeMigrationRequest body, + Context context) { + return serviceManager.volumes() + .peerClusterForOnPremMigration(resourceGroupName, accountName, poolName, volumeName, body, context); + } + + public SvmPeerCommandResponse createOnPremMigrationReplication() { + return serviceManager.volumes() + .createOnPremMigrationReplication(resourceGroupName, accountName, poolName, volumeName); + } + + public SvmPeerCommandResponse createOnPremMigrationReplication(Context context) { + return serviceManager.volumes() + .createOnPremMigrationReplication(resourceGroupName, accountName, poolName, volumeName, context); + } + + public void finalizeOnPremMigration() { + serviceManager.volumes().finalizeOnPremMigration(resourceGroupName, accountName, poolName, volumeName); + } + + public void finalizeOnPremMigration(Context context) { + serviceManager.volumes().finalizeOnPremMigration(resourceGroupName, accountName, poolName, volumeName, context); + } + + public void performReplicationTransfer() { + serviceManager.volumes().performReplicationTransfer(resourceGroupName, accountName, poolName, volumeName); + } + + public void performReplicationTransfer(Context context) { + serviceManager.volumes() + .performReplicationTransfer(resourceGroupName, accountName, poolName, volumeName, context); + } + public void poolChange(PoolChangeRequest body) { serviceManager.volumes().poolChange(resourceGroupName, accountName, poolName, volumeName, body); } @@ -642,6 +713,13 @@ public VolumeImpl withDataProtection(VolumePropertiesDataProtection dataProtecti return this; } + public VolumeImpl withAcceptGrowCapacityPoolForShortTermCloneSplit( + AcceptGrowCapacityPoolForShortTermCloneSplit acceptGrowCapacityPoolForShortTermCloneSplit) { + this.innerModel() + .withAcceptGrowCapacityPoolForShortTermCloneSplit(acceptGrowCapacityPoolForShortTermCloneSplit); + return this; + } + public VolumeImpl withIsRestoring(Boolean isRestoring) { this.innerModel().withIsRestoring(isRestoring); return this; @@ -827,6 +905,11 @@ public VolumeImpl withIsLargeVolume(Boolean isLargeVolume) { return this; } + public VolumeImpl withLanguage(VolumeLanguage language) { + this.innerModel().withLanguage(language); + return this; + } + public VolumeImpl withUsageThreshold(Long usageThreshold) { this.updateBody.withUsageThreshold(usageThreshold); 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 index 3d531824cd660..3a3cb09be8eff 100644 --- 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 @@ -107,14 +107,18 @@ public VolumeQuotaRuleImpl withExistingVolume(String resourceGroupName, String a } public VolumeQuotaRule create() { - this.innerObject = serviceManager.serviceClient().getVolumeQuotaRules().create(resourceGroupName, accountName, - poolName, volumeName, volumeQuotaRuleName, this.innerModel(), Context.NONE); + 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); + this.innerObject = serviceManager.serviceClient() + .getVolumeQuotaRules() + .create(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, this.innerModel(), + context); return this; } @@ -130,14 +134,17 @@ public VolumeQuotaRuleImpl update() { } public VolumeQuotaRule apply() { - this.innerObject = serviceManager.serviceClient().getVolumeQuotaRules().update(resourceGroupName, accountName, - poolName, volumeName, volumeQuotaRuleName, updateBody, Context.NONE); + 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); + this.innerObject = serviceManager.serviceClient() + .getVolumeQuotaRules() + .update(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, updateBody, context); return this; } @@ -153,14 +160,16 @@ public VolumeQuotaRule apply(Context context) { } public VolumeQuotaRule refresh() { - this.innerObject = serviceManager.serviceClient().getVolumeQuotaRules() + 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() + this.innerObject = serviceManager.serviceClient() + .getVolumeQuotaRules() .getWithResponse(resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, context) .getValue(); return this; 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 index 124f5cd8793dc..6d2886a458eda 100644 --- 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 @@ -1331,7 +1331,8 @@ private Mono deleteAsync(String resourceGroupName, String accountName, Str 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); + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** 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 index 41570c7d99a48..3d94a162d297f 100644 --- 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 @@ -43,8 +43,8 @@ public PagedIterable listByVolume(String resourceGroupName, Str 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); + 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())); 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 4713305302b15..7ddbb17ce5d2b 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 @@ -34,15 +34,18 @@ 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.ClusterPeerCommandResponseInner; import com.azure.resourcemanager.netapp.fluent.models.GetGroupIdListForLdapUserResponseInner; import com.azure.resourcemanager.netapp.fluent.models.ReplicationInner; import com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner; +import com.azure.resourcemanager.netapp.fluent.models.SvmPeerCommandResponseInner; import com.azure.resourcemanager.netapp.fluent.models.VolumeInner; import com.azure.resourcemanager.netapp.models.AuthorizeRequest; import com.azure.resourcemanager.netapp.models.BreakFileLocksRequest; import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest; import com.azure.resourcemanager.netapp.models.ListReplications; +import com.azure.resourcemanager.netapp.models.PeerClusterForVolumeMigrationRequest; import com.azure.resourcemanager.netapp.models.PoolChangeRequest; import com.azure.resourcemanager.netapp.models.ReestablishReplicationRequest; import com.azure.resourcemanager.netapp.models.RelocateVolumeRequest; @@ -168,6 +171,16 @@ Mono>> resetCifsPassword(@HostParam("$host") String en @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, @QueryParam("api-version") String apiVersion, @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}/splitCloneFromParent") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> splitCloneFromParent(@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" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/breakFileLocks") @ExpectedResponses({ 200, 202 }) @@ -275,6 +288,48 @@ Mono>> reInitializeReplication(@HostParam("$host") Str @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, @QueryParam("api-version") String apiVersion, @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}/peerClusterForOnPremMigration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> peerClusterForOnPremMigration(@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, + @BodyParam("application/json") PeerClusterForVolumeMigrationRequest body, + @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}/createOnPremMigrationReplication") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOnPremMigrationReplication(@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" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/finalizeOnPremMigration") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> finalizeOnPremMigration(@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" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/performReplicationTransfer") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> performReplicationTransfer(@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" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/poolChange") @ExpectedResponses({ 200, 202 }) @@ -2349,23 +2404,22 @@ public void resetCifsPassword(String resourceGroupName, String accountName, Stri } /** - * Break file locks + * Split clone from parent volume * - * Break all the file locks on a volume. + * Split operation to convert clone volume to an independent volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 provide the ability to clear file locks with selected options. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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>> breakFileLocksWithResponseAsync(String resourceGroupName, - String accountName, String poolName, String volumeName, BreakFileLocksRequest body) { + private Mono>> splitCloneFromParentWithResponseAsync(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.")); @@ -2387,27 +2441,23 @@ private Mono>> breakFileLocksWithResponseAsync(String if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); } - if (body != null) { - body.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.breakFileLocks(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, - context)) + .withContext( + context -> service.splitCloneFromParent(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())); } /** - * Break file locks + * Split clone from parent volume * - * Break all the file locks on a volume. + * Split operation to convert clone volume to an independent volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 provide the ability to clear file locks with selected options. * @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. @@ -2415,8 +2465,8 @@ private Mono>> breakFileLocksWithResponseAsync(String * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> breakFileLocksWithResponseAsync(String resourceGroupName, - String accountName, String poolName, String volumeName, BreakFileLocksRequest body, Context context) { + private Mono>> splitCloneFromParentWithResponseAsync(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.")); @@ -2438,43 +2488,16 @@ private Mono>> breakFileLocksWithResponseAsync(String if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); } - if (body != null) { - body.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.breakFileLocks(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Break file locks - * - * Break all the file locks on a volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 provide the ability to clear file locks with selected options. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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> beginBreakFileLocksAsync(String resourceGroupName, String accountName, - String poolName, String volumeName, BreakFileLocksRequest body) { - Mono>> mono - = breakFileLocksWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + return service.splitCloneFromParent(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), accept, context); } /** - * Break file locks + * Split clone from parent volume * - * Break all the file locks on a volume. + * Split operation to convert clone volume to an independent volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -2486,25 +2509,23 @@ private PollerFlux, Void> beginBreakFileLocksAsync(String resou * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginBreakFileLocksAsync(String resourceGroupName, String accountName, - String poolName, String volumeName) { - final BreakFileLocksRequest body = null; + private PollerFlux, Void> beginSplitCloneFromParentAsync(String resourceGroupName, + String accountName, String poolName, String volumeName) { Mono>> mono - = breakFileLocksWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); + = splitCloneFromParentWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Break file locks + * Split clone from parent volume * - * Break all the file locks on a volume. + * Split operation to convert clone volume to an independent volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 provide the ability to clear file locks with selected options. * @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. @@ -2512,19 +2533,19 @@ private PollerFlux, Void> beginBreakFileLocksAsync(String resou * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginBreakFileLocksAsync(String resourceGroupName, String accountName, - String poolName, String volumeName, BreakFileLocksRequest body, Context context) { + private PollerFlux, Void> beginSplitCloneFromParentAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, Context context) { context = this.client.mergeContext(context); Mono>> mono - = breakFileLocksWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body, context); + = splitCloneFromParentWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Break file locks + * Split clone from parent volume * - * Break all the file locks on a volume. + * Split operation to convert clone volume to an independent volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -2536,23 +2557,21 @@ private PollerFlux, Void> beginBreakFileLocksAsync(String resou * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginBreakFileLocks(String resourceGroupName, String accountName, + public SyncPoller, Void> beginSplitCloneFromParent(String resourceGroupName, String accountName, String poolName, String volumeName) { - final BreakFileLocksRequest body = null; - return this.beginBreakFileLocksAsync(resourceGroupName, accountName, poolName, volumeName, body) + return this.beginSplitCloneFromParentAsync(resourceGroupName, accountName, poolName, volumeName) .getSyncPoller(); } /** - * Break file locks + * Split clone from parent volume * - * Break all the file locks on a volume. + * Split operation to convert clone volume to an independent volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 provide the ability to clear file locks with selected options. * @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. @@ -2560,38 +2579,16 @@ public SyncPoller, Void> beginBreakFileLocks(String resourceGro * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginBreakFileLocks(String resourceGroupName, String accountName, - String poolName, String volumeName, BreakFileLocksRequest body, Context context) { - return this.beginBreakFileLocksAsync(resourceGroupName, accountName, poolName, volumeName, body, context) + public SyncPoller, Void> beginSplitCloneFromParent(String resourceGroupName, String accountName, + String poolName, String volumeName, Context context) { + return this.beginSplitCloneFromParentAsync(resourceGroupName, accountName, poolName, volumeName, context) .getSyncPoller(); } /** - * Break file locks - * - * Break all the file locks on a volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 provide the ability to clear file locks with selected options. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 breakFileLocksAsync(String resourceGroupName, String accountName, String poolName, - String volumeName, BreakFileLocksRequest body) { - return beginBreakFileLocksAsync(resourceGroupName, accountName, poolName, volumeName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Break file locks + * Split clone from parent volume * - * Break all the file locks on a volume. + * Split operation to convert clone volume to an independent volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -2603,23 +2600,21 @@ private Mono breakFileLocksAsync(String resourceGroupName, String accountN * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono breakFileLocksAsync(String resourceGroupName, String accountName, String poolName, + private Mono splitCloneFromParentAsync(String resourceGroupName, String accountName, String poolName, String volumeName) { - final BreakFileLocksRequest body = null; - return beginBreakFileLocksAsync(resourceGroupName, accountName, poolName, volumeName, body).last() + return beginSplitCloneFromParentAsync(resourceGroupName, accountName, poolName, volumeName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Break file locks + * Split clone from parent volume * - * Break all the file locks on a volume. + * Split operation to convert clone volume to an independent volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 provide the ability to clear file locks with selected options. * @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. @@ -2627,16 +2622,16 @@ private Mono breakFileLocksAsync(String resourceGroupName, String accountN * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono breakFileLocksAsync(String resourceGroupName, String accountName, String poolName, - String volumeName, BreakFileLocksRequest body, Context context) { - return beginBreakFileLocksAsync(resourceGroupName, accountName, poolName, volumeName, body, context).last() + private Mono splitCloneFromParentAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + return beginSplitCloneFromParentAsync(resourceGroupName, accountName, poolName, volumeName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Break file locks + * Split clone from parent volume * - * Break all the file locks on a volume. + * Split operation to convert clone volume to an independent volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -2647,50 +2642,48 @@ private Mono breakFileLocksAsync(String resourceGroupName, String accountN * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void breakFileLocks(String resourceGroupName, String accountName, String poolName, String volumeName) { - final BreakFileLocksRequest body = null; - breakFileLocksAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); + public void splitCloneFromParent(String resourceGroupName, String accountName, String poolName, String volumeName) { + splitCloneFromParentAsync(resourceGroupName, accountName, poolName, volumeName).block(); } /** - * Break file locks + * Split clone from parent volume * - * Break all the file locks on a volume. + * Split operation to convert clone volume to an independent volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 provide the ability to clear file locks with selected options. * @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 breakFileLocks(String resourceGroupName, String accountName, String poolName, String volumeName, - BreakFileLocksRequest body, Context context) { - breakFileLocksAsync(resourceGroupName, accountName, poolName, volumeName, body, context).block(); + public void splitCloneFromParent(String resourceGroupName, String accountName, String poolName, String volumeName, + Context context) { + splitCloneFromParentAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); } /** - * Get Group Id List for LDAP User + * Break file locks * - * Returns the list of group Ids for a specific LDAP User. + * Break all the file locks on a volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Returns group Id list for a specific LDAP user. + * @param body Optional body to provide the ability to clear file locks with selected options. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 group Id list for Ldap user 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>> listGetGroupIdListForLdapUserWithResponseAsync(String resourceGroupName, - String accountName, String poolName, String volumeName, GetGroupIdListForLdapUserRequest body) { + private Mono>> breakFileLocksWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, BreakFileLocksRequest body) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2712,39 +2705,36 @@ private Mono>> listGetGroupIdListForLdapUserWithRespon 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 { + if (body != null) { body.validate(); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listGetGroupIdListForLdapUser(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, - this.client.getApiVersion(), body, accept, context)) + .withContext(context -> service.breakFileLocks(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get Group Id List for LDAP User + * Break file locks * - * Returns the list of group Ids for a specific LDAP User. + * Break all the file locks on a volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Returns group Id list for a specific LDAP user. + * @param body Optional body to provide the ability to clear file locks with selected options. * @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 group Id list for Ldap user 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>> listGetGroupIdListForLdapUserWithResponseAsync(String resourceGroupName, - String accountName, String poolName, String volumeName, GetGroupIdListForLdapUserRequest body, - Context context) { + private Mono>> breakFileLocksWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, BreakFileLocksRequest body, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2766,227 +2756,259 @@ private Mono>> listGetGroupIdListForLdapUserWithRespon 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 { + if (body != null) { body.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listGetGroupIdListForLdapUser(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, context); + return service.breakFileLocks(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, context); } /** - * Get Group Id List for LDAP User + * Break file locks * - * Returns the list of group Ids for a specific LDAP User. + * Break all the file locks on a volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Returns group Id list for a specific LDAP user. + * @param body Optional body to provide the ability to clear file locks with selected options. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 group Id list for Ldap user. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, GetGroupIdListForLdapUserResponseInner> - beginListGetGroupIdListForLdapUserAsync(String resourceGroupName, String accountName, String poolName, - String volumeName, GetGroupIdListForLdapUserRequest body) { - Mono>> mono = listGetGroupIdListForLdapUserWithResponseAsync(resourceGroupName, - accountName, poolName, volumeName, body); - return this.client.getLroResult( - mono, this.client.getHttpPipeline(), GetGroupIdListForLdapUserResponseInner.class, - GetGroupIdListForLdapUserResponseInner.class, this.client.getContext()); + private PollerFlux, Void> beginBreakFileLocksAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, BreakFileLocksRequest body) { + Mono>> mono + = breakFileLocksWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Get Group Id List for LDAP User + * Break file locks * - * Returns the list of group Ids for a specific LDAP User. + * Break all the file locks on a volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Returns group Id list for a specific LDAP user. - * @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 group Id list for Ldap user. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, GetGroupIdListForLdapUserResponseInner> - beginListGetGroupIdListForLdapUserAsync(String resourceGroupName, String accountName, String poolName, - String volumeName, GetGroupIdListForLdapUserRequest body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = listGetGroupIdListForLdapUserWithResponseAsync(resourceGroupName, - accountName, poolName, volumeName, body, context); - return this.client.getLroResult( - mono, this.client.getHttpPipeline(), GetGroupIdListForLdapUserResponseInner.class, - GetGroupIdListForLdapUserResponseInner.class, context); + private PollerFlux, Void> beginBreakFileLocksAsync(String resourceGroupName, String accountName, + String poolName, String volumeName) { + final BreakFileLocksRequest body = null; + Mono>> mono + = breakFileLocksWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Get Group Id List for LDAP User + * Break file locks * - * Returns the list of group Ids for a specific LDAP User. + * Break all the file locks on a volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Returns group Id list for a specific LDAP user. + * @param body Optional body to provide the ability to clear file locks with selected options. + * @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 group Id list for Ldap user. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, GetGroupIdListForLdapUserResponseInner> - beginListGetGroupIdListForLdapUser(String resourceGroupName, String accountName, String poolName, - String volumeName, GetGroupIdListForLdapUserRequest body) { - return this.beginListGetGroupIdListForLdapUserAsync(resourceGroupName, accountName, poolName, volumeName, body) + private PollerFlux, Void> beginBreakFileLocksAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, BreakFileLocksRequest body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = breakFileLocksWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Break file locks + * + * Break all the file locks on a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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> beginBreakFileLocks(String resourceGroupName, String accountName, + String poolName, String volumeName) { + final BreakFileLocksRequest body = null; + return this.beginBreakFileLocksAsync(resourceGroupName, accountName, poolName, volumeName, body) .getSyncPoller(); } /** - * Get Group Id List for LDAP User + * Break file locks * - * Returns the list of group Ids for a specific LDAP User. + * Break all the file locks on a volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Returns group Id list for a specific LDAP user. + * @param body Optional body to provide the ability to clear file locks with selected options. * @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 group Id list for Ldap user. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, GetGroupIdListForLdapUserResponseInner> - beginListGetGroupIdListForLdapUser(String resourceGroupName, String accountName, String poolName, - String volumeName, GetGroupIdListForLdapUserRequest body, Context context) { - return this.beginListGetGroupIdListForLdapUserAsync(resourceGroupName, accountName, poolName, volumeName, body, - context).getSyncPoller(); + public SyncPoller, Void> beginBreakFileLocks(String resourceGroupName, String accountName, + String poolName, String volumeName, BreakFileLocksRequest body, Context context) { + return this.beginBreakFileLocksAsync(resourceGroupName, accountName, poolName, volumeName, body, context) + .getSyncPoller(); } /** - * Get Group Id List for LDAP User + * Break file locks * - * Returns the list of group Ids for a specific LDAP User. + * Break all the file locks on a volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Returns group Id list for a specific LDAP user. + * @param body Optional body to provide the ability to clear file locks with selected options. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 group Id list for Ldap user on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listGetGroupIdListForLdapUserAsync(String resourceGroupName, - String accountName, String poolName, String volumeName, GetGroupIdListForLdapUserRequest body) { - return beginListGetGroupIdListForLdapUserAsync(resourceGroupName, accountName, poolName, volumeName, body) - .last().flatMap(this.client::getLroFinalResultOrError); + private Mono breakFileLocksAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, BreakFileLocksRequest body) { + return beginBreakFileLocksAsync(resourceGroupName, accountName, poolName, volumeName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get Group Id List for LDAP User + * Break file locks * - * Returns the list of group Ids for a specific LDAP User. + * Break all the file locks on a volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Returns group Id list for a specific LDAP user. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 breakFileLocksAsync(String resourceGroupName, String accountName, String poolName, + String volumeName) { + final BreakFileLocksRequest body = null; + return beginBreakFileLocksAsync(resourceGroupName, accountName, poolName, volumeName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Break file locks + * + * Break all the file locks on a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 provide the ability to clear file locks with selected options. * @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 group Id list for Ldap user on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listGetGroupIdListForLdapUserAsync(String resourceGroupName, - String accountName, String poolName, String volumeName, GetGroupIdListForLdapUserRequest body, - Context context) { - return beginListGetGroupIdListForLdapUserAsync(resourceGroupName, accountName, poolName, volumeName, body, - context).last().flatMap(this.client::getLroFinalResultOrError); + private Mono breakFileLocksAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, BreakFileLocksRequest body, Context context) { + return beginBreakFileLocksAsync(resourceGroupName, accountName, poolName, volumeName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get Group Id List for LDAP User + * Break file locks * - * Returns the list of group Ids for a specific LDAP User. + * Break all the file locks on a volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Returns group Id list for a specific LDAP user. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 group Id list for Ldap user. */ @ServiceMethod(returns = ReturnType.SINGLE) - public GetGroupIdListForLdapUserResponseInner listGetGroupIdListForLdapUser(String resourceGroupName, - String accountName, String poolName, String volumeName, GetGroupIdListForLdapUserRequest body) { - return listGetGroupIdListForLdapUserAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); + public void breakFileLocks(String resourceGroupName, String accountName, String poolName, String volumeName) { + final BreakFileLocksRequest body = null; + breakFileLocksAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); } /** - * Get Group Id List for LDAP User + * Break file locks * - * Returns the list of group Ids for a specific LDAP User. + * Break all the file locks on a volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Returns group Id list for a specific LDAP user. + * @param body Optional body to provide the ability to clear file locks with selected options. * @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 group Id list for Ldap user. */ @ServiceMethod(returns = ReturnType.SINGLE) - public GetGroupIdListForLdapUserResponseInner listGetGroupIdListForLdapUser(String resourceGroupName, - String accountName, String poolName, String volumeName, GetGroupIdListForLdapUserRequest body, - Context context) { - return listGetGroupIdListForLdapUserAsync(resourceGroupName, accountName, poolName, volumeName, body, context) - .block(); + public void breakFileLocks(String resourceGroupName, String accountName, String poolName, String volumeName, + BreakFileLocksRequest body, Context context) { + breakFileLocksAsync(resourceGroupName, accountName, poolName, volumeName, body, context).block(); } /** - * Break volume replication + * Get Group Id List for LDAP User * - * Break the replication connection on the destination volume. + * Returns the list of group Ids for a specific LDAP User. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 body Returns group Id list for a specific LDAP user. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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}. + * @return group Id list for Ldap user along with {@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>> listGetGroupIdListForLdapUserWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, GetGroupIdListForLdapUserRequest body) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3008,36 +3030,39 @@ private Mono>> breakReplicationWithResponseAsync(Strin if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); } - if (body != 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.breakReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, - context)) + .withContext(context -> service.listGetGroupIdListForLdapUser(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, + this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Break volume replication + * Get Group Id List for LDAP User * - * Break the replication connection on the destination volume. + * Returns the list of group Ids for a specific LDAP User. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 body Returns group Id list for a specific LDAP user. * @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}. + * @return group Id list for Ldap user along with {@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>> listGetGroupIdListForLdapUserWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, GetGroupIdListForLdapUserRequest body, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3059,218 +3084,210 @@ private Mono>> breakReplicationWithResponseAsync(Strin if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); } - if (body != 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.breakReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, context); + return service.listGetGroupIdListForLdapUser(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, context); } /** - * Break volume replication + * Get Group Id List for LDAP User * - * Break the replication connection on the destination volume. + * Returns the list of group Ids for a specific LDAP User. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 body Returns group Id list for a specific LDAP user. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. + * @return the {@link PollerFlux} for polling of group Id list for Ldap user. */ @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()); + private PollerFlux, GetGroupIdListForLdapUserResponseInner> + beginListGetGroupIdListForLdapUserAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, GetGroupIdListForLdapUserRequest body) { + Mono>> mono = listGetGroupIdListForLdapUserWithResponseAsync(resourceGroupName, + accountName, poolName, volumeName, body); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), GetGroupIdListForLdapUserResponseInner.class, + GetGroupIdListForLdapUserResponseInner.class, this.client.getContext()); } /** - * Break volume replication + * Get Group Id List for LDAP User * - * Break the replication connection on the destination volume. + * Returns the list of group Ids for a specific LDAP User. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Returns group Id list for a specific LDAP user. + * @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. + * @return the {@link PollerFlux} for polling of group Id list for Ldap user. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginBreakReplicationAsync(String resourceGroupName, String accountName, - String poolName, String volumeName) { - final BreakReplicationRequest body = null; - Mono>> mono - = breakReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + private PollerFlux, GetGroupIdListForLdapUserResponseInner> + beginListGetGroupIdListForLdapUserAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, GetGroupIdListForLdapUserRequest body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = listGetGroupIdListForLdapUserWithResponseAsync(resourceGroupName, + accountName, poolName, volumeName, body, context); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), GetGroupIdListForLdapUserResponseInner.class, + GetGroupIdListForLdapUserResponseInner.class, context); } /** - * Break volume replication + * Get Group Id List for LDAP User * - * Break the replication connection on the destination volume. + * Returns the list of group Ids for a specific LDAP User. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. + * @param body Returns group Id list for a specific LDAP user. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. + * @return the {@link SyncPoller} for polling of group Id list for Ldap user. */ @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); + public SyncPoller, GetGroupIdListForLdapUserResponseInner> + beginListGetGroupIdListForLdapUser(String resourceGroupName, String accountName, String poolName, + String volumeName, GetGroupIdListForLdapUserRequest body) { + return this.beginListGetGroupIdListForLdapUserAsync(resourceGroupName, accountName, poolName, volumeName, body) + .getSyncPoller(); } /** - * Break volume replication + * Get Group Id List for LDAP User * - * Break the replication connection on the destination volume. + * Returns the list of group Ids for a specific LDAP User. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Returns group Id list for a specific LDAP user. + * @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. + * @return the {@link SyncPoller} for polling of group Id list for Ldap user. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginBreakReplication(String resourceGroupName, String accountName, - String poolName, String volumeName) { - final BreakReplicationRequest body = null; - return this.beginBreakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body) - .getSyncPoller(); - } - - /** - * Break volume replication - * - * Break the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 this.beginBreakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context) + public SyncPoller, GetGroupIdListForLdapUserResponseInner> + beginListGetGroupIdListForLdapUser(String resourceGroupName, String accountName, String poolName, + String volumeName, GetGroupIdListForLdapUserRequest body, Context context) { + return this + .beginListGetGroupIdListForLdapUserAsync(resourceGroupName, accountName, poolName, volumeName, body, + context) .getSyncPoller(); } /** - * Break volume replication + * Get Group Id List for LDAP User * - * Break the replication connection on the destination volume. + * Returns the list of group Ids for a specific LDAP User. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 body Returns group Id list for a specific LDAP user. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. + * @return group Id list for Ldap user on successful completion of {@link Mono}. */ @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() + private Mono listGetGroupIdListForLdapUserAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, GetGroupIdListForLdapUserRequest body) { + return beginListGetGroupIdListForLdapUserAsync(resourceGroupName, accountName, poolName, volumeName, body) + .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Break volume replication + * Get Group Id List for LDAP User * - * Break the replication connection on the destination volume. + * Returns the list of group Ids for a specific LDAP User. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Returns group Id list for a specific LDAP user. + * @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. + * @return group Id list for Ldap user on successful completion of {@link Mono}. */ @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); + private Mono listGetGroupIdListForLdapUserAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, GetGroupIdListForLdapUserRequest body, + Context context) { + return beginListGetGroupIdListForLdapUserAsync(resourceGroupName, accountName, poolName, volumeName, body, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Break volume replication + * Get Group Id List for LDAP User * - * Break the replication connection on the destination volume. + * Returns the list of group Ids for a specific LDAP User. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. + * @param body Returns group Id list for a specific LDAP user. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. + * @return group Id list for Ldap user. */ @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); + public GetGroupIdListForLdapUserResponseInner listGetGroupIdListForLdapUser(String resourceGroupName, + String accountName, String poolName, String volumeName, GetGroupIdListForLdapUserRequest body) { + return listGetGroupIdListForLdapUserAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); } /** - * Break volume replication + * Get Group Id List for LDAP User * - * Break the replication connection on the destination volume. + * Returns the list of group Ids for a specific LDAP User. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Returns group Id list for a specific LDAP user. + * @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 group Id list for Ldap user. */ @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 GetGroupIdListForLdapUserResponseInner listGetGroupIdListForLdapUser(String resourceGroupName, + String accountName, String poolName, String volumeName, GetGroupIdListForLdapUserRequest body, + Context context) { + return listGetGroupIdListForLdapUserAsync(resourceGroupName, accountName, poolName, volumeName, body, context) + .block(); } /** @@ -3283,36 +3300,14 @@ 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. - */ - @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(); - } - - /** - * Re-establish volume replication - * - * Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or policy-based - * snapshots. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 body for the id of the source 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>> reestablishReplicationWithResponseAsync(String resourceGroupName, - String accountName, String poolName, String volumeName, ReestablishReplicationRequest body) { + private Mono>> breakReplicationWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, BreakReplicationRequest body) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3334,30 +3329,27 @@ private Mono>> reestablishReplicationWithResponseAsync 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 { + if (body != null) { body.validate(); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.reestablishReplication(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, - this.client.getApiVersion(), body, accept, context)) + .withContext(context -> service.breakReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Re-establish volume replication + * Break volume replication * - * Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or policy-based - * snapshots. + * Break the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 body for the id of the source 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. @@ -3365,8 +3357,8 @@ private Mono>> reestablishReplicationWithResponseAsync * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reestablishReplicationWithResponseAsync(String resourceGroupName, - String accountName, String poolName, String volumeName, ReestablishReplicationRequest body, 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( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3388,53 +3380,73 @@ private Mono>> reestablishReplicationWithResponseAsync 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 { + if (body != null) { body.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.reestablishReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, context); + return service.breakReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, context); } /** - * Re-establish volume replication + * Break volume replication * - * Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or policy-based - * snapshots. + * Break the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 body for the id of the source 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> beginReestablishReplicationAsync(String resourceGroupName, - String accountName, String poolName, String volumeName, ReestablishReplicationRequest body) { + private PollerFlux, Void> beginBreakReplicationAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, BreakReplicationRequest body) { Mono>> mono - = reestablishReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); + = breakReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Re-establish volume replication + * Break volume replication * - * Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or policy-based - * snapshots. + * Break the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 body for the id of the source 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> beginBreakReplicationAsync(String resourceGroupName, String accountName, + String poolName, String volumeName) { + final BreakReplicationRequest body = null; + Mono>> mono + = breakReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Break volume replication + * + * Break the replication connection on the destination volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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. @@ -3442,49 +3454,47 @@ private PollerFlux, Void> beginReestablishReplicationAsync(Stri * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginReestablishReplicationAsync(String resourceGroupName, - String accountName, String poolName, String volumeName, ReestablishReplicationRequest body, Context context) { + private PollerFlux, Void> beginBreakReplicationAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, BreakReplicationRequest body, Context context) { context = this.client.mergeContext(context); - Mono>> mono = reestablishReplicationWithResponseAsync(resourceGroupName, accountName, - poolName, volumeName, body, context); + Mono>> mono + = breakReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Re-establish volume replication + * Break volume replication * - * Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or policy-based - * snapshots. + * Break the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 body for the id of the source 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> beginReestablishReplication(String resourceGroupName, String accountName, - String poolName, String volumeName, ReestablishReplicationRequest body) { - return this.beginReestablishReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body) + public SyncPoller, Void> beginBreakReplication(String resourceGroupName, String accountName, + String poolName, String volumeName) { + final BreakReplicationRequest body = null; + return this.beginBreakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body) .getSyncPoller(); } /** - * Re-establish volume replication + * Break volume replication * - * Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or policy-based - * snapshots. + * Break the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 body for the id of the source 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. @@ -3492,107 +3502,1250 @@ public SyncPoller, Void> beginReestablishReplication(String res * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginReestablishReplication(String resourceGroupName, String accountName, - String poolName, String volumeName, ReestablishReplicationRequest body, Context context) { - return this - .beginReestablishReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context) + public SyncPoller, Void> beginBreakReplication(String resourceGroupName, String accountName, + String poolName, String volumeName, BreakReplicationRequest body, Context context) { + return this.beginBreakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context) .getSyncPoller(); } /** - * Re-establish volume replication + * Break volume replication * - * Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or policy-based - * snapshots. + * Break the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 body for the id of the source 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 reestablishReplicationAsync(String resourceGroupName, String accountName, String poolName, - String volumeName, ReestablishReplicationRequest body) { - return beginReestablishReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body).last() + 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); } /** - * Re-establish volume replication + * Break volume replication * - * Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or policy-based - * snapshots. + * Break the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 body for the id of the source 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 reestablishReplicationAsync(String resourceGroupName, String accountName, String poolName, - String volumeName, ReestablishReplicationRequest body, Context context) { - return beginReestablishReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context) - .last().flatMap(this.client::getLroFinalResultOrError); + 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); } /** - * Re-establish volume replication + * Break volume replication * - * Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or policy-based - * snapshots. + * Break the replication connection on the destination volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 volume replication + * + * Break the replication connection on the destination volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 volume replication + * + * Break the replication connection on the destination volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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(); + } + + /** + * Re-establish volume replication + * + * Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or policy-based + * snapshots. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 body for the id of the source 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>> reestablishReplicationWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, ReestablishReplicationRequest 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(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.reestablishReplication(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, + this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Re-establish volume replication + * + * Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or policy-based + * snapshots. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 body for the id of the source 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>> reestablishReplicationWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, ReestablishReplicationRequest 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(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.reestablishReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Re-establish volume replication + * + * Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or policy-based + * snapshots. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 body for the id of the source 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> beginReestablishReplicationAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, ReestablishReplicationRequest body) { + Mono>> mono + = reestablishReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Re-establish volume replication + * + * Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or policy-based + * snapshots. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 body for the id of the source 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> beginReestablishReplicationAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, ReestablishReplicationRequest body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = reestablishReplicationWithResponseAsync(resourceGroupName, accountName, + poolName, volumeName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Re-establish volume replication + * + * Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or policy-based + * snapshots. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 body for the id of the source 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> beginReestablishReplication(String resourceGroupName, String accountName, + String poolName, String volumeName, ReestablishReplicationRequest body) { + return this.beginReestablishReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body) + .getSyncPoller(); + } + + /** + * Re-establish volume replication + * + * Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or policy-based + * snapshots. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 body for the id of the source 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> beginReestablishReplication(String resourceGroupName, String accountName, + String poolName, String volumeName, ReestablishReplicationRequest body, Context context) { + return this + .beginReestablishReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context) + .getSyncPoller(); + } + + /** + * Re-establish volume replication + * + * Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or policy-based + * snapshots. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 body for the id of the source 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 reestablishReplicationAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, ReestablishReplicationRequest body) { + return beginReestablishReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Re-establish volume replication + * + * Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or policy-based + * snapshots. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 body for the id of the source 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 reestablishReplicationAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, ReestablishReplicationRequest body, Context context) { + return beginReestablishReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Re-establish volume replication + * + * Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or policy-based + * snapshots. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 body for the id of the source 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 reestablishReplication(String resourceGroupName, String accountName, String poolName, String volumeName, + ReestablishReplicationRequest body) { + reestablishReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); + } + + /** + * Re-establish volume replication + * + * Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or policy-based + * snapshots. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 body for the id of the source 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 reestablishReplication(String resourceGroupName, String accountName, String poolName, String volumeName, + ReestablishReplicationRequest body, Context context) { + reestablishReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context).block(); + } + + /** + * Get volume replication status + * + * Get the status of the replication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 volume replication status + * + * Get the status of the replication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 volume replication status + * + * Get the status of the replication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 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(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get volume replication status + * + * Get the status of the replication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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(); + } + + /** + * Get volume replication status + * + * Get the status of the replication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 replicationStatusWithResponse(resourceGroupName, accountName, poolName, volumeName, Context.NONE) + .getValue(); + } + + /** + * List replications for volume + * + * List all replications for a specified volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 replications for volume + * + * List all replications for a specified volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 replications for volume + * + * List all replications for a specified volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 replications for volume + * + * List all replications for a specified volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 replications for volume + * + * List all replications for a specified volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 replications for volume + * + * List all replications for a specified volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 volume replication + * + * 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. The name is case insensitive. + * @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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.resyncReplication(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())); + } + + /** + * Resync volume replication + * + * 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. The name is case insensitive. + * @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.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.resyncReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + accountName, poolName, volumeName, this.client.getApiVersion(), accept, context); + } + + /** + * Resync volume replication + * + * 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. The name is case insensitive. + * @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 volume replication + * + * 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. The name is case insensitive. + * @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 volume replication + * + * 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. The name is case insensitive. + * @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 this.beginResyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName).getSyncPoller(); + } + + /** + * Resync volume replication + * + * 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. The name is case insensitive. + * @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 this.beginResyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) + .getSyncPoller(); + } + + /** + * Resync volume replication + * + * 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. The name is case insensitive. + * @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 volume replication + * + * 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. The name is case insensitive. + * @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 volume replication + * + * 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. The name is case insensitive. + * @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 volume replication + * + * 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. The name is case insensitive. + * @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 volume replication + * + * Delete the replication connection on the destination volume, and send release to the source replication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.deleteReplication(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())); + } + + /** + * Delete volume replication + * + * Delete the replication connection on the destination volume, and send release to the source replication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.deleteReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + accountName, poolName, volumeName, this.client.getApiVersion(), accept, context); + } + + /** + * Delete volume replication + * + * Delete the replication connection on the destination volume, and send release to the source replication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 volume replication + * + * Delete the replication connection on the destination volume, and send release to the source replication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 volume replication + * + * Delete the replication connection on the destination volume, and send release to the source replication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 this.beginDeleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName).getSyncPoller(); + } + + /** + * Delete volume replication + * + * Delete the replication connection on the destination volume, and send release to the source replication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 this.beginDeleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) + .getSyncPoller(); + } + + /** + * Delete volume replication + * + * Delete the replication connection on the destination volume, and send release to the source replication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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) - public void reestablishReplication(String resourceGroupName, String accountName, String poolName, String volumeName, - ReestablishReplicationRequest body) { - reestablishReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); + private Mono deleteReplicationAsync(String resourceGroupName, String accountName, String poolName, + String volumeName) { + return beginDeleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Re-establish volume replication + * Delete volume replication * - * Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or policy-based - * snapshots. + * Delete the replication connection on the destination volume, and send release to the source replication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 body for the id of the source 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) - public void reestablishReplication(String resourceGroupName, String accountName, String poolName, String volumeName, - ReestablishReplicationRequest body, Context context) { - reestablishReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context).block(); + 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); } /** - * Get volume replication status + * Delete volume replication * - * Get the status of the replication. + * Delete the replication connection on the destination volume, and send release to the source replication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -3601,11 +4754,50 @@ public void reestablishReplication(String resourceGroupName, String accountName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @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) { + public void deleteReplication(String resourceGroupName, String accountName, String poolName, String volumeName) { + deleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName).block(); + } + + /** + * Delete volume replication + * + * Delete the replication connection on the destination volume, and send release to the source replication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 source volume replication + * + * Authorize the replication connection on the source volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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.")); @@ -3627,32 +4819,38 @@ private Mono> replicationStatusWithResponseAsyn 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(); + } 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)) + .withContext(context -> service.authorizeReplication(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, + this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get volume replication status + * Authorize source volume replication * - * Get the status of the replication. + * Authorize the replication connection on the source volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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} 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>> 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.")); @@ -3674,80 +4872,203 @@ private Mono> replicationStatusWithResponseAsyn 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(); + } 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); + return service.authorizeReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, context); } /** - * Get volume replication status + * Authorize source volume replication * - * Get the status of the replication. + * Authorize the replication connection on the source volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 status of the replication on successful completion of {@link Mono}. + * @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 source volume replication + * + * Authorize the replication connection on the source volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 source volume replication + * + * Authorize the replication connection on the source volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 this.beginAuthorizeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body) + .getSyncPoller(); + } + + /** + * Authorize source volume replication + * + * Authorize the replication connection on the source volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 this.beginAuthorizeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context) + .getSyncPoller(); + } + + /** + * Authorize source volume replication + * + * Authorize the replication connection on the source volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 replicationStatusAsync(String resourceGroupName, String accountName, - String poolName, String volumeName) { - return replicationStatusWithResponseAsync(resourceGroupName, accountName, poolName, volumeName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + 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); + } + + /** + * Authorize source volume replication + * + * Authorize the replication connection on the source volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 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) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get volume replication status + * Authorize source volume replication * - * Get the status of the replication. + * Authorize the replication connection on the source volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. + * @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 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) { + authorizeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); } /** - * Get volume replication status + * Authorize source volume replication * - * Get the status of the replication. + * Authorize the replication connection on the source volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationStatusInner replicationStatus(String resourceGroupName, String accountName, String poolName, - String volumeName) { - return replicationStatusWithResponse(resourceGroupName, accountName, poolName, volumeName, Context.NONE) - .getValue(); + public void authorizeReplication(String resourceGroupName, String accountName, String poolName, String volumeName, + AuthorizeRequest body, Context context) { + authorizeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context).block(); } /** - * List replications for volume + * ReInitialize volume replication * - * List all replications for a specified volume. + * Re-Initializes the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -3756,10 +5077,10 @@ public ReplicationStatusInner replicationStatus(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listReplicationsSinglePageAsync(String resourceGroupName, + private Mono>> reInitializeReplicationWithResponseAsync(String resourceGroupName, String accountName, String poolName, String volumeName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -3784,17 +5105,16 @@ private Mono> listReplicationsSinglePageAsync(St } 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)) + .withContext( + context -> service.reInitializeReplication(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())); } /** - * List replications for volume + * ReInitialize volume replication * - * List all replications for a specified volume. + * Re-Initializes the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -3804,10 +5124,10 @@ private Mono> listReplicationsSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listReplicationsSinglePageAsync(String resourceGroupName, + private Mono>> reInitializeReplicationWithResponseAsync(String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -3832,17 +5152,14 @@ private Mono> listReplicationsSinglePageAsync(St } 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)); + return service.reInitializeReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), accept, context); } /** - * List replications for volume + * ReInitialize volume replication * - * List all replications for a specified volume. + * Re-Initializes the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -3851,19 +5168,21 @@ private Mono> listReplicationsSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @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}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listReplicationsAsync(String resourceGroupName, String accountName, - String poolName, String volumeName) { - return new PagedFlux<>( - () -> listReplicationsSinglePageAsync(resourceGroupName, accountName, poolName, volumeName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginReInitializeReplicationAsync(String resourceGroupName, + String accountName, String poolName, String volumeName) { + Mono>> mono + = reInitializeReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * List replications for volume + * ReInitialize volume replication * - * List all replications for a specified volume. + * Re-Initializes the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -3873,19 +5192,22 @@ private PagedFlux listReplicationsAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @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}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @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)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginReInitializeReplicationAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = reInitializeReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * List replications for volume + * ReInitialize volume replication * - * List all replications for a specified volume. + * Re-Initializes the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -3894,18 +5216,19 @@ private PagedFlux listReplicationsAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @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}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listReplications(String resourceGroupName, String accountName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginReInitializeReplication(String resourceGroupName, String accountName, String poolName, String volumeName) { - return new PagedIterable<>(listReplicationsAsync(resourceGroupName, accountName, poolName, volumeName)); + return this.beginReInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName) + .getSyncPoller(); } /** - * List replications for volume + * ReInitialize volume replication * - * List all replications for a specified volume. + * Re-Initializes the replication connection on the destination volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -3915,20 +5238,19 @@ public PagedIterable listReplications(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @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}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listReplications(String resourceGroupName, String accountName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginReInitializeReplication(String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return new PagedIterable<>( - listReplicationsAsync(resourceGroupName, accountName, poolName, volumeName, context)); + return this.beginReInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) + .getSyncPoller(); } /** - * Resync volume replication + * ReInitialize volume replication * - * 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. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -3937,11 +5259,95 @@ public PagedIterable listReplications(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @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}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resyncReplicationWithResponseAsync(String resourceGroupName, - String accountName, String poolName, String volumeName) { + private Mono reInitializeReplicationAsync(String resourceGroupName, String accountName, String poolName, + String volumeName) { + return beginReInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * ReInitialize volume replication + * + * Re-Initializes the replication connection on the destination volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 reInitializeReplicationAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + return beginReInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * ReInitialize volume replication + * + * Re-Initializes the replication connection on the destination volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 reInitializeReplication(String resourceGroupName, String accountName, String poolName, + String volumeName) { + reInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName).block(); + } + + /** + * ReInitialize volume replication + * + * Re-Initializes the replication connection on the destination volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 reInitializeReplication(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + reInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); + } + + /** + * Start Cluster peering + * + * Starts peering the cluster for this migration volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Cluster peer 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 information about cluster peering process along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> peerClusterForOnPremMigrationWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, PeerClusterForVolumeMigrationRequest body) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3963,33 +5369,40 @@ private Mono>> resyncReplicationWithResponseAsync(Stri 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(); + } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.resyncReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.peerClusterForOnPremMigration(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, + this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Resync volume replication + * Start Cluster peering * - * 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. + * Starts peering the cluster for this migration volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Cluster peer 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}. + * @return information about cluster peering process along with {@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) { + private Mono>> peerClusterForOnPremMigrationWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, PeerClusterForVolumeMigrationRequest body, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4011,195 +5424,216 @@ private Mono>> resyncReplicationWithResponseAsync(Stri 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(); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.resyncReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, this.client.getApiVersion(), accept, context); + return service.peerClusterForOnPremMigration(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, context); } /** - * Resync volume replication + * Start Cluster peering * - * 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. + * Starts peering the cluster for this migration volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Cluster peer 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. + * @return the {@link PollerFlux} for polling of information about cluster peering process. */ @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, + private PollerFlux, ClusterPeerCommandResponseInner> + beginPeerClusterForOnPremMigrationAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, PeerClusterForVolumeMigrationRequest body) { + Mono>> mono = peerClusterForOnPremMigrationWithResponseAsync(resourceGroupName, + accountName, poolName, volumeName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ClusterPeerCommandResponseInner.class, ClusterPeerCommandResponseInner.class, this.client.getContext()); } /** - * Resync volume replication + * Start Cluster peering * - * 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. + * Starts peering the cluster for this migration volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Cluster peer 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. + * @return the {@link PollerFlux} for polling of information about cluster peering process. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginResyncReplicationAsync(String resourceGroupName, String accountName, - String poolName, String volumeName, Context context) { + private PollerFlux, ClusterPeerCommandResponseInner> + beginPeerClusterForOnPremMigrationAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, PeerClusterForVolumeMigrationRequest body, 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, + Mono>> mono = peerClusterForOnPremMigrationWithResponseAsync(resourceGroupName, + accountName, poolName, volumeName, body, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ClusterPeerCommandResponseInner.class, ClusterPeerCommandResponseInner.class, context); } /** - * Resync volume replication + * Start Cluster peering * - * 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. + * Starts peering the cluster for this migration volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Cluster peer 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. + * @return the {@link SyncPoller} for polling of information about cluster peering process. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResyncReplication(String resourceGroupName, String accountName, - String poolName, String volumeName) { - return this.beginResyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName).getSyncPoller(); + public SyncPoller, ClusterPeerCommandResponseInner> + beginPeerClusterForOnPremMigration(String resourceGroupName, String accountName, String poolName, + String volumeName, PeerClusterForVolumeMigrationRequest body) { + return this.beginPeerClusterForOnPremMigrationAsync(resourceGroupName, accountName, poolName, volumeName, body) + .getSyncPoller(); } /** - * Resync volume replication + * Start Cluster peering * - * 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. + * Starts peering the cluster for this migration volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Cluster peer 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. + * @return the {@link SyncPoller} for polling of information about cluster peering process. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResyncReplication(String resourceGroupName, String accountName, - String poolName, String volumeName, Context context) { - return this.beginResyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) + public SyncPoller, ClusterPeerCommandResponseInner> + beginPeerClusterForOnPremMigration(String resourceGroupName, String accountName, String poolName, + String volumeName, PeerClusterForVolumeMigrationRequest body, Context context) { + return this + .beginPeerClusterForOnPremMigrationAsync(resourceGroupName, accountName, poolName, volumeName, body, + context) .getSyncPoller(); } /** - * Resync volume replication + * Start Cluster peering * - * 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. + * Starts peering the cluster for this migration volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Cluster peer 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. + * @return information about cluster peering process on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resyncReplicationAsync(String resourceGroupName, String accountName, String poolName, - String volumeName) { - return beginResyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName).last() + private Mono peerClusterForOnPremMigrationAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, PeerClusterForVolumeMigrationRequest body) { + return beginPeerClusterForOnPremMigrationAsync(resourceGroupName, accountName, poolName, volumeName, body) + .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Resync volume replication + * Start Cluster peering * - * 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. + * Starts peering the cluster for this migration volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Cluster peer 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 A {@link Mono} that completes when a successful response is received. + * @return information about cluster peering process on successful completion of {@link Mono}. */ @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); + private Mono peerClusterForOnPremMigrationAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, PeerClusterForVolumeMigrationRequest body, + Context context) { + return beginPeerClusterForOnPremMigrationAsync(resourceGroupName, accountName, poolName, volumeName, body, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Resync volume replication + * Start Cluster peering * - * 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. + * Starts peering the cluster for this migration volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Cluster peer 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 information about cluster peering process. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void resyncReplication(String resourceGroupName, String accountName, String poolName, String volumeName) { - resyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName).block(); + public ClusterPeerCommandResponseInner peerClusterForOnPremMigration(String resourceGroupName, String accountName, + String poolName, String volumeName, PeerClusterForVolumeMigrationRequest body) { + return peerClusterForOnPremMigrationAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); } /** - * Resync volume replication + * Start Cluster peering * - * 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. + * Starts peering the cluster for this migration volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Cluster peer 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 information about cluster peering process. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void resyncReplication(String resourceGroupName, String accountName, String poolName, String volumeName, - Context context) { - resyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); + public ClusterPeerCommandResponseInner peerClusterForOnPremMigration(String resourceGroupName, String accountName, + String poolName, String volumeName, PeerClusterForVolumeMigrationRequest body, Context context) { + return peerClusterForOnPremMigrationAsync(resourceGroupName, accountName, poolName, volumeName, body, context) + .block(); } /** - * Delete volume replication + * Start migration process * - * Delete the replication connection on the destination volume, and send release to the source replication. + * Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once the SVMs have been + * peered a SnapMirror will be created. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -4208,10 +5642,11 @@ public void resyncReplication(String resourceGroupName, String accountName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @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}. + * @return information about SVM peering process along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteReplicationWithResponseAsync(String resourceGroupName, + private Mono>> createOnPremMigrationReplicationWithResponseAsync(String resourceGroupName, String accountName, String poolName, String volumeName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -4236,16 +5671,17 @@ private Mono>> deleteReplicationWithResponseAsync(Stri } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.deleteReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createOnPremMigrationReplication(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())); } /** - * Delete volume replication + * Start migration process * - * Delete the replication connection on the destination volume, and send release to the source replication. + * Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once the SVMs have been + * peered a SnapMirror will be created. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -4255,10 +5691,11 @@ private Mono>> deleteReplicationWithResponseAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @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}. + * @return information about SVM peering process along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteReplicationWithResponseAsync(String resourceGroupName, + private Mono>> createOnPremMigrationReplicationWithResponseAsync(String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -4283,14 +5720,15 @@ private Mono>> deleteReplicationWithResponseAsync(Stri } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.deleteReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, this.client.getApiVersion(), accept, context); + return service.createOnPremMigrationReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), accept, context); } /** - * Delete volume replication + * Start migration process * - * Delete the replication connection on the destination volume, and send release to the source replication. + * Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once the SVMs have been + * peered a SnapMirror will be created. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -4299,21 +5737,24 @@ private Mono>> deleteReplicationWithResponseAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. + * @return the {@link PollerFlux} for polling of information about SVM peering process. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteReplicationAsync(String resourceGroupName, String accountName, - String poolName, String volumeName) { + private PollerFlux, SvmPeerCommandResponseInner> + beginCreateOnPremMigrationReplicationAsync(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, + = createOnPremMigrationReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), SvmPeerCommandResponseInner.class, SvmPeerCommandResponseInner.class, this.client.getContext()); } /** - * Delete volume replication + * Start migration process * - * Delete the replication connection on the destination volume, and send release to the source replication. + * Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once the SVMs have been + * peered a SnapMirror will be created. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -4323,22 +5764,25 @@ private PollerFlux, Void> beginDeleteReplicationAsync(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. + * @return the {@link PollerFlux} for polling of information about SVM peering process. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteReplicationAsync(String resourceGroupName, String accountName, - String poolName, String volumeName, Context context) { + private PollerFlux, SvmPeerCommandResponseInner> + beginCreateOnPremMigrationReplicationAsync(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, + Mono>> mono = createOnPremMigrationReplicationWithResponseAsync(resourceGroupName, + accountName, poolName, volumeName, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), SvmPeerCommandResponseInner.class, SvmPeerCommandResponseInner.class, context); } /** - * Delete volume replication + * Start migration process * - * Delete the replication connection on the destination volume, and send release to the source replication. + * Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once the SVMs have been + * peered a SnapMirror will be created. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -4347,18 +5791,21 @@ private PollerFlux, Void> beginDeleteReplicationAsync(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. + * @return the {@link SyncPoller} for polling of information about SVM peering process. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteReplication(String resourceGroupName, String accountName, - String poolName, String volumeName) { - return this.beginDeleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName).getSyncPoller(); + public SyncPoller, SvmPeerCommandResponseInner> + beginCreateOnPremMigrationReplication(String resourceGroupName, String accountName, String poolName, + String volumeName) { + return this.beginCreateOnPremMigrationReplicationAsync(resourceGroupName, accountName, poolName, volumeName) + .getSyncPoller(); } /** - * Delete volume replication + * Start migration process * - * Delete the replication connection on the destination volume, and send release to the source replication. + * Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once the SVMs have been + * peered a SnapMirror will be created. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -4368,19 +5815,22 @@ public SyncPoller, Void> beginDeleteReplication(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. + * @return the {@link SyncPoller} for polling of information about SVM peering process. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteReplication(String resourceGroupName, String accountName, - String poolName, String volumeName, Context context) { - return this.beginDeleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) + public SyncPoller, SvmPeerCommandResponseInner> + beginCreateOnPremMigrationReplication(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + return this + .beginCreateOnPremMigrationReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) .getSyncPoller(); } /** - * Delete volume replication + * Start migration process * - * Delete the replication connection on the destination volume, and send release to the source replication. + * Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once the SVMs have been + * peered a SnapMirror will be created. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -4389,19 +5839,20 @@ public SyncPoller, Void> beginDeleteReplication(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. + * @return information about SVM peering process on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteReplicationAsync(String resourceGroupName, String accountName, String poolName, - String volumeName) { - return beginDeleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName).last() + private Mono createOnPremMigrationReplicationAsync(String resourceGroupName, + String accountName, String poolName, String volumeName) { + return beginCreateOnPremMigrationReplicationAsync(resourceGroupName, accountName, poolName, volumeName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete volume replication + * Start migration process * - * Delete the replication connection on the destination volume, and send release to the source replication. + * Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once the SVMs have been + * peered a SnapMirror will be created. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -4411,19 +5862,21 @@ private Mono deleteReplicationAsync(String resourceGroupName, String accou * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. + * @return information about SVM peering process on successful completion of {@link Mono}. */ @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() + private Mono createOnPremMigrationReplicationAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, Context context) { + return beginCreateOnPremMigrationReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) + .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete volume replication + * Start migration process * - * Delete the replication connection on the destination volume, and send release to the source replication. + * Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once the SVMs have been + * peered a SnapMirror will be created. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -4432,16 +5885,19 @@ private Mono deleteReplicationAsync(String resourceGroupName, String accou * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 information about SVM peering process. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteReplication(String resourceGroupName, String accountName, String poolName, String volumeName) { - deleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName).block(); + public SvmPeerCommandResponseInner createOnPremMigrationReplication(String resourceGroupName, String accountName, + String poolName, String volumeName) { + return createOnPremMigrationReplicationAsync(resourceGroupName, accountName, poolName, volumeName).block(); } /** - * Delete volume replication + * Start migration process * - * Delete the replication connection on the destination volume, and send release to the source replication. + * Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once the SVMs have been + * peered a SnapMirror will be created. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -4451,31 +5907,33 @@ public void deleteReplication(String resourceGroupName, String accountName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 information about SVM peering process. */ @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 SvmPeerCommandResponseInner createOnPremMigrationReplication(String resourceGroupName, String accountName, + String poolName, String volumeName, Context context) { + return createOnPremMigrationReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) + .block(); } /** - * Authorize source volume replication + * Finalize migration process * - * Authorize the replication connection on the source volume. + * Finalizes the migration of a volume by performing a final sync on the replication, breaking and releasing the + * replication, and breaking the cluster peering if no other migration is active. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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>> finalizeOnPremMigrationWithResponseAsync(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.")); @@ -4497,29 +5955,24 @@ private Mono>> authorizeReplicationWithResponseAsync(S 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(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.authorizeReplication(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, - this.client.getApiVersion(), body, accept, context)) + .withContext( + context -> service.finalizeOnPremMigration(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())); } /** - * Authorize source volume replication + * Finalize migration process * - * Authorize the replication connection on the source volume. + * Finalizes the migration of a volume by performing a final sync on the replication, breaking and releasing the + * replication, and breaking the cluster peering if no other migration is active. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -4527,8 +5980,8 @@ private Mono>> authorizeReplicationWithResponseAsync(S * @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>> finalizeOnPremMigrationWithResponseAsync(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.")); @@ -4550,51 +6003,46 @@ private Mono>> authorizeReplicationWithResponseAsync(S 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(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.authorizeReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, context); + return service.finalizeOnPremMigration(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), accept, context); } /** - * Authorize source volume replication + * Finalize migration process * - * Authorize the replication connection on the source volume. + * Finalizes the migration of a volume by performing a final sync on the replication, breaking and releasing the + * replication, and breaking the cluster peering if no other migration is active. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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> beginFinalizeOnPremMigrationAsync(String resourceGroupName, + String accountName, String poolName, String volumeName) { Mono>> mono - = authorizeReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); + = finalizeOnPremMigrationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Authorize source volume replication + * Finalize migration process * - * Authorize the replication connection on the source volume. + * Finalizes the migration of a volume by performing a final sync on the replication, breaking and releasing the + * replication, and breaking the cluster peering if no other migration is active. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -4602,47 +6050,47 @@ private PollerFlux, Void> beginAuthorizeReplicationAsync(String * @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> beginFinalizeOnPremMigrationAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = authorizeReplicationWithResponseAsync(resourceGroupName, accountName, - poolName, volumeName, body, context); + Mono>> mono + = finalizeOnPremMigrationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Authorize source volume replication + * Finalize migration process * - * Authorize the replication connection on the source volume. + * Finalizes the migration of a volume by performing a final sync on the replication, breaking and releasing the + * replication, and breaking the cluster peering if no other migration is active. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 this.beginAuthorizeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body) + public SyncPoller, Void> beginFinalizeOnPremMigration(String resourceGroupName, String accountName, + String poolName, String volumeName) { + return this.beginFinalizeOnPremMigrationAsync(resourceGroupName, accountName, poolName, volumeName) .getSyncPoller(); } /** - * Authorize source volume replication + * Finalize migration process * - * Authorize the replication connection on the source volume. + * Finalizes the migration of a volume by performing a final sync on the replication, breaking and releasing the + * replication, and breaking the cluster peering if no other migration is active. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -4650,44 +6098,44 @@ public SyncPoller, Void> beginAuthorizeReplication(String resou * @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 this.beginAuthorizeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context) + public SyncPoller, Void> beginFinalizeOnPremMigration(String resourceGroupName, String accountName, + String poolName, String volumeName, Context context) { + return this.beginFinalizeOnPremMigrationAsync(resourceGroupName, accountName, poolName, volumeName, context) .getSyncPoller(); } /** - * Authorize source volume replication + * Finalize migration process * - * Authorize the replication connection on the source volume. + * Finalizes the migration of a volume by performing a final sync on the replication, breaking and releasing the + * replication, and breaking the cluster peering if no other migration is active. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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() + private Mono finalizeOnPremMigrationAsync(String resourceGroupName, String accountName, String poolName, + String volumeName) { + return beginFinalizeOnPremMigrationAsync(resourceGroupName, accountName, poolName, volumeName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Authorize source volume replication + * Finalize migration process * - * Authorize the replication connection on the source volume. + * Finalizes the migration of a volume by performing a final sync on the replication, breaking and releasing the + * replication, and breaking the cluster peering if no other migration is active. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -4695,57 +6143,57 @@ private Mono authorizeReplicationAsync(String resourceGroupName, String ac * @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) - .last().flatMap(this.client::getLroFinalResultOrError); + private Mono finalizeOnPremMigrationAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + return beginFinalizeOnPremMigrationAsync(resourceGroupName, accountName, poolName, volumeName, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Authorize source volume replication + * Finalize migration process * - * Authorize the replication connection on the source volume. + * Finalizes the migration of a volume by performing a final sync on the replication, breaking and releasing the + * replication, and breaking the cluster peering if no other migration is active. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 finalizeOnPremMigration(String resourceGroupName, String accountName, String poolName, + String volumeName) { + finalizeOnPremMigrationAsync(resourceGroupName, accountName, poolName, volumeName).block(); } /** - * Authorize source volume replication + * Finalize migration process * - * Authorize the replication connection on the source volume. + * Finalizes the migration of a volume by performing a final sync on the replication, breaking and releasing the + * replication, and breaking the cluster peering if no other migration is active. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 finalizeOnPremMigration(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + finalizeOnPremMigrationAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); } /** - * ReInitialize volume replication + * Perform a replication transfer * - * Re-Initializes the replication connection on the destination volume. + * Performs an adhoc replication transfer on a volume with volumeType Migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -4757,7 +6205,7 @@ public void authorizeReplication(String resourceGroupName, String accountName, S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reInitializeReplicationWithResponseAsync(String resourceGroupName, + private Mono>> performReplicationTransferWithResponseAsync(String resourceGroupName, String accountName, String poolName, String volumeName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -4782,16 +6230,16 @@ private Mono>> reInitializeReplicationWithResponseAsyn } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.reInitializeReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.performReplicationTransfer(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())); } /** - * ReInitialize volume replication + * Perform a replication transfer * - * Re-Initializes the replication connection on the destination volume. + * Performs an adhoc replication transfer on a volume with volumeType Migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -4804,7 +6252,7 @@ private Mono>> reInitializeReplicationWithResponseAsyn * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reInitializeReplicationWithResponseAsync(String resourceGroupName, + private Mono>> performReplicationTransferWithResponseAsync(String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -4829,14 +6277,14 @@ private Mono>> reInitializeReplicationWithResponseAsyn } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.reInitializeReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), + return service.performReplicationTransfer(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), accept, context); } /** - * ReInitialize volume replication + * Perform a replication transfer * - * Re-Initializes the replication connection on the destination volume. + * Performs an adhoc replication transfer on a volume with volumeType Migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -4848,18 +6296,18 @@ private Mono>> reInitializeReplicationWithResponseAsyn * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginReInitializeReplicationAsync(String resourceGroupName, + private PollerFlux, Void> beginPerformReplicationTransferAsync(String resourceGroupName, String accountName, String poolName, String volumeName) { Mono>> mono - = reInitializeReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); + = performReplicationTransferWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * ReInitialize volume replication + * Perform a replication transfer * - * Re-Initializes the replication connection on the destination volume. + * Performs an adhoc replication transfer on a volume with volumeType Migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -4872,19 +6320,19 @@ private PollerFlux, Void> beginReInitializeReplicationAsync(Str * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginReInitializeReplicationAsync(String resourceGroupName, + private PollerFlux, Void> beginPerformReplicationTransferAsync(String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { context = this.client.mergeContext(context); - Mono>> mono - = reInitializeReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context); + Mono>> mono = performReplicationTransferWithResponseAsync(resourceGroupName, + accountName, poolName, volumeName, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * ReInitialize volume replication + * Perform a replication transfer * - * Re-Initializes the replication connection on the destination volume. + * Performs an adhoc replication transfer on a volume with volumeType Migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -4896,16 +6344,16 @@ private PollerFlux, Void> beginReInitializeReplicationAsync(Str * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginReInitializeReplication(String resourceGroupName, String accountName, - String poolName, String volumeName) { - return this.beginReInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName) + public SyncPoller, Void> beginPerformReplicationTransfer(String resourceGroupName, + String accountName, String poolName, String volumeName) { + return this.beginPerformReplicationTransferAsync(resourceGroupName, accountName, poolName, volumeName) .getSyncPoller(); } /** - * ReInitialize volume replication + * Perform a replication transfer * - * Re-Initializes the replication connection on the destination volume. + * Performs an adhoc replication transfer on a volume with volumeType Migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -4918,16 +6366,16 @@ public SyncPoller, Void> beginReInitializeReplication(String re * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginReInitializeReplication(String resourceGroupName, String accountName, - String poolName, String volumeName, Context context) { - return this.beginReInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) + public SyncPoller, Void> beginPerformReplicationTransfer(String resourceGroupName, + String accountName, String poolName, String volumeName, Context context) { + return this.beginPerformReplicationTransferAsync(resourceGroupName, accountName, poolName, volumeName, context) .getSyncPoller(); } /** - * ReInitialize volume replication + * Perform a replication transfer * - * Re-Initializes the replication connection on the destination volume. + * Performs an adhoc replication transfer on a volume with volumeType Migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -4939,16 +6387,16 @@ public SyncPoller, Void> beginReInitializeReplication(String re * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reInitializeReplicationAsync(String resourceGroupName, String accountName, String poolName, + private Mono performReplicationTransferAsync(String resourceGroupName, String accountName, String poolName, String volumeName) { - return beginReInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName).last() + return beginPerformReplicationTransferAsync(resourceGroupName, accountName, poolName, volumeName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * ReInitialize volume replication + * Perform a replication transfer * - * Re-Initializes the replication connection on the destination volume. + * Performs an adhoc replication transfer on a volume with volumeType Migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -4961,16 +6409,17 @@ private Mono reInitializeReplicationAsync(String resourceGroupName, String * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reInitializeReplicationAsync(String resourceGroupName, String accountName, String poolName, + private Mono performReplicationTransferAsync(String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return beginReInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context).last() + return beginPerformReplicationTransferAsync(resourceGroupName, accountName, poolName, volumeName, context) + .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * ReInitialize volume replication + * Perform a replication transfer * - * Re-Initializes the replication connection on the destination volume. + * Performs an adhoc replication transfer on a volume with volumeType Migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -4981,15 +6430,15 @@ private Mono reInitializeReplicationAsync(String resourceGroupName, String * @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, + public void performReplicationTransfer(String resourceGroupName, String accountName, String poolName, String volumeName) { - reInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName).block(); + performReplicationTransferAsync(resourceGroupName, accountName, poolName, volumeName).block(); } /** - * ReInitialize volume replication + * Perform a replication transfer * - * Re-Initializes the replication connection on the destination volume. + * Performs an adhoc replication transfer on a volume with volumeType Migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -5001,9 +6450,9 @@ public void reInitializeReplication(String resourceGroupName, String accountName * @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, + public void performReplicationTransfer(String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - reInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); + performReplicationTransferAsync(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 87039bca03046..8c4a15dc0067c 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,20 +10,25 @@ 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.ClusterPeerCommandResponseInner; import com.azure.resourcemanager.netapp.fluent.models.GetGroupIdListForLdapUserResponseInner; import com.azure.resourcemanager.netapp.fluent.models.ReplicationInner; import com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner; +import com.azure.resourcemanager.netapp.fluent.models.SvmPeerCommandResponseInner; import com.azure.resourcemanager.netapp.fluent.models.VolumeInner; import com.azure.resourcemanager.netapp.models.AuthorizeRequest; import com.azure.resourcemanager.netapp.models.BreakFileLocksRequest; import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; +import com.azure.resourcemanager.netapp.models.ClusterPeerCommandResponse; import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest; import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserResponse; +import com.azure.resourcemanager.netapp.models.PeerClusterForVolumeMigrationRequest; import com.azure.resourcemanager.netapp.models.PoolChangeRequest; import com.azure.resourcemanager.netapp.models.ReestablishReplicationRequest; import com.azure.resourcemanager.netapp.models.RelocateVolumeRequest; import com.azure.resourcemanager.netapp.models.Replication; import com.azure.resourcemanager.netapp.models.ReplicationStatus; +import com.azure.resourcemanager.netapp.models.SvmPeerCommandResponse; import com.azure.resourcemanager.netapp.models.Volume; import com.azure.resourcemanager.netapp.models.VolumeRevert; import com.azure.resourcemanager.netapp.models.Volumes; @@ -93,8 +98,8 @@ public Volume populateAvailabilityZone(String resourceGroupName, String accountN public Volume populateAvailabilityZone(String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - VolumeInner inner = this.serviceClient().populateAvailabilityZone(resourceGroupName, accountName, poolName, - volumeName, context); + VolumeInner inner = this.serviceClient() + .populateAvailabilityZone(resourceGroupName, accountName, poolName, volumeName, context); if (inner != null) { return new VolumeImpl(inner, this.manager()); } else { @@ -121,6 +126,15 @@ public void resetCifsPassword(String resourceGroupName, String accountName, Stri this.serviceClient().resetCifsPassword(resourceGroupName, accountName, poolName, volumeName, context); } + public void splitCloneFromParent(String resourceGroupName, String accountName, String poolName, String volumeName) { + this.serviceClient().splitCloneFromParent(resourceGroupName, accountName, poolName, volumeName); + } + + public void splitCloneFromParent(String resourceGroupName, String accountName, String poolName, String volumeName, + Context context) { + this.serviceClient().splitCloneFromParent(resourceGroupName, accountName, poolName, volumeName, context); + } + public void breakFileLocks(String resourceGroupName, String accountName, String poolName, String volumeName) { this.serviceClient().breakFileLocks(resourceGroupName, accountName, poolName, volumeName); } @@ -168,14 +182,14 @@ public void reestablishReplication(String resourceGroupName, String accountName, public void reestablishReplication(String resourceGroupName, String accountName, String poolName, String volumeName, ReestablishReplicationRequest body, Context context) { - this.serviceClient().reestablishReplication(resourceGroupName, accountName, poolName, volumeName, body, - context); + this.serviceClient() + .reestablishReplication(resourceGroupName, accountName, poolName, volumeName, body, context); } public Response replicationStatusWithResponse(String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - Response inner = this.serviceClient().replicationStatusWithResponse(resourceGroupName, - accountName, poolName, volumeName, context); + Response inner = this.serviceClient() + .replicationStatusWithResponse(resourceGroupName, accountName, poolName, volumeName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ReplicationStatusImpl(inner.getValue(), this.manager())); @@ -247,6 +261,70 @@ public void reInitializeReplication(String resourceGroupName, String accountName this.serviceClient().reInitializeReplication(resourceGroupName, accountName, poolName, volumeName, context); } + public ClusterPeerCommandResponse peerClusterForOnPremMigration(String resourceGroupName, String accountName, + String poolName, String volumeName, PeerClusterForVolumeMigrationRequest body) { + ClusterPeerCommandResponseInner inner = this.serviceClient() + .peerClusterForOnPremMigration(resourceGroupName, accountName, poolName, volumeName, body); + if (inner != null) { + return new ClusterPeerCommandResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ClusterPeerCommandResponse peerClusterForOnPremMigration(String resourceGroupName, String accountName, + String poolName, String volumeName, PeerClusterForVolumeMigrationRequest body, Context context) { + ClusterPeerCommandResponseInner inner = this.serviceClient() + .peerClusterForOnPremMigration(resourceGroupName, accountName, poolName, volumeName, body, context); + if (inner != null) { + return new ClusterPeerCommandResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public SvmPeerCommandResponse createOnPremMigrationReplication(String resourceGroupName, String accountName, + String poolName, String volumeName) { + SvmPeerCommandResponseInner inner = this.serviceClient() + .createOnPremMigrationReplication(resourceGroupName, accountName, poolName, volumeName); + if (inner != null) { + return new SvmPeerCommandResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public SvmPeerCommandResponse createOnPremMigrationReplication(String resourceGroupName, String accountName, + String poolName, String volumeName, Context context) { + SvmPeerCommandResponseInner inner = this.serviceClient() + .createOnPremMigrationReplication(resourceGroupName, accountName, poolName, volumeName, context); + if (inner != null) { + return new SvmPeerCommandResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public void finalizeOnPremMigration(String resourceGroupName, String accountName, String poolName, + String volumeName) { + this.serviceClient().finalizeOnPremMigration(resourceGroupName, accountName, poolName, volumeName); + } + + public void finalizeOnPremMigration(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + this.serviceClient().finalizeOnPremMigration(resourceGroupName, accountName, poolName, volumeName, context); + } + + public void performReplicationTransfer(String resourceGroupName, String accountName, String poolName, + String volumeName) { + this.serviceClient().performReplicationTransfer(resourceGroupName, accountName, poolName, volumeName); + } + + public void performReplicationTransfer(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + this.serviceClient().performReplicationTransfer(resourceGroupName, accountName, poolName, volumeName, context); + } + public void poolChange(String resourceGroupName, String accountName, String poolName, String volumeName, PoolChangeRequest body) { this.serviceClient().poolChange(resourceGroupName, accountName, poolName, volumeName, body); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AcceptGrowCapacityPoolForShortTermCloneSplit.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AcceptGrowCapacityPoolForShortTermCloneSplit.java new file mode 100644 index 0000000000000..455f800d35c9f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AcceptGrowCapacityPoolForShortTermCloneSplit.java @@ -0,0 +1,58 @@ +// 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; + +/** + * acceptGrowCapacityPoolForShortTermCloneSplit + * + * While auto splitting the short term clone volume, if the parent pool does not have enough space to accommodate the + * volume after split, it will be automatically resized, which will lead to increased billing. To accept capacity pool + * size auto grow and create a short term clone volume, set the property as accepted. + */ +public final class AcceptGrowCapacityPoolForShortTermCloneSplit + extends ExpandableStringEnum { + /** + * Static value Accepted for AcceptGrowCapacityPoolForShortTermCloneSplit. + */ + public static final AcceptGrowCapacityPoolForShortTermCloneSplit ACCEPTED = fromString("Accepted"); + + /** + * Static value Declined for AcceptGrowCapacityPoolForShortTermCloneSplit. + */ + public static final AcceptGrowCapacityPoolForShortTermCloneSplit DECLINED = fromString("Declined"); + + /** + * Creates a new instance of AcceptGrowCapacityPoolForShortTermCloneSplit value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AcceptGrowCapacityPoolForShortTermCloneSplit() { + } + + /** + * Creates or finds a AcceptGrowCapacityPoolForShortTermCloneSplit from its string representation. + * + * @param name a name to look for. + * @return the corresponding AcceptGrowCapacityPoolForShortTermCloneSplit. + */ + @JsonCreator + public static AcceptGrowCapacityPoolForShortTermCloneSplit fromString(String name) { + return fromString(name, AcceptGrowCapacityPoolForShortTermCloneSplit.class); + } + + /** + * Gets known AcceptGrowCapacityPoolForShortTermCloneSplit values. + * + * @return known AcceptGrowCapacityPoolForShortTermCloneSplit values. + */ + public static Collection values() { + return values(AcceptGrowCapacityPoolForShortTermCloneSplit.class); + } +} 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 9456e541018d4..0b2c7e6bb58e1 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 @@ -13,7 +13,7 @@ @Fluent public final class AccountEncryption { /* - * The encryption keySource (provider). Possible values (case-insensitive): Microsoft.NetApp, Microsoft.KeyVault + * The encryption keySource (provider). Possible values (case-insensitive): Microsoft.NetApp, Microsoft.KeyVault */ @JsonProperty(value = "keySource") private KeySource keySource; diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Accounts.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Accounts.java index e7c8474d99a2b..ccab2b0774790 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Accounts.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Accounts.java @@ -149,6 +149,98 @@ Response getByResourceGroupWithResponse(String resourceGroupName, */ void renewCredentials(String resourceGroupName, String accountName, Context context); + /** + * Migrate volumes encryption key source. + * + * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). + * Operation fails if targeted volumes share encryption sibling set with volumes from another account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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 migrateEncryptionKey(String resourceGroupName, String accountName); + + /** + * Migrate volumes encryption key source. + * + * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). + * Operation fails if targeted volumes share encryption sibling set with volumes from another account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body The required parameters to perform encryption migration. + * @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 migrateEncryptionKey(String resourceGroupName, String accountName, EncryptionMigrationRequest body, + Context context); + + /** + * Get information about how volumes under NetApp account are encrypted. + * + * Contains data from encryption.keyVaultProperties as well as information about which private endpoint is used by + * each encryption sibling set. Response from this endpoint can be modified and used as request body for POST + * request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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 getChangeKeyVaultInformation(String resourceGroupName, String accountName); + + /** + * Get information about how volumes under NetApp account are encrypted. + * + * Contains data from encryption.keyVaultProperties as well as information about which private endpoint is used by + * each encryption sibling set. Response from this endpoint can be modified and used as request body for POST + * request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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 getChangeKeyVaultInformation(String resourceGroupName, String accountName, Context context); + + /** + * Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + * + * Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports MHSM to Key + * Vault, Key Vault to MHSM, MHSM to MHSM and Key Vault to Key Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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 changeKeyVault(String resourceGroupName, String accountName); + + /** + * Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + * + * Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports MHSM to Key + * Vault, Key Vault to MHSM, MHSM to MHSM and Key Vault to Key Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body The required parameters to perform encryption migration. + * @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 changeKeyVault(String resourceGroupName, String accountName, ChangeKeyVault body, Context context); + /** * Describe a NetApp Account * 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 4cf1648cab910..a68cef8ec2e95 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 @@ -56,8 +56,7 @@ public final class ActiveDirectory { private String statusDetails; /* - * NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount - * volumes + * NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount volumes */ @JsonProperty(value = "smbServerName") private String smbServerName; @@ -75,22 +74,19 @@ public final class ActiveDirectory { private String site; /* - * Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without - * domain specifier + * Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without domain specifier */ @JsonProperty(value = "backupOperators") private List backupOperators; /* - * Users to be added to the Built-in Administrators active directory group. A list of unique usernames without - * domain specifier + * Users to be added to the Built-in Administrators active directory group. A list of unique usernames without domain specifier */ @JsonProperty(value = "administrators") private List administrators; /* - * kdc server IP addresses for the active directory machine. This optional parameter is used only while creating - * kerberos volume. + * kdc server IP addresses for the active directory machine. This optional parameter is used only while creating kerberos volume. */ @JsonProperty(value = "kdcIP") private String kdcIp; @@ -102,9 +98,7 @@ public final class ActiveDirectory { private String adName; /* - * When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded Active Directory - * Certificate Service's self-signed root CA certificate, this optional parameter is used only for dual protocol - * with LDAP user-mapping volumes. + * When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded Active Directory Certificate Service's self-signed root CA certificate, this optional parameter is used only for dual protocol with LDAP user-mapping volumes. */ @JsonProperty(value = "serverRootCACertificate") private String serverRootCACertificate; @@ -122,8 +116,7 @@ public final class ActiveDirectory { private Boolean ldapSigning; /* - * Domain Users in the Active directory to be given SeSecurityPrivilege privilege (Needed for SMB Continuously - * available shares for SQL). A list of unique usernames without domain specifier + * Domain Users in the Active directory to be given SeSecurityPrivilege privilege (Needed for SMB Continuously available shares for SQL). A list of unique usernames without domain specifier */ @JsonProperty(value = "securityOperators") private List securityOperators; @@ -135,7 +128,7 @@ public final class ActiveDirectory { private Boolean ldapOverTls; /* - * If enabled, NFS client local users can also (in addition to LDAP users) access the NFS volumes. + * If enabled, NFS client local users can also (in addition to LDAP users) access the NFS volumes. */ @JsonProperty(value = "allowLocalNfsUsersWithLdap") private Boolean allowLocalNfsUsersWithLdap; @@ -153,8 +146,7 @@ public final class ActiveDirectory { private LdapSearchScopeOpt ldapSearchScope; /* - * Comma separated list of IPv4 addresses of preferred servers for LDAP client. At most two comma separated IPv4 - * addresses can be passed. + * Comma separated list of IPv4 addresses of preferred servers for LDAP client. At most two comma separated IPv4 addresses can be passed. */ @JsonProperty(value = "preferredServersForLdapClient") private String preferredServersForLdapClient; @@ -394,8 +386,8 @@ public ActiveDirectory withAdministrators(List administrators) { } /** - * Get the kdcIp property: kdc server IP addresses for the active directory machine. This optional parameter is - * used only while creating kerberos volume. + * Get the kdcIp property: kdc server IP addresses for the active directory machine. This optional parameter is used + * only while creating kerberos volume. * * @return the kdcIp value. */ @@ -404,8 +396,8 @@ public String kdcIp() { } /** - * Set the kdcIp property: kdc server IP addresses for the active directory machine. This optional parameter is - * used only while creating kerberos volume. + * Set the kdcIp property: kdc server IP addresses for the active directory machine. This optional parameter is used + * only while creating kerberos volume. * * @param kdcIp the kdcIp value to set. * @return the ActiveDirectory object itself. @@ -439,8 +431,8 @@ public ActiveDirectory withAdName(String adName) { /** * Get the serverRootCACertificate property: When LDAP over SSL/TLS is enabled, the LDAP client is required to have - * base64 encoded Active Directory Certificate Service's self-signed root CA certificate, this optional parameter - * is used only for dual protocol with LDAP user-mapping volumes. + * base64 encoded Active Directory Certificate Service's self-signed root CA certificate, this optional parameter is + * used only for dual protocol with LDAP user-mapping volumes. * * @return the serverRootCACertificate value. */ @@ -450,8 +442,8 @@ public String serverRootCACertificate() { /** * Set the serverRootCACertificate property: When LDAP over SSL/TLS is enabled, the LDAP client is required to have - * base64 encoded Active Directory Certificate Service's self-signed root CA certificate, this optional parameter - * is used only for dual protocol with LDAP user-mapping volumes. + * base64 encoded Active Directory Certificate Service's self-signed root CA certificate, this optional parameter is + * used only for dual protocol with LDAP user-mapping volumes. * * @param serverRootCACertificate the serverRootCACertificate value to set. * @return the ActiveDirectory object itself. 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 new file mode 100644 index 0000000000000..b3e82fc922993 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backup.java @@ -0,0 +1,311 @@ +// 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.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.BackupInner; +import java.time.OffsetDateTime; + +/** + * An immutable client-side representation of Backup. + */ +public interface Backup { + /** + * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the backupId property: backupId + * + * UUID v4 used to identify the Backup. + * + * @return the backupId value. + */ + String backupId(); + + /** + * Gets the creationDate property: creationDate + * + * The creation date of the backup. + * + * @return the creationDate value. + */ + OffsetDateTime creationDate(); + + /** + * Gets the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * Gets the size property: Size of backup in bytes. + * + * @return the size value. + */ + Long size(); + + /** + * Gets the label property: Label for backup. + * + * @return the label value. + */ + String label(); + + /** + * Gets the backupType property: backupType + * + * Type of backup Manual or Scheduled. + * + * @return the backupType value. + */ + BackupType backupType(); + + /** + * Gets the failureReason property: Failure reason. + * + * @return the failureReason value. + */ + String failureReason(); + + /** + * Gets the volumeResourceId property: ResourceId used to identify the Volume. + * + * @return the volumeResourceId value. + */ + String volumeResourceId(); + + /** + * Gets the useExistingSnapshot property: Manual backup an already existing snapshot. This will always be false for + * scheduled backups and true/false for manual backups. + * + * @return the useExistingSnapshot value. + */ + Boolean useExistingSnapshot(); + + /** + * Gets the snapshotName property: The name of the snapshot. + * + * @return the snapshotName value. + */ + String snapshotName(); + + /** + * Gets the backupPolicyResourceId property: ResourceId used to identify the backup policy. + * + * @return the backupPolicyResourceId value. + */ + String backupPolicyResourceId(); + + /** + * 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. + * + * @return the inner object. + */ + BackupInner innerModel(); + + /** + * The entirety of the Backup definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithVolumeResourceId, DefinitionStages.WithCreate { + } + + /** + * The Backup definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Backup definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the Backup definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, accountName, backupVaultName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @return the next definition stage. + */ + WithVolumeResourceId withExistingBackupVault(String resourceGroupName, String accountName, + String backupVaultName); + } + + /** + * The stage of the Backup definition allowing to specify volumeResourceId. + */ + interface WithVolumeResourceId { + /** + * Specifies the volumeResourceId property: ResourceId used to identify the Volume. + * + * @param volumeResourceId ResourceId used to identify the Volume. + * @return the next definition stage. + */ + WithCreate withVolumeResourceId(String volumeResourceId); + } + + /** + * The stage of the Backup 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.WithLabel, DefinitionStages.WithUseExistingSnapshot, + DefinitionStages.WithSnapshotName { + /** + * Executes the create request. + * + * @return the created resource. + */ + Backup create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Backup create(Context context); + } + + /** + * The stage of the Backup definition allowing to specify label. + */ + interface WithLabel { + /** + * Specifies the label property: Label for backup. + * + * @param label Label for backup. + * @return the next definition stage. + */ + WithCreate withLabel(String label); + } + + /** + * The stage of the Backup definition allowing to specify useExistingSnapshot. + */ + interface WithUseExistingSnapshot { + /** + * Specifies the useExistingSnapshot property: Manual backup an already existing snapshot. This will always + * be false for scheduled backups and true/false for manual backups. + * + * @param useExistingSnapshot Manual backup an already existing snapshot. This will always be false for + * scheduled backups and true/false for manual backups. + * @return the next definition stage. + */ + WithCreate withUseExistingSnapshot(Boolean useExistingSnapshot); + } + + /** + * The stage of the Backup definition allowing to specify snapshotName. + */ + interface WithSnapshotName { + /** + * Specifies the snapshotName property: The name of the snapshot. + * + * @param snapshotName The name of the snapshot. + * @return the next definition stage. + */ + WithCreate withSnapshotName(String snapshotName); + } + } + + /** + * Begins update for the Backup resource. + * + * @return the stage of resource update. + */ + Backup.Update update(); + + /** + * The template for Backup update. + */ + interface Update extends UpdateStages.WithLabel { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Backup apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Backup apply(Context context); + } + + /** + * The Backup update stages. + */ + interface UpdateStages { + /** + * The stage of the Backup update allowing to specify label. + */ + interface WithLabel { + /** + * Specifies the label property: Label for backup. + * + * @param label Label for backup. + * @return the next definition stage. + */ + Update withLabel(String label); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Backup refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Backup refresh(Context context); +} 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 new file mode 100644 index 0000000000000..10b95c292fe38 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java @@ -0,0 +1,70 @@ +// 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.BackupPatchProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Backup patch. + */ +@Fluent +public final class BackupPatch { + /* + * Backup Patch Properties + */ + @JsonProperty(value = "properties") + private BackupPatchProperties innerProperties; + + /** + * Creates an instance of BackupPatch class. + */ + public BackupPatch() { + } + + /** + * Get the innerProperties property: Backup Patch Properties. + * + * @return the innerProperties value. + */ + private BackupPatchProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the label property: Label for backup. + * + * @return the label value. + */ + public String label() { + return this.innerProperties() == null ? null : this.innerProperties().label(); + } + + /** + * Set the label property: Label for backup. + * + * @param label the label value to set. + * @return the BackupPatch object itself. + */ + public BackupPatch withLabel(String label) { + if (this.innerProperties() == null) { + this.innerProperties = new BackupPatchProperties(); + } + this.innerProperties().withLabel(label); + 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/BackupRestoreFiles.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupRestoreFiles.java new file mode 100644 index 0000000000000..7d9d9c7836f57 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupRestoreFiles.java @@ -0,0 +1,125 @@ +// 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.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Restore payload for Single File Backup Restore. + */ +@Fluent +public final class BackupRestoreFiles { + /* + * List of files to be restored + */ + @JsonProperty(value = "fileList", required = true) + private List fileList; + + /* + * Destination folder where the files will be restored. The path name should start with a forward slash. If it is omitted from request then restore is done at the root folder of the destination volume by default + */ + @JsonProperty(value = "restoreFilePath") + private String restoreFilePath; + + /* + * Resource Id of the destination volume on which the files need to be restored + */ + @JsonProperty(value = "destinationVolumeId", required = true) + private String destinationVolumeId; + + /** + * Creates an instance of BackupRestoreFiles class. + */ + public BackupRestoreFiles() { + } + + /** + * Get the fileList property: List of files to be restored. + * + * @return the fileList value. + */ + public List fileList() { + return this.fileList; + } + + /** + * Set the fileList property: List of files to be restored. + * + * @param fileList the fileList value to set. + * @return the BackupRestoreFiles object itself. + */ + public BackupRestoreFiles withFileList(List fileList) { + this.fileList = fileList; + return this; + } + + /** + * Get the restoreFilePath property: Destination folder where the files will be restored. The path name should start + * with a forward slash. If it is omitted from request then restore is done at the root folder of the destination + * volume by default. + * + * @return the restoreFilePath value. + */ + public String restoreFilePath() { + return this.restoreFilePath; + } + + /** + * Set the restoreFilePath property: Destination folder where the files will be restored. The path name should start + * with a forward slash. If it is omitted from request then restore is done at the root folder of the destination + * volume by default. + * + * @param restoreFilePath the restoreFilePath value to set. + * @return the BackupRestoreFiles object itself. + */ + public BackupRestoreFiles withRestoreFilePath(String restoreFilePath) { + this.restoreFilePath = restoreFilePath; + return this; + } + + /** + * Get the destinationVolumeId property: Resource Id of the destination volume on which the files need to be + * restored. + * + * @return the destinationVolumeId value. + */ + public String destinationVolumeId() { + return this.destinationVolumeId; + } + + /** + * Set the destinationVolumeId property: Resource Id of the destination volume on which the files need to be + * restored. + * + * @param destinationVolumeId the destinationVolumeId value to set. + * @return the BackupRestoreFiles object itself. + */ + public BackupRestoreFiles withDestinationVolumeId(String destinationVolumeId) { + this.destinationVolumeId = destinationVolumeId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (fileList() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property fileList in model BackupRestoreFiles")); + } + if (destinationVolumeId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property destinationVolumeId in model BackupRestoreFiles")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(BackupRestoreFiles.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupStatus.java new file mode 100644 index 0000000000000..7b5447a254d97 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupStatus.java @@ -0,0 +1,83 @@ +// 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.BackupStatusInner; + +/** + * An immutable client-side representation of BackupStatus. + */ +public interface BackupStatus { + /** + * Gets the healthy property: Backup health status. + * + * @return the healthy value. + */ + Boolean healthy(); + + /** + * Gets the relationshipStatus property: Status of the backup mirror relationship. + * + * @return the relationshipStatus value. + */ + RelationshipStatus relationshipStatus(); + + /** + * Gets the mirrorState property: The status of the backup. + * + * @return the mirrorState value. + */ + MirrorState mirrorState(); + + /** + * Gets the unhealthyReason property: Reason for the unhealthy backup relationship. + * + * @return the unhealthyReason value. + */ + String unhealthyReason(); + + /** + * Gets the errorMessage property: Displays error message if the backup is in an error state. + * + * @return the errorMessage value. + */ + String errorMessage(); + + /** + * Gets the lastTransferSize property: Displays the last transfer size. + * + * @return the lastTransferSize value. + */ + Long lastTransferSize(); + + /** + * Gets the lastTransferType property: Displays the last transfer type. + * + * @return the lastTransferType value. + */ + String lastTransferType(); + + /** + * Gets the totalTransferBytes property: Displays the total bytes transferred. + * + * @return the totalTransferBytes value. + */ + Long totalTransferBytes(); + + /** + * Gets the transferProgressBytes property: Displays the total number of bytes transferred for the ongoing + * operation. + * + * @return the transferProgressBytes value. + */ + Long transferProgressBytes(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner object. + * + * @return the inner object. + */ + BackupStatusInner innerModel(); +} 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 new file mode 100644 index 0000000000000..840e5383705be --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java @@ -0,0 +1,55 @@ +// 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; + +/** + * backupType + * + * Type of backup Manual or Scheduled. + */ +public final class BackupType extends ExpandableStringEnum { + /** + * Static value Manual for BackupType. + */ + public static final BackupType MANUAL = fromString("Manual"); + + /** + * Static value Scheduled for BackupType. + */ + public static final BackupType SCHEDULED = fromString("Scheduled"); + + /** + * Creates a new instance of BackupType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BackupType() { + } + + /** + * Creates or finds a BackupType from its string representation. + * + * @param name a name to look for. + * @return the corresponding BackupType. + */ + @JsonCreator + public static BackupType fromString(String name) { + return fromString(name, BackupType.class); + } + + /** + * 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/BackupVault.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVault.java new file mode 100644 index 0000000000000..778124fa7ed50 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVault.java @@ -0,0 +1,240 @@ +// 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.BackupVaultInner; +import java.util.Map; + +/** + * An immutable client-side representation of BackupVault. + */ +public interface BackupVault { + /** + * 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: Azure lifecycle management. + * + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * 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.BackupVaultInner object. + * + * @return the inner object. + */ + BackupVaultInner innerModel(); + + /** + * The entirety of the BackupVault definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The BackupVault definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the BackupVault definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the BackupVault 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 BackupVault definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, accountName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @return the next definition stage. + */ + WithCreate withExistingNetAppAccount(String resourceGroupName, String accountName); + } + + /** + * The stage of the BackupVault 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + BackupVault create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + BackupVault create(Context context); + } + + /** + * The stage of the BackupVault 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); + } + } + + /** + * Begins update for the BackupVault resource. + * + * @return the stage of resource update. + */ + BackupVault.Update update(); + + /** + * The template for BackupVault update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + BackupVault apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + BackupVault apply(Context context); + } + + /** + * The BackupVault update stages. + */ + interface UpdateStages { + /** + * The stage of the BackupVault update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + BackupVault refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + BackupVault refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultPatch.java new file mode 100644 index 0000000000000..0a25d4bb2e7f3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultPatch.java @@ -0,0 +1,57 @@ +// 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * Backup Vault information. + */ +@Fluent +public final class BackupVaultPatch { + /* + * Resource tags + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** + * Creates an instance of BackupVaultPatch class. + */ + public BackupVaultPatch() { + } + + /** + * 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 BackupVaultPatch object itself. + */ + public BackupVaultPatch withTags(Map tags) { + this.tags = tags; + 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/models/BackupVaults.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaults.java new file mode 100644 index 0000000000000..bdf958fac0789 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaults.java @@ -0,0 +1,164 @@ +// 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 BackupVaults. + */ +public interface BackupVaults { + /** + * Describe all Backup Vaults + * + * List and describe all Backup Vaults in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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 Backup Vaults as paginated response with {@link PagedIterable}. + */ + PagedIterable listByNetAppAccount(String resourceGroupName, String accountName); + + /** + * Describe all Backup Vaults + * + * List and describe all Backup Vaults in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @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 Backup Vaults as paginated response with {@link PagedIterable}. + */ + PagedIterable listByNetAppAccount(String resourceGroupName, String accountName, Context context); + + /** + * Describe the Backup Vault + * + * Get the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Backup Vault along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String accountName, String backupVaultName, + Context context); + + /** + * Describe the Backup Vault + * + * Get the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Backup Vault. + */ + BackupVault get(String resourceGroupName, String accountName, String backupVaultName); + + /** + * Delete NetApp Backup Vault + * + * Delete the specified Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @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 backupVaultName); + + /** + * Delete NetApp Backup Vault + * + * Delete the specified Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @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 backupVaultName, Context context); + + /** + * Describe the Backup Vault + * + * Get the Backup Vault. + * + * @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 the Backup Vault along with {@link Response}. + */ + BackupVault getById(String id); + + /** + * Describe the Backup Vault + * + * Get the Backup Vault. + * + * @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 the Backup Vault along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete NetApp Backup Vault + * + * Delete the specified Backup Vault. + * + * @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 NetApp Backup Vault + * + * Delete the specified Backup Vault. + * + * @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 BackupVault resource. + * + * @param name resource name. + * @return the first stage of the new BackupVault definition. + */ + BackupVault.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultsList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultsList.java new file mode 100644 index 0000000000000..81bc9513ab556 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultsList.java @@ -0,0 +1,85 @@ +// 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.BackupVaultInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of Backup Vaults. + */ +@Fluent +public final class BackupVaultsList { + /* + * A list of Backup Vaults + */ + @JsonProperty(value = "value") + private List value; + + /* + * URL to get the next set of results. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of BackupVaultsList class. + */ + public BackupVaultsList() { + } + + /** + * Get the value property: A list of Backup Vaults. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of Backup Vaults. + * + * @param value the value value to set. + * @return the BackupVaultsList object itself. + */ + public BackupVaultsList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: URL to get the next set of results. + * + * @param nextLink the nextLink value to set. + * @return the BackupVaultsList object itself. + */ + public BackupVaultsList withNextLink(String nextLink) { + this.nextLink = nextLink; + 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/Backups.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backups.java index f80539951799e..41831d58860dd 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backups.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backups.java @@ -4,6 +4,7 @@ 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; @@ -12,9 +13,9 @@ */ public interface Backups { /** - * Get volume's restore status + * Get the latest backup status of a volume * - * Get the status of the restore for a volume. + * Get the latest status of the backup for a volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -24,15 +25,49 @@ public interface Backups { * @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 status of the restore for a volume along with {@link Response}. + * @return the latest status of the backup for a volume along with {@link Response}. */ - Response getVolumeRestoreStatusWithResponse(String resourceGroupName, String accountName, + Response getLatestStatusWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context); + + /** + * Get the latest backup status of a volume + * + * Get the latest status of the backup for a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 latest status of the backup for a volume. + */ + BackupStatus getLatestStatus(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Get the latest restore status of a volume + * + * Get the latest status of the restore for a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 latest status of the restore for a volume along with {@link Response}. + */ + Response getVolumeLatestRestoreStatusWithResponse(String resourceGroupName, String accountName, String poolName, String volumeName, Context context); /** - * Get volume's restore status + * Get the latest restore status of a volume * - * Get the status of the restore for a volume. + * Get the latest status of the restore for a volume. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of the NetApp account. @@ -41,8 +76,168 @@ Response getVolumeRestoreStatusWithResponse(String resourceGroupN * @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 status of the restore for a volume. + * @return the latest status of the restore for a volume. */ - RestoreStatus getVolumeRestoreStatus(String resourceGroupName, String accountName, String poolName, + RestoreStatus getVolumeLatestRestoreStatus(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * List Backups + * + * List all backups Under a Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @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 Backups as paginated response with {@link PagedIterable}. + */ + PagedIterable listByVault(String resourceGroupName, String accountName, String backupVaultName); + + /** + * List Backups + * + * List all backups Under a Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param filter An option to specify the VolumeResourceId. If present, then only returns the backups under the + * 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 of Backups as paginated response with {@link PagedIterable}. + */ + PagedIterable listByVault(String resourceGroupName, String accountName, String backupVaultName, + String filter, Context context); + + /** + * Describe the Backup under Backup Vault + * + * Get the specified Backup under Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Backup under Backup Vault along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String accountName, String backupVaultName, + String backupName, Context context); + + /** + * Describe the Backup under Backup Vault + * + * Get the specified Backup under Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Backup under Backup Vault. + */ + Backup get(String resourceGroupName, String accountName, String backupVaultName, String backupName); + + /** + * Delete backup + * + * Delete a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @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 backupVaultName, String backupName); + + /** + * Delete backup + * + * Delete a Backup under the Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @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 backupVaultName, String backupName, + Context context); + + /** + * Describe the Backup under Backup Vault + * + * Get the specified Backup under Backup Vault. + * + * @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 the specified Backup under Backup Vault along with {@link Response}. + */ + Backup getById(String id); + + /** + * Describe the Backup under Backup Vault + * + * Get the specified Backup under Backup Vault. + * + * @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 the specified Backup under Backup Vault along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete backup + * + * Delete a Backup under the Backup Vault. + * + * @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 backup + * + * Delete a Backup under the Backup Vault. + * + * @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 Backup resource. + * + * @param name resource name. + * @return the first stage of the new Backup definition. + */ + Backup.DefinitionStages.Blank define(String name); } 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 new file mode 100644 index 0000000000000..3bdae065250b0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsList.java @@ -0,0 +1,85 @@ +// 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.BackupInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of Backups. + */ +@Fluent +public final class BackupsList { + /* + * A list of Backups + */ + @JsonProperty(value = "value") + private List value; + + /* + * URL to get the next set of results. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of BackupsList class. + */ + public BackupsList() { + } + + /** + * Get the value property: A list of Backups. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of Backups. + * + * @param value the value value to set. + * @return the BackupsList object itself. + */ + public BackupsList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: URL to get the next set of results. + * + * @param nextLink the nextLink value to set. + * @return the BackupsList object itself. + */ + public BackupsList withNextLink(String nextLink) { + this.nextLink = nextLink; + 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/BackupsMigrationRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsMigrationRequest.java new file mode 100644 index 0000000000000..1ed2f88b24a31 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsMigrationRequest.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.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Migrate Backups Request. + */ +@Fluent +public final class BackupsMigrationRequest { + /* + * The ResourceId of the Backup Vault + */ + @JsonProperty(value = "backupVaultId", required = true) + private String backupVaultId; + + /** + * Creates an instance of BackupsMigrationRequest class. + */ + public BackupsMigrationRequest() { + } + + /** + * Get the backupVaultId property: The ResourceId of the Backup Vault. + * + * @return the backupVaultId value. + */ + public String backupVaultId() { + return this.backupVaultId; + } + + /** + * Set the backupVaultId property: The ResourceId of the Backup Vault. + * + * @param backupVaultId the backupVaultId value to set. + * @return the BackupsMigrationRequest object itself. + */ + public BackupsMigrationRequest withBackupVaultId(String backupVaultId) { + this.backupVaultId = backupVaultId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (backupVaultId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property backupVaultId in model BackupsMigrationRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(BackupsMigrationRequest.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderAccounts.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderAccounts.java new file mode 100644 index 0000000000000..2f0176a3561a1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderAccounts.java @@ -0,0 +1,41 @@ +// 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.Context; + +/** + * Resource collection API of BackupsUnderAccounts. + */ +public interface BackupsUnderAccounts { + /** + * Create a new migrate request for backups under account + * + * Migrate the backups under a NetApp account to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body Migrate backups under an account payload 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. + */ + void migrateBackups(String resourceGroupName, String accountName, BackupsMigrationRequest body); + + /** + * Create a new migrate request for backups under account + * + * Migrate the backups under a NetApp account to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param body Migrate backups under an account payload 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. + */ + void migrateBackups(String resourceGroupName, String accountName, BackupsMigrationRequest body, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderBackupVaults.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderBackupVaults.java new file mode 100644 index 0000000000000..45e4d720539bc --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderBackupVaults.java @@ -0,0 +1,47 @@ +// 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.Context; + +/** + * Resource collection API of BackupsUnderBackupVaults. + */ +public interface BackupsUnderBackupVaults { + /** + * Create a new Backup Restore Files request + * + * Restore the specified files from the specified backup to the active filesystem. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Restore payload 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. + */ + void restoreFiles(String resourceGroupName, String accountName, String backupVaultName, String backupName, + BackupRestoreFiles body); + + /** + * Create a new Backup Restore Files request + * + * Restore the specified files from the specified backup to the active filesystem. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param backupVaultName The name of the Backup Vault. + * @param backupName The name of the backup. + * @param body Restore payload 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. + */ + void restoreFiles(String resourceGroupName, String accountName, String backupVaultName, String backupName, + BackupRestoreFiles body, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderVolumes.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderVolumes.java new file mode 100644 index 0000000000000..d277aa4b64d21 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderVolumes.java @@ -0,0 +1,47 @@ +// 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.Context; + +/** + * Resource collection API of BackupsUnderVolumes. + */ +public interface BackupsUnderVolumes { + /** + * Create a new migrate request for backups under volume + * + * Migrate the backups under volume to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Migrate backups under volume payload 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. + */ + void migrateBackups(String resourceGroupName, String accountName, String poolName, String volumeName, + BackupsMigrationRequest body); + + /** + * Create a new migrate request for backups under volume + * + * Migrate the backups under volume to backup vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Migrate backups under volume payload 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. + */ + void migrateBackups(String resourceGroupName, String accountName, String poolName, String volumeName, + BackupsMigrationRequest body, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakFileLocksRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakFileLocksRequest.java index f7938fe6e2220..618f6b87bb475 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakFileLocksRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakFileLocksRequest.java @@ -19,8 +19,7 @@ public final class BreakFileLocksRequest { private String clientIp; /* - * Break File locks could be a disruptive operation for application as locks on the volume will be broken, if want - * to process, set to true. + * Break File locks could be a disruptive operation for application as locks on the volume will be broken, if want to process, set to true. */ @JsonProperty(value = "confirmRunningDisruptiveOperation") private Boolean confirmRunningDisruptiveOperation; 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 3b19e5a77457d..31dd9c198194a 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 @@ -76,7 +76,7 @@ public interface CapacityPool { * Gets the size property: size * * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of - * 4398046511104). + * 1099511627776). * * @return the size value. */ @@ -225,12 +225,12 @@ interface WithSize { * Specifies the size property: size * * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of - * 4398046511104).. + * 1099511627776).. * * @param size size * * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of - * 4398046511104). + * 1099511627776). * @return the next definition stage. */ WithServiceLevel withSize(long size); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChangeKeyVault.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChangeKeyVault.java new file mode 100644 index 0000000000000..eb4f2e0c0ce82 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChangeKeyVault.java @@ -0,0 +1,182 @@ +// 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.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Change key vault request. + */ +@Fluent +public final class ChangeKeyVault { + /* + * keyVaultUri + * + * The URI of the key vault/managed HSM that should be used for encryption. + */ + @JsonProperty(value = "keyVaultUri", required = true) + private String keyVaultUri; + + /* + * keyName + * + * The name of the key that should be used for encryption. + */ + @JsonProperty(value = "keyName", required = true) + private String keyName; + + /* + * keyVaultResourceId + * + * Azure resource ID of the key vault/managed HSM that should be used for encryption. + */ + @JsonProperty(value = "keyVaultResourceId", required = true) + private String keyVaultResourceId; + + /* + * keyVaultPrivateEndpoints + * + * Pairs of virtual network ID and private endpoint ID. Every virtual network that has volumes encrypted with customer-managed keys needs its own key vault private endpoint. + */ + @JsonProperty(value = "keyVaultPrivateEndpoints", required = true) + private List keyVaultPrivateEndpoints; + + /** + * Creates an instance of ChangeKeyVault class. + */ + public ChangeKeyVault() { + } + + /** + * Get the keyVaultUri property: keyVaultUri + * + * The URI of the key vault/managed HSM that should be used for encryption. + * + * @return the keyVaultUri value. + */ + public String keyVaultUri() { + return this.keyVaultUri; + } + + /** + * Set the keyVaultUri property: keyVaultUri + * + * The URI of the key vault/managed HSM that should be used for encryption. + * + * @param keyVaultUri the keyVaultUri value to set. + * @return the ChangeKeyVault object itself. + */ + public ChangeKeyVault withKeyVaultUri(String keyVaultUri) { + this.keyVaultUri = keyVaultUri; + return this; + } + + /** + * Get the keyName property: keyName + * + * The name of the key that should be used for encryption. + * + * @return the keyName value. + */ + public String keyName() { + return this.keyName; + } + + /** + * Set the keyName property: keyName + * + * The name of the key that should be used for encryption. + * + * @param keyName the keyName value to set. + * @return the ChangeKeyVault object itself. + */ + public ChangeKeyVault withKeyName(String keyName) { + this.keyName = keyName; + return this; + } + + /** + * Get the keyVaultResourceId property: keyVaultResourceId + * + * Azure resource ID of the key vault/managed HSM that should be used for encryption. + * + * @return the keyVaultResourceId value. + */ + public String keyVaultResourceId() { + return this.keyVaultResourceId; + } + + /** + * Set the keyVaultResourceId property: keyVaultResourceId + * + * Azure resource ID of the key vault/managed HSM that should be used for encryption. + * + * @param keyVaultResourceId the keyVaultResourceId value to set. + * @return the ChangeKeyVault object itself. + */ + public ChangeKeyVault withKeyVaultResourceId(String keyVaultResourceId) { + this.keyVaultResourceId = keyVaultResourceId; + return this; + } + + /** + * Get the keyVaultPrivateEndpoints property: keyVaultPrivateEndpoints + * + * Pairs of virtual network ID and private endpoint ID. Every virtual network that has volumes encrypted with + * customer-managed keys needs its own key vault private endpoint. + * + * @return the keyVaultPrivateEndpoints value. + */ + public List keyVaultPrivateEndpoints() { + return this.keyVaultPrivateEndpoints; + } + + /** + * Set the keyVaultPrivateEndpoints property: keyVaultPrivateEndpoints + * + * Pairs of virtual network ID and private endpoint ID. Every virtual network that has volumes encrypted with + * customer-managed keys needs its own key vault private endpoint. + * + * @param keyVaultPrivateEndpoints the keyVaultPrivateEndpoints value to set. + * @return the ChangeKeyVault object itself. + */ + public ChangeKeyVault withKeyVaultPrivateEndpoints(List keyVaultPrivateEndpoints) { + this.keyVaultPrivateEndpoints = keyVaultPrivateEndpoints; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyVaultUri() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property keyVaultUri in model ChangeKeyVault")); + } + if (keyName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property keyName in model ChangeKeyVault")); + } + if (keyVaultResourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property keyVaultResourceId in model ChangeKeyVault")); + } + if (keyVaultPrivateEndpoints() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property keyVaultPrivateEndpoints in model ChangeKeyVault")); + } else { + keyVaultPrivateEndpoints().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ChangeKeyVault.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeerCommandResponse.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeerCommandResponse.java new file mode 100644 index 0000000000000..278519b23813f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeerCommandResponse.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.models; + +import com.azure.resourcemanager.netapp.fluent.models.ClusterPeerCommandResponseInner; + +/** + * An immutable client-side representation of ClusterPeerCommandResponse. + */ +public interface ClusterPeerCommandResponse { + /** + * Gets the peerAcceptCommand property: A command that needs to be run on the external ONTAP to accept cluster + * peering. Will only be present if <code>clusterPeeringStatus</code> is + * <code>pending</code>. + * + * @return the peerAcceptCommand value. + */ + String peerAcceptCommand(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.ClusterPeerCommandResponseInner object. + * + * @return the inner object. + */ + ClusterPeerCommandResponseInner innerModel(); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionIdentity.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionIdentity.java index 1da24f921a822..02772b9aec34c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionIdentity.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionIdentity.java @@ -19,8 +19,7 @@ public final class EncryptionIdentity { private String principalId; /* - * The ARM resource identifier of the user assigned identity used to authenticate with key vault. Applicable if - * identity.type has 'UserAssigned'. It should match key of identity.userAssignedIdentities. + * The ARM resource identifier of the user assigned identity used to authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match key of identity.userAssignedIdentities. */ @JsonProperty(value = "userAssignedIdentity") private String userAssignedIdentity; diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionMigrationRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionMigrationRequest.java new file mode 100644 index 0000000000000..6e9ddd9416b7a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionMigrationRequest.java @@ -0,0 +1,105 @@ +// 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.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Encryption migration request. + */ +@Fluent +public final class EncryptionMigrationRequest { + /* + * virtualNetworkId + * + * Identifier for the virtual network + */ + @JsonProperty(value = "virtualNetworkId", required = true) + private String virtualNetworkId; + + /* + * privateEndpointId + * + * Identifier of the private endpoint to reach the Azure Key Vault + */ + @JsonProperty(value = "privateEndpointId", required = true) + private String privateEndpointId; + + /** + * Creates an instance of EncryptionMigrationRequest class. + */ + public EncryptionMigrationRequest() { + } + + /** + * Get the virtualNetworkId property: virtualNetworkId + * + * Identifier for the virtual network. + * + * @return the virtualNetworkId value. + */ + public String virtualNetworkId() { + return this.virtualNetworkId; + } + + /** + * Set the virtualNetworkId property: virtualNetworkId + * + * Identifier for the virtual network. + * + * @param virtualNetworkId the virtualNetworkId value to set. + * @return the EncryptionMigrationRequest object itself. + */ + public EncryptionMigrationRequest withVirtualNetworkId(String virtualNetworkId) { + this.virtualNetworkId = virtualNetworkId; + return this; + } + + /** + * Get the privateEndpointId property: privateEndpointId + * + * Identifier of the private endpoint to reach the Azure Key Vault. + * + * @return the privateEndpointId value. + */ + public String privateEndpointId() { + return this.privateEndpointId; + } + + /** + * Set the privateEndpointId property: privateEndpointId + * + * Identifier of the private endpoint to reach the Azure Key Vault. + * + * @param privateEndpointId the privateEndpointId value to set. + * @return the EncryptionMigrationRequest object itself. + */ + public EncryptionMigrationRequest withPrivateEndpointId(String privateEndpointId) { + this.privateEndpointId = privateEndpointId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (virtualNetworkId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property virtualNetworkId in model EncryptionMigrationRequest")); + } + if (privateEndpointId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property privateEndpointId in model EncryptionMigrationRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EncryptionMigrationRequest.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 464d500046f3f..736032f667b71 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 @@ -97,8 +97,7 @@ public final class ExportPolicyRule { private Boolean hasRootAccess; /* - * This parameter specifies who is authorized to change the ownership of a file. restricted - Only root user can - * change the ownership of the file. unrestricted - Non-root users can change ownership of files that they own. + * This parameter specifies who is authorized to change the ownership of a file. restricted - Only root user can change the ownership of the file. unrestricted - Non-root users can change ownership of files that they own. */ @JsonProperty(value = "chownMode") private ChownMode chownMode; @@ -236,8 +235,8 @@ public ExportPolicyRule withKerberos5IReadOnly(Boolean kerberos5IReadOnly) { } /** - * Get the kerberos5IReadWrite property: Kerberos5i Read and write access. To be use with swagger version - * 2020-05-01 or later. + * Get the kerberos5IReadWrite property: Kerberos5i Read and write access. To be use with swagger version 2020-05-01 + * or later. * * @return the kerberos5IReadWrite value. */ @@ -246,8 +245,8 @@ public Boolean kerberos5IReadWrite() { } /** - * Set the kerberos5IReadWrite property: Kerberos5i Read and write access. To be use with swagger version - * 2020-05-01 or later. + * Set the kerberos5IReadWrite property: Kerberos5i Read and write access. To be use with swagger version 2020-05-01 + * or later. * * @param kerberos5IReadWrite the kerberos5IReadWrite value to set. * @return the ExportPolicyRule object itself. @@ -280,8 +279,8 @@ public ExportPolicyRule withKerberos5PReadOnly(Boolean kerberos5PReadOnly) { } /** - * Get the kerberos5PReadWrite property: Kerberos5p Read and write access. To be use with swagger version - * 2020-05-01 or later. + * Get the kerberos5PReadWrite property: Kerberos5p Read and write access. To be use with swagger version 2020-05-01 + * or later. * * @return the kerberos5PReadWrite value. */ @@ -290,8 +289,8 @@ public Boolean kerberos5PReadWrite() { } /** - * Set the kerberos5PReadWrite property: Kerberos5p Read and write access. To be use with swagger version - * 2020-05-01 or later. + * Set the kerberos5PReadWrite property: Kerberos5p Read and write access. To be use with swagger version 2020-05-01 + * or later. * * @param kerberos5PReadWrite the kerberos5PReadWrite value to set. * @return the ExportPolicyRule object itself. 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 ffd70c149b09d..1be5b6ad13f5c 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 @@ -25,6 +25,14 @@ public final class FilePathAvailabilityRequest { @JsonProperty(value = "subnetId", required = true) private String subnetId; + /* + * Logical availability zone + * + * The Azure Resource logical availability zone which is used within zone mapping lookup for the subscription and region. The lookup will retrieve the physical zone where volume is placed. + */ + @JsonProperty(value = "availabilityZone") + private String availabilityZone; + /** * Creates an instance of FilePathAvailabilityRequest class. */ @@ -73,6 +81,32 @@ public FilePathAvailabilityRequest withSubnetId(String subnetId) { return this; } + /** + * Get the availabilityZone property: Logical availability zone + * + * The Azure Resource logical availability zone which is used within zone mapping lookup for the subscription and + * region. The lookup will retrieve the physical zone where volume is placed. + * + * @return the availabilityZone value. + */ + public String availabilityZone() { + return this.availabilityZone; + } + + /** + * Set the availabilityZone property: Logical availability zone + * + * The Azure Resource logical availability zone which is used within zone mapping lookup for the subscription and + * region. The lookup will retrieve the physical zone where volume is placed. + * + * @param availabilityZone the availabilityZone value to set. + * @return the FilePathAvailabilityRequest object itself. + */ + public FilePathAvailabilityRequest withAvailabilityZone(String availabilityZone) { + this.availabilityZone = availabilityZone; + return this; + } + /** * Validates the instance. * @@ -80,12 +114,14 @@ public FilePathAvailabilityRequest withSubnetId(String subnetId) { */ public void validate() { if (name() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property name in model FilePathAvailabilityRequest")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property name in model FilePathAvailabilityRequest")); } if (subnetId() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property subnetId in model FilePathAvailabilityRequest")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property subnetId in model FilePathAvailabilityRequest")); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/GetGroupIdListForLdapUserRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/GetGroupIdListForLdapUserRequest.java index f4f12a742f38c..e471bcdbb1f95 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/GetGroupIdListForLdapUserRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/GetGroupIdListForLdapUserRequest.java @@ -52,8 +52,9 @@ public GetGroupIdListForLdapUserRequest withUsername(String username) { */ public void validate() { if (username() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property username in model GetGroupIdListForLdapUserRequest")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property username in model GetGroupIdListForLdapUserRequest")); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultPrivateEndpoint.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultPrivateEndpoint.java new file mode 100644 index 0000000000000..6459dc02f3317 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultPrivateEndpoint.java @@ -0,0 +1,95 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** + * keyVaultPrivateEndpoint + * + * Pairs of virtual network ID and private endpoint ID. Every virtual network that has volumes encrypted with + * customer-managed keys needs its own key vault private endpoint. + */ +@Fluent +public final class KeyVaultPrivateEndpoint { + /* + * virtualNetworkId + * + * Identifier for the virtual network id + */ + @JsonProperty(value = "virtualNetworkId") + private String virtualNetworkId; + + /* + * privateEndpointId + * + * Identifier of the private endpoint to reach the Azure Key Vault + */ + @JsonProperty(value = "privateEndpointId") + private String privateEndpointId; + + /** + * Creates an instance of KeyVaultPrivateEndpoint class. + */ + public KeyVaultPrivateEndpoint() { + } + + /** + * Get the virtualNetworkId property: virtualNetworkId + * + * Identifier for the virtual network id. + * + * @return the virtualNetworkId value. + */ + public String virtualNetworkId() { + return this.virtualNetworkId; + } + + /** + * Set the virtualNetworkId property: virtualNetworkId + * + * Identifier for the virtual network id. + * + * @param virtualNetworkId the virtualNetworkId value to set. + * @return the KeyVaultPrivateEndpoint object itself. + */ + public KeyVaultPrivateEndpoint withVirtualNetworkId(String virtualNetworkId) { + this.virtualNetworkId = virtualNetworkId; + return this; + } + + /** + * Get the privateEndpointId property: privateEndpointId + * + * Identifier of the private endpoint to reach the Azure Key Vault. + * + * @return the privateEndpointId value. + */ + public String privateEndpointId() { + return this.privateEndpointId; + } + + /** + * Set the privateEndpointId property: privateEndpointId + * + * Identifier of the private endpoint to reach the Azure Key Vault. + * + * @param privateEndpointId the privateEndpointId value to set. + * @return the KeyVaultPrivateEndpoint object itself. + */ + public KeyVaultPrivateEndpoint withPrivateEndpointId(String privateEndpointId) { + this.privateEndpointId = privateEndpointId; + 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/models/KeyVaultProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultProperties.java index eb29929bf804d..be742c2d7f42a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultProperties.java @@ -134,16 +134,17 @@ public KeyVaultStatus status() { */ public void validate() { if (keyVaultUri() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property keyVaultUri in model KeyVaultProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property keyVaultUri in model KeyVaultProperties")); } if (keyName() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property keyName in model KeyVaultProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property keyName in model KeyVaultProperties")); } if (keyVaultResourceId() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property keyVaultResourceId in model KeyVaultProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property keyVaultResourceId in model KeyVaultProperties")); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentity.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentity.java index 2753cef5c00ed..52302fe979ada 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentity.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentity.java @@ -17,15 +17,13 @@ @Fluent public final class ManagedServiceIdentity { /* - * The service principal ID of the system assigned identity. This property will only be provided for a system - * assigned identity. + * The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. */ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) private UUID principalId; /* - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned - * identity. + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. */ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private UUID tenantId; @@ -37,11 +35,7 @@ public final class ManagedServiceIdentity { private ManagedServiceIdentityType type; /* - * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/ - * userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. + * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */ @JsonProperty(value = "userAssignedIdentities") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) @@ -64,8 +58,8 @@ public UUID principalId() { } /** - * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided - * for a system assigned identity. + * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for + * a system assigned identity. * * @return the tenantId value. */ @@ -128,8 +122,8 @@ public ManagedServiceIdentity withUserAssignedIdentities(Map { 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 867609d0b592a..44f211824d4fa 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 @@ -100,6 +100,21 @@ public interface NetAppAccount { */ Boolean disableShowmount(); + /** + * Gets the nfsV4IdDomain property: Domain for NFSv4 user ID mapping. This property will be set for all NetApp + * accounts in the subscription and region and only affect non ldap NFSv4 volumes. + * + * @return the nfsV4IdDomain value. + */ + String nfsV4IdDomain(); + + /** + * Gets the isMultiAdEnabled property: This will have true value only if account is Multiple AD enabled. + * + * @return the isMultiAdEnabled value. + */ + Boolean isMultiAdEnabled(); + /** * Gets the region of the resource. * @@ -183,8 +198,9 @@ interface WithResourceGroup { * The stage of the NetAppAccount 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.WithIdentity, - DefinitionStages.WithActiveDirectories, DefinitionStages.WithEncryption { + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithActiveDirectories, + DefinitionStages.WithEncryption, DefinitionStages.WithNfsV4IdDomain { /** * Executes the create request. * @@ -252,6 +268,21 @@ interface WithEncryption { */ WithCreate withEncryption(AccountEncryption encryption); } + + /** + * The stage of the NetAppAccount definition allowing to specify nfsV4IdDomain. + */ + interface WithNfsV4IdDomain { + /** + * Specifies the nfsV4IdDomain property: Domain for NFSv4 user ID mapping. This property will be set for all + * NetApp accounts in the subscription and region and only affect non ldap NFSv4 volumes.. + * + * @param nfsV4IdDomain Domain for NFSv4 user ID mapping. This property will be set for all NetApp accounts + * in the subscription and region and only affect non ldap NFSv4 volumes. + * @return the next definition stage. + */ + WithCreate withNfsV4IdDomain(String nfsV4IdDomain); + } } /** @@ -265,7 +296,7 @@ interface WithEncryption { * The template for NetAppAccount update. */ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithActiveDirectories, - UpdateStages.WithEncryption { + UpdateStages.WithEncryption, UpdateStages.WithNfsV4IdDomain { /** * Executes the update request. * @@ -337,6 +368,21 @@ interface WithEncryption { */ Update withEncryption(AccountEncryption encryption); } + + /** + * The stage of the NetAppAccount update allowing to specify nfsV4IdDomain. + */ + interface WithNfsV4IdDomain { + /** + * Specifies the nfsV4IdDomain property: Domain for NFSv4 user ID mapping. This property will be set for all + * NetApp accounts in the subscription and region and only affect non ldap NFSv4 volumes.. + * + * @param nfsV4IdDomain Domain for NFSv4 user ID mapping. This property will be set for all NetApp accounts + * in the subscription and region and only affect non ldap NFSv4 volumes. + * @return the next definition stage. + */ + Update withNfsV4IdDomain(String nfsV4IdDomain); + } } /** @@ -377,4 +423,80 @@ interface WithEncryption { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void renewCredentials(Context context); + + /** + * Migrate volumes encryption key source. + * + * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). + * Operation fails if targeted volumes share encryption sibling set with volumes from another account. + * + * @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 migrateEncryptionKey(); + + /** + * Migrate volumes encryption key source. + * + * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). + * Operation fails if targeted volumes share encryption sibling set with volumes from another account. + * + * @param body The required parameters to perform encryption migration. + * @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 migrateEncryptionKey(EncryptionMigrationRequest body, Context context); + + /** + * Get information about how volumes under NetApp account are encrypted. + * + * Contains data from encryption.keyVaultProperties as well as information about which private endpoint is used by + * each encryption sibling set. Response from this endpoint can be modified and used as request body for POST + * request. + * + * @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 getChangeKeyVaultInformation(); + + /** + * Get information about how volumes under NetApp account are encrypted. + * + * Contains data from encryption.keyVaultProperties as well as information about which private endpoint is used by + * each encryption sibling set. Response from this endpoint can be modified and used as request body for POST + * request. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void getChangeKeyVaultInformation(Context context); + + /** + * Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + * + * Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports MHSM to Key + * Vault, Key Vault to MHSM, MHSM to MHSM and Key Vault to Key Vault. + * + * @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 changeKeyVault(); + + /** + * Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + * + * Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports MHSM to Key + * Vault, Key Vault to MHSM, MHSM to MHSM and Key Vault to Key Vault. + * + * @param body The required parameters to perform encryption migration. + * @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 changeKeyVault(ChangeKeyVault body, Context context); } 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 551c73c4e8f0f..b33a3abb2b2b8 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 @@ -146,6 +146,40 @@ public Boolean disableShowmount() { return this.innerProperties() == null ? null : this.innerProperties().disableShowmount(); } + /** + * Get the nfsV4IdDomain property: Domain for NFSv4 user ID mapping. This property will be set for all NetApp + * accounts in the subscription and region and only affect non ldap NFSv4 volumes. + * + * @return the nfsV4IdDomain value. + */ + public String nfsV4IdDomain() { + return this.innerProperties() == null ? null : this.innerProperties().nfsV4IdDomain(); + } + + /** + * Set the nfsV4IdDomain property: Domain for NFSv4 user ID mapping. This property will be set for all NetApp + * accounts in the subscription and region and only affect non ldap NFSv4 volumes. + * + * @param nfsV4IdDomain the nfsV4IdDomain value to set. + * @return the NetAppAccountPatch object itself. + */ + public NetAppAccountPatch withNfsV4IdDomain(String nfsV4IdDomain) { + if (this.innerProperties() == null) { + this.innerProperties = new AccountProperties(); + } + this.innerProperties().withNfsV4IdDomain(nfsV4IdDomain); + return this; + } + + /** + * Get the isMultiAdEnabled property: This will have true value only if account is Multiple AD enabled. + * + * @return the isMultiAdEnabled value. + */ + public Boolean isMultiAdEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().isMultiAdEnabled(); + } + /** * Validates the instance. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceRegionInfos.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceRegionInfos.java new file mode 100644 index 0000000000000..b80138280bc23 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceRegionInfos.java @@ -0,0 +1,68 @@ +// 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 NetAppResourceRegionInfos. + */ +public interface NetAppResourceRegionInfos { + /** + * Describes region specific information. + * + * Provides region specific information. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of regionInfo resources as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String location); + + /** + * Describes region specific information. + * + * Provides region specific information. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of regionInfo resources as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String location, Context context); + + /** + * Describes region specific information. + * + * Provides storage to network proximity and logical zone mapping information. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding regionInfo Item along with {@link Response}. + */ + Response getWithResponse(String location, Context context); + + /** + * Describes region specific information. + * + * Provides storage to network proximity and logical zone mapping information. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding regionInfo Item. + */ + RegionInfoResource get(String location); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PeerClusterForVolumeMigrationRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PeerClusterForVolumeMigrationRequest.java new file mode 100644 index 0000000000000..09d02c02362ea --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PeerClusterForVolumeMigrationRequest.java @@ -0,0 +1,94 @@ +// 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.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Source cluster properties for a cluster peer request. + */ +@Fluent +public final class PeerClusterForVolumeMigrationRequest { + /* + * A list of IC-LIF IPs that can be used to connect to the on-prem cluster + */ + @JsonProperty(value = "peerAddresses", required = true) + private List peerAddresses; + + /* + * The full path to a volume that is to be migrated into ANF. Required for Migration volumes + */ + @JsonProperty(value = "remotePath") + private RemotePath remotePath; + + /** + * Creates an instance of PeerClusterForVolumeMigrationRequest class. + */ + public PeerClusterForVolumeMigrationRequest() { + } + + /** + * Get the peerAddresses property: A list of IC-LIF IPs that can be used to connect to the on-prem cluster. + * + * @return the peerAddresses value. + */ + public List peerAddresses() { + return this.peerAddresses; + } + + /** + * Set the peerAddresses property: A list of IC-LIF IPs that can be used to connect to the on-prem cluster. + * + * @param peerAddresses the peerAddresses value to set. + * @return the PeerClusterForVolumeMigrationRequest object itself. + */ + public PeerClusterForVolumeMigrationRequest withPeerAddresses(List peerAddresses) { + this.peerAddresses = peerAddresses; + return this; + } + + /** + * Get the remotePath property: The full path to a volume that is to be migrated into ANF. Required for Migration + * volumes. + * + * @return the remotePath value. + */ + public RemotePath remotePath() { + return this.remotePath; + } + + /** + * Set the remotePath property: The full path to a volume that is to be migrated into ANF. Required for Migration + * volumes. + * + * @param remotePath the remotePath value to set. + * @return the PeerClusterForVolumeMigrationRequest object itself. + */ + public PeerClusterForVolumeMigrationRequest withRemotePath(RemotePath remotePath) { + this.remotePath = remotePath; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (peerAddresses() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property peerAddresses in model PeerClusterForVolumeMigrationRequest")); + } + if (remotePath() != null) { + remotePath().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PeerClusterForVolumeMigrationRequest.class); +} 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 7fa34f04cab3a..dd0c08a426d32 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 @@ -32,8 +32,7 @@ public PlacementKeyValuePairs() { } /** - * Get the key property: Key for an application specific parameter for the placement of volumes in the volume - * group. + * Get the key property: Key for an application specific parameter for the placement of volumes in the volume group. * * @return the key value. */ @@ -42,8 +41,7 @@ public String key() { } /** - * Set the key property: Key for an application specific parameter for the placement of volumes in the volume - * group. + * Set the key property: Key for an application specific parameter for the placement of volumes in the volume group. * * @param key the key value to set. * @return the PlacementKeyValuePairs object itself. @@ -82,12 +80,12 @@ public PlacementKeyValuePairs withValue(String value) { */ public void validate() { if (key() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property key in model PlacementKeyValuePairs")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property key in model PlacementKeyValuePairs")); } if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model PlacementKeyValuePairs")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model PlacementKeyValuePairs")); } } 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 879c09260fb91..3f2015d440cc0 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 @@ -52,8 +52,9 @@ public PoolChangeRequest withNewPoolResourceId(String newPoolResourceId) { */ public void validate() { if (newPoolResourceId() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property newPoolResourceId in model PoolChangeRequest")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property newPoolResourceId in model PoolChangeRequest")); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QueryNetworkSiblingSetRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QueryNetworkSiblingSetRequest.java index 17a248122f09b..eb0782ffb45ad 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QueryNetworkSiblingSetRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QueryNetworkSiblingSetRequest.java @@ -26,9 +26,7 @@ public final class QueryNetworkSiblingSetRequest { /* * Subnet resource Id * - * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example - * /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/ - * subnets/{mySubnet} + * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet} */ @JsonProperty(value = "subnetId", required = true) private String subnetId; @@ -96,12 +94,14 @@ public QueryNetworkSiblingSetRequest withSubnetId(String subnetId) { */ public void validate() { if (networkSiblingSetId() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property networkSiblingSetId in model QueryNetworkSiblingSetRequest")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property networkSiblingSetId in model QueryNetworkSiblingSetRequest")); } if (subnetId() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property subnetId in model QueryNetworkSiblingSetRequest")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property subnetId in model QueryNetworkSiblingSetRequest")); } } 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 d66cc68d4a055..9f6c5e195ea3e 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 @@ -104,16 +104,17 @@ public QuotaAvailabilityRequest withResourceGroup(String resourceGroup) { */ public void validate() { if (name() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property name in model QuotaAvailabilityRequest")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model QuotaAvailabilityRequest")); } if (type() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property type in model QuotaAvailabilityRequest")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property type in model QuotaAvailabilityRequest")); } if (resourceGroup() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property resourceGroup in model QuotaAvailabilityRequest")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resourceGroup in model QuotaAvailabilityRequest")); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoResource.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoResource.java new file mode 100644 index 0000000000000..2b38b85fc6c4c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoResource.java @@ -0,0 +1,67 @@ +// 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.SystemData; +import com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner; +import java.util.List; + +/** + * An immutable client-side representation of RegionInfoResource. + */ +public interface RegionInfoResource { + /** + * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the storageToNetworkProximity property: Storage to Network Proximity + * + * Provides storage to network proximity information in the region. + * + * @return the storageToNetworkProximity value. + */ + RegionStorageToNetworkProximity storageToNetworkProximity(); + + /** + * Gets the availabilityZoneMappings property: Logical availability zone mappings. + * + * Provides logical availability zone mappings for the subscription for a region. + * + * @return the availabilityZoneMappings value. + */ + List availabilityZoneMappings(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner object. + * + * @return the inner object. + */ + RegionInfoResourceInner innerModel(); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfosList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfosList.java new file mode 100644 index 0000000000000..4532e186625bb --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfosList.java @@ -0,0 +1,85 @@ +// 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.RegionInfoResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of regionInfo resources. + */ +@Fluent +public final class RegionInfosList { + /* + * A list of regionInfo resources + */ + @JsonProperty(value = "value") + private List value; + + /* + * URL to get the next set of results. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of RegionInfosList class. + */ + public RegionInfosList() { + } + + /** + * Get the value property: A list of regionInfo resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of regionInfo resources. + * + * @param value the value value to set. + * @return the RegionInfosList object itself. + */ + public RegionInfosList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: URL to get the next set of results. + * + * @param nextLink the nextLink value to set. + * @return the RegionInfosList object itself. + */ + public RegionInfosList withNextLink(String nextLink) { + this.nextLink = nextLink; + 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/RemotePath.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RemotePath.java new file mode 100644 index 0000000000000..af1bf63cdfc13 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RemotePath.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.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The full path to a volume that is to be migrated into ANF. Required for Migration volumes. + */ +@Fluent +public final class RemotePath { + /* + * The Path to a ONTAP Host + */ + @JsonProperty(value = "externalHostName", required = true) + private String externalHostname; + + /* + * The name of a server on the ONTAP Host + */ + @JsonProperty(value = "serverName", required = true) + private String serverName; + + /* + * The name of a volume on the server + */ + @JsonProperty(value = "volumeName", required = true) + private String volumeName; + + /** + * Creates an instance of RemotePath class. + */ + public RemotePath() { + } + + /** + * Get the externalHostname property: The Path to a ONTAP Host. + * + * @return the externalHostname value. + */ + public String externalHostname() { + return this.externalHostname; + } + + /** + * Set the externalHostname property: The Path to a ONTAP Host. + * + * @param externalHostname the externalHostname value to set. + * @return the RemotePath object itself. + */ + public RemotePath withExternalHostname(String externalHostname) { + this.externalHostname = externalHostname; + return this; + } + + /** + * Get the serverName property: The name of a server on the ONTAP Host. + * + * @return the serverName value. + */ + public String serverName() { + return this.serverName; + } + + /** + * Set the serverName property: The name of a server on the ONTAP Host. + * + * @param serverName the serverName value to set. + * @return the RemotePath object itself. + */ + public RemotePath withServerName(String serverName) { + this.serverName = serverName; + return this; + } + + /** + * Get the volumeName property: The name of a volume on the server. + * + * @return the volumeName value. + */ + public String volumeName() { + return this.volumeName; + } + + /** + * Set the volumeName property: The name of a volume on the server. + * + * @param volumeName the volumeName value to set. + * @return the RemotePath object itself. + */ + public RemotePath withVolumeName(String volumeName) { + this.volumeName = volumeName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (externalHostname() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property externalHostname in model RemotePath")); + } + if (serverName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property serverName in model RemotePath")); + } + if (volumeName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property volumeName in model RemotePath")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RemotePath.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 index 2c805152607f4..b88c82cb04a1b 100644 --- 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 @@ -10,6 +10,13 @@ * An immutable client-side representation of Replication. */ public interface Replication { + /** + * Gets the replicationId property: UUID v4 used to identify the replication. + * + * @return the replicationId value. + */ + String replicationId(); + /** * Gets the endpointType property: Indicates whether the local volume is the source or destination for the Volume * Replication. 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 21a38ce648ea6..fe2fb0e6081b8 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 @@ -32,11 +32,17 @@ public final class ReplicationObject { private ReplicationSchedule replicationSchedule; /* - * The resource ID of the remote volume. + * The resource ID of the remote volume. Required for cross region and cross zone replication */ @JsonProperty(value = "remoteVolumeResourceId", required = true) private String remoteVolumeResourceId; + /* + * The full path to a volume that is to be migrated into ANF. Required for Migration volumes + */ + @JsonProperty(value = "remotePath") + private RemotePath remotePath; + /* * The remote region for the other end of the Volume Replication. */ @@ -101,7 +107,8 @@ public ReplicationObject withReplicationSchedule(ReplicationSchedule replication } /** - * Get the remoteVolumeResourceId property: The resource ID of the remote volume. + * Get the remoteVolumeResourceId property: The resource ID of the remote volume. Required for cross region and + * cross zone replication. * * @return the remoteVolumeResourceId value. */ @@ -110,7 +117,8 @@ public String remoteVolumeResourceId() { } /** - * Set the remoteVolumeResourceId property: The resource ID of the remote volume. + * Set the remoteVolumeResourceId property: The resource ID of the remote volume. Required for cross region and + * cross zone replication. * * @param remoteVolumeResourceId the remoteVolumeResourceId value to set. * @return the ReplicationObject object itself. @@ -120,6 +128,28 @@ public ReplicationObject withRemoteVolumeResourceId(String remoteVolumeResourceI return this; } + /** + * Get the remotePath property: The full path to a volume that is to be migrated into ANF. Required for Migration + * volumes. + * + * @return the remotePath value. + */ + public RemotePath remotePath() { + return this.remotePath; + } + + /** + * Set the remotePath property: The full path to a volume that is to be migrated into ANF. Required for Migration + * volumes. + * + * @param remotePath the remotePath value to set. + * @return the ReplicationObject object itself. + */ + public ReplicationObject withRemotePath(RemotePath remotePath) { + this.remotePath = remotePath; + return this; + } + /** * Get the remoteVolumeRegion property: The remote region for the other end of the Volume Replication. * @@ -147,8 +177,12 @@ public ReplicationObject withRemoteVolumeRegion(String remoteVolumeRegion) { */ public void validate() { if (remoteVolumeResourceId() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property remoteVolumeResourceId in model ReplicationObject")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property remoteVolumeResourceId in model ReplicationObject")); + } + if (remotePath() != null) { + remotePath().validate(); } } 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 ecd495cc3b787..7f424842983f8 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 @@ -104,16 +104,19 @@ public ResourceNameAvailabilityRequest withResourceGroup(String resourceGroup) { */ public void validate() { if (name() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property name in model ResourceNameAvailabilityRequest")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property name in model ResourceNameAvailabilityRequest")); } if (type() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property type in model ResourceNameAvailabilityRequest")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property type in model ResourceNameAvailabilityRequest")); } if (resourceGroup() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property resourceGroup in model ResourceNameAvailabilityRequest")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resourceGroup in model ResourceNameAvailabilityRequest")); } } 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 3292bba7a360d..0e49ff1b380a5 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 @@ -79,8 +79,8 @@ public SnapshotRestoreFiles withDestinationPath(String destinationPath) { */ public void validate() { if (filePaths() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property filePaths in model SnapshotRestoreFiles")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property filePaths in model SnapshotRestoreFiles")); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerCommandResponse.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerCommandResponse.java new file mode 100644 index 0000000000000..31be928e1d022 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerCommandResponse.java @@ -0,0 +1,27 @@ +// 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.SvmPeerCommandResponseInner; + +/** + * An immutable client-side representation of SvmPeerCommandResponse. + */ +public interface SvmPeerCommandResponse { + /** + * Gets the svmPeeringCommand property: A command that needs to be run on the external ONTAP to accept SVM peering. + * Will only be present if <code>svmPeeringStatus</code> is <code>pending</code>. + * + * @return the svmPeeringCommand value. + */ + String svmPeeringCommand(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.SvmPeerCommandResponseInner object. + * + * @return the inner object. + */ + SvmPeerCommandResponseInner innerModel(); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/UpdateNetworkSiblingSetRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/UpdateNetworkSiblingSetRequest.java index abad9f5864a6b..ac00af2d4a06f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/UpdateNetworkSiblingSetRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/UpdateNetworkSiblingSetRequest.java @@ -26,9 +26,7 @@ public final class UpdateNetworkSiblingSetRequest { /* * Subnet resource Id * - * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example - * /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/ - * subnets/{mySubnet} + * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet} */ @JsonProperty(value = "subnetId", required = true) private String subnetId; @@ -44,7 +42,7 @@ public final class UpdateNetworkSiblingSetRequest { /* * Network features * - * Network features available to the volume, some such + * Network features available to the volume. */ @JsonProperty(value = "networkFeatures", required = true) private NetworkFeatures networkFeatures; @@ -132,7 +130,7 @@ public UpdateNetworkSiblingSetRequest withNetworkSiblingSetStateId(String networ /** * Get the networkFeatures property: Network features * - * Network features available to the volume, some such. + * Network features available to the volume. * * @return the networkFeatures value. */ @@ -143,7 +141,7 @@ public NetworkFeatures networkFeatures() { /** * Set the networkFeatures property: Network features * - * Network features available to the volume, some such. + * Network features available to the volume. * * @param networkFeatures the networkFeatures value to set. * @return the UpdateNetworkSiblingSetRequest object itself. @@ -160,20 +158,24 @@ public UpdateNetworkSiblingSetRequest withNetworkFeatures(NetworkFeatures networ */ public void validate() { if (networkSiblingSetId() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property networkSiblingSetId in model UpdateNetworkSiblingSetRequest")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property networkSiblingSetId in model UpdateNetworkSiblingSetRequest")); } if (subnetId() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property subnetId in model UpdateNetworkSiblingSetRequest")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property subnetId in model UpdateNetworkSiblingSetRequest")); } if (networkSiblingSetStateId() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property networkSiblingSetStateId in model UpdateNetworkSiblingSetRequest")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property networkSiblingSetStateId in model UpdateNetworkSiblingSetRequest")); } if (networkFeatures() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property networkFeatures in model UpdateNetworkSiblingSetRequest")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property networkFeatures in model UpdateNetworkSiblingSetRequest")); } } 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 a8dc5e859db02..a70879486e5d6 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 @@ -139,7 +139,7 @@ public interface Volume { /** * Gets the snapshotId property: Snapshot ID * - * UUID v4 or resource identifier used to identify the Snapshot. + * Resource identifier used to identify the Snapshot. * * @return the snapshotId value. */ @@ -156,7 +156,7 @@ public interface Volume { /** * Gets the backupId property: Backup ID * - * UUID v4 or resource identifier used to identify the Backup. + * Resource identifier used to identify the Backup. * * @return the backupId value. */ @@ -217,7 +217,7 @@ public interface Volume { /** * Gets the volumeType property: What type of volume is this. For destination volumes in Cross Region Replication, - * set type to DataProtection. + * set type to DataProtection. For creating clone volume, set type to ShortTermClone. * * @return the volumeType value. */ @@ -232,6 +232,17 @@ public interface Volume { */ VolumePropertiesDataProtection dataProtection(); + /** + * Gets the acceptGrowCapacityPoolForShortTermCloneSplit property: acceptGrowCapacityPoolForShortTermCloneSplit + * + * While auto splitting the short term clone volume, if the parent pool does not have enough space to accommodate + * the volume after split, it will be automatically resized, which will lead to increased billing. To accept + * capacity pool size auto grow and create a short term clone volume, set the property as accepted. + * + * @return the acceptGrowCapacityPoolForShortTermCloneSplit value. + */ + AcceptGrowCapacityPoolForShortTermCloneSplit acceptGrowCapacityPoolForShortTermCloneSplit(); + /** * Gets the isRestoring property: Restoring. * @@ -531,6 +542,24 @@ public interface Volume { */ String originatingResourceId(); + /** + * Gets the inheritedSizeInBytes property: inheritedSizeInBytes + * + * Space shared by short term clone volume with parent volume in bytes. + * + * @return the inheritedSizeInBytes value. + */ + Long inheritedSizeInBytes(); + + /** + * Gets the language property: VolumeLanguage + * + * Language supported for volume. + * + * @return the language value. + */ + VolumeLanguage language(); + /** * Gets the region of the resource. * @@ -674,19 +703,19 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithZon DefinitionStages.WithServiceLevel, DefinitionStages.WithExportPolicy, DefinitionStages.WithProtocolTypes, DefinitionStages.WithSnapshotId, DefinitionStages.WithDeleteBaseSnapshot, DefinitionStages.WithBackupId, DefinitionStages.WithNetworkFeatures, DefinitionStages.WithVolumeType, DefinitionStages.WithDataProtection, - DefinitionStages.WithIsRestoring, DefinitionStages.WithSnapshotDirectoryVisible, - DefinitionStages.WithKerberosEnabled, DefinitionStages.WithSecurityStyle, - DefinitionStages.WithSmbEncryption, DefinitionStages.WithSmbAccessBasedEnumeration, - DefinitionStages.WithSmbNonBrowsable, DefinitionStages.WithSmbContinuouslyAvailable, - DefinitionStages.WithThroughputMibps, DefinitionStages.WithEncryptionKeySource, - DefinitionStages.WithKeyVaultPrivateEndpointResourceId, DefinitionStages.WithLdapEnabled, - DefinitionStages.WithCoolAccess, DefinitionStages.WithCoolnessPeriod, + DefinitionStages.WithAcceptGrowCapacityPoolForShortTermCloneSplit, DefinitionStages.WithIsRestoring, + DefinitionStages.WithSnapshotDirectoryVisible, DefinitionStages.WithKerberosEnabled, + DefinitionStages.WithSecurityStyle, DefinitionStages.WithSmbEncryption, + DefinitionStages.WithSmbAccessBasedEnumeration, DefinitionStages.WithSmbNonBrowsable, + DefinitionStages.WithSmbContinuouslyAvailable, DefinitionStages.WithThroughputMibps, + DefinitionStages.WithEncryptionKeySource, DefinitionStages.WithKeyVaultPrivateEndpointResourceId, + DefinitionStages.WithLdapEnabled, DefinitionStages.WithCoolAccess, DefinitionStages.WithCoolnessPeriod, DefinitionStages.WithCoolAccessRetrievalPolicy, DefinitionStages.WithUnixPermissions, DefinitionStages.WithAvsDataStore, DefinitionStages.WithIsDefaultQuotaEnabled, DefinitionStages.WithDefaultUserQuotaInKiBs, DefinitionStages.WithDefaultGroupQuotaInKiBs, DefinitionStages.WithCapacityPoolResourceId, DefinitionStages.WithProximityPlacementGroup, DefinitionStages.WithVolumeSpecName, DefinitionStages.WithPlacementRules, - DefinitionStages.WithEnableSubvolumes, DefinitionStages.WithIsLargeVolume { + DefinitionStages.WithEnableSubvolumes, DefinitionStages.WithIsLargeVolume, DefinitionStages.WithLanguage { /** * Executes the create request. * @@ -787,11 +816,11 @@ interface WithSnapshotId { /** * Specifies the snapshotId property: Snapshot ID * - * UUID v4 or resource identifier used to identify the Snapshot.. + * Resource identifier used to identify the Snapshot.. * * @param snapshotId Snapshot ID * - * UUID v4 or resource identifier used to identify the Snapshot. + * Resource identifier used to identify the Snapshot. * @return the next definition stage. */ WithCreate withSnapshotId(String snapshotId); @@ -819,11 +848,11 @@ interface WithBackupId { /** * Specifies the backupId property: Backup ID * - * UUID v4 or resource identifier used to identify the Backup.. + * Resource identifier used to identify the Backup.. * * @param backupId Backup ID * - * UUID v4 or resource identifier used to identify the Backup. + * Resource identifier used to identify the Backup. * @return the next definition stage. */ WithCreate withBackupId(String backupId); @@ -852,10 +881,10 @@ interface WithNetworkFeatures { interface WithVolumeType { /** * Specifies the volumeType property: What type of volume is this. For destination volumes in Cross Region - * Replication, set type to DataProtection. + * Replication, set type to DataProtection. For creating clone volume, set type to ShortTermClone. * * @param volumeType What type of volume is this. For destination volumes in Cross Region Replication, set - * type to DataProtection. + * type to DataProtection. For creating clone volume, set type to ShortTermClone. * @return the next definition stage. */ WithCreate withVolumeType(String volumeType); @@ -878,6 +907,31 @@ interface WithDataProtection { WithCreate withDataProtection(VolumePropertiesDataProtection dataProtection); } + /** + * The stage of the Volume definition allowing to specify acceptGrowCapacityPoolForShortTermCloneSplit. + */ + interface WithAcceptGrowCapacityPoolForShortTermCloneSplit { + /** + * Specifies the acceptGrowCapacityPoolForShortTermCloneSplit property: + * acceptGrowCapacityPoolForShortTermCloneSplit + * + * While auto splitting the short term clone volume, if the parent pool does not have enough space to + * accommodate the volume after split, it will be automatically resized, which will lead to increased + * billing. To accept capacity pool size auto grow and create a short term clone volume, set the property as + * accepted.. + * + * @param acceptGrowCapacityPoolForShortTermCloneSplit acceptGrowCapacityPoolForShortTermCloneSplit + * + * While auto splitting the short term clone volume, if the parent pool does not have enough space to + * accommodate the volume after split, it will be automatically resized, which will lead to increased + * billing. To accept capacity pool size auto grow and create a short term clone volume, set the property as + * accepted. + * @return the next definition stage. + */ + WithCreate withAcceptGrowCapacityPoolForShortTermCloneSplit( + AcceptGrowCapacityPoolForShortTermCloneSplit acceptGrowCapacityPoolForShortTermCloneSplit); + } + /** * The stage of the Volume definition allowing to specify isRestoring. */ @@ -1288,6 +1342,23 @@ interface WithIsLargeVolume { */ WithCreate withIsLargeVolume(Boolean isLargeVolume); } + + /** + * The stage of the Volume definition allowing to specify language. + */ + interface WithLanguage { + /** + * Specifies the language property: VolumeLanguage + * + * Language supported for volume.. + * + * @param language VolumeLanguage + * + * Language supported for volume. + * @return the next definition stage. + */ + WithCreate withLanguage(VolumeLanguage language); + } } /** @@ -1684,6 +1755,28 @@ interface WithSmbNonBrowsable { */ void resetCifsPassword(Context context); + /** + * Split clone from parent volume + * + * Split operation to convert clone volume to an independent 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 splitCloneFromParent(); + + /** + * Split clone from parent volume + * + * Split operation to convert clone volume to an independent 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 splitCloneFromParent(Context context); + /** * Break file locks * @@ -1902,6 +1995,106 @@ GetGroupIdListForLdapUserResponse listGetGroupIdListForLdapUser(GetGroupIdListFo */ void reInitializeReplication(Context context); + /** + * Start Cluster peering + * + * Starts peering the cluster for this migration volume. + * + * @param body Cluster peer request 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 information about cluster peering process. + */ + ClusterPeerCommandResponse peerClusterForOnPremMigration(PeerClusterForVolumeMigrationRequest body); + + /** + * Start Cluster peering + * + * Starts peering the cluster for this migration volume. + * + * @param body Cluster peer 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 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 information about cluster peering process. + */ + ClusterPeerCommandResponse peerClusterForOnPremMigration(PeerClusterForVolumeMigrationRequest body, + Context context); + + /** + * Start migration process + * + * Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once the SVMs have been + * peered a SnapMirror will be created. + * + * @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 information about SVM peering process. + */ + SvmPeerCommandResponse createOnPremMigrationReplication(); + + /** + * Start migration process + * + * Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once the SVMs have been + * peered a SnapMirror will be created. + * + * @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 information about SVM peering process. + */ + SvmPeerCommandResponse createOnPremMigrationReplication(Context context); + + /** + * Finalize migration process + * + * Finalizes the migration of a volume by performing a final sync on the replication, breaking and releasing the + * replication, and breaking the cluster peering if no other migration is active. + * + * @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 finalizeOnPremMigration(); + + /** + * Finalize migration process + * + * Finalizes the migration of a volume by performing a final sync on the replication, breaking and releasing the + * replication, and breaking the cluster peering if no other migration is active. + * + * @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 finalizeOnPremMigration(Context context); + + /** + * Perform a replication transfer + * + * Performs an adhoc replication transfer on a volume with volumeType Migration. + * + * @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 performReplicationTransfer(); + + /** + * Perform a replication transfer + * + * Performs an adhoc replication transfer on a volume with volumeType Migration. + * + * @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 performReplicationTransfer(Context context); + /** * Change pool for volume * 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 new file mode 100644 index 0000000000000..6ad0e25c7f1fc --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupProperties.java @@ -0,0 +1,106 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** + * Volume Backup Properties. + */ +@Fluent +public final class VolumeBackupProperties { + /* + * Backup Policy Resource ID + */ + @JsonProperty(value = "backupPolicyId") + private String backupPolicyId; + + /* + * Policy Enforced + */ + @JsonProperty(value = "policyEnforced") + private Boolean policyEnforced; + + /* + * Backup Vault Resource ID + */ + @JsonProperty(value = "backupVaultId") + private String backupVaultId; + + /** + * Creates an instance of VolumeBackupProperties class. + */ + public VolumeBackupProperties() { + } + + /** + * Get the backupPolicyId property: Backup Policy Resource ID. + * + * @return the backupPolicyId value. + */ + public String backupPolicyId() { + return this.backupPolicyId; + } + + /** + * Set the backupPolicyId property: Backup Policy Resource ID. + * + * @param backupPolicyId the backupPolicyId value to set. + * @return the VolumeBackupProperties object itself. + */ + public VolumeBackupProperties withBackupPolicyId(String backupPolicyId) { + this.backupPolicyId = backupPolicyId; + return this; + } + + /** + * Get the policyEnforced property: Policy Enforced. + * + * @return the policyEnforced value. + */ + public Boolean policyEnforced() { + return this.policyEnforced; + } + + /** + * Set the policyEnforced property: Policy Enforced. + * + * @param policyEnforced the policyEnforced value to set. + * @return the VolumeBackupProperties object itself. + */ + public VolumeBackupProperties withPolicyEnforced(Boolean policyEnforced) { + this.policyEnforced = policyEnforced; + return this; + } + + /** + * Get the backupVaultId property: Backup Vault Resource ID. + * + * @return the backupVaultId value. + */ + public String backupVaultId() { + return this.backupVaultId; + } + + /** + * Set the backupVaultId property: Backup Vault Resource ID. + * + * @param backupVaultId the backupVaultId value to set. + * @return the VolumeBackupProperties object itself. + */ + public VolumeBackupProperties withBackupVaultId(String backupVaultId) { + this.backupVaultId = backupVaultId; + 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/models/VolumeBackups.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackups.java index 9ba4a6cc638d1..8492da99a5e2a 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 @@ -18,6 +18,12 @@ public final class VolumeBackups { @JsonProperty(value = "volumeName") private String volumeName; + /* + * ResourceId used to identify the Volume + */ + @JsonProperty(value = "volumeResourceId") + private String volumeResourceId; + /* * Total count of backups for volume */ @@ -56,6 +62,26 @@ public VolumeBackups withVolumeName(String volumeName) { return this; } + /** + * Get the volumeResourceId property: ResourceId used to identify the Volume. + * + * @return the volumeResourceId value. + */ + public String volumeResourceId() { + return this.volumeResourceId; + } + + /** + * Set the volumeResourceId property: ResourceId used to identify the Volume. + * + * @param volumeResourceId the volumeResourceId value to set. + * @return the VolumeBackups object itself. + */ + public VolumeBackups withVolumeResourceId(String volumeResourceId) { + this.volumeResourceId = volumeResourceId; + return this; + } + /** * Get the backupsCount property: Total count of backups for volume. * 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 db2712bb5a2fe..56e740233dc6d 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 @@ -281,7 +281,7 @@ public String provisioningState() { /** * Get the snapshotId property: Snapshot ID * - * UUID v4 or resource identifier used to identify the Snapshot. + * Resource identifier used to identify the Snapshot. * * @return the snapshotId value. */ @@ -292,7 +292,7 @@ public String snapshotId() { /** * Set the snapshotId property: Snapshot ID * - * UUID v4 or resource identifier used to identify the Snapshot. + * Resource identifier used to identify the Snapshot. * * @param snapshotId the snapshotId value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -333,7 +333,7 @@ public VolumeGroupVolumeProperties withDeleteBaseSnapshot(Boolean deleteBaseSnap /** * Get the backupId property: Backup ID * - * UUID v4 or resource identifier used to identify the Backup. + * Resource identifier used to identify the Backup. * * @return the backupId value. */ @@ -344,7 +344,7 @@ public String backupId() { /** * Set the backupId property: Backup ID * - * UUID v4 or resource identifier used to identify the Backup. + * Resource identifier used to identify the Backup. * * @param backupId the backupId value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -455,7 +455,7 @@ public List mountTargets() { /** * Get the volumeType property: What type of volume is this. For destination volumes in Cross Region Replication, - * set type to DataProtection. + * set type to DataProtection. For creating clone volume, set type to ShortTermClone. * * @return the volumeType value. */ @@ -465,7 +465,7 @@ public String volumeType() { /** * Set the volumeType property: What type of volume is this. For destination volumes in Cross Region Replication, - * set type to DataProtection. + * set type to DataProtection. For creating clone volume, set type to ShortTermClone. * * @param volumeType the volumeType value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -505,6 +505,42 @@ public VolumeGroupVolumeProperties withDataProtection(VolumePropertiesDataProtec return this; } + /** + * Get the acceptGrowCapacityPoolForShortTermCloneSplit property: acceptGrowCapacityPoolForShortTermCloneSplit + * + * While auto splitting the short term clone volume, if the parent pool does not have enough space to accommodate + * the volume after split, it will be automatically resized, which will lead to increased billing. To accept + * capacity pool size auto grow and create a short term clone volume, set the property as accepted. + * + * @return the acceptGrowCapacityPoolForShortTermCloneSplit value. + */ + public AcceptGrowCapacityPoolForShortTermCloneSplit acceptGrowCapacityPoolForShortTermCloneSplit() { + return this.innerProperties() == null + ? null + : this.innerProperties().acceptGrowCapacityPoolForShortTermCloneSplit(); + } + + /** + * Set the acceptGrowCapacityPoolForShortTermCloneSplit property: acceptGrowCapacityPoolForShortTermCloneSplit + * + * While auto splitting the short term clone volume, if the parent pool does not have enough space to accommodate + * the volume after split, it will be automatically resized, which will lead to increased billing. To accept + * capacity pool size auto grow and create a short term clone volume, set the property as accepted. + * + * @param acceptGrowCapacityPoolForShortTermCloneSplit the acceptGrowCapacityPoolForShortTermCloneSplit value to + * set. + * @return the VolumeGroupVolumeProperties object itself. + */ + public VolumeGroupVolumeProperties withAcceptGrowCapacityPoolForShortTermCloneSplit( + AcceptGrowCapacityPoolForShortTermCloneSplit acceptGrowCapacityPoolForShortTermCloneSplit) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties() + .withAcceptGrowCapacityPoolForShortTermCloneSplit(acceptGrowCapacityPoolForShortTermCloneSplit); + return this; + } + /** * Get the isRestoring property: Restoring. * @@ -579,8 +615,8 @@ public VolumeGroupVolumeProperties withKerberosEnabled(Boolean kerberosEnabled) } /** - * Get the securityStyle property: The security style of volume, default unix, defaults to ntfs for dual protocol - * or CIFS protocol. + * Get the securityStyle property: The security style of volume, default unix, defaults to ntfs for dual protocol or + * CIFS protocol. * * @return the securityStyle value. */ @@ -589,8 +625,8 @@ public SecurityStyle securityStyle() { } /** - * Set the securityStyle property: The security style of volume, default unix, defaults to ntfs for dual protocol - * or CIFS protocol. + * Set the securityStyle property: The security style of volume, default unix, defaults to ntfs for dual protocol or + * CIFS protocol. * * @param securityStyle the securityStyle value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -867,9 +903,9 @@ public VolumeGroupVolumeProperties withCoolnessPeriod(Integer coolnessPeriod) { } /** - * Get the coolAccessRetrievalPolicy property: coolAccessRetrievalPolicy determines the data retrieval behavior - * from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible - * values for this field are: + * Get the coolAccessRetrievalPolicy property: coolAccessRetrievalPolicy determines the data retrieval behavior from + * the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values + * for this field are: * Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. * OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random * reads. @@ -882,9 +918,9 @@ public CoolAccessRetrievalPolicy coolAccessRetrievalPolicy() { } /** - * Set the coolAccessRetrievalPolicy property: coolAccessRetrievalPolicy determines the data retrieval behavior - * from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible - * values for this field are: + * Set the coolAccessRetrievalPolicy property: coolAccessRetrievalPolicy determines the data retrieval behavior from + * the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values + * for this field are: * Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. * OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random * reads. @@ -1085,8 +1121,7 @@ public String volumeGroupName() { } /** - * Get the capacityPoolResourceId property: Pool Resource Id used in case of creating a volume through volume - * group. + * Get the capacityPoolResourceId property: Pool Resource Id used in case of creating a volume through volume group. * * @return the capacityPoolResourceId value. */ @@ -1095,8 +1130,7 @@ public String capacityPoolResourceId() { } /** - * Set the capacityPoolResourceId property: Pool Resource Id used in case of creating a volume through volume - * group. + * Set the capacityPoolResourceId property: Pool Resource Id used in case of creating a volume through volume group. * * @param capacityPoolResourceId the capacityPoolResourceId value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -1276,6 +1310,44 @@ public String originatingResourceId() { return this.innerProperties() == null ? null : this.innerProperties().originatingResourceId(); } + /** + * Get the inheritedSizeInBytes property: inheritedSizeInBytes + * + * Space shared by short term clone volume with parent volume in bytes. + * + * @return the inheritedSizeInBytes value. + */ + public Long inheritedSizeInBytes() { + return this.innerProperties() == null ? null : this.innerProperties().inheritedSizeInBytes(); + } + + /** + * Get the language property: VolumeLanguage + * + * Language supported for volume. + * + * @return the language value. + */ + public VolumeLanguage language() { + return this.innerProperties() == null ? null : this.innerProperties().language(); + } + + /** + * Set the language property: VolumeLanguage + * + * Language supported for volume. + * + * @param language the language value to set. + * @return the VolumeGroupVolumeProperties object itself. + */ + public VolumeGroupVolumeProperties withLanguage(VolumeLanguage language) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withLanguage(language); + return this; + } + /** * Validates the instance. * @@ -1283,8 +1355,9 @@ public String originatingResourceId() { */ public void validate() { if (innerProperties() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property innerProperties in model VolumeGroupVolumeProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model VolumeGroupVolumeProperties")); } else { innerProperties().validate(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeLanguage.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeLanguage.java new file mode 100644 index 0000000000000..1a2cef6af60ef --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeLanguage.java @@ -0,0 +1,390 @@ +// 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; + +/** + * VolumeLanguage + * + * Language supported for volume. + */ +public final class VolumeLanguage extends ExpandableStringEnum { + /** + * Static value c.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage C_UTF_8 = fromString("c.utf-8"); + + /** + * Static value utf8mb4 for VolumeLanguage. + */ + public static final VolumeLanguage UTF8MB4 = fromString("utf8mb4"); + + /** + * Static value ar for VolumeLanguage. + */ + public static final VolumeLanguage AR = fromString("ar"); + + /** + * Static value ar.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage AR_UTF_8 = fromString("ar.utf-8"); + + /** + * Static value hr for VolumeLanguage. + */ + public static final VolumeLanguage HR = fromString("hr"); + + /** + * Static value hr.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage HR_UTF_8 = fromString("hr.utf-8"); + + /** + * Static value cs for VolumeLanguage. + */ + public static final VolumeLanguage CS = fromString("cs"); + + /** + * Static value cs.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage CS_UTF_8 = fromString("cs.utf-8"); + + /** + * Static value da for VolumeLanguage. + */ + public static final VolumeLanguage DA = fromString("da"); + + /** + * Static value da.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage DA_UTF_8 = fromString("da.utf-8"); + + /** + * Static value nl for VolumeLanguage. + */ + public static final VolumeLanguage NL = fromString("nl"); + + /** + * Static value nl.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage NL_UTF_8 = fromString("nl.utf-8"); + + /** + * Static value en for VolumeLanguage. + */ + public static final VolumeLanguage EN = fromString("en"); + + /** + * Static value en.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage EN_UTF_8 = fromString("en.utf-8"); + + /** + * Static value fi for VolumeLanguage. + */ + public static final VolumeLanguage FI = fromString("fi"); + + /** + * Static value fi.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage FI_UTF_8 = fromString("fi.utf-8"); + + /** + * Static value fr for VolumeLanguage. + */ + public static final VolumeLanguage FR = fromString("fr"); + + /** + * Static value fr.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage FR_UTF_8 = fromString("fr.utf-8"); + + /** + * Static value de for VolumeLanguage. + */ + public static final VolumeLanguage DE = fromString("de"); + + /** + * Static value de.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage DE_UTF_8 = fromString("de.utf-8"); + + /** + * Static value he for VolumeLanguage. + */ + public static final VolumeLanguage HE = fromString("he"); + + /** + * Static value he.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage HE_UTF_8 = fromString("he.utf-8"); + + /** + * Static value hu for VolumeLanguage. + */ + public static final VolumeLanguage HU = fromString("hu"); + + /** + * Static value hu.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage HU_UTF_8 = fromString("hu.utf-8"); + + /** + * Static value it for VolumeLanguage. + */ + public static final VolumeLanguage IT = fromString("it"); + + /** + * Static value it.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage IT_UTF_8 = fromString("it.utf-8"); + + /** + * Static value ja for VolumeLanguage. + */ + public static final VolumeLanguage JA = fromString("ja"); + + /** + * Static value ja.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage JA_UTF_8 = fromString("ja.utf-8"); + + /** + * Static value ja-v1 for VolumeLanguage. + */ + public static final VolumeLanguage JA_V1 = fromString("ja-v1"); + + /** + * Static value ja-v1.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage JA_V1_UTF_8 = fromString("ja-v1.utf-8"); + + /** + * Static value ja-jp.pck for VolumeLanguage. + */ + public static final VolumeLanguage JA_JP_PCK = fromString("ja-jp.pck"); + + /** + * Static value ja-jp.pck.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage JA_JP_PCK_UTF_8 = fromString("ja-jp.pck.utf-8"); + + /** + * Static value ja-jp.932 for VolumeLanguage. + */ + public static final VolumeLanguage JA_JP_932 = fromString("ja-jp.932"); + + /** + * Static value ja-jp.932.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage JA_JP_932_UTF_8 = fromString("ja-jp.932.utf-8"); + + /** + * Static value ja-jp.pck-v2 for VolumeLanguage. + */ + public static final VolumeLanguage JA_JP_PCK_V2 = fromString("ja-jp.pck-v2"); + + /** + * Static value ja-jp.pck-v2.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage JA_JP_PCK_V2_UTF_8 = fromString("ja-jp.pck-v2.utf-8"); + + /** + * Static value ko for VolumeLanguage. + */ + public static final VolumeLanguage KO = fromString("ko"); + + /** + * Static value ko.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage KO_UTF_8 = fromString("ko.utf-8"); + + /** + * Static value no for VolumeLanguage. + */ + public static final VolumeLanguage NO = fromString("no"); + + /** + * Static value no.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage NO_UTF_8 = fromString("no.utf-8"); + + /** + * Static value pl for VolumeLanguage. + */ + public static final VolumeLanguage PL = fromString("pl"); + + /** + * Static value pl.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage PL_UTF_8 = fromString("pl.utf-8"); + + /** + * Static value pt for VolumeLanguage. + */ + public static final VolumeLanguage PT = fromString("pt"); + + /** + * Static value pt.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage PT_UTF_8 = fromString("pt.utf-8"); + + /** + * Static value c for VolumeLanguage. + */ + public static final VolumeLanguage C = fromString("c"); + + /** + * Static value ro for VolumeLanguage. + */ + public static final VolumeLanguage RO = fromString("ro"); + + /** + * Static value ro.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage RO_UTF_8 = fromString("ro.utf-8"); + + /** + * Static value ru for VolumeLanguage. + */ + public static final VolumeLanguage RU = fromString("ru"); + + /** + * Static value ru.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage RU_UTF_8 = fromString("ru.utf-8"); + + /** + * Static value zh for VolumeLanguage. + */ + public static final VolumeLanguage ZH = fromString("zh"); + + /** + * Static value zh.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage ZH_UTF_8 = fromString("zh.utf-8"); + + /** + * Static value zh.gbk for VolumeLanguage. + */ + public static final VolumeLanguage ZH_GBK = fromString("zh.gbk"); + + /** + * Static value zh.gbk.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage ZH_GBK_UTF_8 = fromString("zh.gbk.utf-8"); + + /** + * Static value zh-tw.big5 for VolumeLanguage. + */ + public static final VolumeLanguage ZH_TW_BIG5 = fromString("zh-tw.big5"); + + /** + * Static value zh-tw.big5.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage ZH_TW_BIG5_UTF_8 = fromString("zh-tw.big5.utf-8"); + + /** + * Static value zh-tw for VolumeLanguage. + */ + public static final VolumeLanguage ZH_TW = fromString("zh-tw"); + + /** + * Static value zh-tw.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage ZH_TW_UTF_8 = fromString("zh-tw.utf-8"); + + /** + * Static value sk for VolumeLanguage. + */ + public static final VolumeLanguage SK = fromString("sk"); + + /** + * Static value sk.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage SK_UTF_8 = fromString("sk.utf-8"); + + /** + * Static value sl for VolumeLanguage. + */ + public static final VolumeLanguage SL = fromString("sl"); + + /** + * Static value sl.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage SL_UTF_8 = fromString("sl.utf-8"); + + /** + * Static value es for VolumeLanguage. + */ + public static final VolumeLanguage ES = fromString("es"); + + /** + * Static value es.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage ES_UTF_8 = fromString("es.utf-8"); + + /** + * Static value sv for VolumeLanguage. + */ + public static final VolumeLanguage SV = fromString("sv"); + + /** + * Static value sv.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage SV_UTF_8 = fromString("sv.utf-8"); + + /** + * Static value tr for VolumeLanguage. + */ + public static final VolumeLanguage TR = fromString("tr"); + + /** + * Static value tr.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage TR_UTF_8 = fromString("tr.utf-8"); + + /** + * Static value en-us for VolumeLanguage. + */ + public static final VolumeLanguage EN_US = fromString("en-us"); + + /** + * Static value en-us.utf-8 for VolumeLanguage. + */ + public static final VolumeLanguage EN_US_UTF_8 = fromString("en-us.utf-8"); + + /** + * Creates a new instance of VolumeLanguage value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VolumeLanguage() { + } + + /** + * Creates or finds a VolumeLanguage from its string representation. + * + * @param name a name to look for. + * @return the corresponding VolumeLanguage. + */ + @JsonCreator + public static VolumeLanguage fromString(String name) { + return fromString(name, VolumeLanguage.class); + } + + /** + * Gets known VolumeLanguage values. + * + * @return known VolumeLanguage values. + */ + public static Collection values() { + return values(VolumeLanguage.class); + } +} 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 48209e6740953..a1fa87587cf21 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 @@ -344,9 +344,9 @@ public VolumePatch withCoolnessPeriod(Integer coolnessPeriod) { } /** - * Get the coolAccessRetrievalPolicy property: coolAccessRetrievalPolicy determines the data retrieval behavior - * from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible - * values for this field are: + * Get the coolAccessRetrievalPolicy property: coolAccessRetrievalPolicy determines the data retrieval behavior from + * the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values + * for this field are: * Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. * OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random * reads. @@ -359,9 +359,9 @@ public CoolAccessRetrievalPolicy coolAccessRetrievalPolicy() { } /** - * Set the coolAccessRetrievalPolicy property: coolAccessRetrievalPolicy determines the data retrieval behavior - * from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible - * values for this field are: + * Set the coolAccessRetrievalPolicy property: coolAccessRetrievalPolicy determines the data retrieval behavior from + * the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values + * for this field are: * Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. * OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random * reads. 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 4c88558e735d0..fde5158f3c885 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 @@ -14,6 +14,12 @@ */ @Fluent public final class VolumePatchPropertiesDataProtection { + /* + * Backup Properties + */ + @JsonProperty(value = "backup") + private VolumeBackupProperties backup; + /* * Snapshot properties. */ @@ -26,6 +32,26 @@ public final class VolumePatchPropertiesDataProtection { public VolumePatchPropertiesDataProtection() { } + /** + * Get the backup property: Backup Properties. + * + * @return the backup value. + */ + public VolumeBackupProperties backup() { + return this.backup; + } + + /** + * Set the backup property: Backup Properties. + * + * @param backup the backup value to set. + * @return the VolumePatchPropertiesDataProtection object itself. + */ + public VolumePatchPropertiesDataProtection withBackup(VolumeBackupProperties backup) { + this.backup = backup; + return this; + } + /** * Get the snapshot property: Snapshot properties. * @@ -52,6 +78,9 @@ public VolumePatchPropertiesDataProtection withSnapshot(VolumeSnapshotProperties * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (backup() != null) { + backup().validate(); + } if (snapshot() != null) { snapshot().validate(); } 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 81555a2926109..5203d2249da71 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 @@ -14,6 +14,12 @@ */ @Fluent public final class VolumePropertiesDataProtection { + /* + * Backup Properties + */ + @JsonProperty(value = "backup") + private VolumeBackupProperties backup; + /* * Replication properties */ @@ -38,6 +44,26 @@ public final class VolumePropertiesDataProtection { public VolumePropertiesDataProtection() { } + /** + * Get the backup property: Backup Properties. + * + * @return the backup value. + */ + public VolumeBackupProperties backup() { + return this.backup; + } + + /** + * Set the backup property: Backup Properties. + * + * @param backup the backup value to set. + * @return the VolumePropertiesDataProtection object itself. + */ + public VolumePropertiesDataProtection withBackup(VolumeBackupProperties backup) { + this.backup = backup; + return this; + } + /** * Get the replication property: Replication properties. * @@ -104,6 +130,9 @@ public VolumePropertiesDataProtection withVolumeRelocation(VolumeRelocationPrope * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (backup() != null) { + backup().validate(); + } if (replication() != null) { replication().validate(); } 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 94599e770d461..0d574eed240c1 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 @@ -211,6 +211,38 @@ void revert(String resourceGroupName, String accountName, String poolName, Strin void resetCifsPassword(String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + /** + * Split clone from parent volume + * + * Split operation to convert clone volume to an independent volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 splitCloneFromParent(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Split clone from parent volume + * + * Split operation to convert clone volume to an independent volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 splitCloneFromParent(String resourceGroupName, String accountName, String poolName, String volumeName, + Context context); + /** * Break file locks * @@ -554,6 +586,146 @@ void authorizeReplication(String resourceGroupName, String accountName, String p void reInitializeReplication(String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + /** + * Start Cluster peering + * + * Starts peering the cluster for this migration volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Cluster peer request 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 information about cluster peering process. + */ + ClusterPeerCommandResponse peerClusterForOnPremMigration(String resourceGroupName, String accountName, + String poolName, String volumeName, PeerClusterForVolumeMigrationRequest body); + + /** + * Start Cluster peering + * + * Starts peering the cluster for this migration volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Cluster peer 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 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 information about cluster peering process. + */ + ClusterPeerCommandResponse peerClusterForOnPremMigration(String resourceGroupName, String accountName, + String poolName, String volumeName, PeerClusterForVolumeMigrationRequest body, Context context); + + /** + * Start migration process + * + * Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once the SVMs have been + * peered a SnapMirror will be created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 information about SVM peering process. + */ + SvmPeerCommandResponse createOnPremMigrationReplication(String resourceGroupName, String accountName, + String poolName, String volumeName); + + /** + * Start migration process + * + * Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once the SVMs have been + * peered a SnapMirror will be created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 information about SVM peering process. + */ + SvmPeerCommandResponse createOnPremMigrationReplication(String resourceGroupName, String accountName, + String poolName, String volumeName, Context context); + + /** + * Finalize migration process + * + * Finalizes the migration of a volume by performing a final sync on the replication, breaking and releasing the + * replication, and breaking the cluster peering if no other migration is active. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 finalizeOnPremMigration(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Finalize migration process + * + * Finalizes the migration of a volume by performing a final sync on the replication, breaking and releasing the + * replication, and breaking the cluster peering if no other migration is active. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 finalizeOnPremMigration(String resourceGroupName, String accountName, String poolName, String volumeName, + Context context); + + /** + * Perform a replication transfer + * + * Performs an adhoc replication transfer on a volume with volumeType Migration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 performReplicationTransfer(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Perform a replication transfer + * + * Performs an adhoc replication transfer on a volume with volumeType Migration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 performReplicationTransfer(String resourceGroupName, String accountName, String poolName, String volumeName, + Context context); + /** * Change pool for volume * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/module-info.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/module-info.java index 4329b7cbfb93b..34b8c7b45e99b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/module-info.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/module-info.java @@ -10,4 +10,4 @@ exports com.azure.resourcemanager.netapp.models; opens com.azure.resourcemanager.netapp.fluent.models to com.azure.core, com.fasterxml.jackson.databind; opens com.azure.resourcemanager.netapp.models to com.azure.core, com.fasterxml.jackson.databind; -} +} \ No newline at end of file diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/proxy-config.json b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/proxy-config.json index 98e17e49daaae..e6b59ddf56c08 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/proxy-config.json +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/proxy-config.json @@ -1 +1 @@ -[ [ "com.azure.resourcemanager.netapp.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.netapp.implementation.NetAppResourcesClientImpl$NetAppResourcesService" ], [ "com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsClientImpl$NetAppResourceQuotaLimitsService" ], [ "com.azure.resourcemanager.netapp.implementation.AccountsClientImpl$AccountsService" ], [ "com.azure.resourcemanager.netapp.implementation.PoolsClientImpl$PoolsService" ], [ "com.azure.resourcemanager.netapp.implementation.VolumesClientImpl$VolumesService" ], [ "com.azure.resourcemanager.netapp.implementation.SnapshotsClientImpl$SnapshotsService" ], [ "com.azure.resourcemanager.netapp.implementation.SnapshotPoliciesClientImpl$SnapshotPoliciesService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupsClientImpl$BackupsService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupPoliciesClientImpl$BackupPoliciesService" ], [ "com.azure.resourcemanager.netapp.implementation.VolumeQuotaRulesClientImpl$VolumeQuotaRulesService" ], [ "com.azure.resourcemanager.netapp.implementation.VolumeGroupsClientImpl$VolumeGroupsService" ], [ "com.azure.resourcemanager.netapp.implementation.SubvolumesClientImpl$SubvolumesService" ] ] \ No newline at end of file +[ [ "com.azure.resourcemanager.netapp.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.netapp.implementation.NetAppResourcesClientImpl$NetAppResourcesService" ], [ "com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsClientImpl$NetAppResourceQuotaLimitsService" ], [ "com.azure.resourcemanager.netapp.implementation.NetAppResourceRegionInfosClientImpl$NetAppResourceRegionInfosService" ], [ "com.azure.resourcemanager.netapp.implementation.AccountsClientImpl$AccountsService" ], [ "com.azure.resourcemanager.netapp.implementation.PoolsClientImpl$PoolsService" ], [ "com.azure.resourcemanager.netapp.implementation.VolumesClientImpl$VolumesService" ], [ "com.azure.resourcemanager.netapp.implementation.SnapshotsClientImpl$SnapshotsService" ], [ "com.azure.resourcemanager.netapp.implementation.SnapshotPoliciesClientImpl$SnapshotPoliciesService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupPoliciesClientImpl$BackupPoliciesService" ], [ "com.azure.resourcemanager.netapp.implementation.VolumeQuotaRulesClientImpl$VolumeQuotaRulesService" ], [ "com.azure.resourcemanager.netapp.implementation.VolumeGroupsClientImpl$VolumeGroupsService" ], [ "com.azure.resourcemanager.netapp.implementation.SubvolumesClientImpl$SubvolumesService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupsClientImpl$BackupsService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupVaultsClientImpl$BackupVaultsService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupsUnderBackupVaultsClientImpl$BackupsUnderBackupVaultsService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupsUnderVolumesClientImpl$BackupsUnderVolumesService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupsUnderAccountsClientImpl$BackupsUnderAccountsService" ] ] \ No newline at end of file diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/reflect-config.json b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/reflect-config.json index 87eaa157228e2..8ffdc2102650e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/reflect-config.json +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/reflect-config.json @@ -83,6 +83,16 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.models.RegionInfosList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest", "allDeclaredConstructors" : true, @@ -158,6 +168,21 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.models.EncryptionMigrationRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.models.ChangeKeyVault", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.models.KeyVaultPrivateEndpoint", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.netapp.models.CapacityPoolList", "allDeclaredConstructors" : true, @@ -218,11 +243,21 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.models.VolumeBackupProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.netapp.models.ReplicationObject", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.models.RemotePath", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties", "allDeclaredConstructors" : true, @@ -308,6 +343,21 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.models.PeerClusterForVolumeMigrationRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.fluent.models.ClusterPeerCommandResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.fluent.models.SvmPeerCommandResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.netapp.models.PoolChangeRequest", "allDeclaredConstructors" : true, @@ -383,11 +433,6 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.RestoreStatusInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.netapp.models.BackupPoliciesList", "allDeclaredConstructors" : true, @@ -503,6 +548,71 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.fluent.models.RestoreStatusInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.models.BackupsList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.fluent.models.BackupInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.fluent.models.BackupProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.models.BackupPatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.fluent.models.BackupPatchProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.models.BackupVaultsList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.fluent.models.BackupVaultProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.models.BackupVaultPatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.models.BackupRestoreFiles", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.models.BackupsMigrationRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.netapp.models.MetricAggregationType", "allDeclaredConstructors" : true, @@ -593,6 +703,11 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.netapp.models.SecurityStyle", "allDeclaredConstructors" : true, @@ -633,6 +748,11 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.models.VolumeLanguage", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.netapp.models.RelationshipStatus", "allDeclaredConstructors" : true, @@ -653,6 +773,11 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.netapp.models.BackupType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.netapp.models.ProvisioningState", "allDeclaredConstructors" : true, diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsChangeKeyVaultSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsChangeKeyVaultSamples.java new file mode 100644 index 0000000000000..dede2e219a5bd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsChangeKeyVaultSamples.java @@ -0,0 +1,34 @@ +// 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.ChangeKeyVault; +import com.azure.resourcemanager.netapp.models.KeyVaultPrivateEndpoint; +import java.util.Arrays; + +/** + * Samples for Accounts ChangeKeyVault. + */ +public final class AccountsChangeKeyVaultSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Accounts_ChangeKeyVault.json + */ + /** + * Sample code: Accounts_ChangeKeyVault. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void accountsChangeKeyVault(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.accounts() + .changeKeyVault("myRG", "account1", new ChangeKeyVault().withKeyVaultUri("fakeTokenPlaceholder") + .withKeyName("fakeTokenPlaceholder") + .withKeyVaultResourceId("fakeTokenPlaceholder") + .withKeyVaultPrivateEndpoints(Arrays.asList(new KeyVaultPrivateEndpoint().withVirtualNetworkId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.Network/virtualNetworks/vnet1") + .withPrivateEndpointId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.Network/privateEndpoints/privip1"))), + com.azure.core.util.Context.NONE); + } +} 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 28318649eed1e..ee2fe69fc5d50 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 @@ -12,8 +12,7 @@ */ public final class AccountsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_CreateOrUpdate.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Accounts_CreateOrUpdate.json */ /** * Sample code: Accounts_CreateOrUpdate. @@ -25,8 +24,7 @@ public static void accountsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_CreateOrUpdateAD.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Accounts_CreateOrUpdateAD.json */ /** * Sample code: Accounts_CreateOrUpdateWithActiveDirectory. @@ -35,11 +33,20 @@ public static void accountsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAp */ public static void accountsCreateOrUpdateWithActiveDirectory(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.accounts().define("account1").withRegion("eastus").withExistingResourceGroup("myRG") + manager.accounts() + .define("account1") + .withRegion("eastus") + .withExistingResourceGroup("myRG") .withActiveDirectories(Arrays.asList(new ActiveDirectory().withUsername("ad_user_name") - .withPassword("fakeTokenPlaceholder").withDomain("10.10.10.3").withDns("10.10.10.3") - .withSmbServerName("SMBServer").withOrganizationalUnit("OU=Engineering").withSite("SiteName") - .withAesEncryption(true).withLdapSigning(false).withLdapOverTls(false))) + .withPassword("fakeTokenPlaceholder") + .withDomain("10.10.10.3") + .withDns("10.10.10.3") + .withSmbServerName("SMBServer") + .withOrganizationalUnit("OU=Engineering") + .withSite("SiteName") + .withAesEncryption(true) + .withLdapSigning(false) + .withLdapOverTls(false))) .create(); } } 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 314009375bc18..d352e557f10dc 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,8 +9,7 @@ */ public final class AccountsDeleteSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/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 fc0ddefcd3581..4e9bc15e3022e 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,8 +9,7 @@ */ public final class AccountsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Accounts_Get.json */ /** * Sample code: Accounts_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetChangeKeyVaultInformationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetChangeKeyVaultInformationSamples.java new file mode 100644 index 0000000000000..4c78b5d8f9ddb --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetChangeKeyVaultInformationSamples.java @@ -0,0 +1,23 @@ +// 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; + +/** + * Samples for Accounts GetChangeKeyVaultInformation. + */ +public final class AccountsGetChangeKeyVaultInformationSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Accounts_GetChangeKeyVaultInformation.json + */ + /** + * Sample code: Accounts_GetChangeKeyVaultInformation. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + accountsGetChangeKeyVaultInformation(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.accounts().getChangeKeyVaultInformation("myRG", "account1", com.azure.core.util.Context.NONE); + } +} 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 32c14bc32e1ae..65d083527a224 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,8 +9,7 @@ */ public final class AccountsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/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 0e90cb3b15700..3f46bad937077 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,8 +9,7 @@ */ public final class AccountsListSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Accounts_List.json */ /** * Sample code: Accounts_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsMigrateEncryptionKeySamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsMigrateEncryptionKeySamples.java new file mode 100644 index 0000000000000..7b32406f58bd5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsMigrateEncryptionKeySamples.java @@ -0,0 +1,29 @@ +// 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.EncryptionMigrationRequest; + +/** + * Samples for Accounts MigrateEncryptionKey. + */ +public final class AccountsMigrateEncryptionKeySamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Accounts_MigrateEncryptionKey.json + */ + /** + * Sample code: Accounts_MigrateEncryptionKey. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void accountsMigrateEncryptionKey(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.accounts() + .migrateEncryptionKey("myRG", "account1", new EncryptionMigrationRequest().withVirtualNetworkId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.Network/virtualNetworks/vnet1") + .withPrivateEndpointId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.Network/privateEndpoints/privip1"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsSamples.java index 5bbc4d6b5de0d..146ea501419b7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsSamples.java @@ -9,8 +9,7 @@ */ public final class AccountsRenewCredentialsSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_RenewCredentials.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Accounts_RenewCredentials.json */ /** * Sample code: Accounts_RenewCredentials. 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 d3037295a9df9..5dc38c6bf355d 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 @@ -13,8 +13,7 @@ */ public final class AccountsUpdateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Accounts_Update.json */ /** * Sample code: Accounts_Update. @@ -23,7 +22,8 @@ public final class AccountsUpdateSamples { */ public static void accountsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { NetAppAccount resource = manager.accounts() - .getByResourceGroupWithResponse("myRG", "account1", com.azure.core.util.Context.NONE).getValue(); + .getByResourceGroupWithResponse("myRG", "account1", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("Tag1", "Value1")).apply(); } 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 33918be3b79d3..d7587e31ef0e6 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 @@ -9,8 +9,7 @@ */ public final class BackupPoliciesCreateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/BackupPolicies_Create.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupPolicies_Create.json */ /** * Sample code: BackupPolicies_Create. @@ -18,8 +17,14 @@ public final class BackupPoliciesCreateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void backupPoliciesCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupPolicies().define("backupPolicyName").withRegion("westus") - .withExistingNetAppAccount("myRG", "account1").withDailyBackupsToKeep(10).withWeeklyBackupsToKeep(10) - .withMonthlyBackupsToKeep(10).withEnabled(true).create(); + manager.backupPolicies() + .define("backupPolicyName") + .withRegion("westus") + .withExistingNetAppAccount("myRG", "account1") + .withDailyBackupsToKeep(10) + .withWeeklyBackupsToKeep(10) + .withMonthlyBackupsToKeep(10) + .withEnabled(true) + .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 a1a3cc2cbd0ae..ecda6a8b026e5 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,16 +9,15 @@ */ public final class BackupPoliciesDeleteSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/BackupPolicies_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupPolicies_Delete.json */ /** - * Sample code: Backups_Delete. + * Sample code: BackupPolicies_Delete. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupPolicies().delete("resourceGroup", "accountName", "backupPolicyName", - com.azure.core.util.Context.NONE); + public static void backupPoliciesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupPolicies() + .delete("resourceGroup", "accountName", "backupPolicyName", com.azure.core.util.Context.NONE); } } 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 b9500598b1717..67e9fb843f724 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,8 +9,7 @@ */ public final class BackupPoliciesGetSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/BackupPolicies_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupPolicies_Get.json */ /** * Sample code: Backups_Get. @@ -18,7 +17,7 @@ public final class BackupPoliciesGetSamples { * @param manager Entry point to NetAppFilesManager. */ public static void backupsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupPolicies().getWithResponse("myRG", "account1", "backupPolicyName", - com.azure.core.util.Context.NONE); + manager.backupPolicies() + .getWithResponse("myRG", "account1", "backupPolicyName", com.azure.core.util.Context.NONE); } } 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 80526eeaeac36..5710fee00de21 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,15 +9,14 @@ */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/BackupPolicies_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupPolicies_List.json */ /** - * Sample code: Backups_List. + * Sample code: BackupPolicies_List. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + public static void backupPoliciesList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { manager.backupPolicies().list("myRG", "account1", com.azure.core.util.Context.NONE); } } 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 ad1240f60d2f3..cb31344570a92 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 @@ -11,8 +11,7 @@ */ public final class BackupPoliciesUpdateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/BackupPolicies_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupPolicies_Update.json */ /** * Sample code: BackupPolicies_Update. @@ -21,8 +20,13 @@ public final class BackupPoliciesUpdateSamples { */ public static void backupPoliciesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { BackupPolicy resource = manager.backupPolicies() - .getWithResponse("myRG", "account1", "backupPolicyName", com.azure.core.util.Context.NONE).getValue(); - resource.update().withDailyBackupsToKeep(5).withWeeklyBackupsToKeep(10).withMonthlyBackupsToKeep(10) - .withEnabled(false).apply(); + .getWithResponse("myRG", "account1", "backupPolicyName", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withDailyBackupsToKeep(5) + .withWeeklyBackupsToKeep(10) + .withMonthlyBackupsToKeep(10) + .withEnabled(false) + .apply(); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..eebed50e18f26 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateSamples.java @@ -0,0 +1,26 @@ +// 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; + +/** + * Samples for BackupVaults CreateOrUpdate. + */ +public final class BackupVaultsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupVaults_Create.json + */ + /** + * Sample code: BackupVault_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupVaultCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupVaults() + .define("backupVault1") + .withRegion("eastus") + .withExistingNetAppAccount("myRG", "account1") + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsDeleteSamples.java new file mode 100644 index 0000000000000..2f531e0815d35 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsDeleteSamples.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; + +/** + * Samples for BackupVaults Delete. + */ +public final class BackupVaultsDeleteSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupVaults_Delete.json + */ + /** + * Sample code: BackupVaults_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupVaultsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupVaults().delete("resourceGroup", "account1", "backupVault1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetSamples.java new file mode 100644 index 0000000000000..1516f7a7e70b1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetSamples.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; + +/** + * Samples for BackupVaults Get. + */ +public final class BackupVaultsGetSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupVaults_Get.json + */ + /** + * Sample code: BackupVaults_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupVaultsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupVaults().getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountSamples.java new file mode 100644 index 0000000000000..57750c959a203 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountSamples.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; + +/** + * Samples for BackupVaults ListByNetAppAccount. + */ +public final class BackupVaultsListByNetAppAccountSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupVaults_List.json + */ + /** + * Sample code: BackupVaults_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupVaultsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupVaults().listByNetAppAccount("myRG", "account1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsUpdateSamples.java new file mode 100644 index 0000000000000..cbeece92a6cb9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsUpdateSamples.java @@ -0,0 +1,41 @@ +// 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.BackupVault; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for BackupVaults Update. + */ +public final class BackupVaultsUpdateSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupVaults_Update.json + */ + /** + * Sample code: BackupVaults_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupVaultsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + BackupVault resource = manager.backupVaults() + .getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("Tag1", "Value1")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} 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 new file mode 100644 index 0000000000000..6b54f220d183f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsCreateSamples.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; + +/** + * Samples for Backups Create. + */ +public final class BackupsCreateSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupsUnderBackupVault_Create.json + */ + /** + * Sample code: BackupsUnderBackupVault_Create. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderBackupVaultCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backups() + .define("backup1") + .withExistingBackupVault("myRG", "account1", "backupVault1") + .withVolumeResourceId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPool/pool1/volumes/volume1") + .withLabel("myLabel") + .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 new file mode 100644 index 0000000000000..96c9fdc358244 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsDeleteSamples.java @@ -0,0 +1,23 @@ +// 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; + +/** + * Samples for Backups Delete. + */ +public final class BackupsDeleteSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupsUnderBackupVault_Delete.json + */ + /** + * Sample code: BackupsUnderBackupVault_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderBackupVaultDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backups() + .delete("resourceGroup", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusSamples.java new file mode 100644 index 0000000000000..bced5aeab8317 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusSamples.java @@ -0,0 +1,23 @@ +// 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; + +/** + * Samples for Backups GetLatestStatus. + */ +public final class BackupsGetLatestStatusSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_LatestBackupStatus.json + */ + /** + * Sample code: Volumes_BackupStatus. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesBackupStatus(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backups() + .getLatestStatusWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..6985d4b8520af --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetSamples.java @@ -0,0 +1,23 @@ +// 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; + +/** + * Samples for Backups Get. + */ +public final class BackupsGetSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupsUnderBackupVault_Get.json + */ + /** + * Sample code: BackupsUnderBackupVault_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderBackupVaultGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backups() + .getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE); + } +} 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/BackupsGetVolumeLatestRestoreStatusSamples.java similarity index 51% rename from sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeRestoreStatusSamples.java rename to sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusSamples.java index 5fb2dc0dc12e2..84db9d373a270 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/BackupsGetVolumeLatestRestoreStatusSamples.java @@ -5,12 +5,11 @@ package com.azure.resourcemanager.netapp.generated; /** - * Samples for Backups GetVolumeRestoreStatus. + * Samples for Backups GetVolumeLatestRestoreStatus. */ -public final class BackupsGetVolumeRestoreStatusSamples { +public final class BackupsGetVolumeLatestRestoreStatusSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_RestoreStatus.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_LatestRestoreStatus.json */ /** * Sample code: Volumes_RestoreStatus. @@ -18,7 +17,8 @@ public final class BackupsGetVolumeRestoreStatusSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesRestoreStatus(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups().getVolumeRestoreStatusWithResponse("myRG", "account1", "pool1", "volume1", - com.azure.core.util.Context.NONE); + manager.backups() + .getVolumeLatestRestoreStatusWithResponse("myRG", "account1", "pool1", "volume1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultSamples.java new file mode 100644 index 0000000000000..bd3123ca95b4b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultSamples.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; + +/** + * Samples for Backups ListByVault. + */ +public final class BackupsListByVaultSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupsUnderBackupVault_List.json + */ + /** + * Sample code: Backups_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backups().listByVault("myRG", "account1", "backupVault1", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderAccountMigrateBackupsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderAccountMigrateBackupsSamples.java new file mode 100644 index 0000000000000..9f337d8f30309 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderAccountMigrateBackupsSamples.java @@ -0,0 +1,27 @@ +// 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.BackupsMigrationRequest; + +/** + * Samples for BackupsUnderAccount MigrateBackups. + */ +public final class BackupsUnderAccountMigrateBackupsSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupsUnderAccount_Migrate.json + */ + /** + * Sample code: BackupsUnderAccount_Migrate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderAccountMigrate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupsUnderAccounts() + .migrateBackups("myRG", "account1", new BackupsMigrationRequest().withBackupVaultId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderBackupVaultRestoreFilesSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderBackupVaultRestoreFilesSamples.java new file mode 100644 index 0000000000000..e34837dde3276 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderBackupVaultRestoreFilesSamples.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.BackupRestoreFiles; +import java.util.Arrays; + +/** + * Samples for BackupsUnderBackupVault RestoreFiles. + */ +public final class BackupsUnderBackupVaultRestoreFilesSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupsUnderBackupVault_SingleFileRestore.json + */ + /** + * Sample code: Backups_SingleFileRestore. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsSingleFileRestore(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupsUnderBackupVaults() + .restoreFiles("myRG", "account1", "backupVault1", "backup1", new BackupRestoreFiles() + .withFileList(Arrays.asList("/dir1/customer1.db", "/dir1/customer2.db")) + .withDestinationVolumeId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderVolumeMigrateBackupsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderVolumeMigrateBackupsSamples.java new file mode 100644 index 0000000000000..5f3f453aac91a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderVolumeMigrateBackupsSamples.java @@ -0,0 +1,27 @@ +// 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.BackupsMigrationRequest; + +/** + * Samples for BackupsUnderVolume MigrateBackups. + */ +public final class BackupsUnderVolumeMigrateBackupsSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupsUnderVolume_Migrate.json + */ + /** + * Sample code: BackupsUnderVolume_Migrate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderVolumeMigrate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupsUnderVolumes() + .migrateBackups("myRG", "account1", "pool1", "volume1", new BackupsMigrationRequest().withBackupVaultId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"), + com.azure.core.util.Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..b47a28d404e58 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUpdateSamples.java @@ -0,0 +1,27 @@ +// 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.Backup; + +/** + * Samples for Backups Update. + */ +public final class BackupsUpdateSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/BackupsUnderBackupVault_Update.json + */ + /** + * Sample code: BackupsUnderBackupVault_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderBackupVaultUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + Backup resource = manager.backups() + .getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} 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 35969ed3f9b17..79fa8df69a794 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 @@ -11,8 +11,7 @@ */ public final class NetAppResourceCheckFilePathAvailabilitySamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/CheckFilePathAvailability.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/CheckFilePathAvailability.json */ /** * Sample code: CheckFilePathAvailability. @@ -20,9 +19,11 @@ public final class NetAppResourceCheckFilePathAvailabilitySamples { * @param manager Entry point to NetAppFilesManager. */ public static void checkFilePathAvailability(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResources().checkFilePathAvailabilityWithResponse("eastus", - new FilePathAvailabilityRequest().withName("my-exact-filepth").withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), - com.azure.core.util.Context.NONE); + manager.netAppResources() + .checkFilePathAvailabilityWithResponse("eastus", new FilePathAvailabilityRequest() + .withName("my-exact-filepth") + .withSubnetId( + "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), + com.azure.core.util.Context.NONE); } } 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 a2f88093e4b56..e18aaee413a80 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 @@ -12,8 +12,7 @@ */ public final class NetAppResourceCheckNameAvailabilitySamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/CheckNameAvailability.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/CheckNameAvailability.json */ /** * Sample code: CheckNameAvailability. @@ -21,9 +20,11 @@ public final class NetAppResourceCheckNameAvailabilitySamples { * @param manager Entry point to NetAppFilesManager. */ public static void checkNameAvailability(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResources().checkNameAvailabilityWithResponse("eastus", - new ResourceNameAvailabilityRequest().withName("accName") - .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS).withResourceGroup("myRG"), - com.azure.core.util.Context.NONE); + manager.netAppResources() + .checkNameAvailabilityWithResponse("eastus", + new ResourceNameAvailabilityRequest().withName("accName") + .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS) + .withResourceGroup("myRG"), + com.azure.core.util.Context.NONE); } } 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 147594cf24993..79ed4e593642b 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 @@ -12,8 +12,7 @@ */ public final class NetAppResourceCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/CheckQuotaAvailability.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/CheckQuotaAvailability.json */ /** * Sample code: CheckQuotaAvailability. @@ -21,9 +20,11 @@ public final class NetAppResourceCheckQuotaAvailabilitySamples { * @param manager Entry point to NetAppFilesManager. */ public static void checkQuotaAvailability(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResources().checkQuotaAvailabilityWithResponse("eastus", - new QuotaAvailabilityRequest().withName("resource1") - .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS).withResourceGroup("myRG"), - com.azure.core.util.Context.NONE); + manager.netAppResources() + .checkQuotaAvailabilityWithResponse("eastus", + new QuotaAvailabilityRequest().withName("resource1") + .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS) + .withResourceGroup("myRG"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryNetworkSiblingSetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryNetworkSiblingSetSamples.java index 9e51c370a3a18..4e601aa4b73d6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryNetworkSiblingSetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryNetworkSiblingSetSamples.java @@ -11,8 +11,7 @@ */ public final class NetAppResourceQueryNetworkSiblingSetSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/NetworkSiblingSet_Query.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/NetworkSiblingSet_Query.json */ /** * Sample code: NetworkSiblingSet_Query. @@ -20,9 +19,11 @@ public final class NetAppResourceQueryNetworkSiblingSetSamples { * @param manager Entry point to NetAppFilesManager. */ public static void networkSiblingSetQuery(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResources().queryNetworkSiblingSetWithResponse("eastus", new QueryNetworkSiblingSetRequest() - .withNetworkSiblingSetId("9760acf5-4638-11e7-9bdb-020073ca3333").withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), - com.azure.core.util.Context.NONE); + manager.netAppResources() + .queryNetworkSiblingSetWithResponse("eastus", new QueryNetworkSiblingSetRequest() + .withNetworkSiblingSetId("9760acf5-4638-11e7-9bdb-020073ca3333") + .withSubnetId( + "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryRegionInfoSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryRegionInfoSamples.java index 5500bab67fbf9..e46fa61016f8c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryRegionInfoSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryRegionInfoSamples.java @@ -9,8 +9,7 @@ */ public final class NetAppResourceQueryRegionInfoSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/RegionInfo.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/RegionInfo.json */ /** * Sample code: RegionInfo_Query. 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 dca31426845d5..a1eb8b38a7bb9 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,8 +9,7 @@ */ public final class NetAppResourceQuotaLimitsGetSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/QuotaLimits_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/QuotaLimits_Get.json */ /** * Sample code: QuotaLimits. @@ -18,7 +17,7 @@ public final class NetAppResourceQuotaLimitsGetSamples { * @param manager Entry point to NetAppFilesManager. */ public static void quotaLimits(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResourceQuotaLimits().getWithResponse("eastus", "totalCoolAccessVolumesPerSubscription", - com.azure.core.util.Context.NONE); + manager.netAppResourceQuotaLimits() + .getWithResponse("eastus", "totalCoolAccessVolumesPerSubscription", com.azure.core.util.Context.NONE); } } 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 66d896611a266..684b6092a977e 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,8 +9,7 @@ */ public final class NetAppResourceQuotaLimitsListSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/QuotaLimits_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/QuotaLimits_List.json */ /** * Sample code: QuotaLimits. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetSamples.java new file mode 100644 index 0000000000000..18d74069dc267 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetSamples.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; + +/** + * Samples for NetAppResourceRegionInfos Get. + */ +public final class NetAppResourceRegionInfosGetSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/RegionInfos_Get.json + */ + /** + * Sample code: RegionInfos_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void regionInfosGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.netAppResourceRegionInfos().getWithResponse("eastus", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListSamples.java new file mode 100644 index 0000000000000..2c8b625ac3c6a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListSamples.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; + +/** + * Samples for NetAppResourceRegionInfos List. + */ +public final class NetAppResourceRegionInfosListSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/RegionInfos_List.json + */ + /** + * Sample code: RegionInfos_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void regionInfosList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.netAppResourceRegionInfos().list("eastus", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUpdateNetworkSiblingSetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUpdateNetworkSiblingSetSamples.java index ed275fe11d65c..b9fd88e7dfc31 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUpdateNetworkSiblingSetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUpdateNetworkSiblingSetSamples.java @@ -12,8 +12,7 @@ */ public final class NetAppResourceUpdateNetworkSiblingSetSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/NetworkSiblingSet_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/NetworkSiblingSet_Update.json */ /** * Sample code: NetworkFeatures_Update. @@ -21,11 +20,12 @@ public final class NetAppResourceUpdateNetworkSiblingSetSamples { * @param manager Entry point to NetAppFilesManager. */ public static void networkFeaturesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResources().updateNetworkSiblingSet("eastus", new UpdateNetworkSiblingSetRequest() - .withNetworkSiblingSetId("9760acf5-4638-11e7-9bdb-020073ca3333") - .withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet") - .withNetworkSiblingSetStateId("12345_44420.8001578125").withNetworkFeatures(NetworkFeatures.STANDARD), - com.azure.core.util.Context.NONE); + manager.netAppResources() + .updateNetworkSiblingSet("eastus", new UpdateNetworkSiblingSetRequest() + .withNetworkSiblingSetId("9760acf5-4638-11e7-9bdb-020073ca3333") + .withSubnetId( + "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet") + .withNetworkSiblingSetStateId("12345_44420.8001578125") + .withNetworkFeatures(NetworkFeatures.STANDARD), com.azure.core.util.Context.NONE); } } 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 5bd1d46684793..8f7689dbbf556 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,8 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/OperationList.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/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 a524db14bee76..6470bd1190c16 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 @@ -12,8 +12,7 @@ */ public final class PoolsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Pools_CreateOrUpdate.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Pools_CreateOrUpdate.json */ /** * Sample code: Pools_CreateOrUpdate. @@ -21,7 +20,13 @@ public final class PoolsCreateOrUpdateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void poolsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.pools().define("pool1").withRegion("eastus").withExistingNetAppAccount("myRG", "account1") - .withSize(4398046511104L).withServiceLevel(ServiceLevel.PREMIUM).withQosType(QosType.AUTO).create(); + manager.pools() + .define("pool1") + .withRegion("eastus") + .withExistingNetAppAccount("myRG", "account1") + .withSize(4398046511104L) + .withServiceLevel(ServiceLevel.PREMIUM) + .withQosType(QosType.AUTO) + .create(); } } 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 0e594238ac41e..f0b964b8d7de9 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,8 +9,7 @@ */ public final class PoolsDeleteSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Pools_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/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 2c51519f16ea8..207e261c6e97f 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,8 +9,7 @@ */ public final class PoolsGetSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Pools_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/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 8aa1eee3675fa..0b779e5ae13c6 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,8 +9,7 @@ */ public final class PoolsListSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Pools_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/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 470901425c2c4..c0527cbba42d7 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 @@ -11,8 +11,7 @@ */ public final class PoolsUpdateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Pools_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/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 e5c66125722e1..0aef6b9aa0cf7 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 @@ -14,8 +14,7 @@ */ public final class SnapshotPoliciesCreateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_Create.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/SnapshotPolicies_Create.json */ /** * Sample code: SnapshotPolicies_Create. @@ -23,7 +22,9 @@ public final class SnapshotPoliciesCreateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotPoliciesCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshotPolicies().define("snapshotPolicyName").withRegion("eastus") + manager.snapshotPolicies() + .define("snapshotPolicyName") + .withRegion("eastus") .withExistingNetAppAccount("myRG", "account1") .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(2).withMinute(50)) .withDailySchedule(new DailySchedule().withSnapshotsToKeep(4).withHour(14).withMinute(30)) @@ -31,6 +32,7 @@ public static void snapshotPoliciesCreate(com.azure.resourcemanager.netapp.NetAp new WeeklySchedule().withSnapshotsToKeep(3).withDay("Wednesday").withHour(14).withMinute(45)) .withMonthlySchedule( new MonthlySchedule().withSnapshotsToKeep(5).withDaysOfMonth("10,11,12").withHour(14).withMinute(15)) - .withEnabled(true).create(); + .withEnabled(true) + .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 5f2a1d87cbd1f..9edd127faacbd 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,8 +9,7 @@ */ public final class SnapshotPoliciesDeleteSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/SnapshotPolicies_Delete.json */ /** * Sample code: SnapshotPolicies_Delete. @@ -18,7 +17,7 @@ public final class SnapshotPoliciesDeleteSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotPoliciesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshotPolicies().delete("resourceGroup", "accountName", "snapshotPolicyName", - com.azure.core.util.Context.NONE); + manager.snapshotPolicies() + .delete("resourceGroup", "accountName", "snapshotPolicyName", com.azure.core.util.Context.NONE); } } 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 72db9de829206..7f6b2df8bd6eb 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,8 +9,7 @@ */ public final class SnapshotPoliciesGetSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/SnapshotPolicies_Get.json */ /** * Sample code: SnapshotPolicies_Get. @@ -18,7 +17,7 @@ public final class SnapshotPoliciesGetSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotPoliciesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshotPolicies().getWithResponse("myRG", "account1", "snapshotPolicyName", - com.azure.core.util.Context.NONE); + manager.snapshotPolicies() + .getWithResponse("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE); } } 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 21b5ed43e2a45..046077c22369a 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,8 +9,7 @@ */ public final class SnapshotPoliciesListSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/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 a5bb38141df29..48fb0ee24386a 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,9 +9,7 @@ */ public final class SnapshotPoliciesListVolumesSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_ListVolumes. - * json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/SnapshotPolicies_ListVolumes.json */ /** * Sample code: SnapshotPolicies_ListVolumes. @@ -19,7 +17,7 @@ public final class SnapshotPoliciesListVolumesSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotPoliciesListVolumes(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshotPolicies().listVolumesWithResponse("myRG", "account1", "snapshotPolicyName", - com.azure.core.util.Context.NONE); + manager.snapshotPolicies() + .listVolumesWithResponse("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE); } } 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 812ce45e685e6..896ddfb047ad1 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 @@ -15,8 +15,7 @@ */ public final class SnapshotPoliciesUpdateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/SnapshotPolicies_Update.json */ /** * Sample code: SnapshotPolicies_Update. @@ -25,13 +24,16 @@ public final class SnapshotPoliciesUpdateSamples { */ public static void snapshotPoliciesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { SnapshotPolicy resource = manager.snapshotPolicies() - .getWithResponse("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE).getValue(); - resource.update().withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(2).withMinute(50)) + .getWithResponse("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(2).withMinute(50)) .withDailySchedule(new DailySchedule().withSnapshotsToKeep(4).withHour(14).withMinute(30)) .withWeeklySchedule( new WeeklySchedule().withSnapshotsToKeep(3).withDay("Wednesday").withHour(14).withMinute(45)) .withMonthlySchedule( new MonthlySchedule().withSnapshotsToKeep(5).withDaysOfMonth("10,11,12").withHour(14).withMinute(15)) - .withEnabled(true).apply(); + .withEnabled(true) + .apply(); } } 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 cc17606d91afd..9594e298ec144 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 @@ -9,8 +9,7 @@ */ public final class SnapshotsCreateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_Create.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Snapshots_Create.json */ /** * Sample code: Snapshots_Create. @@ -18,7 +17,10 @@ public final class SnapshotsCreateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotsCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshots().define("snapshot1").withRegion("eastus") - .withExistingVolume("myRG", "account1", "pool1", "volume1").create(); + manager.snapshots() + .define("snapshot1") + .withRegion("eastus") + .withExistingVolume("myRG", "account1", "pool1", "volume1") + .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 223702dfc220c..3c349c7d11404 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,8 +9,7 @@ */ public final class SnapshotsDeleteSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Snapshots_Delete.json */ /** * Sample code: Snapshots_Delete. @@ -18,7 +17,7 @@ public final class SnapshotsDeleteSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshots().delete("myRG", "account1", "pool1", "volume1", "snapshot1", - com.azure.core.util.Context.NONE); + manager.snapshots() + .delete("myRG", "account1", "pool1", "volume1", "snapshot1", com.azure.core.util.Context.NONE); } } 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 e0675850165cf..b99fef808e8cb 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,8 +9,7 @@ */ public final class SnapshotsGetSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Snapshots_Get.json */ /** * Sample code: Snapshots_Get. @@ -18,7 +17,7 @@ public final class SnapshotsGetSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshots().getWithResponse("myRG", "account1", "pool1", "volume1", "snapshot1", - com.azure.core.util.Context.NONE); + manager.snapshots() + .getWithResponse("myRG", "account1", "pool1", "volume1", "snapshot1", com.azure.core.util.Context.NONE); } } 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 8fa136e6cbb79..acde1e5ae6f55 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,8 +9,7 @@ */ public final class SnapshotsListSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/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 c671af1d2dd9e..a6fd35b6eb93e 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 @@ -12,9 +12,7 @@ */ public final class SnapshotsRestoreFilesSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_SingleFileRestore. - * json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Snapshots_SingleFileRestore.json */ /** * Sample code: Snapshots_SingleFileRestore. @@ -22,8 +20,9 @@ public final class SnapshotsRestoreFilesSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotsSingleFileRestore(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshots().restoreFiles("myRG", "account1", "pool1", "volume1", "snapshot1", - new SnapshotRestoreFiles().withFilePaths(Arrays.asList("/dir1/customer1.db", "/dir1/customer2.db")), - com.azure.core.util.Context.NONE); + manager.snapshots() + .restoreFiles("myRG", "account1", "pool1", "volume1", "snapshot1", + new SnapshotRestoreFiles().withFilePaths(Arrays.asList("/dir1/customer1.db", "/dir1/customer2.db")), + com.azure.core.util.Context.NONE); } } 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 07b0fe485056e..191375284f0e7 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 @@ -13,8 +13,7 @@ */ public final class SnapshotsUpdateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Snapshots_Update.json */ /** * Sample code: Snapshots_Update. @@ -23,8 +22,9 @@ public final class SnapshotsUpdateSamples { */ public static void snapshotsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) throws IOException { manager.snapshots() - .update("myRG", "account1", "pool1", "volume1", "snapshot1", SerializerFactory - .createDefaultManagementSerializerAdapter().deserialize("{}", Object.class, SerializerEncoding.JSON), + .update("myRG", "account1", "pool1", "volume1", "snapshot1", + SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON), com.azure.core.util.Context.NONE); } } 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 cd4df6a721e78..243375681d16b 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 @@ -9,8 +9,7 @@ */ public final class SubvolumesCreateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_Create.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Subvolumes_Create.json */ /** * Sample code: Subvolumes_Create. @@ -18,7 +17,10 @@ public final class SubvolumesCreateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void subvolumesCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.subvolumes().define("subvolume1").withExistingVolume("myRG", "account1", "pool1", "volume1") - .withPath("/subvolumePath").create(); + manager.subvolumes() + .define("subvolume1") + .withExistingVolume("myRG", "account1", "pool1", "volume1") + .withPath("/subvolumePath") + .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 2898e37d8cd25..f84eb3660ad69 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,8 +9,7 @@ */ public final class SubvolumesDeleteSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Subvolumes_Delete.json */ /** * Sample code: Subvolumes_Delete. @@ -18,7 +17,7 @@ public final class SubvolumesDeleteSamples { * @param manager Entry point to NetAppFilesManager. */ public static void subvolumesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.subvolumes().delete("myRG", "account1", "pool1", "volume1", "subvolume1", - com.azure.core.util.Context.NONE); + manager.subvolumes() + .delete("myRG", "account1", "pool1", "volume1", "subvolume1", com.azure.core.util.Context.NONE); } } 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 a71abbde29287..ac4ec76f3b961 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,8 +9,7 @@ */ public final class SubvolumesGetMetadataSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_Metadata.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Subvolumes_Metadata.json */ /** * Sample code: Subvolumes_Metadata. @@ -18,7 +17,7 @@ public final class SubvolumesGetMetadataSamples { * @param manager Entry point to NetAppFilesManager. */ public static void subvolumesMetadata(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.subvolumes().getMetadata("myRG", "account1", "pool1", "volume1", "subvolume1", - com.azure.core.util.Context.NONE); + manager.subvolumes() + .getMetadata("myRG", "account1", "pool1", "volume1", "subvolume1", com.azure.core.util.Context.NONE); } } 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 cf955d1f94858..81f5a23b9f30d 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,8 +9,7 @@ */ public final class SubvolumesGetSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Subvolumes_Get.json */ /** * Sample code: Subvolumes_Get. @@ -18,7 +17,7 @@ public final class SubvolumesGetSamples { * @param manager Entry point to NetAppFilesManager. */ public static void subvolumesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.subvolumes().getWithResponse("myRG", "account1", "pool1", "volume1", "subvolume1", - com.azure.core.util.Context.NONE); + manager.subvolumes() + .getWithResponse("myRG", "account1", "pool1", "volume1", "subvolume1", com.azure.core.util.Context.NONE); } } 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 cdce6f7702e8c..08a06ea40387b 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,8 +9,7 @@ */ public final class SubvolumesListByVolumeSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/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 afbf8247f862b..9dc5a401723f1 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 @@ -11,8 +11,7 @@ */ public final class SubvolumesUpdateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Subvolumes_Update.json */ /** * Sample code: Subvolumes_Update. 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 28accab19bf4c..b769873ac90ac 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 @@ -17,9 +17,7 @@ */ public final class VolumeGroupsCreateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_Create_SapHana. - * json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeGroups_Create_SapHana.json */ /** * Sample code: VolumeGroups_Create_SapHana. @@ -27,39 +25,61 @@ public final class VolumeGroupsCreateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumeGroupsCreateSapHana(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager - .volumeGroups().define("group1").withExistingNetAppAccount("myRG", "account1").withRegion( - "westus") - .withGroupMetadata( - new VolumeGroupMetadata() - .withGroupDescription("Volume group").withApplicationType( - ApplicationType.SAP_HANA) - .withApplicationIdentifier("SH9")) - .withVolumes(Arrays.asList(new VolumeGroupVolumeProperties().withName("test-data-mnt00001") - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) - .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) - .withProtocolTypes(Arrays.asList("NFSv4.1")) - .withSubnetId( - "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") - .withThroughputMibps(10.0F) - .withCapacityPoolResourceId( - "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") - .withProximityPlacementGroup( - "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg") - .withVolumeSpecName("data"), + manager.volumeGroups() + .define("group1") + .withExistingNetAppAccount("myRG", "account1") + .withRegion("westus") + .withGroupMetadata(new VolumeGroupMetadata().withGroupDescription("Volume group") + .withApplicationType(ApplicationType.SAP_HANA) + .withApplicationIdentifier("SH9")) + .withVolumes(Arrays.asList( + new VolumeGroupVolumeProperties().withName("test-data-mnt00001") + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) + .withProtocolTypes(Arrays.asList("NFSv4.1")) + .withSubnetId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withProximityPlacementGroup( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg") + .withVolumeSpecName("data"), new VolumeGroupVolumeProperties().withName("test-log-mnt00001") - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -69,13 +89,25 @@ public static void volumeGroupsCreateSapHana(com.azure.resourcemanager.netapp.Ne .withProximityPlacementGroup( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg") .withVolumeSpecName("log"), - new VolumeGroupVolumeProperties().withName("test-shared").withCreationToken("fakeTokenPlaceholder") - .withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + new VolumeGroupVolumeProperties().withName("test-shared") + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -85,13 +117,25 @@ public static void volumeGroupsCreateSapHana(com.azure.resourcemanager.netapp.Ne .withProximityPlacementGroup( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg") .withVolumeSpecName("shared"), - new VolumeGroupVolumeProperties().withName("test-data-backup").withCreationToken("fakeTokenPlaceholder") - .withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + new VolumeGroupVolumeProperties().withName("test-data-backup") + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -101,13 +145,25 @@ public static void volumeGroupsCreateSapHana(com.azure.resourcemanager.netapp.Ne .withProximityPlacementGroup( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg") .withVolumeSpecName("data-backup"), - new VolumeGroupVolumeProperties().withName("test-log-backup").withCreationToken("fakeTokenPlaceholder") - .withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + new VolumeGroupVolumeProperties().withName("test-log-backup") + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -121,8 +177,7 @@ public static void volumeGroupsCreateSapHana(com.azure.resourcemanager.netapp.Ne } /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_Create_Oracle.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeGroups_Create_Oracle.json */ /** * Sample code: VolumeGroups_Create_Oracle. @@ -130,37 +185,61 @@ public static void volumeGroupsCreateSapHana(com.azure.resourcemanager.netapp.Ne * @param manager Entry point to NetAppFilesManager. */ public static void volumeGroupsCreateOracle(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager - .volumeGroups().define("group1").withExistingNetAppAccount("myRG", "account1").withRegion( - "westus") - .withGroupMetadata( - new VolumeGroupMetadata() - .withGroupDescription("Volume group").withApplicationType( - ApplicationType.ORACLE) - .withApplicationIdentifier("OR2")) - .withVolumes(Arrays.asList(new VolumeGroupVolumeProperties().withName("test-ora-data1") - .withZones(Arrays.asList("1")).withCreationToken("fakeTokenPlaceholder") - .withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) - .withProtocolTypes(Arrays.asList("NFSv4.1")) - .withSubnetId( - "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") - .withThroughputMibps(10.0F) - .withCapacityPoolResourceId( - "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") - .withVolumeSpecName("ora-data1"), - new VolumeGroupVolumeProperties().withName("test-ora-data2").withZones(Arrays.asList("1")) - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + manager.volumeGroups() + .define("group1") + .withExistingNetAppAccount("myRG", "account1") + .withRegion("westus") + .withGroupMetadata(new VolumeGroupMetadata().withGroupDescription("Volume group") + .withApplicationType(ApplicationType.ORACLE) + .withApplicationIdentifier("OR2")) + .withVolumes(Arrays.asList( + new VolumeGroupVolumeProperties().withName("test-ora-data1") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) + .withProtocolTypes(Arrays.asList("NFSv4.1")) + .withSubnetId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("ora-data1"), + new VolumeGroupVolumeProperties().withName("test-ora-data2") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -168,14 +247,26 @@ public static void volumeGroupsCreateOracle(com.azure.resourcemanager.netapp.Net .withCapacityPoolResourceId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") .withVolumeSpecName("ora-data2"), - new VolumeGroupVolumeProperties().withName("test-ora-data3").withZones(Arrays.asList("1")) - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + new VolumeGroupVolumeProperties().withName("test-ora-data3") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -183,14 +274,26 @@ public static void volumeGroupsCreateOracle(com.azure.resourcemanager.netapp.Net .withCapacityPoolResourceId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") .withVolumeSpecName("ora-data3"), - new VolumeGroupVolumeProperties().withName("test-ora-data4").withZones(Arrays.asList("1")) - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + new VolumeGroupVolumeProperties().withName("test-ora-data4") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -198,14 +301,26 @@ public static void volumeGroupsCreateOracle(com.azure.resourcemanager.netapp.Net .withCapacityPoolResourceId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") .withVolumeSpecName("ora-data4"), - new VolumeGroupVolumeProperties().withName("test-ora-data5").withZones(Arrays.asList("1")) - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + new VolumeGroupVolumeProperties().withName("test-ora-data5") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -213,14 +328,26 @@ public static void volumeGroupsCreateOracle(com.azure.resourcemanager.netapp.Net .withCapacityPoolResourceId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") .withVolumeSpecName("ora-data5"), - new VolumeGroupVolumeProperties().withName("test-ora-data6").withZones(Arrays.asList("1")) - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + new VolumeGroupVolumeProperties().withName("test-ora-data6") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -228,14 +355,26 @@ public static void volumeGroupsCreateOracle(com.azure.resourcemanager.netapp.Net .withCapacityPoolResourceId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") .withVolumeSpecName("ora-data6"), - new VolumeGroupVolumeProperties().withName("test-ora-data7").withZones(Arrays.asList("1")) - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + new VolumeGroupVolumeProperties().withName("test-ora-data7") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -243,14 +382,26 @@ public static void volumeGroupsCreateOracle(com.azure.resourcemanager.netapp.Net .withCapacityPoolResourceId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") .withVolumeSpecName("ora-data7"), - new VolumeGroupVolumeProperties().withName("test-ora-data8").withZones(Arrays.asList("1")) - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + new VolumeGroupVolumeProperties().withName("test-ora-data8") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -258,14 +409,26 @@ public static void volumeGroupsCreateOracle(com.azure.resourcemanager.netapp.Net .withCapacityPoolResourceId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") .withVolumeSpecName("ora-data8"), - new VolumeGroupVolumeProperties().withName("test-ora-log").withZones(Arrays.asList("1")) - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + new VolumeGroupVolumeProperties().withName("test-ora-log") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -273,14 +436,26 @@ public static void volumeGroupsCreateOracle(com.azure.resourcemanager.netapp.Net .withCapacityPoolResourceId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") .withVolumeSpecName("ora-log"), - new VolumeGroupVolumeProperties().withName("test-ora-log-mirror").withZones(Arrays.asList("1")) - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + new VolumeGroupVolumeProperties().withName("test-ora-log-mirror") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -288,14 +463,26 @@ public static void volumeGroupsCreateOracle(com.azure.resourcemanager.netapp.Net .withCapacityPoolResourceId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") .withVolumeSpecName("ora-log-mirror"), - new VolumeGroupVolumeProperties().withName("test-ora-binary").withZones(Arrays.asList("1")) - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + new VolumeGroupVolumeProperties().withName("test-ora-binary") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") @@ -303,14 +490,26 @@ public static void volumeGroupsCreateOracle(com.azure.resourcemanager.netapp.Net .withCapacityPoolResourceId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") .withVolumeSpecName("ora-binary"), - new VolumeGroupVolumeProperties().withName("test-ora-backup").withZones(Arrays.asList("1")) - .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + new VolumeGroupVolumeProperties().withName("test-ora-backup") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) - .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() - .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) - .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withExportPolicy(new VolumePropertiesExportPolicy() + .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(false) + .withCifs(false) + .withNfsv3(false) + .withNfsv41(true) + .withAllowedClients("0.0.0.0/0") + .withHasRootAccess(true)))) .withProtocolTypes(Arrays.asList("NFSv4.1")) .withSubnetId( "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") 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 9759150243f71..751f1833fbd91 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,8 +9,7 @@ */ public final class VolumeGroupsDeleteSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/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 fc4c499282dfe..bdfaf0a61f386 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,8 +9,7 @@ */ public final class VolumeGroupsGetSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_Get_SapHana.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeGroups_Get_SapHana.json */ /** * Sample code: VolumeGroups_Get_SapHana. @@ -22,8 +21,7 @@ public static void volumeGroupsGetSapHana(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_Get_Oracle.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeGroups_Get_Oracle.json */ /** * Sample code: VolumeGroups_Get_Oracle. 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 38a07faf613e2..eecb61e1e57f9 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,8 +9,7 @@ */ public final class VolumeGroupsListByNetAppAccountSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_List_Oracle.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeGroups_List_Oracle.json */ /** * Sample code: VolumeGroups_List_Oracle. @@ -22,8 +21,7 @@ public static void volumeGroupsListOracle(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_List_SapHana.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeGroups_List_SapHana.json */ /** * Sample code: VolumeGroups_List_SapHana. 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 index c706c6c0ea115..d00abdb49cf61 100644 --- 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 @@ -11,8 +11,7 @@ */ public final class VolumeQuotaRulesCreateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeQuotaRules_Create.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeQuotaRules_Create.json */ /** * Sample code: VolumeQuotaRules_Create. @@ -20,8 +19,13 @@ public final class VolumeQuotaRulesCreateSamples { * @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(); + 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 index 015739da72920..c659bc9e57cf5 100644 --- 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 @@ -9,8 +9,7 @@ */ public final class VolumeQuotaRulesDeleteSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeQuotaRules_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeQuotaRules_Delete.json */ /** * Sample code: VolumeQuotaRules_Delete. @@ -18,7 +17,7 @@ public final class VolumeQuotaRulesDeleteSamples { * @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", - com.azure.core.util.Context.NONE); + manager.volumeQuotaRules() + .delete("myRG", "account-9957", "pool-5210", "volume-6387", "rule-0004", com.azure.core.util.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 index 032e47636a299..c285810090464 100644 --- 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 @@ -9,8 +9,7 @@ */ public final class VolumeQuotaRulesGetSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeQuotaRules_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeQuotaRules_Get.json */ /** * Sample code: VolumeQuotaRules_Get. @@ -18,7 +17,8 @@ public final class VolumeQuotaRulesGetSamples { * @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", - com.azure.core.util.Context.NONE); + manager.volumeQuotaRules() + .getWithResponse("myRG", "account-9957", "pool-5210", "volume-6387", "rule-0004", + com.azure.core.util.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 index ebb99927e062b..5c98c3854cef6 100644 --- 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 @@ -9,8 +9,7 @@ */ public final class VolumeQuotaRulesListByVolumeSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeQuotaRules_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeQuotaRules_List.json */ /** * Sample code: VolumeQuotaRules_List. @@ -18,7 +17,7 @@ public final class VolumeQuotaRulesListByVolumeSamples { * @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", - com.azure.core.util.Context.NONE); + manager.volumeQuotaRules() + .listByVolume("myRG", "account-9957", "pool-5210", "volume-6387", com.azure.core.util.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 index b74bcd3d0e09b..65fefc79a7350 100644 --- 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 @@ -11,8 +11,7 @@ */ public final class VolumeQuotaRulesUpdateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeQuotaRules_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/VolumeQuotaRules_Update.json */ /** * Sample code: VolumeQuotaRules_Update. @@ -20,8 +19,10 @@ public final class VolumeQuotaRulesUpdateSamples { * @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", com.azure.core.util.Context.NONE).getValue(); + VolumeQuotaRule resource = manager.volumeQuotaRules() + .getWithResponse("myRG", "account-9957", "pool-5210", "volume-6387", "rule-0004", + com.azure.core.util.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 359f224e4d5cc..d78417a3ff542 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 @@ -11,9 +11,7 @@ */ public final class VolumesAuthorizeReplicationSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_AuthorizeReplication. - * json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_AuthorizeReplication.json */ /** * Sample code: Volumes_AuthorizeReplication. @@ -21,9 +19,10 @@ public final class VolumesAuthorizeReplicationSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesAuthorizeReplication(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().authorizeReplication("myRG", "account1", "pool1", "volume1", - new AuthorizeRequest().withRemoteVolumeResourceId( - "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRemoteRG/providers/Microsoft.NetApp/netAppAccounts/remoteAccount1/capacityPools/remotePool1/volumes/remoteVolume1"), - com.azure.core.util.Context.NONE); + manager.volumes() + .authorizeReplication("myRG", "account1", "pool1", "volume1", + new AuthorizeRequest().withRemoteVolumeResourceId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRemoteRG/providers/Microsoft.NetApp/netAppAccounts/remoteAccount1/capacityPools/remotePool1/volumes/remoteVolume1"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksSamples.java index 52c7cdebd0776..31b4d7b095455 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksSamples.java @@ -11,8 +11,7 @@ */ public final class VolumesBreakFileLocksSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_BreakFileLocks.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_BreakFileLocks.json */ /** * Sample code: Volumes_BreakFileLocks. @@ -20,8 +19,9 @@ public final class VolumesBreakFileLocksSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesBreakFileLocks(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().breakFileLocks("myRG", "account1", "pool1", "volume1", - new BreakFileLocksRequest().withClientIp("101.102.103.104").withConfirmRunningDisruptiveOperation(true), - com.azure.core.util.Context.NONE); + manager.volumes() + .breakFileLocks("myRG", "account1", "pool1", "volume1", + new BreakFileLocksRequest().withClientIp("101.102.103.104").withConfirmRunningDisruptiveOperation(true), + com.azure.core.util.Context.NONE); } } 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 5444220d7e559..e3153dae50948 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 @@ -11,8 +11,7 @@ */ public final class VolumesBreakReplicationSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_BreakReplication.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_BreakReplication.json */ /** * Sample code: Volumes_BreakReplication. @@ -20,7 +19,8 @@ public final class VolumesBreakReplicationSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesBreakReplication(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().breakReplication("myRG", "account1", "pool1", "volume1", - new BreakReplicationRequest().withForceBreakReplication(false), com.azure.core.util.Context.NONE); + manager.volumes() + .breakReplication("myRG", "account1", "pool1", "volume1", + new BreakReplicationRequest().withForceBreakReplication(false), com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOnPremMigrationReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOnPremMigrationReplicationSamples.java new file mode 100644 index 0000000000000..eab8ae55c8bde --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOnPremMigrationReplicationSamples.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; + +/** + * Samples for Volumes CreateOnPremMigrationReplication. + */ +public final class VolumesCreateOnPremMigrationReplicationSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_CreateOnPremMigrationReplication.json + */ + /** + * Sample code: Volumes_CreateOnPremMigrationReplication. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + volumesCreateOnPremMigrationReplication(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes() + .createOnPremMigrationReplication("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} 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 cf4551de252ca..0e69cf446cfb5 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 @@ -11,8 +11,7 @@ */ public final class VolumesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_CreateOrUpdate.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_CreateOrUpdate.json */ /** * Sample code: Volumes_CreateOrUpdate. @@ -20,10 +19,15 @@ public final class VolumesCreateOrUpdateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().define("volume1").withRegion("eastus").withExistingCapacityPool("myRG", "account1", "pool1") - .withCreationToken("my-unique-file-path").withUsageThreshold(107374182400L) + manager.volumes() + .define("volume1") + .withRegion("eastus") + .withExistingCapacityPool("myRG", "account1", "pool1") + .withCreationToken("my-unique-file-path") + .withUsageThreshold(107374182400L) .withSubnetId( "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") - .withServiceLevel(ServiceLevel.PREMIUM).create(); + .withServiceLevel(ServiceLevel.PREMIUM) + .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 d9ef057ff7a2d..e0c3add60fca1 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,8 +9,7 @@ */ public final class VolumesDeleteReplicationSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_DeleteReplication.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/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 2a2bf178654c2..cc5552b223465 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,8 +9,7 @@ */ public final class VolumesDeleteSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_Delete.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_Delete.json */ /** * Sample code: Volumes_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeOnPremMigrationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeOnPremMigrationSamples.java new file mode 100644 index 0000000000000..4da4438704584 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeOnPremMigrationSamples.java @@ -0,0 +1,23 @@ +// 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; + +/** + * Samples for Volumes FinalizeOnPremMigration. + */ +public final class VolumesFinalizeOnPremMigrationSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_FinalizeOnPremMigration.json + */ + /** + * Sample code: Volumes_FinalizeOnPremMigration. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesFinalizeOnPremMigration(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes() + .finalizeOnPremMigration("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} 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 index dc27858c7e32d..bb272b57f47f0 100644 --- 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 @@ -9,8 +9,7 @@ */ public final class VolumesFinalizeRelocationSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_FinalizeRelocation.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_FinalizeRelocation.json */ /** * Sample code: Volumes_FinalizeRelocation. 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 d4a1c3b119043..7862ced9fbad2 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,8 +9,7 @@ */ public final class VolumesGetSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_Get.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_Get.json */ /** * Sample code: Volumes_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserSamples.java index 0f738243fb301..635fafb2d2a28 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserSamples.java @@ -11,8 +11,7 @@ */ public final class VolumesListGetGroupIdListForLdapUserSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/GroupIdListForLDAPUser.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/GroupIdListForLDAPUser.json */ /** * Sample code: GetGroupIdListForUser. @@ -20,7 +19,8 @@ public final class VolumesListGetGroupIdListForLdapUserSamples { * @param manager Entry point to NetAppFilesManager. */ public static void getGroupIdListForUser(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().listGetGroupIdListForLdapUser("myRG", "account1", "pool1", "volume1", - new GetGroupIdListForLdapUserRequest().withUsername("user1"), com.azure.core.util.Context.NONE); + manager.volumes() + .listGetGroupIdListForLdapUser("myRG", "account1", "pool1", "volume1", + new GetGroupIdListForLdapUserRequest().withUsername("user1"), com.azure.core.util.Context.NONE); } } 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 index 24c115d0498e8..37095ff8462cb 100644 --- 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 @@ -9,8 +9,7 @@ */ public final class VolumesListReplicationsSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ListReplications.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_ListReplications.json */ /** * Sample code: Volumes_ListReplications. 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 41acf4cf99173..1aeb48b8f9ae4 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,8 +9,7 @@ */ public final class VolumesListSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_List.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_List.json */ /** * Sample code: Volumes_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPeerClusterForOnPremMigrationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPeerClusterForOnPremMigrationSamples.java new file mode 100644 index 0000000000000..c8d2b8f423d69 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPeerClusterForOnPremMigrationSamples.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.PeerClusterForVolumeMigrationRequest; +import java.util.Arrays; + +/** + * Samples for Volumes PeerClusterForOnPremMigration. + */ +public final class VolumesPeerClusterForOnPremMigrationSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_PeerClusterForOnPremMigration.json + */ + /** + * Sample code: Volumes_PeerClusterForOnPremMigration. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + volumesPeerClusterForOnPremMigration(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes() + .peerClusterForOnPremMigration("myRG", "account1", "pool1", "volume1", + new PeerClusterForVolumeMigrationRequest() + .withPeerAddresses(Arrays.asList("0.0.0.1", "0.0.0.2", "0.0.0.3", "0.0.0.4", "0.0.0.5", "0.0.0.6")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPerformReplicationTransferSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPerformReplicationTransferSamples.java new file mode 100644 index 0000000000000..c4e5812040e77 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPerformReplicationTransferSamples.java @@ -0,0 +1,23 @@ +// 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; + +/** + * Samples for Volumes PerformReplicationTransfer. + */ +public final class VolumesPerformReplicationTransferSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_PerformReplicationTransfer.json + */ + /** + * Sample code: Volumes_PerformReplicationTransfer. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesPerformReplicationTransfer(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes() + .performReplicationTransfer("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} 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 3cb52baf8bca2..0c5ecd93c1ed1 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 @@ -11,8 +11,7 @@ */ public final class VolumesPoolChangeSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_PoolChange.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_PoolChange.json */ /** * Sample code: Volumes_AuthorizeReplication. @@ -20,9 +19,9 @@ public final class VolumesPoolChangeSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesAuthorizeReplication(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().poolChange("myRG", "account1", "pool1", "volume1", - new PoolChangeRequest().withNewPoolResourceId( + manager.volumes() + .poolChange("myRG", "account1", "pool1", "volume1", new PoolChangeRequest().withNewPoolResourceId( "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - com.azure.core.util.Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPopulateAvailabilityZoneSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPopulateAvailabilityZoneSamples.java index 359a692c9dc15..e618ad7d610f4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPopulateAvailabilityZoneSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPopulateAvailabilityZoneSamples.java @@ -9,8 +9,7 @@ */ public final class VolumesPopulateAvailabilityZoneSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/ - * Volumes_PopulateAvailabilityZones.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_PopulateAvailabilityZones.json */ /** * Sample code: Volumes_PopulateAvailabilityZones. @@ -18,7 +17,7 @@ public final class VolumesPopulateAvailabilityZoneSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesPopulateAvailabilityZones(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().populateAvailabilityZone("myRG", "account1", "pool1", "volume1", - com.azure.core.util.Context.NONE); + manager.volumes() + .populateAvailabilityZone("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); } } 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 6055a18362780..60152b8025b90 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,9 +9,7 @@ */ public final class VolumesReInitializeReplicationSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ReInitializeReplication - * .json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_ReInitializeReplication.json */ /** * Sample code: Volumes_ReInitializeReplication. @@ -19,7 +17,7 @@ public final class VolumesReInitializeReplicationSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesReInitializeReplication(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().reInitializeReplication("myRG", "account1", "pool1", "volume1", - com.azure.core.util.Context.NONE); + manager.volumes() + .reInitializeReplication("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReestablishReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReestablishReplicationSamples.java index bf0f9b94b0cd9..0e10faee0b8dc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReestablishReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReestablishReplicationSamples.java @@ -11,9 +11,7 @@ */ public final class VolumesReestablishReplicationSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ReestablishReplication. - * json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_ReestablishReplication.json */ /** * Sample code: Volumes_ReestablishReplication. @@ -21,9 +19,10 @@ public final class VolumesReestablishReplicationSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesReestablishReplication(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().reestablishReplication("myRG", "account1", "pool1", "volume1", - new ReestablishReplicationRequest().withSourceVolumeId( - "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/mySourceRG/providers/Microsoft.NetApp/netAppAccounts/sourceAccount1/capacityPools/sourcePool1/volumes/sourceVolume1"), - com.azure.core.util.Context.NONE); + manager.volumes() + .reestablishReplication("myRG", "account1", "pool1", "volume1", + new ReestablishReplicationRequest().withSourceVolumeId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/mySourceRG/providers/Microsoft.NetApp/netAppAccounts/sourceAccount1/capacityPools/sourcePool1/volumes/sourceVolume1"), + com.azure.core.util.Context.NONE); } } 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 index c789c755272ef..73a0bbd579c0a 100644 --- 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 @@ -11,8 +11,7 @@ */ public final class VolumesRelocateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_Relocate.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_Relocate.json */ /** * Sample code: Volumes_Relocate. @@ -20,7 +19,8 @@ public final class VolumesRelocateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesRelocate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().relocate("myRG", "account1", "pool1", "volume1", new RelocateVolumeRequest(), - com.azure.core.util.Context.NONE); + manager.volumes() + .relocate("myRG", "account1", "pool1", "volume1", new RelocateVolumeRequest(), + com.azure.core.util.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 d1c4567ff94fd..cf2c8e4af3c38 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,8 +9,7 @@ */ public final class VolumesReplicationStatusSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ReplicationStatus.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_ReplicationStatus.json */ /** * Sample code: Volumes_ReplicationStatus. @@ -18,7 +17,7 @@ public final class VolumesReplicationStatusSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesReplicationStatus(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().replicationStatusWithResponse("myRG", "account1", "pool1", "volume1", - com.azure.core.util.Context.NONE); + manager.volumes() + .replicationStatusWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); } } 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 index 978e96cba49e5..3d436ae08846d 100644 --- 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 @@ -9,8 +9,7 @@ */ public final class VolumesResetCifsPasswordSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ResetCifsPassword.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_ResetCifsPassword.json */ /** * Sample code: Volumes_ResetCifsPassword. 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 e02ae435b63a7..b96f1e6fc3df3 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,8 +9,7 @@ */ public final class VolumesResyncReplicationSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ResyncReplication.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/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 index c8780fbe2f064..ae6334c7d99fd 100644 --- 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 @@ -9,8 +9,7 @@ */ public final class VolumesRevertRelocationSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_RevertRelocation.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_RevertRelocation.json */ /** * Sample code: Volumes_RevertRelocation. 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 671610d9595d9..7929e8eeb225a 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 @@ -11,8 +11,7 @@ */ public final class VolumesRevertSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_Revert.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_Revert.json */ /** * Sample code: Volumes_Revert. @@ -20,8 +19,9 @@ public final class VolumesRevertSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesRevert(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().revert("myRG", "account1", "pool1", "volume1", new VolumeRevert().withSnapshotId( - "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/snapshots/snapshot1"), - com.azure.core.util.Context.NONE); + manager.volumes() + .revert("myRG", "account1", "pool1", "volume1", new VolumeRevert().withSnapshotId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/snapshots/snapshot1"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesSplitCloneFromParentSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesSplitCloneFromParentSamples.java new file mode 100644 index 0000000000000..d6d07fa1fe852 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesSplitCloneFromParentSamples.java @@ -0,0 +1,23 @@ +// 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; + +/** + * Samples for Volumes SplitCloneFromParent. + */ +public final class VolumesSplitCloneFromParentSamples { + /* + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_SplitClone.json + */ + /** + * Sample code: Volumes_SplitClone. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesSplitClone(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes() + .splitCloneFromParent("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} 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 7184d5dd6a5b7..69080236846bf 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 @@ -11,8 +11,7 @@ */ public final class VolumesUpdateSamples { /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_Update.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-11-01-preview/examples/Volumes_Update.json */ /** * Sample code: Volumes_Update. @@ -21,7 +20,8 @@ public final class VolumesUpdateSamples { */ public static void volumesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { Volume resource = manager.volumes() - .getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE).getValue(); + .getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE) + .getValue(); resource.update().apply(); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsMockTests.java deleted file mode 100644 index de8dd4ae667a2..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsMockTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AccountsRenewCredentialsMockTests { - @Test - public void testRenewCredentials() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.accounts().renewCredentials("fgcviz", "zdwlvwlyoupfgfb", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AuthorizeRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AuthorizeRequestTests.java deleted file mode 100644 index 63d61f123c390..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AuthorizeRequestTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.AuthorizeRequest; -import org.junit.jupiter.api.Assertions; - -public final class AuthorizeRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AuthorizeRequest model - = BinaryData.fromString("{\"remoteVolumeResourceId\":\"koievseo\"}").toObject(AuthorizeRequest.class); - Assertions.assertEquals("koievseo", model.remoteVolumeResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AuthorizeRequest model = new AuthorizeRequest().withRemoteVolumeResourceId("koievseo"); - model = BinaryData.fromObject(model).toObject(AuthorizeRequest.class); - Assertions.assertEquals("koievseo", model.remoteVolumeResourceId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateMockTests.java deleted file mode 100644 index f19ee8112b4c7..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.BackupPolicy; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupPoliciesCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"etag\":\"zinkfkbgbzbowxeq\",\"properties\":{\"backupPolicyId\":\"ljmygvkzqkjjeokb\",\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":1829804009,\"weeklyBackupsToKeep\":1049990644,\"monthlyBackupsToKeep\":1442604370,\"volumesAssigned\":1208921361,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"wvz\",\"backupsCount\":765217570,\"policyEnabled\":true},{\"volumeName\":\"bzdixzmq\",\"backupsCount\":1928163279,\"policyEnabled\":false}]},\"location\":\"opqhewjptmc\",\"tags\":{\"mzlbiojlvfhrb\":\"ostzelndlatu\",\"qvcww\":\"pn\"},\"id\":\"yurmochpprprs\",\"name\":\"mo\",\"type\":\"ayzejnhlbkpbz\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BackupPolicy response = manager.backupPolicies().define("asiibmiybnnust").withRegion("nzcyjtotp") - .withExistingNetAppAccount("ciqdsme", "iitdfuxt") - .withTags(mapOf("ihed", "vpbdbzqgq", "mkyi", "vqwt", "qcwdhoh", "cysihs", "sufco", "dtmcd")) - .withDailyBackupsToKeep(677853893).withWeeklyBackupsToKeep(915134983).withMonthlyBackupsToKeep(1400929714) - .withEnabled(true).create(); - - Assertions.assertEquals("opqhewjptmc", response.location()); - Assertions.assertEquals("ostzelndlatu", response.tags().get("mzlbiojlvfhrb")); - Assertions.assertEquals(1829804009, response.dailyBackupsToKeep()); - Assertions.assertEquals(1049990644, response.weeklyBackupsToKeep()); - Assertions.assertEquals(1442604370, response.monthlyBackupsToKeep()); - Assertions.assertEquals(false, response.enabled()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteMockTests.java deleted file mode 100644 index d0555ac0264e0..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteMockTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupPoliciesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.backupPolicies().delete("gv", "irpghriypoqeyh", "qhykprlpyzn", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetWithResponseMockTests.java deleted file mode 100644 index 3a4a09154523b..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetWithResponseMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.BackupPolicy; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupPoliciesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"etag\":\"pctf\",\"properties\":{\"backupPolicyId\":\"dxotng\",\"provisioningState\":\"gugey\",\"dailyBackupsToKeep\":1242659668,\"weeklyBackupsToKeep\":1204887332,\"monthlyBackupsToKeep\":692345701,\"volumesAssigned\":249369524,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"mfp\",\"backupsCount\":1515954350,\"policyEnabled\":false},{\"volumeName\":\"vyhyhsgzfc\",\"backupsCount\":396816762,\"policyEnabled\":false},{\"volumeName\":\"gbeglqgleo\",\"backupsCount\":1725930797,\"policyEnabled\":true},{\"volumeName\":\"luan\",\"backupsCount\":416708927,\"policyEnabled\":true}]},\"location\":\"eebtijvacvb\",\"tags\":{\"nw\":\"bqqxlaj\"},\"id\":\"acevehjkuyx\",\"name\":\"afgaoqlt\",\"type\":\"aeylinm\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BackupPolicy response = manager.backupPolicies() - .getWithResponse("dfqwmkyoq", "fdvruz", "lzo", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("eebtijvacvb", response.location()); - Assertions.assertEquals("bqqxlaj", response.tags().get("nw")); - Assertions.assertEquals(1242659668, response.dailyBackupsToKeep()); - Assertions.assertEquals(1204887332, response.weeklyBackupsToKeep()); - Assertions.assertEquals(692345701, response.monthlyBackupsToKeep()); - Assertions.assertEquals(false, response.enabled()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListMockTests.java deleted file mode 100644 index b3661822075c7..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.BackupPolicy; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupPoliciesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"etag\":\"q\",\"properties\":{\"backupPolicyId\":\"kcxk\",\"provisioningState\":\"bn\",\"dailyBackupsToKeep\":866421840,\"weeklyBackupsToKeep\":490406344,\"monthlyBackupsToKeep\":928926099,\"volumesAssigned\":1250131057,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"wijpsttexoqqpwc\",\"backupsCount\":2114285001,\"policyEnabled\":true}]},\"location\":\"runcuwmqspkcd\",\"tags\":{\"qbnj\":\"lctddunqndyfpch\",\"qqoli\":\"rcgegydcwboxjum\",\"aiouaubrjt\":\"r\"},\"id\":\"oq\",\"name\":\"fuojrngif\",\"type\":\"rzpasccbiuimzdly\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.backupPolicies().list("gdakchz", "vl", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("runcuwmqspkcd", response.iterator().next().location()); - Assertions.assertEquals("lctddunqndyfpch", response.iterator().next().tags().get("qbnj")); - Assertions.assertEquals(866421840, response.iterator().next().dailyBackupsToKeep()); - Assertions.assertEquals(490406344, response.iterator().next().weeklyBackupsToKeep()); - Assertions.assertEquals(928926099, response.iterator().next().monthlyBackupsToKeep()); - Assertions.assertEquals(true, response.iterator().next().enabled()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListTests.java deleted file mode 100644 index 5dd36df413595..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner; -import com.azure.resourcemanager.netapp.models.BackupPoliciesList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BackupPoliciesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupPoliciesList model = BinaryData.fromString( - "{\"value\":[{\"etag\":\"ofncckwyfzqwhxxb\",\"properties\":{\"backupPolicyId\":\"qa\",\"provisioningState\":\"feqztppriol\",\"dailyBackupsToKeep\":621148688,\"weeklyBackupsToKeep\":1270431726,\"monthlyBackupsToKeep\":929982715,\"volumesAssigned\":1321856720,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"obqwcsdbnwdcfh\",\"backupsCount\":1589501712,\"policyEnabled\":true},{\"volumeName\":\"uvglsbjjcanvx\",\"backupsCount\":235845887,\"policyEnabled\":false},{\"volumeName\":\"utncorm\",\"backupsCount\":1945766703,\"policyEnabled\":false}]},\"location\":\"cofudflvkgjub\",\"tags\":{\"nqntorudsgsahm\":\"nnqvsa\",\"rauwjuetaebu\":\"yc\",\"dmovsm\":\"u\"},\"id\":\"l\",\"name\":\"wabm\",\"type\":\"oefki\"}]}") - .toObject(BackupPoliciesList.class); - Assertions.assertEquals("cofudflvkgjub", model.value().get(0).location()); - Assertions.assertEquals("nnqvsa", model.value().get(0).tags().get("nqntorudsgsahm")); - Assertions.assertEquals(621148688, model.value().get(0).dailyBackupsToKeep()); - Assertions.assertEquals(1270431726, model.value().get(0).weeklyBackupsToKeep()); - Assertions.assertEquals(929982715, model.value().get(0).monthlyBackupsToKeep()); - Assertions.assertEquals(false, model.value().get(0).enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupPoliciesList model - = new BackupPoliciesList().withValue(Arrays.asList(new BackupPolicyInner().withLocation("cofudflvkgjub") - .withTags(mapOf("nqntorudsgsahm", "nnqvsa", "rauwjuetaebu", "yc", "dmovsm", "u")) - .withDailyBackupsToKeep(621148688).withWeeklyBackupsToKeep(1270431726) - .withMonthlyBackupsToKeep(929982715).withEnabled(false))); - model = BinaryData.fromObject(model).toObject(BackupPoliciesList.class); - Assertions.assertEquals("cofudflvkgjub", model.value().get(0).location()); - Assertions.assertEquals("nnqvsa", model.value().get(0).tags().get("nqntorudsgsahm")); - Assertions.assertEquals(621148688, model.value().get(0).dailyBackupsToKeep()); - Assertions.assertEquals(1270431726, model.value().get(0).weeklyBackupsToKeep()); - Assertions.assertEquals(929982715, model.value().get(0).monthlyBackupsToKeep()); - Assertions.assertEquals(false, model.value().get(0).enabled()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyInnerTests.java deleted file mode 100644 index aa76ba8710b23..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyInnerTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BackupPolicyInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupPolicyInner model = BinaryData.fromString( - "{\"etag\":\"vtpuqujmqlgk\",\"properties\":{\"backupPolicyId\":\"tndoaongbjc\",\"provisioningState\":\"ujitcjedftww\",\"dailyBackupsToKeep\":1066178212,\"weeklyBackupsToKeep\":565058049,\"monthlyBackupsToKeep\":229411798,\"volumesAssigned\":242462331,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"ouicybxarzgszu\",\"backupsCount\":37759464,\"policyEnabled\":true},{\"volumeName\":\"opidoamciodh\",\"backupsCount\":1741139859,\"policyEnabled\":true},{\"volumeName\":\"hnzbonl\",\"backupsCount\":1184830478,\"policyEnabled\":true},{\"volumeName\":\"okdwb\",\"backupsCount\":1161774579,\"policyEnabled\":false}]},\"location\":\"cmrvexzt\",\"tags\":{\"lmnguxaw\":\"qgsfraoyzkoow\"},\"id\":\"aldsy\",\"name\":\"uximerqfobw\",\"type\":\"znkbykutwpfhpagm\"}") - .toObject(BackupPolicyInner.class); - Assertions.assertEquals("cmrvexzt", model.location()); - Assertions.assertEquals("qgsfraoyzkoow", model.tags().get("lmnguxaw")); - Assertions.assertEquals(1066178212, model.dailyBackupsToKeep()); - Assertions.assertEquals(565058049, model.weeklyBackupsToKeep()); - Assertions.assertEquals(229411798, model.monthlyBackupsToKeep()); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupPolicyInner model = new BackupPolicyInner().withLocation("cmrvexzt") - .withTags(mapOf("lmnguxaw", "qgsfraoyzkoow")).withDailyBackupsToKeep(1066178212) - .withWeeklyBackupsToKeep(565058049).withMonthlyBackupsToKeep(229411798).withEnabled(true); - model = BinaryData.fromObject(model).toObject(BackupPolicyInner.class); - Assertions.assertEquals("cmrvexzt", model.location()); - Assertions.assertEquals("qgsfraoyzkoow", model.tags().get("lmnguxaw")); - Assertions.assertEquals(1066178212, model.dailyBackupsToKeep()); - Assertions.assertEquals(565058049, model.weeklyBackupsToKeep()); - Assertions.assertEquals(229411798, model.monthlyBackupsToKeep()); - Assertions.assertEquals(true, model.enabled()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPatchTests.java deleted file mode 100644 index fc3dc85544435..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPatchTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.BackupPolicyPatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BackupPolicyPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupPolicyPatch model = BinaryData.fromString( - "{\"properties\":{\"backupPolicyId\":\"bminrfdwoyuhhzi\",\"provisioningState\":\"efozbhdms\",\"dailyBackupsToKeep\":1531171615,\"weeklyBackupsToKeep\":1354395459,\"monthlyBackupsToKeep\":572432734,\"volumesAssigned\":1916559931,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"u\",\"backupsCount\":674060065,\"policyEnabled\":false}]},\"location\":\"cslfaoqzpiyylha\",\"tags\":{\"hka\":\"whccs\",\"ggwoluhczb\":\"vwitqscyw\",\"i\":\"emh\"},\"id\":\"sbrgz\",\"name\":\"wmsweypqwd\",\"type\":\"ggicccnxqhue\"}") - .toObject(BackupPolicyPatch.class); - Assertions.assertEquals("cslfaoqzpiyylha", model.location()); - Assertions.assertEquals("whccs", model.tags().get("hka")); - Assertions.assertEquals(1531171615, model.dailyBackupsToKeep()); - Assertions.assertEquals(1354395459, model.weeklyBackupsToKeep()); - Assertions.assertEquals(572432734, model.monthlyBackupsToKeep()); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupPolicyPatch model = new BackupPolicyPatch().withLocation("cslfaoqzpiyylha") - .withTags(mapOf("hka", "whccs", "ggwoluhczb", "vwitqscyw", "i", "emh")).withDailyBackupsToKeep(1531171615) - .withWeeklyBackupsToKeep(1354395459).withMonthlyBackupsToKeep(572432734).withEnabled(true); - model = BinaryData.fromObject(model).toObject(BackupPolicyPatch.class); - Assertions.assertEquals("cslfaoqzpiyylha", model.location()); - Assertions.assertEquals("whccs", model.tags().get("hka")); - Assertions.assertEquals(1531171615, model.dailyBackupsToKeep()); - Assertions.assertEquals(1354395459, model.weeklyBackupsToKeep()); - Assertions.assertEquals(572432734, model.monthlyBackupsToKeep()); - Assertions.assertEquals(true, model.enabled()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPropertiesTests.java deleted file mode 100644 index 38dfd124d9f2d..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPropertiesTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.BackupPolicyProperties; -import org.junit.jupiter.api.Assertions; - -public final class BackupPolicyPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupPolicyProperties model = BinaryData.fromString( - "{\"backupPolicyId\":\"skdsnfdsdoakg\",\"provisioningState\":\"lmkk\",\"dailyBackupsToKeep\":1673981436,\"weeklyBackupsToKeep\":246193278,\"monthlyBackupsToKeep\":1837577186,\"volumesAssigned\":1686383029,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"twvogvbbe\",\"backupsCount\":1690092543,\"policyEnabled\":true},{\"volumeName\":\"qmoa\",\"backupsCount\":840228808,\"policyEnabled\":false},{\"volumeName\":\"zr\",\"backupsCount\":1964426059,\"policyEnabled\":true}]}") - .toObject(BackupPolicyProperties.class); - Assertions.assertEquals(1673981436, model.dailyBackupsToKeep()); - Assertions.assertEquals(246193278, model.weeklyBackupsToKeep()); - Assertions.assertEquals(1837577186, model.monthlyBackupsToKeep()); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupPolicyProperties model = new BackupPolicyProperties().withDailyBackupsToKeep(1673981436) - .withWeeklyBackupsToKeep(246193278).withMonthlyBackupsToKeep(1837577186).withEnabled(true); - model = BinaryData.fromObject(model).toObject(BackupPolicyProperties.class); - Assertions.assertEquals(1673981436, model.dailyBackupsToKeep()); - Assertions.assertEquals(246193278, model.weeklyBackupsToKeep()); - Assertions.assertEquals(1837577186, model.monthlyBackupsToKeep()); - Assertions.assertEquals(true, model.enabled()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeRestoreStatusWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeRestoreStatusWithResponseMockTests.java deleted file mode 100644 index 8e917581c6db7..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeRestoreStatusWithResponseMockTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.RestoreStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupsGetVolumeRestoreStatusWithResponseMockTests { - @Test - public void testGetVolumeRestoreStatusWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"healthy\":true,\"relationshipStatus\":\"Transferring\",\"mirrorState\":\"Mirrored\",\"unhealthyReason\":\"rzpgep\",\"errorMessage\":\"yb\",\"totalTransferBytes\":6730843668651593065}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RestoreStatus response = manager.backups().getVolumeRestoreStatusWithResponse("slzkwrrwoycqu", "wyh", - "hnomdrkywuh", "svfuurutlwexxwl", com.azure.core.util.Context.NONE).getValue(); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakFileLocksRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakFileLocksRequestTests.java deleted file mode 100644 index e5df6fae0f895..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakFileLocksRequestTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.BreakFileLocksRequest; -import org.junit.jupiter.api.Assertions; - -public final class BreakFileLocksRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BreakFileLocksRequest model - = BinaryData.fromString("{\"clientIp\":\"adbzmnvdfznud\",\"confirmRunningDisruptiveOperation\":true}") - .toObject(BreakFileLocksRequest.class); - Assertions.assertEquals("adbzmnvdfznud", model.clientIp()); - Assertions.assertEquals(true, model.confirmRunningDisruptiveOperation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BreakFileLocksRequest model - = new BreakFileLocksRequest().withClientIp("adbzmnvdfznud").withConfirmRunningDisruptiveOperation(true); - model = BinaryData.fromObject(model).toObject(BreakFileLocksRequest.class); - Assertions.assertEquals("adbzmnvdfznud", model.clientIp()); - Assertions.assertEquals(true, model.confirmRunningDisruptiveOperation()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakReplicationRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakReplicationRequestTests.java deleted file mode 100644 index fee942f4e8881..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakReplicationRequestTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; -import org.junit.jupiter.api.Assertions; - -public final class BreakReplicationRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BreakReplicationRequest model - = BinaryData.fromString("{\"forceBreakReplication\":true}").toObject(BreakReplicationRequest.class); - Assertions.assertEquals(true, model.forceBreakReplication()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BreakReplicationRequest model = new BreakReplicationRequest().withForceBreakReplication(true); - model = BinaryData.fromObject(model).toObject(BreakReplicationRequest.class); - Assertions.assertEquals(true, model.forceBreakReplication()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolInnerTests.java deleted file mode 100644 index 4fe2803e7626c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolInnerTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner; -import com.azure.resourcemanager.netapp.models.EncryptionType; -import com.azure.resourcemanager.netapp.models.QosType; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CapacityPoolInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CapacityPoolInner model = BinaryData.fromString( - "{\"etag\":\"fqkquj\",\"properties\":{\"poolId\":\"suyonobglaocq\",\"size\":3198824190275494463,\"serviceLevel\":\"Premium\",\"provisioningState\":\"g\",\"totalThroughputMibps\":24.563444,\"utilizedThroughputMibps\":78.17242,\"qosType\":\"Auto\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"location\":\"vwfudwpzntxhd\",\"tags\":{\"rxsbkyvp\":\"rqjbhckfrl\",\"uzbpzkafku\":\"ca\",\"rnwb\":\"b\"},\"id\":\"ehhseyvjusrts\",\"name\":\"hspkdeemao\",\"type\":\"mx\"}") - .toObject(CapacityPoolInner.class); - Assertions.assertEquals("vwfudwpzntxhd", model.location()); - Assertions.assertEquals("rqjbhckfrl", model.tags().get("rxsbkyvp")); - Assertions.assertEquals(3198824190275494463L, model.size()); - Assertions.assertEquals(ServiceLevel.PREMIUM, model.serviceLevel()); - Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertEquals(true, model.coolAccess()); - Assertions.assertEquals(EncryptionType.SINGLE, model.encryptionType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CapacityPoolInner model = new CapacityPoolInner().withLocation("vwfudwpzntxhd") - .withTags(mapOf("rxsbkyvp", "rqjbhckfrl", "uzbpzkafku", "ca", "rnwb", "b")).withSize(3198824190275494463L) - .withServiceLevel(ServiceLevel.PREMIUM).withQosType(QosType.AUTO).withCoolAccess(true) - .withEncryptionType(EncryptionType.SINGLE); - model = BinaryData.fromObject(model).toObject(CapacityPoolInner.class); - Assertions.assertEquals("vwfudwpzntxhd", model.location()); - Assertions.assertEquals("rqjbhckfrl", model.tags().get("rxsbkyvp")); - Assertions.assertEquals(3198824190275494463L, model.size()); - Assertions.assertEquals(ServiceLevel.PREMIUM, model.serviceLevel()); - Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertEquals(true, model.coolAccess()); - Assertions.assertEquals(EncryptionType.SINGLE, model.encryptionType()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java deleted file mode 100644 index 133c670efc918..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner; -import com.azure.resourcemanager.netapp.models.CapacityPoolList; -import com.azure.resourcemanager.netapp.models.EncryptionType; -import com.azure.resourcemanager.netapp.models.QosType; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CapacityPoolListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CapacityPoolList model = BinaryData.fromString( - "{\"value\":[{\"etag\":\"eaxib\",\"properties\":{\"poolId\":\"jwbhqwalmuz\",\"size\":6168274838392071541,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"pdkzjancuxr\",\"totalThroughputMibps\":66.62854,\"utilizedThroughputMibps\":93.76715,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Single\"},\"location\":\"jswztsdbpg\",\"tags\":{\"xbzpfzab\":\"txhp\",\"ovplw\":\"lcuhxwtctyqiklb\"},\"id\":\"bhvgy\",\"name\":\"gu\",\"type\":\"svmkfssxquk\"},{\"etag\":\"plgmgsxnk\",\"properties\":{\"poolId\":\"kde\",\"size\":7084872588122570574,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"opwi\",\"totalThroughputMibps\":41.176914,\"utilizedThroughputMibps\":20.48598,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"location\":\"iuebbaumny\",\"tags\":{\"hsmtxpsiebtfhvp\":\"edeojnabc\"},\"id\":\"sapskr\",\"name\":\"qmhjjdhtld\",\"type\":\"kyzxuutk\"},{\"etag\":\"ws\",\"properties\":{\"poolId\":\"svlxotogtwrup\",\"size\":1377433518907384393,\"serviceLevel\":\"Standard\",\"provisioningState\":\"micykvceoveilo\",\"totalThroughputMibps\":15.381831,\"utilizedThroughputMibps\":64.81392,\"qosType\":\"Auto\",\"coolAccess\":true,\"encryptionType\":\"Double\"},\"location\":\"k\",\"tags\":{\"kphywpnvjto\":\"dhbt\"},\"id\":\"nermcl\",\"name\":\"plpho\",\"type\":\"uscrpabgyepsb\"}],\"nextLink\":\"azqugxywpmueefj\"}") - .toObject(CapacityPoolList.class); - Assertions.assertEquals("jswztsdbpg", model.value().get(0).location()); - Assertions.assertEquals("txhp", model.value().get(0).tags().get("xbzpfzab")); - Assertions.assertEquals(6168274838392071541L, model.value().get(0).size()); - Assertions.assertEquals(ServiceLevel.ULTRA, model.value().get(0).serviceLevel()); - Assertions.assertEquals(QosType.AUTO, model.value().get(0).qosType()); - Assertions.assertEquals(false, model.value().get(0).coolAccess()); - Assertions.assertEquals(EncryptionType.SINGLE, model.value().get(0).encryptionType()); - Assertions.assertEquals("azqugxywpmueefj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CapacityPoolList model - = new CapacityPoolList() - .withValue(Arrays.asList( - new CapacityPoolInner().withLocation("jswztsdbpg") - .withTags(mapOf("xbzpfzab", "txhp", "ovplw", "lcuhxwtctyqiklb")).withSize(6168274838392071541L) - .withServiceLevel(ServiceLevel.ULTRA).withQosType(QosType.AUTO).withCoolAccess(false) - .withEncryptionType(EncryptionType.SINGLE), - new CapacityPoolInner().withLocation("iuebbaumny").withTags(mapOf("hsmtxpsiebtfhvp", "edeojnabc")) - .withSize(7084872588122570574L).withServiceLevel(ServiceLevel.ULTRA).withQosType(QosType.MANUAL) - .withCoolAccess(false).withEncryptionType(EncryptionType.DOUBLE), - new CapacityPoolInner().withLocation("k").withTags(mapOf("kphywpnvjto", "dhbt")) - .withSize(1377433518907384393L).withServiceLevel(ServiceLevel.STANDARD) - .withQosType(QosType.AUTO).withCoolAccess(true).withEncryptionType(EncryptionType.DOUBLE))) - .withNextLink("azqugxywpmueefj"); - model = BinaryData.fromObject(model).toObject(CapacityPoolList.class); - Assertions.assertEquals("jswztsdbpg", model.value().get(0).location()); - Assertions.assertEquals("txhp", model.value().get(0).tags().get("xbzpfzab")); - Assertions.assertEquals(6168274838392071541L, model.value().get(0).size()); - Assertions.assertEquals(ServiceLevel.ULTRA, model.value().get(0).serviceLevel()); - Assertions.assertEquals(QosType.AUTO, model.value().get(0).qosType()); - Assertions.assertEquals(false, model.value().get(0).coolAccess()); - Assertions.assertEquals(EncryptionType.SINGLE, model.value().get(0).encryptionType()); - Assertions.assertEquals("azqugxywpmueefj", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolPatchTests.java deleted file mode 100644 index d9b991c5aaa0a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolPatchTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.CapacityPoolPatch; -import com.azure.resourcemanager.netapp.models.QosType; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CapacityPoolPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CapacityPoolPatch model = BinaryData.fromString( - "{\"properties\":{\"size\":2542526403950408941,\"qosType\":\"Auto\",\"coolAccess\":false},\"location\":\"fadmws\",\"tags\":{\"gomz\":\"gvxp\"},\"id\":\"fmisg\",\"name\":\"bnbbeldawkz\",\"type\":\"ali\"}") - .toObject(CapacityPoolPatch.class); - Assertions.assertEquals("fadmws", model.location()); - Assertions.assertEquals("gvxp", model.tags().get("gomz")); - Assertions.assertEquals(2542526403950408941L, model.size()); - Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertEquals(false, model.coolAccess()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CapacityPoolPatch model = new CapacityPoolPatch().withLocation("fadmws").withTags(mapOf("gomz", "gvxp")) - .withSize(2542526403950408941L).withQosType(QosType.AUTO).withCoolAccess(false); - model = BinaryData.fromObject(model).toObject(CapacityPoolPatch.class); - Assertions.assertEquals("fadmws", model.location()); - Assertions.assertEquals("gvxp", model.tags().get("gomz")); - Assertions.assertEquals(2542526403950408941L, model.size()); - Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertEquals(false, model.coolAccess()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckAvailabilityResponseInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckAvailabilityResponseInnerTests.java deleted file mode 100644 index 6698c3df0c377..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckAvailabilityResponseInnerTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.CheckAvailabilityResponseInner; -import com.azure.resourcemanager.netapp.models.InAvailabilityReasonType; -import org.junit.jupiter.api.Assertions; - -public final class CheckAvailabilityResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckAvailabilityResponseInner model = BinaryData - .fromString("{\"isAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"czwtruwiqzbqjv\"}") - .toObject(CheckAvailabilityResponseInner.class); - Assertions.assertEquals(true, model.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, model.reason()); - Assertions.assertEquals("czwtruwiqzbqjv", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckAvailabilityResponseInner model = new CheckAvailabilityResponseInner().withIsAvailable(true) - .withReason(InAvailabilityReasonType.ALREADY_EXISTS).withMessage("czwtruwiqzbqjv"); - model = BinaryData.fromObject(model).toObject(CheckAvailabilityResponseInner.class); - Assertions.assertEquals(true, model.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, model.reason()); - Assertions.assertEquals("czwtruwiqzbqjv", model.message()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DailyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DailyScheduleTests.java deleted file mode 100644 index 556b5da76c64d..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DailyScheduleTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.DailySchedule; -import org.junit.jupiter.api.Assertions; - -public final class DailyScheduleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DailySchedule model = BinaryData.fromString( - "{\"snapshotsToKeep\":1081662268,\"hour\":535447173,\"minute\":88116741,\"usedBytes\":4291870996342138092}") - .toObject(DailySchedule.class); - Assertions.assertEquals(1081662268, model.snapshotsToKeep()); - Assertions.assertEquals(535447173, model.hour()); - Assertions.assertEquals(88116741, model.minute()); - Assertions.assertEquals(4291870996342138092L, model.usedBytes()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DailySchedule model = new DailySchedule().withSnapshotsToKeep(1081662268).withHour(535447173) - .withMinute(88116741).withUsedBytes(4291870996342138092L); - model = BinaryData.fromObject(model).toObject(DailySchedule.class); - Assertions.assertEquals(1081662268, model.snapshotsToKeep()); - Assertions.assertEquals(535447173, model.hour()); - Assertions.assertEquals(88116741, model.minute()); - Assertions.assertEquals(4291870996342138092L, model.usedBytes()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DimensionTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DimensionTests.java deleted file mode 100644 index 5bdc411ce2b17..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DimensionTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.Dimension; -import org.junit.jupiter.api.Assertions; - -public final class DimensionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Dimension model = BinaryData.fromString("{\"name\":\"mddystkiiux\",\"displayName\":\"yudxorrqnbp\"}") - .toObject(Dimension.class); - Assertions.assertEquals("mddystkiiux", model.name()); - Assertions.assertEquals("yudxorrqnbp", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Dimension model = new Dimension().withName("mddystkiiux").withDisplayName("yudxorrqnbp"); - model = BinaryData.fromObject(model).toObject(Dimension.class); - Assertions.assertEquals("mddystkiiux", model.name()); - Assertions.assertEquals("yudxorrqnbp", model.displayName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java deleted file mode 100644 index fff20576c954b..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.EncryptionIdentity; -import org.junit.jupiter.api.Assertions; - -public final class EncryptionIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EncryptionIdentity model - = BinaryData.fromString("{\"principalId\":\"pnazzm\",\"userAssignedIdentity\":\"runmp\"}") - .toObject(EncryptionIdentity.class); - Assertions.assertEquals("runmp", model.userAssignedIdentity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EncryptionIdentity model = new EncryptionIdentity().withUserAssignedIdentity("runmp"); - model = BinaryData.fromObject(model).toObject(EncryptionIdentity.class); - Assertions.assertEquals("runmp", model.userAssignedIdentity()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExportPolicyRuleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExportPolicyRuleTests.java deleted file mode 100644 index 1f0056b38dff8..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExportPolicyRuleTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.ChownMode; -import com.azure.resourcemanager.netapp.models.ExportPolicyRule; -import org.junit.jupiter.api.Assertions; - -public final class ExportPolicyRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExportPolicyRule model = BinaryData.fromString( - "{\"ruleIndex\":1115460475,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"srknftguv\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"}") - .toObject(ExportPolicyRule.class); - Assertions.assertEquals(1115460475, model.ruleIndex()); - Assertions.assertEquals(false, model.unixReadOnly()); - Assertions.assertEquals(true, model.unixReadWrite()); - Assertions.assertEquals(false, model.kerberos5ReadOnly()); - Assertions.assertEquals(false, model.kerberos5ReadWrite()); - Assertions.assertEquals(true, model.kerberos5IReadOnly()); - Assertions.assertEquals(false, model.kerberos5IReadWrite()); - Assertions.assertEquals(false, model.kerberos5PReadOnly()); - Assertions.assertEquals(true, model.kerberos5PReadWrite()); - Assertions.assertEquals(false, model.cifs()); - Assertions.assertEquals(true, model.nfsv3()); - Assertions.assertEquals(true, model.nfsv41()); - Assertions.assertEquals("srknftguv", model.allowedClients()); - Assertions.assertEquals(true, model.hasRootAccess()); - Assertions.assertEquals(ChownMode.UNRESTRICTED, model.chownMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExportPolicyRule model = new ExportPolicyRule().withRuleIndex(1115460475).withUnixReadOnly(false) - .withUnixReadWrite(true).withKerberos5ReadOnly(false).withKerberos5ReadWrite(false) - .withKerberos5IReadOnly(true).withKerberos5IReadWrite(false).withKerberos5PReadOnly(false) - .withKerberos5PReadWrite(true).withCifs(false).withNfsv3(true).withNfsv41(true) - .withAllowedClients("srknftguv").withHasRootAccess(true).withChownMode(ChownMode.UNRESTRICTED); - model = BinaryData.fromObject(model).toObject(ExportPolicyRule.class); - Assertions.assertEquals(1115460475, model.ruleIndex()); - Assertions.assertEquals(false, model.unixReadOnly()); - Assertions.assertEquals(true, model.unixReadWrite()); - Assertions.assertEquals(false, model.kerberos5ReadOnly()); - Assertions.assertEquals(false, model.kerberos5ReadWrite()); - Assertions.assertEquals(true, model.kerberos5IReadOnly()); - Assertions.assertEquals(false, model.kerberos5IReadWrite()); - Assertions.assertEquals(false, model.kerberos5PReadOnly()); - Assertions.assertEquals(true, model.kerberos5PReadWrite()); - Assertions.assertEquals(false, model.cifs()); - Assertions.assertEquals(true, model.nfsv3()); - Assertions.assertEquals(true, model.nfsv41()); - Assertions.assertEquals("srknftguv", model.allowedClients()); - Assertions.assertEquals(true, model.hasRootAccess()); - Assertions.assertEquals(ChownMode.UNRESTRICTED, model.chownMode()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java deleted file mode 100644 index 7d6eecb25a6f8..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class FilePathAvailabilityRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FilePathAvailabilityRequest model = BinaryData.fromString("{\"name\":\"ovm\",\"subnetId\":\"okacspk\"}") - .toObject(FilePathAvailabilityRequest.class); - Assertions.assertEquals("ovm", model.name()); - Assertions.assertEquals("okacspk", model.subnetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FilePathAvailabilityRequest model = new FilePathAvailabilityRequest().withName("ovm").withSubnetId("okacspk"); - model = BinaryData.fromObject(model).toObject(FilePathAvailabilityRequest.class); - Assertions.assertEquals("ovm", model.name()); - Assertions.assertEquals("okacspk", model.subnetId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserRequestTests.java deleted file mode 100644 index 64b02f8137871..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserRequestTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest; -import org.junit.jupiter.api.Assertions; - -public final class GetGroupIdListForLdapUserRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GetGroupIdListForLdapUserRequest model - = BinaryData.fromString("{\"username\":\"vxzbncb\"}").toObject(GetGroupIdListForLdapUserRequest.class); - Assertions.assertEquals("vxzbncb", model.username()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GetGroupIdListForLdapUserRequest model = new GetGroupIdListForLdapUserRequest().withUsername("vxzbncb"); - model = BinaryData.fromObject(model).toObject(GetGroupIdListForLdapUserRequest.class); - Assertions.assertEquals("vxzbncb", model.username()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserResponseInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserResponseInnerTests.java deleted file mode 100644 index ce63612ed5e2b..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserResponseInnerTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.GetGroupIdListForLdapUserResponseInner; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class GetGroupIdListForLdapUserResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GetGroupIdListForLdapUserResponseInner model = BinaryData - .fromString("{\"groupIdsForLdapUser\":[\"pstdbhhxsrzd\",\"ucerscdntnevfi\",\"jmygtdsslswtmwer\",\"ofz\"]}") - .toObject(GetGroupIdListForLdapUserResponseInner.class); - Assertions.assertEquals("pstdbhhxsrzd", model.groupIdsForLdapUser().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GetGroupIdListForLdapUserResponseInner model = new GetGroupIdListForLdapUserResponseInner() - .withGroupIdsForLdapUser(Arrays.asList("pstdbhhxsrzd", "ucerscdntnevfi", "jmygtdsslswtmwer", "ofz")); - model = BinaryData.fromObject(model).toObject(GetGroupIdListForLdapUserResponseInner.class); - Assertions.assertEquals("pstdbhhxsrzd", model.groupIdsForLdapUser().get(0)); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/HourlyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/HourlyScheduleTests.java deleted file mode 100644 index fdf5a0ec879de..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/HourlyScheduleTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.HourlySchedule; -import org.junit.jupiter.api.Assertions; - -public final class HourlyScheduleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HourlySchedule model = BinaryData - .fromString("{\"snapshotsToKeep\":381030924,\"minute\":1017473450,\"usedBytes\":6968746441071799209}") - .toObject(HourlySchedule.class); - Assertions.assertEquals(381030924, model.snapshotsToKeep()); - Assertions.assertEquals(1017473450, model.minute()); - Assertions.assertEquals(6968746441071799209L, model.usedBytes()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HourlySchedule model = new HourlySchedule().withSnapshotsToKeep(381030924).withMinute(1017473450) - .withUsedBytes(6968746441071799209L); - model = BinaryData.fromObject(model).toObject(HourlySchedule.class); - Assertions.assertEquals(381030924, model.snapshotsToKeep()); - Assertions.assertEquals(1017473450, model.minute()); - Assertions.assertEquals(6968746441071799209L, model.usedBytes()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java deleted file mode 100644 index 9606c84da0215..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.LdapSearchScopeOpt; -import org.junit.jupiter.api.Assertions; - -public final class LdapSearchScopeOptTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LdapSearchScopeOpt model = BinaryData - .fromString("{\"userDN\":\"rgvtqag\",\"groupDN\":\"uynhijg\",\"groupMembershipFilter\":\"ebf\"}") - .toObject(LdapSearchScopeOpt.class); - Assertions.assertEquals("rgvtqag", model.userDN()); - Assertions.assertEquals("uynhijg", model.groupDN()); - Assertions.assertEquals("ebf", model.groupMembershipFilter()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LdapSearchScopeOpt model - = new LdapSearchScopeOpt().withUserDN("rgvtqag").withGroupDN("uynhijg").withGroupMembershipFilter("ebf"); - model = BinaryData.fromObject(model).toObject(LdapSearchScopeOpt.class); - Assertions.assertEquals("rgvtqag", model.userDN()); - Assertions.assertEquals("uynhijg", model.groupDN()); - Assertions.assertEquals("ebf", model.groupMembershipFilter()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsTests.java deleted file mode 100644 index 495b71c28aeb4..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.ReplicationInner; -import com.azure.resourcemanager.netapp.models.EndpointType; -import com.azure.resourcemanager.netapp.models.ListReplications; -import com.azure.resourcemanager.netapp.models.ReplicationSchedule; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ListReplicationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListReplications model = BinaryData.fromString( - "{\"value\":[{\"endpointType\":\"src\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"xogaokonzmnsikv\",\"remoteVolumeRegion\":\"qzeqqkdltfzxm\"},{\"endpointType\":\"src\",\"replicationSchedule\":\"daily\",\"remoteVolumeResourceId\":\"ur\",\"remoteVolumeRegion\":\"dkwobdagx\"},{\"endpointType\":\"src\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"xbxwa\",\"remoteVolumeRegion\":\"ogqxndlkzgxhuri\"}]}") - .toObject(ListReplications.class); - Assertions.assertEquals(EndpointType.SRC, model.value().get(0).endpointType()); - Assertions.assertEquals(ReplicationSchedule.ONE_ZEROMINUTELY, model.value().get(0).replicationSchedule()); - Assertions.assertEquals("xogaokonzmnsikv", model.value().get(0).remoteVolumeResourceId()); - Assertions.assertEquals("qzeqqkdltfzxm", model.value().get(0).remoteVolumeRegion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListReplications model = new ListReplications().withValue(Arrays.asList( - new ReplicationInner().withEndpointType(EndpointType.SRC) - .withReplicationSchedule(ReplicationSchedule.ONE_ZEROMINUTELY) - .withRemoteVolumeResourceId("xogaokonzmnsikv").withRemoteVolumeRegion("qzeqqkdltfzxm"), - new ReplicationInner().withEndpointType(EndpointType.SRC).withReplicationSchedule(ReplicationSchedule.DAILY) - .withRemoteVolumeResourceId("ur").withRemoteVolumeRegion("dkwobdagx"), - new ReplicationInner().withEndpointType(EndpointType.SRC) - .withReplicationSchedule(ReplicationSchedule.ONE_ZEROMINUTELY).withRemoteVolumeResourceId("xbxwa") - .withRemoteVolumeRegion("ogqxndlkzgxhuri"))); - model = BinaryData.fromObject(model).toObject(ListReplications.class); - Assertions.assertEquals(EndpointType.SRC, model.value().get(0).endpointType()); - Assertions.assertEquals(ReplicationSchedule.ONE_ZEROMINUTELY, model.value().get(0).replicationSchedule()); - Assertions.assertEquals("xogaokonzmnsikv", model.value().get(0).remoteVolumeResourceId()); - Assertions.assertEquals("qzeqqkdltfzxm", model.value().get(0).remoteVolumeRegion()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LogSpecificationTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LogSpecificationTests.java deleted file mode 100644 index 7b5a5f3ee0664..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LogSpecificationTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.LogSpecification; -import org.junit.jupiter.api.Assertions; - -public final class LogSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogSpecification model = BinaryData.fromString("{\"name\":\"zvyifqrvkdvj\",\"displayName\":\"lrmv\"}") - .toObject(LogSpecification.class); - Assertions.assertEquals("zvyifqrvkdvj", model.name()); - Assertions.assertEquals("lrmv", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogSpecification model = new LogSpecification().withName("zvyifqrvkdvj").withDisplayName("lrmv"); - model = BinaryData.fromObject(model).toObject(LogSpecification.class); - Assertions.assertEquals("zvyifqrvkdvj", model.name()); - Assertions.assertEquals("lrmv", model.displayName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java deleted file mode 100644 index 8a5c74e9c6fdd..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; -import com.azure.resourcemanager.netapp.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.netapp.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedServiceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"c4737fa3-4a9f-43d8-a563-ea2ca59172dd\",\"tenantId\":\"28cd2a9d-619f-471e-8d91-258babd14920\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"nlankxmyskpb\":{\"principalId\":\"b6186b30-9007-4479-9a71-627d4053c229\",\"clientId\":\"b922a97d-6139-4a67-9382-cad812c59f60\"},\"btkcxywnytnrsyn\":{\"principalId\":\"b9b0e7f4-0acc-4924-8d18-4279007d055b\",\"clientId\":\"cdd0c5db-f4a1-40eb-ab94-cb2d252c5933\"},\"dybyxczfclhaa\":{\"principalId\":\"dfdf6aa4-6678-446f-a0c0-f31d89329182\",\"clientId\":\"bbb6aa6b-c831-40e1-83c7-a052a8bd5bfc\"},\"abphlw\":{\"principalId\":\"2be080cf-710e-40ea-96df-3d128bbee929\",\"clientId\":\"86c401f1-b61b-4d9a-a400-630466fd5fe7\"}}}") - .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("nlankxmyskpb", new UserAssignedIdentity(), "btkcxywnytnrsyn", new UserAssignedIdentity(), - "dybyxczfclhaa", new UserAssignedIdentity(), "abphlw", new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MetricSpecificationTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MetricSpecificationTests.java deleted file mode 100644 index 97ed313a3b199..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MetricSpecificationTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.Dimension; -import com.azure.resourcemanager.netapp.models.MetricAggregationType; -import com.azure.resourcemanager.netapp.models.MetricSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MetricSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetricSpecification model = BinaryData.fromString( - "{\"name\":\"whybcib\",\"displayName\":\"vdcsitynn\",\"displayDescription\":\"mdectehfiqscjey\",\"unit\":\"hezrkgq\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"mkqsleyyv\"],\"internalMetricName\":\"qjpkcattpngjcrc\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"pjhvmdajvnys\",\"sourceMdmNamespace\":\"nqecanoaeup\",\"dimensions\":[{\"name\":\"ltrpmopj\",\"displayName\":\"matuok\"},{\"name\":\"fu\",\"displayName\":\"aodsfcpkv\"},{\"name\":\"dpuozmyz\",\"displayName\":\"agfuaxbezyiu\"},{\"name\":\"ktwh\",\"displayName\":\"xw\"}],\"aggregationType\":\"wqsmbsur\",\"fillGapWithZero\":true,\"category\":\"o\",\"resourceIdDimensionNameOverride\":\"ocfs\",\"isInternal\":false}") - .toObject(MetricSpecification.class); - Assertions.assertEquals("whybcib", model.name()); - Assertions.assertEquals("vdcsitynn", model.displayName()); - Assertions.assertEquals("mdectehfiqscjey", model.displayDescription()); - Assertions.assertEquals("hezrkgq", model.unit()); - Assertions.assertEquals(MetricAggregationType.AVERAGE, model.supportedAggregationTypes().get(0)); - Assertions.assertEquals("mkqsleyyv", model.supportedTimeGrainTypes().get(0)); - Assertions.assertEquals("qjpkcattpngjcrc", model.internalMetricName()); - Assertions.assertEquals(true, model.enableRegionalMdmAccount()); - Assertions.assertEquals("pjhvmdajvnys", model.sourceMdmAccount()); - Assertions.assertEquals("nqecanoaeup", model.sourceMdmNamespace()); - Assertions.assertEquals("ltrpmopj", model.dimensions().get(0).name()); - Assertions.assertEquals("matuok", model.dimensions().get(0).displayName()); - Assertions.assertEquals("wqsmbsur", model.aggregationType()); - Assertions.assertEquals(true, model.fillGapWithZero()); - Assertions.assertEquals("o", model.category()); - Assertions.assertEquals("ocfs", model.resourceIdDimensionNameOverride()); - Assertions.assertEquals(false, model.isInternal()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricSpecification model = new MetricSpecification().withName("whybcib").withDisplayName("vdcsitynn") - .withDisplayDescription("mdectehfiqscjey").withUnit("hezrkgq") - .withSupportedAggregationTypes(Arrays.asList(MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE, - MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE)) - .withSupportedTimeGrainTypes(Arrays.asList("mkqsleyyv")).withInternalMetricName("qjpkcattpngjcrc") - .withEnableRegionalMdmAccount(true).withSourceMdmAccount("pjhvmdajvnys") - .withSourceMdmNamespace("nqecanoaeup") - .withDimensions(Arrays.asList(new Dimension().withName("ltrpmopj").withDisplayName("matuok"), - new Dimension().withName("fu").withDisplayName("aodsfcpkv"), - new Dimension().withName("dpuozmyz").withDisplayName("agfuaxbezyiu"), - new Dimension().withName("ktwh").withDisplayName("xw"))) - .withAggregationType("wqsmbsur").withFillGapWithZero(true).withCategory("o") - .withResourceIdDimensionNameOverride("ocfs").withIsInternal(false); - model = BinaryData.fromObject(model).toObject(MetricSpecification.class); - Assertions.assertEquals("whybcib", model.name()); - Assertions.assertEquals("vdcsitynn", model.displayName()); - Assertions.assertEquals("mdectehfiqscjey", model.displayDescription()); - Assertions.assertEquals("hezrkgq", model.unit()); - Assertions.assertEquals(MetricAggregationType.AVERAGE, model.supportedAggregationTypes().get(0)); - Assertions.assertEquals("mkqsleyyv", model.supportedTimeGrainTypes().get(0)); - Assertions.assertEquals("qjpkcattpngjcrc", model.internalMetricName()); - Assertions.assertEquals(true, model.enableRegionalMdmAccount()); - Assertions.assertEquals("pjhvmdajvnys", model.sourceMdmAccount()); - Assertions.assertEquals("nqecanoaeup", model.sourceMdmNamespace()); - Assertions.assertEquals("ltrpmopj", model.dimensions().get(0).name()); - Assertions.assertEquals("matuok", model.dimensions().get(0).displayName()); - Assertions.assertEquals("wqsmbsur", model.aggregationType()); - Assertions.assertEquals(true, model.fillGapWithZero()); - Assertions.assertEquals("o", model.category()); - Assertions.assertEquals("ocfs", model.resourceIdDimensionNameOverride()); - Assertions.assertEquals(false, model.isInternal()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MonthlyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MonthlyScheduleTests.java deleted file mode 100644 index f1bbff645ba93..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MonthlyScheduleTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.MonthlySchedule; -import org.junit.jupiter.api.Assertions; - -public final class MonthlyScheduleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonthlySchedule model = BinaryData.fromString( - "{\"snapshotsToKeep\":1521931041,\"daysOfMonth\":\"krmnjijpxacqqud\",\"hour\":402319478,\"minute\":217779301,\"usedBytes\":3011567239664455561}") - .toObject(MonthlySchedule.class); - Assertions.assertEquals(1521931041, model.snapshotsToKeep()); - Assertions.assertEquals("krmnjijpxacqqud", model.daysOfMonth()); - Assertions.assertEquals(402319478, model.hour()); - Assertions.assertEquals(217779301, model.minute()); - Assertions.assertEquals(3011567239664455561L, model.usedBytes()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonthlySchedule model = new MonthlySchedule().withSnapshotsToKeep(1521931041).withDaysOfMonth("krmnjijpxacqqud") - .withHour(402319478).withMinute(217779301).withUsedBytes(3011567239664455561L); - model = BinaryData.fromObject(model).toObject(MonthlySchedule.class); - Assertions.assertEquals(1521931041, model.snapshotsToKeep()); - Assertions.assertEquals("krmnjijpxacqqud", model.daysOfMonth()); - Assertions.assertEquals(402319478, model.hour()); - Assertions.assertEquals(217779301, model.minute()); - Assertions.assertEquals(3011567239664455561L, model.usedBytes()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MountTargetPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MountTargetPropertiesTests.java deleted file mode 100644 index f17bc17b072f6..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MountTargetPropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.MountTargetProperties; -import org.junit.jupiter.api.Assertions; - -public final class MountTargetPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MountTargetProperties model = BinaryData.fromString( - "{\"mountTargetId\":\"wmdyvxqtay\",\"fileSystemId\":\"iwwroyqbexrmc\",\"ipAddress\":\"bycnojvkn\",\"smbServerFqdn\":\"fqsgzvahapjy\"}") - .toObject(MountTargetProperties.class); - Assertions.assertEquals("iwwroyqbexrmc", model.fileSystemId()); - Assertions.assertEquals("fqsgzvahapjy", model.smbServerFqdn()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MountTargetProperties model - = new MountTargetProperties().withFileSystemId("iwwroyqbexrmc").withSmbServerFqdn("fqsgzvahapjy"); - model = BinaryData.fromObject(model).toObject(MountTargetProperties.class); - Assertions.assertEquals("iwwroyqbexrmc", model.fileSystemId()); - Assertions.assertEquals("fqsgzvahapjy", model.smbServerFqdn()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetWithResponseMockTests.java deleted file mode 100644 index 47f40b6f4a047..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetWithResponseMockTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.SubscriptionQuotaItem; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetAppResourceQuotaLimitsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"current\":1272047729,\"default\":923595041},\"id\":\"bqplh\",\"name\":\"vnuuepzl\",\"type\":\"phwzsoldweyuqdu\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SubscriptionQuotaItem response = manager.netAppResourceQuotaLimits() - .getWithResponse("crxgibb", "axconfozauo", com.azure.core.util.Context.NONE).getValue(); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListMockTests.java deleted file mode 100644 index 78053182a5c97..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListMockTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.SubscriptionQuotaItem; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetAppResourceQuotaLimitsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"properties\":{\"current\":937766926,\"default\":689066944},\"id\":\"gdxpg\",\"name\":\"qchiszep\",\"type\":\"nb\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.netAppResourceQuotaLimits().list("inyflnorwmduvwp", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests.java deleted file mode 100644 index 92c3d0ad90533..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.CheckAvailabilityResponse; -import com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest; -import com.azure.resourcemanager.netapp.models.InAvailabilityReasonType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests { - @Test - public void testCheckFilePathAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"isAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"iv\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckAvailabilityResponse response = manager.netAppResources() - .checkFilePathAvailabilityWithResponse("gaifmvik", - new FilePathAvailabilityRequest().withName("bydvkhbejdz").withSubnetId("xcv"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, response.reason()); - Assertions.assertEquals("iv", response.message()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckNameAvailabilityWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index a6895c8db7d0a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.CheckAvailabilityResponse; -import com.azure.resourcemanager.netapp.models.CheckNameResourceTypes; -import com.azure.resourcemanager.netapp.models.InAvailabilityReasonType; -import com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetAppResourcesCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"isAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"qnrnrpxehuwryk\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckAvailabilityResponse response = manager.netAppResources() - .checkNameAvailabilityWithResponse("xvydfceacvlhvygd", - new ResourceNameAvailabilityRequest().withName("ftumrtwnawjslbiw") - .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS) - .withResourceGroup("jgcyztsfmznba"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, response.reason()); - Assertions.assertEquals("qnrnrpxehuwryk", response.message()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests.java deleted file mode 100644 index 899bd86d8bd98..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.CheckAvailabilityResponse; -import com.azure.resourcemanager.netapp.models.CheckQuotaNameResourceTypes; -import com.azure.resourcemanager.netapp.models.InAvailabilityReasonType; -import com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests { - @Test - public void testCheckQuotaAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"isAvailable\":false,\"reason\":\"Invalid\",\"message\":\"ejwcwwqiok\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckAvailabilityResponse response = manager.netAppResources() - .checkQuotaAvailabilityWithResponse("lvtno", - new QuotaAvailabilityRequest().withName("qfzgemjdftul") - .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS) - .withResourceGroup("tduceamt"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.INVALID, response.reason()); - Assertions.assertEquals("ejwcwwqiok", response.message()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests.java deleted file mode 100644 index bd0aef8ef8475..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.NetworkFeatures; -import com.azure.resourcemanager.netapp.models.NetworkSiblingSet; -import com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests { - @Test - public void testQueryNetworkSiblingSetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"networkSiblingSetId\":\"odpvruudlgzib\",\"subnetId\":\"ostgkts\",\"networkSiblingSetStateId\":\"dxeclzedqbcvh\",\"networkFeatures\":\"Basic\",\"provisioningState\":\"Updating\",\"nicInfoList\":[{\"ipAddress\":\"kdl\",\"volumeResourceIds\":[\"fbumlkx\",\"rqjfsmlm\",\"txhwgfws\",\"tawc\"]},{\"ipAddress\":\"zbrhubskhudyg\",\"volumeResourceIds\":[\"kkqfqjbvle\",\"rfmluiqtq\",\"fa\"]},{\"ipAddress\":\"vnqqybaryeua\",\"volumeResourceIds\":[\"qabqgzslesjcb\"]}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkSiblingSet response = manager.netAppResources() - .queryNetworkSiblingSetWithResponse("htba", - new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("kgxywr").withSubnetId("kpyklyhp"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("odpvruudlgzib", response.networkSiblingSetId()); - Assertions.assertEquals("ostgkts", response.subnetId()); - Assertions.assertEquals("dxeclzedqbcvh", response.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.BASIC, response.networkFeatures()); - Assertions.assertEquals("fbumlkx", response.nicInfoList().get(0).volumeResourceIds().get(0)); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryRegionInfoWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryRegionInfoWithResponseMockTests.java deleted file mode 100644 index 0f17facfd355c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryRegionInfoWithResponseMockTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.RegionInfo; -import com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetAppResourcesQueryRegionInfoWithResponseMockTests { - @Test - public void testQueryRegionInfoWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"storageToNetworkProximity\":\"T2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"vk\",\"isAvailable\":false},{\"availabilityZone\":\"ql\",\"isAvailable\":false},{\"availabilityZone\":\"tczheydbsdshmkx\",\"isAvailable\":true},{\"availabilityZone\":\"vbbxuripl\",\"isAvailable\":false}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RegionInfo response = manager.netAppResources() - .queryRegionInfoWithResponse("ssxmojms", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals(RegionStorageToNetworkProximity.T2, response.storageToNetworkProximity()); - Assertions.assertEquals("vk", response.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertEquals(false, response.availabilityZoneMappings().get(0).isAvailable()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesUpdateNetworkSiblingSetMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesUpdateNetworkSiblingSetMockTests.java deleted file mode 100644 index 409bcda9becd3..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesUpdateNetworkSiblingSetMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.NetworkFeatures; -import com.azure.resourcemanager.netapp.models.NetworkSiblingSet; -import com.azure.resourcemanager.netapp.models.UpdateNetworkSiblingSetRequest; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetAppResourcesUpdateNetworkSiblingSetMockTests { - @Test - public void testUpdateNetworkSiblingSet() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"networkSiblingSetId\":\"vvhmxtdrj\",\"subnetId\":\"tac\",\"networkSiblingSetStateId\":\"bj\",\"networkFeatures\":\"Standard_Basic\",\"provisioningState\":\"Canceled\",\"nicInfoList\":[{\"ipAddress\":\"m\",\"volumeResourceIds\":[\"mguaadraufa\",\"tkahzo\",\"ajjziuxxpshne\",\"kulfg\"]},{\"ipAddress\":\"qubkw\",\"volumeResourceIds\":[\"nrdsutujbazpjuoh\"]}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkSiblingSet response = manager.netAppResources().updateNetworkSiblingSet("ernntiewdjcvbquw", - new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("behwagohb").withSubnetId("f") - .withNetworkSiblingSetStateId("kmr").withNetworkFeatures(NetworkFeatures.STANDARD), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vvhmxtdrj", response.networkSiblingSetId()); - Assertions.assertEquals("tac", response.subnetId()); - Assertions.assertEquals("bj", response.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.STANDARD_BASIC, response.networkFeatures()); - Assertions.assertEquals("mguaadraufa", response.nicInfoList().get(0).volumeResourceIds().get(0)); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetworkSiblingSetInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetworkSiblingSetInnerTests.java deleted file mode 100644 index 239814c1d340f..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetworkSiblingSetInnerTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.NetworkSiblingSetInner; -import com.azure.resourcemanager.netapp.models.NetworkFeatures; -import com.azure.resourcemanager.netapp.models.NicInfo; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkSiblingSetInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkSiblingSetInner model = BinaryData.fromString( - "{\"networkSiblingSetId\":\"pwhonowkg\",\"subnetId\":\"wankixzbi\",\"networkSiblingSetStateId\":\"eputtmrywnuzoqf\",\"networkFeatures\":\"Standard_Basic\",\"provisioningState\":\"Canceled\",\"nicInfoList\":[{\"ipAddress\":\"cqvyxlwhzlsico\",\"volumeResourceIds\":[\"qnwvlrya\"]}]}") - .toObject(NetworkSiblingSetInner.class); - Assertions.assertEquals("pwhonowkg", model.networkSiblingSetId()); - Assertions.assertEquals("wankixzbi", model.subnetId()); - Assertions.assertEquals("eputtmrywnuzoqf", model.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.STANDARD_BASIC, model.networkFeatures()); - Assertions.assertEquals("qnwvlrya", model.nicInfoList().get(0).volumeResourceIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSiblingSetInner model - = new NetworkSiblingSetInner().withNetworkSiblingSetId("pwhonowkg").withSubnetId("wankixzbi") - .withNetworkSiblingSetStateId("eputtmrywnuzoqf").withNetworkFeatures(NetworkFeatures.STANDARD_BASIC) - .withNicInfoList(Arrays.asList(new NicInfo().withVolumeResourceIds(Arrays.asList("qnwvlrya")))); - model = BinaryData.fromObject(model).toObject(NetworkSiblingSetInner.class); - Assertions.assertEquals("pwhonowkg", model.networkSiblingSetId()); - Assertions.assertEquals("wankixzbi", model.subnetId()); - Assertions.assertEquals("eputtmrywnuzoqf", model.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.STANDARD_BASIC, model.networkFeatures()); - Assertions.assertEquals("qnwvlrya", model.nicInfoList().get(0).volumeResourceIds().get(0)); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NicInfoTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NicInfoTests.java deleted file mode 100644 index 2b1bbdd171204..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NicInfoTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.NicInfo; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NicInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NicInfo model - = BinaryData.fromString("{\"ipAddress\":\"hheunmmqhgyx\",\"volumeResourceIds\":[\"noc\",\"koklya\"]}") - .toObject(NicInfo.class); - Assertions.assertEquals("noc", model.volumeResourceIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NicInfo model = new NicInfo().withVolumeResourceIds(Arrays.asList("noc", "koklya")); - model = BinaryData.fromObject(model).toObject(NicInfo.class); - Assertions.assertEquals("noc", model.volumeResourceIds().get(0)); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationDisplayTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationDisplayTests.java deleted file mode 100644 index 140fcdb74ef6f..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationDisplayTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"cndvkaozwyiftyhx\",\"resource\":\"rokft\",\"operation\":\"olniwpwcukjf\",\"description\":\"iawxklry\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("cndvkaozwyiftyhx", model.provider()); - Assertions.assertEquals("rokft", model.resource()); - Assertions.assertEquals("olniwpwcukjf", model.operation()); - Assertions.assertEquals("iawxklry", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay().withProvider("cndvkaozwyiftyhx").withResource("rokft") - .withOperation("olniwpwcukjf").withDescription("iawxklry"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("cndvkaozwyiftyhx", model.provider()); - Assertions.assertEquals("rokft", model.resource()); - Assertions.assertEquals("olniwpwcukjf", model.operation()); - Assertions.assertEquals("iawxklry", model.description()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationInnerTests.java deleted file mode 100644 index f6a2e4f0fb392..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationInnerTests.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.OperationInner; -import com.azure.resourcemanager.netapp.models.Dimension; -import com.azure.resourcemanager.netapp.models.LogSpecification; -import com.azure.resourcemanager.netapp.models.MetricAggregationType; -import com.azure.resourcemanager.netapp.models.MetricSpecification; -import com.azure.resourcemanager.netapp.models.OperationDisplay; -import com.azure.resourcemanager.netapp.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = BinaryData.fromString( - "{\"name\":\"rd\",\"display\":{\"provider\":\"ewnwreitjzyfl\",\"resource\":\"arhmofcqhsmy\",\"operation\":\"kdtmlxhekuk\",\"description\":\"txukcdmp\"},\"origin\":\"cryuan\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"xtayr\",\"displayName\":\"m\",\"displayDescription\":\"fp\",\"unit\":\"qobmtukk\",\"supportedAggregationTypes\":[\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"fxti\"],\"internalMetricName\":\"pzvgnwzsymglzufc\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"hdbihan\",\"sourceMdmNamespace\":\"hfcbjysa\",\"dimensions\":[{}],\"aggregationType\":\"xqhabi\",\"fillGapWithZero\":false,\"category\":\"xwczbyscnp\",\"resourceIdDimensionNameOverride\":\"uhivyqniw\",\"isInternal\":false},{\"name\":\"k\",\"displayName\":\"dumjgrtfwvuk\",\"displayDescription\":\"audccsnhs\",\"unit\":\"nyejhkryhtnap\",\"supportedAggregationTypes\":[\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"yemkkvnip\"],\"internalMetricName\":\"xzjnchgejs\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"ailzydehojwyahu\",\"sourceMdmNamespace\":\"npmqnjaqwixjspro\",\"dimensions\":[{},{},{},{}],\"aggregationType\":\"utegjvwmfdats\",\"fillGapWithZero\":true,\"category\":\"pjhulsuuvmkj\",\"resourceIdDimensionNameOverride\":\"k\",\"isInternal\":false},{\"name\":\"dio\",\"displayName\":\"pslwejdpvw\",\"displayDescription\":\"oqpsoa\",\"unit\":\"tazak\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"yffdfdos\",\"gexpaojakhmsbz\",\"hcrzevd\"],\"internalMetricName\":\"lxaolthqtrgqjbp\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"inzgvfcj\",\"sourceMdmNamespace\":\"zoxxjtf\",\"dimensions\":[{},{},{},{}],\"aggregationType\":\"wfzitonpeqfpjk\",\"fillGapWithZero\":true,\"category\":\"fpdvhpfxxypi\",\"resourceIdDimensionNameOverride\":\"nmayhuybb\",\"isInternal\":true},{\"name\":\"epoo\",\"displayName\":\"nuvamiheogna\",\"displayDescription\":\"zxtheotusivyevcc\",\"unit\":\"ihnhun\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"gxg\",\"spemvtzfk\",\"fublj\"],\"internalMetricName\":\"xqeofjaeqjhqjba\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"mjqulngsn\",\"sourceMdmNamespace\":\"bybkzgcwrwclxx\",\"dimensions\":[{},{}],\"aggregationType\":\"douskcqvkocrcjdk\",\"fillGapWithZero\":false,\"category\":\"xbnjbiksq\",\"resourceIdDimensionNameOverride\":\"lssai\",\"isInternal\":false}],\"logSpecifications\":[{\"name\":\"zlljfmppeebvm\",\"displayName\":\"sabkyqduujitcjcz\"},{\"name\":\"evndh\",\"displayName\":\"wpdappdsbdkv\"},{\"name\":\"wjfeusnhutjel\",\"displayName\":\"rl\"},{\"name\":\"ugjzzdatqxhocdge\",\"displayName\":\"lgphu\"}]}}}") - .toObject(OperationInner.class); - Assertions.assertEquals("rd", model.name()); - Assertions.assertEquals("ewnwreitjzyfl", model.display().provider()); - Assertions.assertEquals("arhmofcqhsmy", model.display().resource()); - Assertions.assertEquals("kdtmlxhekuk", model.display().operation()); - Assertions.assertEquals("txukcdmp", model.display().description()); - Assertions.assertEquals("cryuan", model.origin()); - Assertions.assertEquals("xtayr", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("m", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("fp", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("qobmtukk", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals(MetricAggregationType.AVERAGE, - model.serviceSpecification().metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("fxti", - model.serviceSpecification().metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals("pzvgnwzsymglzufc", - model.serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals(false, - model.serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("hdbihan", - model.serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("hfcbjysa", - model.serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("xqhabi", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("xwczbyscnp", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("uhivyqniw", - model.serviceSpecification().metricSpecifications().get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("zlljfmppeebvm", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("sabkyqduujitcjcz", - model.serviceSpecification().logSpecifications().get(0).displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model - = new OperationInner().withName("rd") - .withDisplay( - new OperationDisplay().withProvider("ewnwreitjzyfl").withResource("arhmofcqhsmy") - .withOperation("kdtmlxhekuk").withDescription("txukcdmp")) - .withOrigin("cryuan") - .withServiceSpecification(new ServiceSpecification() - .withMetricSpecifications(Arrays.asList( - new MetricSpecification().withName("xtayr").withDisplayName("m").withDisplayDescription("fp") - .withUnit("qobmtukk") - .withSupportedAggregationTypes( - Arrays.asList(MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE)) - .withSupportedTimeGrainTypes(Arrays.asList("fxti")) - .withInternalMetricName("pzvgnwzsymglzufc").withEnableRegionalMdmAccount( - false) - .withSourceMdmAccount("hdbihan").withSourceMdmNamespace("hfcbjysa") - .withDimensions(Arrays.asList(new Dimension())).withAggregationType("xqhabi") - .withFillGapWithZero(false).withCategory("xwczbyscnp") - .withResourceIdDimensionNameOverride("uhivyqniw").withIsInternal(false), - new MetricSpecification().withName("k").withDisplayName("dumjgrtfwvuk") - .withDisplayDescription("audccsnhs").withUnit("nyejhkryhtnap") - .withSupportedAggregationTypes( - Arrays.asList(MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE)) - .withSupportedTimeGrainTypes(Arrays.asList("yemkkvnip")).withInternalMetricName( - "xzjnchgejs") - .withEnableRegionalMdmAccount(true).withSourceMdmAccount("ailzydehojwyahu") - .withSourceMdmNamespace("npmqnjaqwixjspro").withDimensions( - Arrays.asList(new Dimension(), new Dimension(), new Dimension(), new Dimension())) - .withAggregationType("utegjvwmfdats").withFillGapWithZero(true).withCategory("pjhulsuuvmkj") - .withResourceIdDimensionNameOverride("k").withIsInternal(false), - new MetricSpecification().withName("dio").withDisplayName("pslwejdpvw") - .withDisplayDescription("oqpsoa").withUnit("tazak") - .withSupportedAggregationTypes(Arrays.asList(MetricAggregationType.AVERAGE, - MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE)) - .withSupportedTimeGrainTypes(Arrays.asList("yffdfdos", "gexpaojakhmsbz", "hcrzevd")) - .withInternalMetricName("lxaolthqtrgqjbp").withEnableRegionalMdmAccount(true) - .withSourceMdmAccount( - "inzgvfcj") - .withSourceMdmNamespace("zoxxjtf") - .withDimensions( - Arrays.asList(new Dimension(), new Dimension(), new Dimension(), new Dimension())) - .withAggregationType("wfzitonpeqfpjk").withFillGapWithZero( - true) - .withCategory("fpdvhpfxxypi").withResourceIdDimensionNameOverride("nmayhuybb") - .withIsInternal(true), - new MetricSpecification().withName("epoo").withDisplayName("nuvamiheogna") - .withDisplayDescription("zxtheotusivyevcc").withUnit("ihnhun") - .withSupportedAggregationTypes( - Arrays.asList(MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE, - MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE)) - .withSupportedTimeGrainTypes(Arrays.asList("gxg", "spemvtzfk", "fublj")) - .withInternalMetricName("xqeofjaeqjhqjba").withEnableRegionalMdmAccount(true) - .withSourceMdmAccount("mjqulngsn").withSourceMdmNamespace("bybkzgcwrwclxx") - .withDimensions(Arrays.asList(new Dimension(), new Dimension())) - .withAggregationType("douskcqvkocrcjdk").withFillGapWithZero(false) - .withCategory("xbnjbiksq").withResourceIdDimensionNameOverride("lssai") - .withIsInternal(false))) - .withLogSpecifications(Arrays.asList( - new LogSpecification().withName("zlljfmppeebvm").withDisplayName("sabkyqduujitcjcz"), - new LogSpecification().withName("evndh").withDisplayName("wpdappdsbdkv"), - new LogSpecification().withName("wjfeusnhutjel").withDisplayName("rl"), - new LogSpecification().withName("ugjzzdatqxhocdge").withDisplayName("lgphu")))); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("rd", model.name()); - Assertions.assertEquals("ewnwreitjzyfl", model.display().provider()); - Assertions.assertEquals("arhmofcqhsmy", model.display().resource()); - Assertions.assertEquals("kdtmlxhekuk", model.display().operation()); - Assertions.assertEquals("txukcdmp", model.display().description()); - Assertions.assertEquals("cryuan", model.origin()); - Assertions.assertEquals("xtayr", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("m", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("fp", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("qobmtukk", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals(MetricAggregationType.AVERAGE, - model.serviceSpecification().metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("fxti", - model.serviceSpecification().metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals("pzvgnwzsymglzufc", - model.serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals(false, - model.serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("hdbihan", - model.serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("hfcbjysa", - model.serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("xqhabi", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("xwczbyscnp", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("uhivyqniw", - model.serviceSpecification().metricSpecifications().get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("zlljfmppeebvm", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("sabkyqduujitcjcz", - model.serviceSpecification().logSpecifications().get(0).displayName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationListResultTests.java deleted file mode 100644 index 554ce6c8f6d27..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationListResultTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.OperationInner; -import com.azure.resourcemanager.netapp.models.LogSpecification; -import com.azure.resourcemanager.netapp.models.MetricSpecification; -import com.azure.resourcemanager.netapp.models.OperationDisplay; -import com.azure.resourcemanager.netapp.models.OperationListResult; -import com.azure.resourcemanager.netapp.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"display\":{\"provider\":\"zopbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"ownoizhw\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{}],\"logSpecifications\":[{},{}]}}},{\"name\":\"qijgkd\",\"display\":{\"provider\":\"azlobcufpdznrbt\",\"resource\":\"qjnqglhqgnufoooj\",\"operation\":\"ifsqesaagdfmg\",\"description\":\"lhjxr\"},\"origin\":\"kwm\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{}],\"logSpecifications\":[{},{},{},{}]}}},{\"name\":\"to\",\"display\":{\"provider\":\"a\",\"resource\":\"ajpsquc\",\"operation\":\"o\",\"description\":\"dkfo\"},\"origin\":\"nygj\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{},{}],\"logSpecifications\":[{}]}}}]}") - .toObject(OperationListResult.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); - Assertions.assertEquals("zopbsphrupidgs", model.value().get(0).display().provider()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); - Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().operation()); - Assertions.assertEquals("zehtbmu", model.value().get(0).display().description()); - Assertions.assertEquals("ownoizhw", model.value().get(0).origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult().withValue(Arrays.asList( - new OperationInner().withName("quvgjxpybczme") - .withDisplay(new OperationDisplay().withProvider("zopbsphrupidgs").withResource("bejhphoycmsxa") - .withOperation("hdxbmtqio").withDescription("zehtbmu")) - .withOrigin("ownoizhw") - .withServiceSpecification(new ServiceSpecification() - .withMetricSpecifications(Arrays.asList(new MetricSpecification(), new MetricSpecification())) - .withLogSpecifications(Arrays.asList(new LogSpecification(), new LogSpecification()))), - new OperationInner().withName("qijgkd") - .withDisplay(new OperationDisplay().withProvider("azlobcufpdznrbt").withResource("qjnqglhqgnufoooj") - .withOperation("ifsqesaagdfmg").withDescription("lhjxr")) - .withOrigin("kwm") - .withServiceSpecification(new ServiceSpecification() - .withMetricSpecifications(Arrays.asList(new MetricSpecification(), new MetricSpecification())) - .withLogSpecifications(Arrays.asList(new LogSpecification(), new LogSpecification(), - new LogSpecification(), new LogSpecification()))), - new OperationInner().withName("to") - .withDisplay(new OperationDisplay() - .withProvider("a").withResource("ajpsquc").withOperation("o").withDescription("dkfo")) - .withOrigin("nygj") - .withServiceSpecification(new ServiceSpecification() - .withMetricSpecifications( - Arrays.asList(new MetricSpecification(), new MetricSpecification(), new MetricSpecification())) - .withLogSpecifications(Arrays.asList(new LogSpecification()))))); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); - Assertions.assertEquals("zopbsphrupidgs", model.value().get(0).display().provider()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); - Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().operation()); - Assertions.assertEquals("zehtbmu", model.value().get(0).display().description()); - Assertions.assertEquals("ownoizhw", model.value().get(0).origin()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationPropertiesTests.java deleted file mode 100644 index d496a6395274a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationPropertiesTests.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.OperationProperties; -import com.azure.resourcemanager.netapp.models.Dimension; -import com.azure.resourcemanager.netapp.models.LogSpecification; -import com.azure.resourcemanager.netapp.models.MetricAggregationType; -import com.azure.resourcemanager.netapp.models.MetricSpecification; -import com.azure.resourcemanager.netapp.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationProperties model = BinaryData.fromString( - "{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"basyy\",\"displayName\":\"ddhsgcbacphe\",\"displayDescription\":\"ot\",\"unit\":\"qgoulznd\",\"supportedAggregationTypes\":[\"Average\"],\"supportedTimeGrainTypes\":[\"kgfg\",\"bmadgak\",\"qsrxybzqqed\"],\"internalMetricName\":\"tbciqfouflmm\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"modmglougpb\",\"sourceMdmNamespace\":\"tmut\",\"dimensions\":[{\"name\":\"ta\",\"displayName\":\"pwgcuertu\"},{\"name\":\"dosvqwhbmdgbbjf\",\"displayName\":\"gmbmbexppbh\"},{\"name\":\"qrolfpf\",\"displayName\":\"algbquxigjyjg\"},{\"name\":\"aoyfhrtxilnerkuj\",\"displayName\":\"vlejuvfqa\"}],\"aggregationType\":\"lyxwjkcprbnwbx\",\"fillGapWithZero\":false,\"category\":\"bvpyss\",\"resourceIdDimensionNameOverride\":\"nruj\",\"isInternal\":true},{\"name\":\"muouqfp\",\"displayName\":\"zw\",\"displayDescription\":\"g\",\"unit\":\"tnwu\",\"supportedAggregationTypes\":[\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"fizuckyf\",\"hr\",\"idf\"],\"internalMetricName\":\"wdzuhtymwisd\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"wxmnteiwao\",\"sourceMdmNamespace\":\"km\",\"dimensions\":[{\"name\":\"mxdcufufsrp\",\"displayName\":\"zidnsezcxtbzsgfy\"}],\"aggregationType\":\"sne\",\"fillGapWithZero\":true,\"category\":\"z\",\"resourceIdDimensionNameOverride\":\"iachbo\",\"isInternal\":true},{\"name\":\"nrosfqpte\",\"displayName\":\"zzvypyqrimzinp\",\"displayDescription\":\"wjdk\",\"unit\":\"soodqxhcrmnoh\",\"supportedAggregationTypes\":[\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"soifiyipjxsqw\",\"gr\",\"bznorcjxvsnby\"],\"internalMetricName\":\"abnmocpcyshu\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"bl\",\"sourceMdmNamespace\":\"gpbtoqcjmklj\",\"dimensions\":[{\"name\":\"idtqajzyu\",\"displayName\":\"kudjkrlkhb\"},{\"name\":\"fepgzgq\",\"displayName\":\"zloc\"}],\"aggregationType\":\"c\",\"fillGapWithZero\":true,\"category\":\"rhhbcs\",\"resourceIdDimensionNameOverride\":\"ummajtjaod\",\"isInternal\":true}],\"logSpecifications\":[{\"name\":\"xkqpxo\",\"displayName\":\"jionpimexgstxgc\"},{\"name\":\"dg\",\"displayName\":\"ajrmvdjwzrlovmc\"},{\"name\":\"hijco\",\"displayName\":\"ctbzaq\"}]}}") - .toObject(OperationProperties.class); - Assertions.assertEquals("basyy", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("ddhsgcbacphe", - model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("ot", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("qgoulznd", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals(MetricAggregationType.AVERAGE, - model.serviceSpecification().metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("kgfg", - model.serviceSpecification().metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals("tbciqfouflmm", - model.serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals(false, - model.serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("modmglougpb", - model.serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("tmut", - model.serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("ta", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("pwgcuertu", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("lyxwjkcprbnwbx", - model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("bvpyss", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("nruj", - model.serviceSpecification().metricSpecifications().get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(true, model.serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("xkqpxo", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("jionpimexgstxgc", - model.serviceSpecification().logSpecifications().get(0).displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationProperties model - = new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecification().withName("basyy").withDisplayName("ddhsgcbacphe") - .withDisplayDescription("ot").withUnit("qgoulznd") - .withSupportedAggregationTypes(Arrays.asList(MetricAggregationType.AVERAGE)) - .withSupportedTimeGrainTypes(Arrays.asList("kgfg", "bmadgak", "qsrxybzqqed")) - .withInternalMetricName("tbciqfouflmm").withEnableRegionalMdmAccount(false) - .withSourceMdmAccount("modmglougpb").withSourceMdmNamespace("tmut") - .withDimensions(Arrays.asList( - new Dimension().withName("ta").withDisplayName("pwgcuertu"), - new Dimension().withName("dosvqwhbmdgbbjf").withDisplayName("gmbmbexppbh"), - new Dimension().withName("qrolfpf").withDisplayName("algbquxigjyjg"), - new Dimension().withName("aoyfhrtxilnerkuj").withDisplayName("vlejuvfqa"))) - .withAggregationType("lyxwjkcprbnwbx").withFillGapWithZero(false) - .withCategory("bvpyss").withResourceIdDimensionNameOverride("nruj") - .withIsInternal(true), - new MetricSpecification().withName("muouqfp").withDisplayName("zw") - .withDisplayDescription("g").withUnit("tnwu") - .withSupportedAggregationTypes( - Arrays.asList(MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE)) - .withSupportedTimeGrainTypes(Arrays.asList("fizuckyf", "hr", "idf")) - .withInternalMetricName("wdzuhtymwisd").withEnableRegionalMdmAccount(true) - .withSourceMdmAccount("wxmnteiwao").withSourceMdmNamespace("km") - .withDimensions(Arrays.asList(new Dimension().withName("mxdcufufsrp") - .withDisplayName("zidnsezcxtbzsgfy"))) - .withAggregationType("sne").withFillGapWithZero(true).withCategory("z") - .withResourceIdDimensionNameOverride("iachbo").withIsInternal(true), - new MetricSpecification().withName("nrosfqpte").withDisplayName("zzvypyqrimzinp") - .withDisplayDescription("wjdk").withUnit("soodqxhcrmnoh") - .withSupportedAggregationTypes( - Arrays.asList(MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE)) - .withSupportedTimeGrainTypes( - Arrays.asList("soifiyipjxsqw", "gr", "bznorcjxvsnby")) - .withInternalMetricName("abnmocpcyshu").withEnableRegionalMdmAccount(true) - .withSourceMdmAccount("bl").withSourceMdmNamespace("gpbtoqcjmklj") - .withDimensions(Arrays.asList( - new Dimension().withName("idtqajzyu").withDisplayName("kudjkrlkhb"), - new Dimension().withName("fepgzgq").withDisplayName("zloc"))) - .withAggregationType("c").withFillGapWithZero(true).withCategory("rhhbcs") - .withResourceIdDimensionNameOverride("ummajtjaod").withIsInternal(true))) - .withLogSpecifications( - Arrays.asList(new LogSpecification().withName("xkqpxo").withDisplayName("jionpimexgstxgc"), - new LogSpecification().withName("dg").withDisplayName("ajrmvdjwzrlovmc"), - new LogSpecification().withName("hijco").withDisplayName("ctbzaq")))); - model = BinaryData.fromObject(model).toObject(OperationProperties.class); - Assertions.assertEquals("basyy", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("ddhsgcbacphe", - model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("ot", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("qgoulznd", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals(MetricAggregationType.AVERAGE, - model.serviceSpecification().metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("kgfg", - model.serviceSpecification().metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals("tbciqfouflmm", - model.serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals(false, - model.serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("modmglougpb", - model.serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("tmut", - model.serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("ta", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("pwgcuertu", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("lyxwjkcprbnwbx", - model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("bvpyss", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("nruj", - model.serviceSpecification().metricSpecifications().get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(true, model.serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("xkqpxo", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("jionpimexgstxgc", - model.serviceSpecification().logSpecifications().get(0).displayName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationsListMockTests.java deleted file mode 100644 index 527f97a4a6a7c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationsListMockTests.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.MetricAggregationType; -import com.azure.resourcemanager.netapp.models.Operation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"name\":\"hixbjxyfwnyl\",\"display\":{\"provider\":\"o\",\"resource\":\"ttpkiwkkbnujrywv\",\"operation\":\"lbfpncurd\",\"description\":\"wiithtywub\"},\"origin\":\"bihwqknfdnt\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"goihx\",\"displayName\":\"wct\",\"displayDescription\":\"dzjlu\",\"unit\":\"fdlwg\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"vvt\",\"seinqfiuf\",\"qknp\",\"rgnepttwqmsniffc\"],\"internalMetricName\":\"qnrojlpijnkrxfrd\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"atiz\",\"sourceMdmNamespace\":\"onasxifto\",\"dimensions\":[{},{},{},{}],\"aggregationType\":\"hftwesgog\",\"fillGapWithZero\":true,\"category\":\"nnxk\",\"resourceIdDimensionNameOverride\":\"gnyhmossxkkg\",\"isInternal\":true},{\"name\":\"gh\",\"displayName\":\"bdhqxvcxgf\",\"displayDescription\":\"dsofbshrns\",\"unit\":\"uswdv\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"nvjsrtkfa\",\"nopqgikyzirtx\",\"yuxzejntpsewgi\",\"ilqu\"],\"internalMetricName\":\"ydxtqm\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"orgguf\",\"sourceMdmNamespace\":\"aomtbghhavgrvkff\",\"dimensions\":[{},{},{},{}],\"aggregationType\":\"hpjbib\",\"fillGapWithZero\":true,\"category\":\"xumvfcluyovw\",\"resourceIdDimensionNameOverride\":\"bkfezzxscyhwzdgi\",\"isInternal\":true},{\"name\":\"zbomvzzbtdcqvpni\",\"displayName\":\"jviylwdshfs\",\"displayDescription\":\"rbgyefry\",\"unit\":\"gaojf\",\"supportedAggregationTypes\":[\"Average\"],\"supportedTimeGrainTypes\":[\"mrfhirctymox\"],\"internalMetricName\":\"tpipiwyczuhx\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"jlihhyus\",\"sourceMdmNamespace\":\"kasdvlm\",\"dimensions\":[{},{},{},{}],\"aggregationType\":\"zxulucvpamrsreu\",\"fillGapWithZero\":true,\"category\":\"risjnhnytxifqjz\",\"resourceIdDimensionNameOverride\":\"mrhublwpc\",\"isInternal\":false}],\"logSpecifications\":[{\"name\":\"jupauut\",\"displayName\":\"oqh\"},{\"name\":\"ejqgw\",\"displayName\":\"nfqn\"},{\"name\":\"ypsxjvfoim\",\"displayName\":\"slirciz\"}]}}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hixbjxyfwnyl", response.iterator().next().name()); - Assertions.assertEquals("o", response.iterator().next().display().provider()); - Assertions.assertEquals("ttpkiwkkbnujrywv", response.iterator().next().display().resource()); - Assertions.assertEquals("lbfpncurd", response.iterator().next().display().operation()); - Assertions.assertEquals("wiithtywub", response.iterator().next().display().description()); - Assertions.assertEquals("bihwqknfdnt", response.iterator().next().origin()); - Assertions.assertEquals("goihx", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("wct", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("dzjlu", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("fdlwg", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals(MetricAggregationType.AVERAGE, response.iterator().next().serviceSpecification() - .metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("vvt", response.iterator().next().serviceSpecification().metricSpecifications().get(0) - .supportedTimeGrainTypes().get(0)); - Assertions.assertEquals("qnrojlpijnkrxfrd", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals(false, - response.iterator().next().serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("atiz", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("onasxifto", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("hftwesgog", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals(true, - response.iterator().next().serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("nnxk", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("gnyhmossxkkg", response.iterator().next().serviceSpecification().metricSpecifications() - .get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(true, - response.iterator().next().serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("jupauut", - response.iterator().next().serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("oqh", - response.iterator().next().serviceSpecification().logSpecifications().get(0).displayName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolChangeRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolChangeRequestTests.java deleted file mode 100644 index 9f7b9413a38b2..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolChangeRequestTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.PoolChangeRequest; -import org.junit.jupiter.api.Assertions; - -public final class PoolChangeRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PoolChangeRequest model - = BinaryData.fromString("{\"newPoolResourceId\":\"gqrlltmuwla\"}").toObject(PoolChangeRequest.class); - Assertions.assertEquals("gqrlltmuwla", model.newPoolResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PoolChangeRequest model = new PoolChangeRequest().withNewPoolResourceId("gqrlltmuwla"); - model = BinaryData.fromObject(model).toObject(PoolChangeRequest.class); - Assertions.assertEquals("gqrlltmuwla", model.newPoolResourceId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPatchPropertiesTests.java deleted file mode 100644 index 7f0013c0efdca..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPatchPropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.PoolPatchProperties; -import com.azure.resourcemanager.netapp.models.QosType; -import org.junit.jupiter.api.Assertions; - -public final class PoolPatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PoolPatchProperties model - = BinaryData.fromString("{\"size\":54169882983487255,\"qosType\":\"Auto\",\"coolAccess\":true}") - .toObject(PoolPatchProperties.class); - Assertions.assertEquals(54169882983487255L, model.size()); - Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertEquals(true, model.coolAccess()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PoolPatchProperties model - = new PoolPatchProperties().withSize(54169882983487255L).withQosType(QosType.AUTO).withCoolAccess(true); - model = BinaryData.fromObject(model).toObject(PoolPatchProperties.class); - Assertions.assertEquals(54169882983487255L, model.size()); - Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertEquals(true, model.coolAccess()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPropertiesTests.java deleted file mode 100644 index 76e0449e36e7b..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPropertiesTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.PoolProperties; -import com.azure.resourcemanager.netapp.models.EncryptionType; -import com.azure.resourcemanager.netapp.models.QosType; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import org.junit.jupiter.api.Assertions; - -public final class PoolPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PoolProperties model = BinaryData.fromString( - "{\"poolId\":\"kv\",\"size\":989086550960883148,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"qkrhahvljua\",\"totalThroughputMibps\":69.46674,\"utilizedThroughputMibps\":50.34383,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Double\"}") - .toObject(PoolProperties.class); - Assertions.assertEquals(989086550960883148L, model.size()); - Assertions.assertEquals(ServiceLevel.ULTRA, model.serviceLevel()); - Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertEquals(false, model.coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, model.encryptionType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PoolProperties model = new PoolProperties().withSize(989086550960883148L).withServiceLevel(ServiceLevel.ULTRA) - .withQosType(QosType.AUTO).withCoolAccess(false).withEncryptionType(EncryptionType.DOUBLE); - model = BinaryData.fromObject(model).toObject(PoolProperties.class); - Assertions.assertEquals(989086550960883148L, model.size()); - Assertions.assertEquals(ServiceLevel.ULTRA, model.serviceLevel()); - Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertEquals(false, model.coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, model.encryptionType()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateMockTests.java deleted file mode 100644 index 41d5402344673..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.CapacityPool; -import com.azure.resourcemanager.netapp.models.EncryptionType; -import com.azure.resourcemanager.netapp.models.QosType; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PoolsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"etag\":\"ajlyjtlvofqzhv\",\"properties\":{\"poolId\":\"ibyfmo\",\"size\":6727856303003361360,\"serviceLevel\":\"StandardZRS\",\"provisioningState\":\"Succeeded\",\"totalThroughputMibps\":78.12518,\"utilizedThroughputMibps\":77.284424,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"location\":\"hyzsxjrkamb\",\"tags\":{\"nvuqeqvldspa\":\"egv\",\"kdmflvestmjlx\":\"tjb\",\"zapeewchpx\":\"ril\"},\"id\":\"ktwkuziyc\",\"name\":\"levufuztcktyhj\",\"type\":\"qedcgzulwm\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CapacityPool response = manager.pools().define("evwrdnhfuk").withRegion("oqcaaewdaomdj") - .withExistingNetAppAccount("chp", "db").withSize(3770519572473050056L) - .withServiceLevel(ServiceLevel.STANDARD).withTags(mapOf("siykzkdncjdxonbz", "jxxkzbrmsgei", "z", "ggcula")) - .withQosType(QosType.AUTO).withCoolAccess(false).withEncryptionType(EncryptionType.SINGLE).create(); - - Assertions.assertEquals("hyzsxjrkamb", response.location()); - Assertions.assertEquals("egv", response.tags().get("nvuqeqvldspa")); - Assertions.assertEquals(6727856303003361360L, response.size()); - Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, response.serviceLevel()); - Assertions.assertEquals(QosType.MANUAL, response.qosType()); - Assertions.assertEquals(false, response.coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, response.encryptionType()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsGetWithResponseMockTests.java deleted file mode 100644 index 50d92ee86bbb5..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsGetWithResponseMockTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.CapacityPool; -import com.azure.resourcemanager.netapp.models.EncryptionType; -import com.azure.resourcemanager.netapp.models.QosType; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PoolsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"etag\":\"yakk\",\"properties\":{\"poolId\":\"zp\",\"size\":8657579168665991549,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"lma\",\"totalThroughputMibps\":64.56741,\"utilizedThroughputMibps\":98.82529,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"location\":\"kdbdgiogsj\",\"tags\":{\"iyhddvi\":\"wqjnob\",\"vm\":\"cegfnmntfp\"},\"id\":\"mfnczd\",\"name\":\"vvbalx\",\"type\":\"l\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CapacityPool response = manager.pools() - .getWithResponse("dabg", "vudtjuewbcihx", "uwhcjyxccybv", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("kdbdgiogsj", response.location()); - Assertions.assertEquals("wqjnob", response.tags().get("iyhddvi")); - Assertions.assertEquals(8657579168665991549L, response.size()); - Assertions.assertEquals(ServiceLevel.ULTRA, response.serviceLevel()); - Assertions.assertEquals(QosType.MANUAL, response.qosType()); - Assertions.assertEquals(false, response.coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, response.encryptionType()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsListMockTests.java deleted file mode 100644 index 7c50b5520b8e0..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsListMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.CapacityPool; -import com.azure.resourcemanager.netapp.models.EncryptionType; -import com.azure.resourcemanager.netapp.models.QosType; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PoolsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"etag\":\"uisavokq\",\"properties\":{\"poolId\":\"fvazivjlfrqttba\",\"size\":8474916357734436058,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"nwxyiop\",\"totalThroughputMibps\":28.38924,\"utilizedThroughputMibps\":76.790695,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"location\":\"kdmligovi\",\"tags\":{\"uruocbgo\":\"kpmloa\"},\"id\":\"rb\",\"name\":\"eoybfhjxakvvjgs\",\"type\":\"ordilmywwtkgkxny\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.pools().list("mmqtgqqqxhr", "xrxc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("kdmligovi", response.iterator().next().location()); - Assertions.assertEquals("kpmloa", response.iterator().next().tags().get("uruocbgo")); - Assertions.assertEquals(8474916357734436058L, response.iterator().next().size()); - Assertions.assertEquals(ServiceLevel.ULTRA, response.iterator().next().serviceLevel()); - Assertions.assertEquals(QosType.MANUAL, response.iterator().next().qosType()); - Assertions.assertEquals(false, response.iterator().next().coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, response.iterator().next().encryptionType()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QueryNetworkSiblingSetRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QueryNetworkSiblingSetRequestTests.java deleted file mode 100644 index 500024b3b9e4d..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QueryNetworkSiblingSetRequestTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest; -import org.junit.jupiter.api.Assertions; - -public final class QueryNetworkSiblingSetRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QueryNetworkSiblingSetRequest model - = BinaryData.fromString("{\"networkSiblingSetId\":\"yeamdphagalpb\",\"subnetId\":\"xw\"}") - .toObject(QueryNetworkSiblingSetRequest.class); - Assertions.assertEquals("yeamdphagalpb", model.networkSiblingSetId()); - Assertions.assertEquals("xw", model.subnetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QueryNetworkSiblingSetRequest model - = new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("yeamdphagalpb").withSubnetId("xw"); - model = BinaryData.fromObject(model).toObject(QueryNetworkSiblingSetRequest.class); - Assertions.assertEquals("yeamdphagalpb", model.networkSiblingSetId()); - Assertions.assertEquals("xw", model.subnetId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaAvailabilityRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaAvailabilityRequestTests.java deleted file mode 100644 index e53c175ac83b6..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaAvailabilityRequestTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.CheckQuotaNameResourceTypes; -import com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class QuotaAvailabilityRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QuotaAvailabilityRequest model = BinaryData.fromString( - "{\"name\":\"lhzdobp\",\"type\":\"Microsoft.NetApp/netAppAccounts/capacityPools/volumes\",\"resourceGroup\":\"mflbv\"}") - .toObject(QuotaAvailabilityRequest.class); - Assertions.assertEquals("lhzdobp", model.name()); - Assertions.assertEquals(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES, - model.type()); - Assertions.assertEquals("mflbv", model.resourceGroup()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuotaAvailabilityRequest model = new QuotaAvailabilityRequest().withName("lhzdobp") - .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES) - .withResourceGroup("mflbv"); - model = BinaryData.fromObject(model).toObject(QuotaAvailabilityRequest.class); - Assertions.assertEquals("lhzdobp", model.name()); - Assertions.assertEquals(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES, - model.type()); - Assertions.assertEquals("mflbv", model.resourceGroup()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReestablishReplicationRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReestablishReplicationRequestTests.java deleted file mode 100644 index bd53d9da4b3d2..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReestablishReplicationRequestTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.ReestablishReplicationRequest; -import org.junit.jupiter.api.Assertions; - -public final class ReestablishReplicationRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReestablishReplicationRequest model - = BinaryData.fromString("{\"sourceVolumeId\":\"emwabnet\"}").toObject(ReestablishReplicationRequest.class); - Assertions.assertEquals("emwabnet", model.sourceVolumeId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReestablishReplicationRequest model = new ReestablishReplicationRequest().withSourceVolumeId("emwabnet"); - model = BinaryData.fromObject(model).toObject(ReestablishReplicationRequest.class); - Assertions.assertEquals("emwabnet", model.sourceVolumeId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoAvailabilityZoneMappingsItemTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoAvailabilityZoneMappingsItemTests.java deleted file mode 100644 index be85868daaacc..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoAvailabilityZoneMappingsItemTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem; -import org.junit.jupiter.api.Assertions; - -public final class RegionInfoAvailabilityZoneMappingsItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegionInfoAvailabilityZoneMappingsItem model - = BinaryData.fromString("{\"availabilityZone\":\"fbishcbkha\",\"isAvailable\":false}") - .toObject(RegionInfoAvailabilityZoneMappingsItem.class); - Assertions.assertEquals("fbishcbkha", model.availabilityZone()); - Assertions.assertEquals(false, model.isAvailable()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegionInfoAvailabilityZoneMappingsItem model - = new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("fbishcbkha").withIsAvailable(false); - model = BinaryData.fromObject(model).toObject(RegionInfoAvailabilityZoneMappingsItem.class); - Assertions.assertEquals("fbishcbkha", model.availabilityZone()); - Assertions.assertEquals(false, model.isAvailable()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoInnerTests.java deleted file mode 100644 index 1a62697c13984..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoInnerTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.RegionInfoInner; -import com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem; -import com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RegionInfoInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegionInfoInner model = BinaryData.fromString( - "{\"storageToNetworkProximity\":\"T1AndT2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"c\",\"isAvailable\":true},{\"availabilityZone\":\"sdpydnfyhxdeoejz\",\"isAvailable\":false},{\"availabilityZone\":\"fsj\",\"isAvailable\":true}]}") - .toObject(RegionInfoInner.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2, - model.storageToNetworkProximity()); - Assertions.assertEquals("c", model.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertEquals(true, model.availabilityZoneMappings().get(0).isAvailable()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegionInfoInner model - = new RegionInfoInner().withStorageToNetworkProximity(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2) - .withAvailabilityZoneMappings(Arrays.asList( - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("c").withIsAvailable(true), - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("sdpydnfyhxdeoejz") - .withIsAvailable(false), - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("fsj").withIsAvailable(true))); - model = BinaryData.fromObject(model).toObject(RegionInfoInner.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2, - model.storageToNetworkProximity()); - Assertions.assertEquals("c", model.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertEquals(true, model.availabilityZoneMappings().get(0).isAvailable()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationInnerTests.java deleted file mode 100644 index a7f0c2a62b520..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationInnerTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.ReplicationInner; -import com.azure.resourcemanager.netapp.models.EndpointType; -import com.azure.resourcemanager.netapp.models.ReplicationSchedule; -import org.junit.jupiter.api.Assertions; - -public final class ReplicationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationInner model = BinaryData.fromString( - "{\"endpointType\":\"dst\",\"replicationSchedule\":\"hourly\",\"remoteVolumeResourceId\":\"dxunkbebxmubyyn\",\"remoteVolumeRegion\":\"lrb\"}") - .toObject(ReplicationInner.class); - Assertions.assertEquals(EndpointType.DST, model.endpointType()); - Assertions.assertEquals(ReplicationSchedule.HOURLY, model.replicationSchedule()); - Assertions.assertEquals("dxunkbebxmubyyn", model.remoteVolumeResourceId()); - Assertions.assertEquals("lrb", model.remoteVolumeRegion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationInner model = new ReplicationInner().withEndpointType(EndpointType.DST) - .withReplicationSchedule(ReplicationSchedule.HOURLY).withRemoteVolumeResourceId("dxunkbebxmubyyn") - .withRemoteVolumeRegion("lrb"); - model = BinaryData.fromObject(model).toObject(ReplicationInner.class); - Assertions.assertEquals(EndpointType.DST, model.endpointType()); - Assertions.assertEquals(ReplicationSchedule.HOURLY, model.replicationSchedule()); - Assertions.assertEquals("dxunkbebxmubyyn", model.remoteVolumeResourceId()); - Assertions.assertEquals("lrb", model.remoteVolumeRegion()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationObjectTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationObjectTests.java deleted file mode 100644 index 9419b3f4e8153..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationObjectTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.EndpointType; -import com.azure.resourcemanager.netapp.models.ReplicationObject; -import com.azure.resourcemanager.netapp.models.ReplicationSchedule; -import org.junit.jupiter.api.Assertions; - -public final class ReplicationObjectTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationObject model = BinaryData.fromString( - "{\"replicationId\":\"xdult\",\"endpointType\":\"dst\",\"replicationSchedule\":\"daily\",\"remoteVolumeResourceId\":\"tdzumveekgpw\",\"remoteVolumeRegion\":\"uh\"}") - .toObject(ReplicationObject.class); - Assertions.assertEquals(EndpointType.DST, model.endpointType()); - Assertions.assertEquals(ReplicationSchedule.DAILY, model.replicationSchedule()); - Assertions.assertEquals("tdzumveekgpw", model.remoteVolumeResourceId()); - Assertions.assertEquals("uh", model.remoteVolumeRegion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationObject model = new ReplicationObject().withEndpointType(EndpointType.DST) - .withReplicationSchedule(ReplicationSchedule.DAILY).withRemoteVolumeResourceId("tdzumveekgpw") - .withRemoteVolumeRegion("uh"); - model = BinaryData.fromObject(model).toObject(ReplicationObject.class); - Assertions.assertEquals(EndpointType.DST, model.endpointType()); - Assertions.assertEquals(ReplicationSchedule.DAILY, model.replicationSchedule()); - Assertions.assertEquals("tdzumveekgpw", model.remoteVolumeResourceId()); - Assertions.assertEquals("uh", model.remoteVolumeRegion()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationStatusInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationStatusInnerTests.java deleted file mode 100644 index d051fcfe656ae..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationStatusInnerTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner; -import com.azure.resourcemanager.netapp.models.MirrorState; -import com.azure.resourcemanager.netapp.models.RelationshipStatus; -import org.junit.jupiter.api.Assertions; - -public final class ReplicationStatusInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationStatusInner model = BinaryData.fromString( - "{\"healthy\":true,\"relationshipStatus\":\"Failed\",\"mirrorState\":\"Broken\",\"totalProgress\":\"plvwiwubmwmbes\",\"errorMessage\":\"nkww\"}") - .toObject(ReplicationStatusInner.class); - Assertions.assertEquals(true, model.healthy()); - Assertions.assertEquals(RelationshipStatus.FAILED, model.relationshipStatus()); - Assertions.assertEquals(MirrorState.BROKEN, model.mirrorState()); - Assertions.assertEquals("plvwiwubmwmbes", model.totalProgress()); - Assertions.assertEquals("nkww", model.errorMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationStatusInner model - = new ReplicationStatusInner().withHealthy(true).withRelationshipStatus(RelationshipStatus.FAILED) - .withMirrorState(MirrorState.BROKEN).withTotalProgress("plvwiwubmwmbes").withErrorMessage("nkww"); - model = BinaryData.fromObject(model).toObject(ReplicationStatusInner.class); - Assertions.assertEquals(true, model.healthy()); - Assertions.assertEquals(RelationshipStatus.FAILED, model.relationshipStatus()); - Assertions.assertEquals(MirrorState.BROKEN, model.mirrorState()); - Assertions.assertEquals("plvwiwubmwmbes", model.totalProgress()); - Assertions.assertEquals("nkww", model.errorMessage()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ResourceNameAvailabilityRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ResourceNameAvailabilityRequestTests.java deleted file mode 100644 index fb22e1b2d7939..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ResourceNameAvailabilityRequestTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.CheckNameResourceTypes; -import com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class ResourceNameAvailabilityRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceNameAvailabilityRequest model = BinaryData.fromString( - "{\"name\":\"d\",\"type\":\"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots\",\"resourceGroup\":\"atkpnp\"}") - .toObject(ResourceNameAvailabilityRequest.class); - Assertions.assertEquals("d", model.name()); - Assertions.assertEquals( - CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS, model.type()); - Assertions.assertEquals("atkpnp", model.resourceGroup()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceNameAvailabilityRequest model = new ResourceNameAvailabilityRequest().withName("d") - .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS) - .withResourceGroup("atkpnp"); - model = BinaryData.fromObject(model).toObject(ResourceNameAvailabilityRequest.class); - Assertions.assertEquals("d", model.name()); - Assertions.assertEquals( - CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS, model.type()); - Assertions.assertEquals("atkpnp", model.resourceGroup()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RestoreStatusInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RestoreStatusInnerTests.java deleted file mode 100644 index aa690d563d2da..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RestoreStatusInnerTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.RestoreStatusInner; - -public final class RestoreStatusInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RestoreStatusInner model = BinaryData.fromString( - "{\"healthy\":true,\"relationshipStatus\":\"Unknown\",\"mirrorState\":\"Mirrored\",\"unhealthyReason\":\"jjxd\",\"errorMessage\":\"buukzclewyhml\",\"totalTransferBytes\":4136836492530491965}") - .toObject(RestoreStatusInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RestoreStatusInner model = new RestoreStatusInner(); - model = BinaryData.fromObject(model).toObject(RestoreStatusInner.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ServiceSpecificationTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ServiceSpecificationTests.java deleted file mode 100644 index c23bd0d23a2b8..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ServiceSpecificationTests.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.Dimension; -import com.azure.resourcemanager.netapp.models.LogSpecification; -import com.azure.resourcemanager.netapp.models.MetricAggregationType; -import com.azure.resourcemanager.netapp.models.MetricSpecification; -import com.azure.resourcemanager.netapp.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ServiceSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceSpecification model = BinaryData.fromString( - "{\"metricSpecifications\":[{\"name\":\"cbkbfkg\",\"displayName\":\"dkexxppofm\",\"displayDescription\":\"x\",\"unit\":\"jpgd\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"pmouexhdz\",\"i\",\"qeojnxqbzvddntw\",\"deicbtwnpzao\"],\"internalMetricName\":\"uhrhcffcyddgl\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"jqkwpyeicx\",\"sourceMdmNamespace\":\"ciwqvhk\",\"dimensions\":[{\"name\":\"igdtopbob\",\"displayName\":\"ghmewuam\"},{\"name\":\"hrzayvvtpgvdf\",\"displayName\":\"otkftutqxlngx\"},{\"name\":\"fgugnxkrxdqmid\",\"displayName\":\"hzrvqd\"}],\"aggregationType\":\"bhj\",\"fillGapWithZero\":false,\"category\":\"ehoqfbowskan\",\"resourceIdDimensionNameOverride\":\"tzlcuiywgqywgn\",\"isInternal\":true},{\"name\":\"nhzgpphrcgyn\",\"displayName\":\"cpecfvmmcoofs\",\"displayDescription\":\"zevgb\",\"unit\":\"jqabcypmivkwlzuv\",\"supportedAggregationTypes\":[\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"bacfionlebxetq\",\"tzxdpnqbqqwx\"],\"internalMetricName\":\"feallnwsu\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"jampmngnzscxaqw\",\"sourceMdmNamespace\":\"chcbonqvpkvlrxnj\",\"dimensions\":[{\"name\":\"ipheoflokeyyien\",\"displayName\":\"dlwtgrhpdj\"},{\"name\":\"umasxazjpq\",\"displayName\":\"gual\"}],\"aggregationType\":\"xxhejjzzvd\",\"fillGapWithZero\":true,\"category\":\"dslfhotwmcy\",\"resourceIdDimensionNameOverride\":\"wlbjnpgacftade\",\"isInternal\":true}],\"logSpecifications\":[{\"name\":\"fsoppusuesnzw\",\"displayName\":\"jbavorxzdm\"},{\"name\":\"ctbqvudwx\",\"displayName\":\"dnvowg\"},{\"name\":\"jugwdkcglhsl\",\"displayName\":\"jdyggdtji\"},{\"name\":\"b\",\"displayName\":\"ofqweykhmenevfye\"}]}") - .toObject(ServiceSpecification.class); - Assertions.assertEquals("cbkbfkg", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("dkexxppofm", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("x", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("jpgd", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals(MetricAggregationType.AVERAGE, - model.metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("pmouexhdz", model.metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals("uhrhcffcyddgl", model.metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals(false, model.metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("jqkwpyeicx", model.metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("ciwqvhk", model.metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("igdtopbob", model.metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("ghmewuam", model.metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("bhj", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals(false, model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("ehoqfbowskan", model.metricSpecifications().get(0).category()); - Assertions.assertEquals("tzlcuiywgqywgn", - model.metricSpecifications().get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(true, model.metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("fsoppusuesnzw", model.logSpecifications().get(0).name()); - Assertions.assertEquals("jbavorxzdm", model.logSpecifications().get(0).displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceSpecification model = new ServiceSpecification().withMetricSpecifications(Arrays.asList( - new MetricSpecification().withName("cbkbfkg").withDisplayName("dkexxppofm").withDisplayDescription("x") - .withUnit("jpgd") - .withSupportedAggregationTypes(Arrays.asList(MetricAggregationType.AVERAGE, - MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE)) - .withSupportedTimeGrainTypes(Arrays.asList("pmouexhdz", "i", "qeojnxqbzvddntw", "deicbtwnpzao")) - .withInternalMetricName("uhrhcffcyddgl").withEnableRegionalMdmAccount(false) - .withSourceMdmAccount("jqkwpyeicx").withSourceMdmNamespace("ciwqvhk") - .withDimensions(Arrays.asList(new Dimension().withName("igdtopbob").withDisplayName("ghmewuam"), - new Dimension().withName("hrzayvvtpgvdf").withDisplayName("otkftutqxlngx"), - new Dimension().withName("fgugnxkrxdqmid").withDisplayName("hzrvqd"))) - .withAggregationType("bhj").withFillGapWithZero(false).withCategory("ehoqfbowskan") - .withResourceIdDimensionNameOverride("tzlcuiywgqywgn").withIsInternal(true), - new MetricSpecification().withName("nhzgpphrcgyn").withDisplayName("cpecfvmmcoofs") - .withDisplayDescription("zevgb").withUnit("jqabcypmivkwlzuv") - .withSupportedAggregationTypes( - Arrays.asList(MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE)) - .withSupportedTimeGrainTypes(Arrays.asList("bacfionlebxetq", "tzxdpnqbqqwx")) - .withInternalMetricName("feallnwsu").withEnableRegionalMdmAccount(true) - .withSourceMdmAccount("jampmngnzscxaqw").withSourceMdmNamespace("chcbonqvpkvlrxnj") - .withDimensions(Arrays.asList(new Dimension().withName("ipheoflokeyyien").withDisplayName("dlwtgrhpdj"), - new Dimension().withName("umasxazjpq").withDisplayName("gual"))) - .withAggregationType("xxhejjzzvd").withFillGapWithZero(true).withCategory("dslfhotwmcy") - .withResourceIdDimensionNameOverride("wlbjnpgacftade").withIsInternal(true))) - .withLogSpecifications( - Arrays.asList(new LogSpecification().withName("fsoppusuesnzw").withDisplayName("jbavorxzdm"), - new LogSpecification().withName("ctbqvudwx").withDisplayName("dnvowg"), - new LogSpecification().withName("jugwdkcglhsl").withDisplayName("jdyggdtji"), - new LogSpecification().withName("b").withDisplayName("ofqweykhmenevfye"))); - model = BinaryData.fromObject(model).toObject(ServiceSpecification.class); - Assertions.assertEquals("cbkbfkg", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("dkexxppofm", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("x", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("jpgd", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals(MetricAggregationType.AVERAGE, - model.metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("pmouexhdz", model.metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals("uhrhcffcyddgl", model.metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals(false, model.metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("jqkwpyeicx", model.metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("ciwqvhk", model.metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("igdtopbob", model.metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("ghmewuam", model.metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("bhj", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals(false, model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("ehoqfbowskan", model.metricSpecifications().get(0).category()); - Assertions.assertEquals("tzlcuiywgqywgn", - model.metricSpecifications().get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(true, model.metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("fsoppusuesnzw", model.logSpecifications().get(0).name()); - Assertions.assertEquals("jbavorxzdm", model.logSpecifications().get(0).displayName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotInnerTests.java deleted file mode 100644 index f3dc91ef8d806..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotInnerTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotInner; -import org.junit.jupiter.api.Assertions; - -public final class SnapshotInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SnapshotInner model = BinaryData.fromString( - "{\"location\":\"sg\",\"properties\":{\"snapshotId\":\"c\",\"created\":\"2021-08-29T01:48:19Z\",\"provisioningState\":\"dsjnka\"},\"id\":\"utiiswacf\",\"name\":\"gdkz\",\"type\":\"ewkfvhqcrai\"}") - .toObject(SnapshotInner.class); - Assertions.assertEquals("sg", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SnapshotInner model = new SnapshotInner().withLocation("sg"); - model = BinaryData.fromObject(model).toObject(SnapshotInner.class); - Assertions.assertEquals("sg", model.location()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateWithResponseMockTests.java deleted file mode 100644 index 65ed56a34234a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateWithResponseMockTests.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -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.SnapshotPolicy; -import com.azure.resourcemanager.netapp.models.WeeklySchedule; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SnapshotPoliciesCreateWithResponseMockTests { - @Test - public void testCreateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"etag\":\"vreljea\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1671689667,\"minute\":1202304870,\"usedBytes\":1705297672247999328},\"dailySchedule\":{\"snapshotsToKeep\":2073795724,\"hour\":1291910908,\"minute\":264997502,\"usedBytes\":7353815266805175635},\"weeklySchedule\":{\"snapshotsToKeep\":1178556723,\"day\":\"bdkelvidizo\",\"hour\":344121425,\"minute\":1181700002,\"usedBytes\":6191416292355922762},\"monthlySchedule\":{\"snapshotsToKeep\":1331407717,\"daysOfMonth\":\"dgnwncypuuwwlt\",\"hour\":740306752,\"minute\":1798680046,\"usedBytes\":5288027656858110726},\"enabled\":true,\"provisioningState\":\"if\"},\"location\":\"hmkdasvfl\",\"tags\":{\"oldforobw\":\"xcudchxgsr\",\"hfovvacqpbtu\":\"lvizb\"},\"id\":\"dxe\",\"name\":\"zab\",\"type\":\"elawumu\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SnapshotPolicy response = manager.snapshotPolicies().define("ieekpndzaa").withRegion("czexrxzbujrtrhqv") - .withExistingNetAppAccount("ttadijae", "kmr").withTags(mapOf("gnl", "vk")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(517735759).withMinute(161734406) - .withUsedBytes(5927921282145979607L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(606462246).withHour(619135714) - .withMinute(310350754).withUsedBytes(8944608160105267933L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(203387229).withDay("hheioqaqhvseuf") - .withHour(695023637).withMinute(703231006).withUsedBytes(6853300792215489751L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1303034345).withDaysOfMonth("sismjqfrddga") - .withHour(15155929).withMinute(1363527870).withUsedBytes(490169068933879788L)) - .withEnabled(false).create(); - - Assertions.assertEquals("hmkdasvfl", response.location()); - Assertions.assertEquals("xcudchxgsr", response.tags().get("oldforobw")); - Assertions.assertEquals(1671689667, response.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1202304870, response.hourlySchedule().minute()); - Assertions.assertEquals(1705297672247999328L, response.hourlySchedule().usedBytes()); - Assertions.assertEquals(2073795724, response.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1291910908, response.dailySchedule().hour()); - Assertions.assertEquals(264997502, response.dailySchedule().minute()); - Assertions.assertEquals(7353815266805175635L, response.dailySchedule().usedBytes()); - Assertions.assertEquals(1178556723, response.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("bdkelvidizo", response.weeklySchedule().day()); - Assertions.assertEquals(344121425, response.weeklySchedule().hour()); - Assertions.assertEquals(1181700002, response.weeklySchedule().minute()); - Assertions.assertEquals(6191416292355922762L, response.weeklySchedule().usedBytes()); - Assertions.assertEquals(1331407717, response.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("dgnwncypuuwwlt", response.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(740306752, response.monthlySchedule().hour()); - Assertions.assertEquals(1798680046, response.monthlySchedule().minute()); - Assertions.assertEquals(5288027656858110726L, response.monthlySchedule().usedBytes()); - Assertions.assertEquals(true, response.enabled()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteMockTests.java deleted file mode 100644 index 6250fc357c588..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteMockTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SnapshotPoliciesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.snapshotPolicies().delete("jpdn", "zhajoylhjlmuo", "xprimrsop", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetWithResponseMockTests.java deleted file mode 100644 index 7f4c59a96276c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetWithResponseMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.SnapshotPolicy; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SnapshotPoliciesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"etag\":\"edxihchrphkmcrj\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":589779398,\"minute\":531525679,\"usedBytes\":5888369763357785786},\"dailySchedule\":{\"snapshotsToKeep\":95470507,\"hour\":259124213,\"minute\":1290363462,\"usedBytes\":217902170113592881},\"weeklySchedule\":{\"snapshotsToKeep\":810731058,\"day\":\"utlwxezwzhok\",\"hour\":1775135679,\"minute\":278626218,\"usedBytes\":1768563471315587827},\"monthlySchedule\":{\"snapshotsToKeep\":1214606185,\"daysOfMonth\":\"gppipifh\",\"hour\":248320498,\"minute\":1885635288,\"usedBytes\":6741191716385680342},\"enabled\":false,\"provisioningState\":\"xjcsheafidltu\"},\"location\":\"resmkssjhoiftxfk\",\"tags\":{\"ptil\":\"gpr\",\"qtgdqohmcwsl\":\"ucb\",\"tpwb\":\"riz\"},\"id\":\"a\",\"name\":\"llibphbqzmizak\",\"type\":\"kan\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SnapshotPolicy response = manager.snapshotPolicies() - .getWithResponse("nwm", "tmvpdvjdhtt", "a", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("resmkssjhoiftxfk", response.location()); - Assertions.assertEquals("gpr", response.tags().get("ptil")); - Assertions.assertEquals(589779398, response.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(531525679, response.hourlySchedule().minute()); - Assertions.assertEquals(5888369763357785786L, response.hourlySchedule().usedBytes()); - Assertions.assertEquals(95470507, response.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(259124213, response.dailySchedule().hour()); - Assertions.assertEquals(1290363462, response.dailySchedule().minute()); - Assertions.assertEquals(217902170113592881L, response.dailySchedule().usedBytes()); - Assertions.assertEquals(810731058, response.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("utlwxezwzhok", response.weeklySchedule().day()); - Assertions.assertEquals(1775135679, response.weeklySchedule().hour()); - Assertions.assertEquals(278626218, response.weeklySchedule().minute()); - Assertions.assertEquals(1768563471315587827L, response.weeklySchedule().usedBytes()); - Assertions.assertEquals(1214606185, response.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("gppipifh", response.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(248320498, response.monthlySchedule().hour()); - Assertions.assertEquals(1885635288, response.monthlySchedule().minute()); - Assertions.assertEquals(6741191716385680342L, response.monthlySchedule().usedBytes()); - Assertions.assertEquals(false, response.enabled()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListMockTests.java deleted file mode 100644 index 241275148a1fb..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.SnapshotPolicy; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SnapshotPoliciesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"etag\":\"prtujwsawdd\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1148238938,\"minute\":149022358,\"usedBytes\":6958305132617717680},\"dailySchedule\":{\"snapshotsToKeep\":177247655,\"hour\":1297733750,\"minute\":1671083084,\"usedBytes\":8033750853148480276},\"weeklySchedule\":{\"snapshotsToKeep\":1119410287,\"day\":\"glecdmdqbwpypq\",\"hour\":543854908,\"minute\":1969231562,\"usedBytes\":7692078568165207428},\"monthlySchedule\":{\"snapshotsToKeep\":1318047091,\"daysOfMonth\":\"xudb\",\"hour\":1229147679,\"minute\":1337444270,\"usedBytes\":5506706101384890254},\"enabled\":true,\"provisioningState\":\"dhzmmesckdlp\"},\"location\":\"zrcxfailcfxwmdbo\",\"tags\":{\"ckknhxkizvy\":\"gsftufqobrjlnacg\",\"nok\":\"nrzvuljraaer\",\"a\":\"gukkjqnvbroy\"},\"id\":\"xulcdisdos\",\"name\":\"jbjsvgjrwh\",\"type\":\"yvycytdclxgcckn\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.snapshotPolicies().list("vecuijpx", "xs", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("zrcxfailcfxwmdbo", response.iterator().next().location()); - Assertions.assertEquals("gsftufqobrjlnacg", response.iterator().next().tags().get("ckknhxkizvy")); - Assertions.assertEquals(1148238938, response.iterator().next().hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(149022358, response.iterator().next().hourlySchedule().minute()); - Assertions.assertEquals(6958305132617717680L, response.iterator().next().hourlySchedule().usedBytes()); - Assertions.assertEquals(177247655, response.iterator().next().dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1297733750, response.iterator().next().dailySchedule().hour()); - Assertions.assertEquals(1671083084, response.iterator().next().dailySchedule().minute()); - Assertions.assertEquals(8033750853148480276L, response.iterator().next().dailySchedule().usedBytes()); - Assertions.assertEquals(1119410287, response.iterator().next().weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("glecdmdqbwpypq", response.iterator().next().weeklySchedule().day()); - Assertions.assertEquals(543854908, response.iterator().next().weeklySchedule().hour()); - Assertions.assertEquals(1969231562, response.iterator().next().weeklySchedule().minute()); - Assertions.assertEquals(7692078568165207428L, response.iterator().next().weeklySchedule().usedBytes()); - Assertions.assertEquals(1318047091, response.iterator().next().monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("xudb", response.iterator().next().monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1229147679, response.iterator().next().monthlySchedule().hour()); - Assertions.assertEquals(1337444270, response.iterator().next().monthlySchedule().minute()); - Assertions.assertEquals(5506706101384890254L, response.iterator().next().monthlySchedule().usedBytes()); - Assertions.assertEquals(true, response.iterator().next().enabled()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListTests.java deleted file mode 100644 index 270e828dfb2ab..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListTests.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyInner; -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.SnapshotPoliciesList; -import com.azure.resourcemanager.netapp.models.WeeklySchedule; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SnapshotPoliciesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SnapshotPoliciesList model = BinaryData.fromString( - "{\"value\":[{\"etag\":\"qdcvdrhvoo\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1193557953,\"minute\":1582782062,\"usedBytes\":2322318888299695987},\"dailySchedule\":{\"snapshotsToKeep\":1146790818,\"hour\":542490098,\"minute\":546984067,\"usedBytes\":8637599636999601474},\"weeklySchedule\":{\"snapshotsToKeep\":363113472,\"day\":\"xcxrsl\",\"hour\":1073132708,\"minute\":2107317095,\"usedBytes\":1317249364545510720},\"monthlySchedule\":{\"snapshotsToKeep\":1828084006,\"daysOfMonth\":\"hjwniyqsluic\",\"hour\":1043474675,\"minute\":1810528552,\"usedBytes\":2246531138644222618},\"enabled\":true,\"provisioningState\":\"mpaxmodfvuefywsb\"},\"location\":\"vmwy\",\"tags\":{\"wiyzvqtmnubexkp\":\"ouyftaakc\",\"mquxvypo\":\"ksmond\"},\"id\":\"gkopkwhojvpajqgx\",\"name\":\"smocmbq\",\"type\":\"qvmkcxo\"},{\"etag\":\"pvhelxprg\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1689859600,\"minute\":1462356590,\"usedBytes\":6814865152361254049},\"dailySchedule\":{\"snapshotsToKeep\":2028979165,\"hour\":1827810592,\"minute\":465544934,\"usedBytes\":8371977725942992913},\"weeklySchedule\":{\"snapshotsToKeep\":785036468,\"day\":\"rhos\",\"hour\":341443712,\"minute\":992326017,\"usedBytes\":7744101608598421858},\"monthlySchedule\":{\"snapshotsToKeep\":5318116,\"daysOfMonth\":\"m\",\"hour\":812505700,\"minute\":1391684752,\"usedBytes\":5425852562349977071},\"enabled\":true,\"provisioningState\":\"szdtmhrkwof\"},\"location\":\"voqacpiexpbt\",\"tags\":{\"tkcnqxwb\":\"bwoenwashrt\"},\"id\":\"okulpiujwa\",\"name\":\"sipqii\",\"type\":\"byuqerpqlp\"},{\"etag\":\"cciuqgbdbutau\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1305719459,\"minute\":1787121852,\"usedBytes\":3230556425991226007},\"dailySchedule\":{\"snapshotsToKeep\":1745648414,\"hour\":537605324,\"minute\":1183832331,\"usedBytes\":3465382466938026517},\"weeklySchedule\":{\"snapshotsToKeep\":2073837951,\"day\":\"pichkoymkcdy\",\"hour\":1322696494,\"minute\":556339960,\"usedBytes\":6135641576986595049},\"monthlySchedule\":{\"snapshotsToKeep\":88319304,\"daysOfMonth\":\"ovvqfovljxywsu\",\"hour\":678747249,\"minute\":188945883,\"usedBytes\":1595532838454650942},\"enabled\":true,\"provisioningState\":\"adgvraeaene\"},\"location\":\"zar\",\"tags\":{\"uijfqk\":\"q\",\"ibwwiftohqkv\":\"cewiipfpub\",\"ljphuopxodl\":\"uvksgplsaknynfsy\",\"sjswsrms\":\"iyntorzihle\"},\"id\":\"yzrpzbchckqqzq\",\"name\":\"ox\",\"type\":\"ysuiizynkedya\"},{\"etag\":\"wyhqmibzyhwits\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1679951474,\"minute\":740699984,\"usedBytes\":4085302065865673737},\"dailySchedule\":{\"snapshotsToKeep\":846796617,\"hour\":1107344942,\"minute\":998287381,\"usedBytes\":359022541227333751},\"weeklySchedule\":{\"snapshotsToKeep\":1572322989,\"day\":\"knso\",\"hour\":1498450316,\"minute\":1807799282,\"usedBytes\":7538220819901034139},\"monthlySchedule\":{\"snapshotsToKeep\":706339919,\"daysOfMonth\":\"rlkdmtncvokotl\",\"hour\":44844899,\"minute\":11976377,\"usedBytes\":8627603791684452412},\"enabled\":true,\"provisioningState\":\"gjltdtbnnhado\"},\"location\":\"rkvcikhnvpa\",\"tags\":{\"queziky\":\"x\",\"ccjzkzivgvv\":\"ggxkallatmelwuip\",\"rdvstkwqqtch\":\"nayrhyrnxxmueedn\"},\"id\":\"alm\",\"name\":\"mtdaa\",\"type\":\"gdv\"}]}") - .toObject(SnapshotPoliciesList.class); - Assertions.assertEquals("vmwy", model.value().get(0).location()); - Assertions.assertEquals("ouyftaakc", model.value().get(0).tags().get("wiyzvqtmnubexkp")); - Assertions.assertEquals(1193557953, model.value().get(0).hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1582782062, model.value().get(0).hourlySchedule().minute()); - Assertions.assertEquals(2322318888299695987L, model.value().get(0).hourlySchedule().usedBytes()); - Assertions.assertEquals(1146790818, model.value().get(0).dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(542490098, model.value().get(0).dailySchedule().hour()); - Assertions.assertEquals(546984067, model.value().get(0).dailySchedule().minute()); - Assertions.assertEquals(8637599636999601474L, model.value().get(0).dailySchedule().usedBytes()); - Assertions.assertEquals(363113472, model.value().get(0).weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("xcxrsl", model.value().get(0).weeklySchedule().day()); - Assertions.assertEquals(1073132708, model.value().get(0).weeklySchedule().hour()); - Assertions.assertEquals(2107317095, model.value().get(0).weeklySchedule().minute()); - Assertions.assertEquals(1317249364545510720L, model.value().get(0).weeklySchedule().usedBytes()); - Assertions.assertEquals(1828084006, model.value().get(0).monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("hjwniyqsluic", model.value().get(0).monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1043474675, model.value().get(0).monthlySchedule().hour()); - Assertions.assertEquals(1810528552, model.value().get(0).monthlySchedule().minute()); - Assertions.assertEquals(2246531138644222618L, model.value().get(0).monthlySchedule().usedBytes()); - Assertions.assertEquals(true, model.value().get(0).enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SnapshotPoliciesList model = new SnapshotPoliciesList().withValue(Arrays.asList( - new SnapshotPolicyInner().withLocation("vmwy") - .withTags(mapOf("wiyzvqtmnubexkp", "ouyftaakc", "mquxvypo", "ksmond")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1193557953).withMinute(1582782062) - .withUsedBytes(2322318888299695987L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1146790818).withHour(542490098) - .withMinute(546984067).withUsedBytes(8637599636999601474L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(363113472).withDay("xcxrsl") - .withHour(1073132708).withMinute(2107317095).withUsedBytes(1317249364545510720L)) - .withMonthlySchedule( - new MonthlySchedule().withSnapshotsToKeep(1828084006).withDaysOfMonth("hjwniyqsluic") - .withHour(1043474675).withMinute(1810528552).withUsedBytes(2246531138644222618L)) - .withEnabled(true), - new SnapshotPolicyInner().withLocation("voqacpiexpbt").withTags(mapOf("tkcnqxwb", "bwoenwashrt")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1689859600).withMinute(1462356590) - .withUsedBytes(6814865152361254049L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(2028979165).withHour(1827810592) - .withMinute(465544934).withUsedBytes(8371977725942992913L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(785036468).withDay("rhos") - .withHour(341443712).withMinute(992326017).withUsedBytes(7744101608598421858L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(5318116).withDaysOfMonth("m") - .withHour(812505700).withMinute(1391684752).withUsedBytes(5425852562349977071L)) - .withEnabled(true), - new SnapshotPolicyInner().withLocation("zar") - .withTags(mapOf("uijfqk", "q", "ibwwiftohqkv", "cewiipfpub", "ljphuopxodl", "uvksgplsaknynfsy", - "sjswsrms", "iyntorzihle")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1305719459).withMinute(1787121852) - .withUsedBytes(3230556425991226007L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1745648414).withHour(537605324) - .withMinute(1183832331).withUsedBytes(3465382466938026517L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(2073837951).withDay("pichkoymkcdy") - .withHour(1322696494).withMinute(556339960).withUsedBytes(6135641576986595049L)) - .withMonthlySchedule( - new MonthlySchedule().withSnapshotsToKeep(88319304).withDaysOfMonth("ovvqfovljxywsu") - .withHour(678747249).withMinute(188945883).withUsedBytes(1595532838454650942L)) - .withEnabled(true), - new SnapshotPolicyInner().withLocation("rkvcikhnvpa") - .withTags(mapOf("queziky", "x", "ccjzkzivgvv", "ggxkallatmelwuip", "rdvstkwqqtch", "nayrhyrnxxmueedn")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1679951474).withMinute(740699984) - .withUsedBytes(4085302065865673737L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(846796617).withHour(1107344942) - .withMinute(998287381).withUsedBytes(359022541227333751L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1572322989).withDay("knso") - .withHour(1498450316).withMinute(1807799282).withUsedBytes(7538220819901034139L)) - .withMonthlySchedule( - new MonthlySchedule().withSnapshotsToKeep(706339919).withDaysOfMonth("rlkdmtncvokotl") - .withHour(44844899).withMinute(11976377).withUsedBytes(8627603791684452412L)) - .withEnabled(true))); - model = BinaryData.fromObject(model).toObject(SnapshotPoliciesList.class); - Assertions.assertEquals("vmwy", model.value().get(0).location()); - Assertions.assertEquals("ouyftaakc", model.value().get(0).tags().get("wiyzvqtmnubexkp")); - Assertions.assertEquals(1193557953, model.value().get(0).hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1582782062, model.value().get(0).hourlySchedule().minute()); - Assertions.assertEquals(2322318888299695987L, model.value().get(0).hourlySchedule().usedBytes()); - Assertions.assertEquals(1146790818, model.value().get(0).dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(542490098, model.value().get(0).dailySchedule().hour()); - Assertions.assertEquals(546984067, model.value().get(0).dailySchedule().minute()); - Assertions.assertEquals(8637599636999601474L, model.value().get(0).dailySchedule().usedBytes()); - Assertions.assertEquals(363113472, model.value().get(0).weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("xcxrsl", model.value().get(0).weeklySchedule().day()); - Assertions.assertEquals(1073132708, model.value().get(0).weeklySchedule().hour()); - Assertions.assertEquals(2107317095, model.value().get(0).weeklySchedule().minute()); - Assertions.assertEquals(1317249364545510720L, model.value().get(0).weeklySchedule().usedBytes()); - Assertions.assertEquals(1828084006, model.value().get(0).monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("hjwniyqsluic", model.value().get(0).monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1043474675, model.value().get(0).monthlySchedule().hour()); - Assertions.assertEquals(1810528552, model.value().get(0).monthlySchedule().minute()); - Assertions.assertEquals(2246531138644222618L, model.value().get(0).monthlySchedule().usedBytes()); - Assertions.assertEquals(true, model.value().get(0).enabled()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyInnerTests.java deleted file mode 100644 index 7293f7f449e89..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyInnerTests.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyInner; -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 java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SnapshotPolicyInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SnapshotPolicyInner model = BinaryData.fromString( - "{\"etag\":\"gpiohgwxrtfudxe\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1902888428,\"minute\":682770513,\"usedBytes\":5596269908877645907},\"dailySchedule\":{\"snapshotsToKeep\":1104557585,\"hour\":128514806,\"minute\":1947559864,\"usedBytes\":6566741920348285642},\"weeklySchedule\":{\"snapshotsToKeep\":2068705398,\"day\":\"xgwim\",\"hour\":1697714955,\"minute\":1799565782,\"usedBytes\":2192828191882361978},\"monthlySchedule\":{\"snapshotsToKeep\":279128548,\"daysOfMonth\":\"kfoqreyfkzikfj\",\"hour\":195683064,\"minute\":113630721,\"usedBytes\":3613181819399504746},\"enabled\":true,\"provisioningState\":\"elpcirelsfeaenwa\"},\"location\":\"atklddxbjhwuaa\",\"tags\":{\"hyoulpjr\":\"jos\",\"vimjwos\":\"xagl\"},\"id\":\"tx\",\"name\":\"tcs\",\"type\":\"fcktqumiekke\"}") - .toObject(SnapshotPolicyInner.class); - Assertions.assertEquals("atklddxbjhwuaa", model.location()); - Assertions.assertEquals("jos", model.tags().get("hyoulpjr")); - Assertions.assertEquals(1902888428, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(682770513, model.hourlySchedule().minute()); - Assertions.assertEquals(5596269908877645907L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(1104557585, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(128514806, model.dailySchedule().hour()); - Assertions.assertEquals(1947559864, model.dailySchedule().minute()); - Assertions.assertEquals(6566741920348285642L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(2068705398, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("xgwim", model.weeklySchedule().day()); - Assertions.assertEquals(1697714955, model.weeklySchedule().hour()); - Assertions.assertEquals(1799565782, model.weeklySchedule().minute()); - Assertions.assertEquals(2192828191882361978L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(279128548, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("kfoqreyfkzikfj", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(195683064, model.monthlySchedule().hour()); - Assertions.assertEquals(113630721, model.monthlySchedule().minute()); - Assertions.assertEquals(3613181819399504746L, model.monthlySchedule().usedBytes()); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SnapshotPolicyInner model = new SnapshotPolicyInner().withLocation("atklddxbjhwuaa") - .withTags(mapOf("hyoulpjr", "jos", "vimjwos", "xagl")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1902888428).withMinute(682770513) - .withUsedBytes(5596269908877645907L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1104557585).withHour(128514806) - .withMinute(1947559864).withUsedBytes(6566741920348285642L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(2068705398).withDay("xgwim") - .withHour(1697714955).withMinute(1799565782).withUsedBytes(2192828191882361978L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(279128548).withDaysOfMonth("kfoqreyfkzikfj") - .withHour(195683064).withMinute(113630721).withUsedBytes(3613181819399504746L)) - .withEnabled(true); - model = BinaryData.fromObject(model).toObject(SnapshotPolicyInner.class); - Assertions.assertEquals("atklddxbjhwuaa", model.location()); - Assertions.assertEquals("jos", model.tags().get("hyoulpjr")); - Assertions.assertEquals(1902888428, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(682770513, model.hourlySchedule().minute()); - Assertions.assertEquals(5596269908877645907L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(1104557585, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(128514806, model.dailySchedule().hour()); - Assertions.assertEquals(1947559864, model.dailySchedule().minute()); - Assertions.assertEquals(6566741920348285642L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(2068705398, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("xgwim", model.weeklySchedule().day()); - Assertions.assertEquals(1697714955, model.weeklySchedule().hour()); - Assertions.assertEquals(1799565782, model.weeklySchedule().minute()); - Assertions.assertEquals(2192828191882361978L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(279128548, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("kfoqreyfkzikfj", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(195683064, model.monthlySchedule().hour()); - Assertions.assertEquals(113630721, model.monthlySchedule().minute()); - Assertions.assertEquals(3613181819399504746L, model.monthlySchedule().usedBytes()); - Assertions.assertEquals(true, model.enabled()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPatchTests.java deleted file mode 100644 index 6593c1948ac9c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPatchTests.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -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.SnapshotPolicyPatch; -import com.azure.resourcemanager.netapp.models.WeeklySchedule; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SnapshotPolicyPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SnapshotPolicyPatch model = BinaryData.fromString( - "{\"location\":\"bjyvay\",\"id\":\"imrzrtuzqog\",\"name\":\"xnevfdnwn\",\"type\":\"ewzsyyceuzsoib\",\"tags\":{\"dwkqbrq\":\"pfrxtrthzvay\",\"irqtdqoa\":\"bpaxhexiilivpdt\",\"eptra\":\"oruzfgsquyfxrxx\",\"wlwnwxuqlcv\":\"xje\"},\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1148696906,\"minute\":1248229075,\"usedBytes\":1507224315581735893},\"dailySchedule\":{\"snapshotsToKeep\":1080524607,\"hour\":1614496522,\"minute\":77495916,\"usedBytes\":1911538746456059968},\"weeklySchedule\":{\"snapshotsToKeep\":1225956555,\"day\":\"ujhemmsbvdkcrodt\",\"hour\":1997229408,\"minute\":291950475,\"usedBytes\":6410034847924566454},\"monthlySchedule\":{\"snapshotsToKeep\":896449803,\"daysOfMonth\":\"cjvefkdlfo\",\"hour\":1252976241,\"minute\":1706699033,\"usedBytes\":5309095811404897814},\"enabled\":false,\"provisioningState\":\"wpu\"}}") - .toObject(SnapshotPolicyPatch.class); - Assertions.assertEquals("bjyvay", model.location()); - Assertions.assertEquals("pfrxtrthzvay", model.tags().get("dwkqbrq")); - Assertions.assertEquals(1148696906, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1248229075, model.hourlySchedule().minute()); - Assertions.assertEquals(1507224315581735893L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(1080524607, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1614496522, model.dailySchedule().hour()); - Assertions.assertEquals(77495916, model.dailySchedule().minute()); - Assertions.assertEquals(1911538746456059968L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(1225956555, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("ujhemmsbvdkcrodt", model.weeklySchedule().day()); - Assertions.assertEquals(1997229408, model.weeklySchedule().hour()); - Assertions.assertEquals(291950475, model.weeklySchedule().minute()); - Assertions.assertEquals(6410034847924566454L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(896449803, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("cjvefkdlfo", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1252976241, model.monthlySchedule().hour()); - Assertions.assertEquals(1706699033, model.monthlySchedule().minute()); - Assertions.assertEquals(5309095811404897814L, model.monthlySchedule().usedBytes()); - Assertions.assertEquals(false, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SnapshotPolicyPatch model = new SnapshotPolicyPatch().withLocation("bjyvay") - .withTags(mapOf("dwkqbrq", "pfrxtrthzvay", "irqtdqoa", "bpaxhexiilivpdt", "eptra", "oruzfgsquyfxrxx", - "wlwnwxuqlcv", "xje")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1148696906).withMinute(1248229075) - .withUsedBytes(1507224315581735893L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1080524607).withHour(1614496522) - .withMinute(77495916).withUsedBytes(1911538746456059968L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1225956555).withDay("ujhemmsbvdkcrodt") - .withHour(1997229408).withMinute(291950475).withUsedBytes(6410034847924566454L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(896449803).withDaysOfMonth("cjvefkdlfo") - .withHour(1252976241).withMinute(1706699033).withUsedBytes(5309095811404897814L)) - .withEnabled(false); - model = BinaryData.fromObject(model).toObject(SnapshotPolicyPatch.class); - Assertions.assertEquals("bjyvay", model.location()); - Assertions.assertEquals("pfrxtrthzvay", model.tags().get("dwkqbrq")); - Assertions.assertEquals(1148696906, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1248229075, model.hourlySchedule().minute()); - Assertions.assertEquals(1507224315581735893L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(1080524607, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1614496522, model.dailySchedule().hour()); - Assertions.assertEquals(77495916, model.dailySchedule().minute()); - Assertions.assertEquals(1911538746456059968L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(1225956555, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("ujhemmsbvdkcrodt", model.weeklySchedule().day()); - Assertions.assertEquals(1997229408, model.weeklySchedule().hour()); - Assertions.assertEquals(291950475, model.weeklySchedule().minute()); - Assertions.assertEquals(6410034847924566454L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(896449803, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("cjvefkdlfo", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1252976241, model.monthlySchedule().hour()); - Assertions.assertEquals(1706699033, model.monthlySchedule().minute()); - Assertions.assertEquals(5309095811404897814L, model.monthlySchedule().usedBytes()); - Assertions.assertEquals(false, model.enabled()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPropertiesTests.java deleted file mode 100644 index 89d3199cca10c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPropertiesTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyProperties; -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 org.junit.jupiter.api.Assertions; - -public final class SnapshotPolicyPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SnapshotPolicyProperties model = BinaryData.fromString( - "{\"hourlySchedule\":{\"snapshotsToKeep\":885439585,\"minute\":270423154,\"usedBytes\":5614257163136424427},\"dailySchedule\":{\"snapshotsToKeep\":1081755723,\"hour\":564076169,\"minute\":1794228240,\"usedBytes\":5489756358952396230},\"weeklySchedule\":{\"snapshotsToKeep\":253317009,\"day\":\"eqidbqfatpx\",\"hour\":48002498,\"minute\":1459715111,\"usedBytes\":8864644598647393386},\"monthlySchedule\":{\"snapshotsToKeep\":2040504053,\"daysOfMonth\":\"uvarmywdmjsjq\",\"hour\":1756269391,\"minute\":1027618115,\"usedBytes\":6679760626312548131},\"enabled\":false,\"provisioningState\":\"co\"}") - .toObject(SnapshotPolicyProperties.class); - Assertions.assertEquals(885439585, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(270423154, model.hourlySchedule().minute()); - Assertions.assertEquals(5614257163136424427L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(1081755723, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(564076169, model.dailySchedule().hour()); - Assertions.assertEquals(1794228240, model.dailySchedule().minute()); - Assertions.assertEquals(5489756358952396230L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(253317009, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("eqidbqfatpx", model.weeklySchedule().day()); - Assertions.assertEquals(48002498, model.weeklySchedule().hour()); - Assertions.assertEquals(1459715111, model.weeklySchedule().minute()); - Assertions.assertEquals(8864644598647393386L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(2040504053, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("uvarmywdmjsjq", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1756269391, model.monthlySchedule().hour()); - Assertions.assertEquals(1027618115, model.monthlySchedule().minute()); - Assertions.assertEquals(6679760626312548131L, model.monthlySchedule().usedBytes()); - Assertions.assertEquals(false, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SnapshotPolicyProperties model = new SnapshotPolicyProperties() - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(885439585).withMinute(270423154) - .withUsedBytes(5614257163136424427L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1081755723).withHour(564076169) - .withMinute(1794228240).withUsedBytes(5489756358952396230L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(253317009).withDay("eqidbqfatpx") - .withHour(48002498).withMinute(1459715111).withUsedBytes(8864644598647393386L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(2040504053).withDaysOfMonth("uvarmywdmjsjq") - .withHour(1756269391).withMinute(1027618115).withUsedBytes(6679760626312548131L)) - .withEnabled(false); - model = BinaryData.fromObject(model).toObject(SnapshotPolicyProperties.class); - Assertions.assertEquals(885439585, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(270423154, model.hourlySchedule().minute()); - Assertions.assertEquals(5614257163136424427L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(1081755723, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(564076169, model.dailySchedule().hour()); - Assertions.assertEquals(1794228240, model.dailySchedule().minute()); - Assertions.assertEquals(5489756358952396230L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(253317009, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("eqidbqfatpx", model.weeklySchedule().day()); - Assertions.assertEquals(48002498, model.weeklySchedule().hour()); - Assertions.assertEquals(1459715111, model.weeklySchedule().minute()); - Assertions.assertEquals(8864644598647393386L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(2040504053, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("uvarmywdmjsjq", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1756269391, model.monthlySchedule().hour()); - Assertions.assertEquals(1027618115, model.monthlySchedule().minute()); - Assertions.assertEquals(6679760626312548131L, model.monthlySchedule().usedBytes()); - Assertions.assertEquals(false, model.enabled()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPropertiesTests.java deleted file mode 100644 index 244ad0813739c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPropertiesTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotProperties; - -public final class SnapshotPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SnapshotProperties model = BinaryData - .fromString( - "{\"snapshotId\":\"pnppfuf\",\"created\":\"2021-04-27T03:55:43Z\",\"provisioningState\":\"mh\"}") - .toObject(SnapshotProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SnapshotProperties model = new SnapshotProperties(); - model = BinaryData.fromObject(model).toObject(SnapshotProperties.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotRestoreFilesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotRestoreFilesTests.java deleted file mode 100644 index 6d0bf6955135c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotRestoreFilesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.SnapshotRestoreFiles; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SnapshotRestoreFilesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SnapshotRestoreFiles model - = BinaryData.fromString("{\"filePaths\":[\"xyjrxsagafcnih\",\"wqapnedgfbcvk\"],\"destinationPath\":\"q\"}") - .toObject(SnapshotRestoreFiles.class); - Assertions.assertEquals("xyjrxsagafcnih", model.filePaths().get(0)); - Assertions.assertEquals("q", model.destinationPath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SnapshotRestoreFiles model = new SnapshotRestoreFiles() - .withFilePaths(Arrays.asList("xyjrxsagafcnih", "wqapnedgfbcvk")).withDestinationPath("q"); - model = BinaryData.fromObject(model).toObject(SnapshotRestoreFiles.class); - Assertions.assertEquals("xyjrxsagafcnih", model.filePaths().get(0)); - Assertions.assertEquals("q", model.destinationPath()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteMockTests.java deleted file mode 100644 index 739a843904065..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SnapshotsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.snapshots().delete("kzyb", "jjidjk", "yxkyxvx", "vblbjednljlageua", "lxunsmjbnkppxy", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetWithResponseMockTests.java deleted file mode 100644 index 9c363940afb23..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetWithResponseMockTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.Snapshot; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SnapshotsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"location\":\"ti\",\"properties\":{\"snapshotId\":\"pwpgclrci\",\"created\":\"2021-07-05T16:33:25Z\",\"provisioningState\":\"xfrk\"},\"id\":\"xpmyyefrpmpdnq\",\"name\":\"skawaoqvmmb\",\"type\":\"pqfrtqlkz\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Snapshot response = manager.snapshots().getWithResponse("ttymsjny", "qdnfwqzdz", "tilaxh", "fhqlyvi", - "ouwivkxoyzunbixx", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("ti", response.location()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListMockTests.java deleted file mode 100644 index 55f1527567543..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListMockTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.Snapshot; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SnapshotsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"location\":\"zhhzjhfjmhvvmu\",\"properties\":{\"snapshotId\":\"mun\",\"created\":\"2021-11-13T08:37:26Z\",\"provisioningState\":\"vmhfbuz\"},\"id\":\"ihsasb\",\"name\":\"udypohyuems\",\"type\":\"ynsqyrpfoobr\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.snapshots().list("rdve", "nwsdtutnwlduyc", "uzhyrmewipmvekdx", - "kuqgsjjxundxgket", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("zhhzjhfjmhvvmu", response.iterator().next().location()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListTests.java deleted file mode 100644 index 6d7cde6d8b145..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotInner; -import com.azure.resourcemanager.netapp.models.SnapshotsList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SnapshotsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SnapshotsList model = BinaryData.fromString( - "{\"value\":[{\"location\":\"zmuvpbttdumorppx\",\"properties\":{\"snapshotId\":\"nzbtbhj\",\"created\":\"2021-10-23T02:17:02Z\",\"provisioningState\":\"fgohdneuelfphs\"},\"id\":\"htozfikdow\",\"name\":\"quuvxzxcl\",\"type\":\"ithhqzon\"}]}") - .toObject(SnapshotsList.class); - Assertions.assertEquals("zmuvpbttdumorppx", model.value().get(0).location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SnapshotsList model - = new SnapshotsList().withValue(Arrays.asList(new SnapshotInner().withLocation("zmuvpbttdumorppx"))); - model = BinaryData.fromObject(model).toObject(SnapshotsList.class); - Assertions.assertEquals("zmuvpbttdumorppx", model.value().get(0).location()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesMockTests.java deleted file mode 100644 index 8629fecd17ed2..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesMockTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.SnapshotRestoreFiles; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SnapshotsRestoreFilesMockTests { - @Test - public void testRestoreFiles() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.snapshots().restoreFiles("enlsvxeizzgwkln", "rmffeyc", "ckt", "iymerteeammxqi", "kk", - new SnapshotRestoreFiles().withFilePaths(Arrays.asList("ddrtkgdojb", "xv")).withDestinationPath("refdee"), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateMockTests.java deleted file mode 100644 index 5dea340d3adcc..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateMockTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.Snapshot; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SnapshotsUpdateMockTests { - @Test - public void testUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"location\":\"xakjsqzhzb\",\"properties\":{\"snapshotId\":\"gims\",\"created\":\"2021-03-21T09:55:03Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"kgfmocwahpq\",\"name\":\"atjeaahh\",\"type\":\"jhhn\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Snapshot response = manager.snapshots().update("egnitg", "kxlzyqdrfeg", "ealzxwhcansymoyq", "lwigdivbkbx", - "omfaj", "datawasqvdaeyyg", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xakjsqzhzb", response.location()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubscriptionQuotaItemInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubscriptionQuotaItemInnerTests.java deleted file mode 100644 index 1952ff6bba4c7..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubscriptionQuotaItemInnerTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner; - -public final class SubscriptionQuotaItemInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubscriptionQuotaItemInner model = BinaryData.fromString( - "{\"properties\":{\"current\":124550903,\"default\":1175944343},\"id\":\"kbldngkpocipa\",\"name\":\"yxoegukgjnp\",\"type\":\"ucgygevqz\"}") - .toObject(SubscriptionQuotaItemInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubscriptionQuotaItemInner model = new SubscriptionQuotaItemInner(); - model = BinaryData.fromObject(model).toObject(SubscriptionQuotaItemInner.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubscriptionQuotaItemListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubscriptionQuotaItemListTests.java deleted file mode 100644 index 966145f614886..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubscriptionQuotaItemListTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner; -import com.azure.resourcemanager.netapp.models.SubscriptionQuotaItemList; -import java.util.Arrays; - -public final class SubscriptionQuotaItemListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubscriptionQuotaItemList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"current\":1201119723,\"default\":682758161},\"id\":\"wwzjuqkhrsajiwku\",\"name\":\"foskghsauuimj\",\"type\":\"vxieduugidyj\"},{\"properties\":{\"current\":857489891,\"default\":786534004},\"id\":\"svexcsonpclhoco\",\"name\":\"slkevle\",\"type\":\"gz\"},{\"properties\":{\"current\":635098272,\"default\":1240175495},\"id\":\"faxkffeii\",\"name\":\"hl\",\"type\":\"m\"},{\"properties\":{\"current\":72720177,\"default\":1090911341},\"id\":\"mzsb\",\"name\":\"zoggigrxwburvjxx\",\"type\":\"nspydptkoenkoukn\"}]}") - .toObject(SubscriptionQuotaItemList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubscriptionQuotaItemList model - = new SubscriptionQuotaItemList().withValue(Arrays.asList(new SubscriptionQuotaItemInner(), - new SubscriptionQuotaItemInner(), new SubscriptionQuotaItemInner(), new SubscriptionQuotaItemInner())); - model = BinaryData.fromObject(model).toObject(SubscriptionQuotaItemList.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubscriptionQuotaItemPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubscriptionQuotaItemPropertiesTests.java deleted file mode 100644 index 6f48a1e70ccd0..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubscriptionQuotaItemPropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemProperties; - -public final class SubscriptionQuotaItemPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubscriptionQuotaItemProperties model = BinaryData.fromString("{\"current\":278176639,\"default\":599264802}") - .toObject(SubscriptionQuotaItemProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubscriptionQuotaItemProperties model = new SubscriptionQuotaItemProperties(); - model = BinaryData.fromObject(model).toObject(SubscriptionQuotaItemProperties.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeInfoInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeInfoInnerTests.java deleted file mode 100644 index 2f82969f935cf..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeInfoInnerTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SubvolumeInfoInner; -import org.junit.jupiter.api.Assertions; - -public final class SubvolumeInfoInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubvolumeInfoInner model = BinaryData.fromString( - "{\"properties\":{\"path\":\"owvrvmtgjqppyos\",\"size\":1997162688114762581,\"parentPath\":\"myhgfipnsxkmc\",\"provisioningState\":\"ekrrjr\"},\"id\":\"fxtsgum\",\"name\":\"jglikkxwslolb\",\"type\":\"pvuzlmv\"}") - .toObject(SubvolumeInfoInner.class); - Assertions.assertEquals("owvrvmtgjqppyos", model.path()); - Assertions.assertEquals(1997162688114762581L, model.size()); - Assertions.assertEquals("myhgfipnsxkmc", model.parentPath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubvolumeInfoInner model = new SubvolumeInfoInner().withPath("owvrvmtgjqppyos").withSize(1997162688114762581L) - .withParentPath("myhgfipnsxkmc"); - model = BinaryData.fromObject(model).toObject(SubvolumeInfoInner.class); - Assertions.assertEquals("owvrvmtgjqppyos", model.path()); - Assertions.assertEquals(1997162688114762581L, model.size()); - Assertions.assertEquals("myhgfipnsxkmc", model.parentPath()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelInnerTests.java deleted file mode 100644 index 6ff393baa6a57..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelInnerTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SubvolumeModelInner; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class SubvolumeModelInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubvolumeModelInner model = BinaryData.fromString( - "{\"id\":\"wuenvr\",\"name\":\"yo\",\"type\":\"ibreb\",\"properties\":{\"path\":\"ysjkixqtnqttez\",\"parentPath\":\"fffiak\",\"size\":7989893119356760730,\"bytesUsed\":167842444741645493,\"permissions\":\"d\",\"creationTimeStamp\":\"2021-09-01T21:15:43Z\",\"accessedTimeStamp\":\"2021-03-09T02:32:12Z\",\"modifiedTimeStamp\":\"2021-08-03T11:39:14Z\",\"changedTimeStamp\":\"2021-01-23T06:09:40Z\",\"provisioningState\":\"zphv\"}}") - .toObject(SubvolumeModelInner.class); - Assertions.assertEquals("ysjkixqtnqttez", model.path()); - Assertions.assertEquals("fffiak", model.parentPath()); - Assertions.assertEquals(7989893119356760730L, model.size()); - Assertions.assertEquals(167842444741645493L, model.bytesUsed()); - Assertions.assertEquals("d", model.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-01T21:15:43Z"), model.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-09T02:32:12Z"), model.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-03T11:39:14Z"), model.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-23T06:09:40Z"), model.changedTimestamp()); - Assertions.assertEquals("zphv", model.provisioningState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubvolumeModelInner model = new SubvolumeModelInner().withPath("ysjkixqtnqttez").withParentPath("fffiak") - .withSize(7989893119356760730L).withBytesUsed(167842444741645493L).withPermissions("d") - .withCreationTimestamp(OffsetDateTime.parse("2021-09-01T21:15:43Z")) - .withAccessedTimestamp(OffsetDateTime.parse("2021-03-09T02:32:12Z")) - .withModifiedTimestamp(OffsetDateTime.parse("2021-08-03T11:39:14Z")) - .withChangedTimestamp(OffsetDateTime.parse("2021-01-23T06:09:40Z")).withProvisioningState("zphv"); - model = BinaryData.fromObject(model).toObject(SubvolumeModelInner.class); - Assertions.assertEquals("ysjkixqtnqttez", model.path()); - Assertions.assertEquals("fffiak", model.parentPath()); - Assertions.assertEquals(7989893119356760730L, model.size()); - Assertions.assertEquals(167842444741645493L, model.bytesUsed()); - Assertions.assertEquals("d", model.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-01T21:15:43Z"), model.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-09T02:32:12Z"), model.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-03T11:39:14Z"), model.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-23T06:09:40Z"), model.changedTimestamp()); - Assertions.assertEquals("zphv", model.provisioningState()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelPropertiesTests.java deleted file mode 100644 index 414ccd547d018..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelPropertiesTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SubvolumeModelProperties; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class SubvolumeModelPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubvolumeModelProperties model = BinaryData.fromString( - "{\"path\":\"uyqncygupkvipmd\",\"parentPath\":\"wx\",\"size\":9152224123184023671,\"bytesUsed\":7138744715268482510,\"permissions\":\"stotxh\",\"creationTimeStamp\":\"2021-02-09T01:55:57Z\",\"accessedTimeStamp\":\"2021-12-08T17:06:05Z\",\"modifiedTimeStamp\":\"2021-04-25T15:36:32Z\",\"changedTimeStamp\":\"2021-06-17T22:54:10Z\",\"provisioningState\":\"c\"}") - .toObject(SubvolumeModelProperties.class); - Assertions.assertEquals("uyqncygupkvipmd", model.path()); - Assertions.assertEquals("wx", model.parentPath()); - Assertions.assertEquals(9152224123184023671L, model.size()); - Assertions.assertEquals(7138744715268482510L, model.bytesUsed()); - Assertions.assertEquals("stotxh", model.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-09T01:55:57Z"), model.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-08T17:06:05Z"), model.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-25T15:36:32Z"), model.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-17T22:54:10Z"), model.changedTimestamp()); - Assertions.assertEquals("c", model.provisioningState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubvolumeModelProperties model = new SubvolumeModelProperties().withPath("uyqncygupkvipmd").withParentPath("wx") - .withSize(9152224123184023671L).withBytesUsed(7138744715268482510L).withPermissions("stotxh") - .withCreationTimestamp(OffsetDateTime.parse("2021-02-09T01:55:57Z")) - .withAccessedTimestamp(OffsetDateTime.parse("2021-12-08T17:06:05Z")) - .withModifiedTimestamp(OffsetDateTime.parse("2021-04-25T15:36:32Z")) - .withChangedTimestamp(OffsetDateTime.parse("2021-06-17T22:54:10Z")).withProvisioningState("c"); - model = BinaryData.fromObject(model).toObject(SubvolumeModelProperties.class); - Assertions.assertEquals("uyqncygupkvipmd", model.path()); - Assertions.assertEquals("wx", model.parentPath()); - Assertions.assertEquals(9152224123184023671L, model.size()); - Assertions.assertEquals(7138744715268482510L, model.bytesUsed()); - Assertions.assertEquals("stotxh", model.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-09T01:55:57Z"), model.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-08T17:06:05Z"), model.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-25T15:36:32Z"), model.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-17T22:54:10Z"), model.changedTimestamp()); - Assertions.assertEquals("c", model.provisioningState()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchParamsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchParamsTests.java deleted file mode 100644 index c3dad53f127a2..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchParamsTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SubvolumePatchParams; -import org.junit.jupiter.api.Assertions; - -public final class SubvolumePatchParamsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubvolumePatchParams model = BinaryData.fromString("{\"size\":5455709346617083840,\"path\":\"j\"}") - .toObject(SubvolumePatchParams.class); - Assertions.assertEquals(5455709346617083840L, model.size()); - Assertions.assertEquals("j", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubvolumePatchParams model = new SubvolumePatchParams().withSize(5455709346617083840L).withPath("j"); - model = BinaryData.fromObject(model).toObject(SubvolumePatchParams.class); - Assertions.assertEquals(5455709346617083840L, model.size()); - Assertions.assertEquals("j", model.path()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchRequestTests.java deleted file mode 100644 index c25d87d18596c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchRequestTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.SubvolumePatchRequest; -import org.junit.jupiter.api.Assertions; - -public final class SubvolumePatchRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubvolumePatchRequest model - = BinaryData.fromString("{\"properties\":{\"size\":4992993506097111219,\"path\":\"augzxnfaazpxdtn\"}}") - .toObject(SubvolumePatchRequest.class); - Assertions.assertEquals(4992993506097111219L, model.size()); - Assertions.assertEquals("augzxnfaazpxdtn", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubvolumePatchRequest model - = new SubvolumePatchRequest().withSize(4992993506097111219L).withPath("augzxnfaazpxdtn"); - model = BinaryData.fromObject(model).toObject(SubvolumePatchRequest.class); - Assertions.assertEquals(4992993506097111219L, model.size()); - Assertions.assertEquals("augzxnfaazpxdtn", model.path()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePropertiesTests.java deleted file mode 100644 index 7dd148b0fa0f5..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePropertiesTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SubvolumeProperties; -import org.junit.jupiter.api.Assertions; - -public final class SubvolumePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubvolumeProperties model = BinaryData.fromString( - "{\"path\":\"lfktgplcrpwjxe\",\"size\":1213023006676271308,\"parentPath\":\"brnjwmw\",\"provisioningState\":\"nbsazejjoqkag\"}") - .toObject(SubvolumeProperties.class); - Assertions.assertEquals("lfktgplcrpwjxe", model.path()); - Assertions.assertEquals(1213023006676271308L, model.size()); - Assertions.assertEquals("brnjwmw", model.parentPath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubvolumeProperties model = new SubvolumeProperties().withPath("lfktgplcrpwjxe").withSize(1213023006676271308L) - .withParentPath("brnjwmw"); - model = BinaryData.fromObject(model).toObject(SubvolumeProperties.class); - Assertions.assertEquals("lfktgplcrpwjxe", model.path()); - Assertions.assertEquals(1213023006676271308L, model.size()); - Assertions.assertEquals("brnjwmw", model.parentPath()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateMockTests.java deleted file mode 100644 index ed9d984c76897..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateMockTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.SubvolumeInfo; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SubvolumesCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"path\":\"oweyirdhlis\",\"size\":2577921237781944905,\"parentPath\":\"qqmpizruwnpqx\",\"provisioningState\":\"Succeeded\"},\"id\":\"iixtmkzj\",\"name\":\"kv\",\"type\":\"irhgfgrwsdp\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SubvolumeInfo response = manager.subvolumes().define("nlb") - .withExistingVolume("ebwlnbmhyreeudzq", "vbpdqmjxlyyzglgo", "wtlmjjyuo", "qtobaxkjeyt").withPath("wrus") - .withSize(7003868836255706377L).withParentPath("syrq").create(); - - Assertions.assertEquals("oweyirdhlis", response.path()); - Assertions.assertEquals(2577921237781944905L, response.size()); - Assertions.assertEquals("qqmpizruwnpqx", response.parentPath()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteMockTests.java deleted file mode 100644 index 8d108bcbd53be..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteMockTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SubvolumesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.subvolumes().delete("g", "pnpbswveflocc", "rmozihmipgawt", "xp", "y", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataMockTests.java deleted file mode 100644 index da1121c71cf72..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataMockTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.SubvolumeModel; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SubvolumesGetMetadataMockTests { - @Test - public void testGetMetadata() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"id\":\"pfnznthjtwkj\",\"name\":\"srxuzvoam\",\"type\":\"cqiosmgbza\",\"properties\":{\"path\":\"qdlyrtl\",\"parentPath\":\"ap\",\"size\":1522364843172111954,\"bytesUsed\":773093768865892885,\"permissions\":\"hjm\",\"creationTimeStamp\":\"2021-01-20T21:27:07Z\",\"accessedTimeStamp\":\"2021-04-06T21:21:13Z\",\"modifiedTimeStamp\":\"2021-07-25T22:28:32Z\",\"changedTimeStamp\":\"2021-06-18T22:17:48Z\",\"provisioningState\":\"Succeeded\"}}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SubvolumeModel response = manager.subvolumes().getMetadata("cxcjxgry", "fmpcycilrmca", "kggnoxu", "t", - "ksxwpnd", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("qdlyrtl", response.path()); - Assertions.assertEquals("ap", response.parentPath()); - Assertions.assertEquals(1522364843172111954L, response.size()); - Assertions.assertEquals(773093768865892885L, response.bytesUsed()); - Assertions.assertEquals("hjm", response.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-20T21:27:07Z"), response.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T21:21:13Z"), response.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-25T22:28:32Z"), response.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-18T22:17:48Z"), response.changedTimestamp()); - Assertions.assertEquals("Succeeded", response.provisioningState()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetWithResponseMockTests.java deleted file mode 100644 index a5b07b5cd35ec..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetWithResponseMockTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.SubvolumeInfo; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SubvolumesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"path\":\"i\",\"size\":8841673596868858874,\"parentPath\":\"wmxqhndvnoamlds\",\"provisioningState\":\"aohdjh\"},\"id\":\"lzok\",\"name\":\"coxpelnjeta\",\"type\":\"ltsxoatf\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SubvolumeInfo response = manager.subvolumes() - .getWithResponse("qbsms", "ziqgfuh", "kzruswh", "hczznvf", "ycjsx", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("i", response.path()); - Assertions.assertEquals(8841673596868858874L, response.size()); - Assertions.assertEquals("wmxqhndvnoamlds", response.parentPath()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeMockTests.java deleted file mode 100644 index 8bd2fd76fd711..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeMockTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.SubvolumeInfo; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SubvolumesListByVolumeMockTests { - @Test - public void testListByVolume() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"properties\":{\"path\":\"xgvelfclduccbird\",\"size\":3261437061903336605,\"parentPath\":\"o\",\"provisioningState\":\"egstmninwjizci\"},\"id\":\"ghgshejjtbxqmu\",\"name\":\"uxlxqzvners\",\"type\":\"ycucrwnamikzeb\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.subvolumes().listByVolume("rtixokff", "yinljqe", "qwhix", - "onsts", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xgvelfclduccbird", response.iterator().next().path()); - Assertions.assertEquals(3261437061903336605L, response.iterator().next().size()); - Assertions.assertEquals("o", response.iterator().next().parentPath()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListTests.java deleted file mode 100644 index e9813e7b8c00f..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SubvolumeInfoInner; -import com.azure.resourcemanager.netapp.models.SubvolumesList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SubvolumesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubvolumesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"path\":\"nhlmctlpdng\",\"size\":5842965141303303723,\"parentPath\":\"mhrixkwmyijejve\",\"provisioningState\":\"hbpnaixexccbd\"},\"id\":\"ax\",\"name\":\"cexdrrvqa\",\"type\":\"qkghtpwijnhy\"}],\"nextLink\":\"vfycxzb\"}") - .toObject(SubvolumesList.class); - Assertions.assertEquals("nhlmctlpdng", model.value().get(0).path()); - Assertions.assertEquals(5842965141303303723L, model.value().get(0).size()); - Assertions.assertEquals("mhrixkwmyijejve", model.value().get(0).parentPath()); - Assertions.assertEquals("vfycxzb", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubvolumesList model - = new SubvolumesList().withValue(Arrays.asList(new SubvolumeInfoInner().withPath("nhlmctlpdng") - .withSize(5842965141303303723L).withParentPath("mhrixkwmyijejve"))).withNextLink("vfycxzb"); - model = BinaryData.fromObject(model).toObject(SubvolumesList.class); - Assertions.assertEquals("nhlmctlpdng", model.value().get(0).path()); - Assertions.assertEquals(5842965141303303723L, model.value().get(0).size()); - Assertions.assertEquals("mhrixkwmyijejve", model.value().get(0).parentPath()); - Assertions.assertEquals("vfycxzb", model.nextLink()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UpdateNetworkSiblingSetRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UpdateNetworkSiblingSetRequestTests.java deleted file mode 100644 index 90894dc5b320f..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UpdateNetworkSiblingSetRequestTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.NetworkFeatures; -import com.azure.resourcemanager.netapp.models.UpdateNetworkSiblingSetRequest; -import org.junit.jupiter.api.Assertions; - -public final class UpdateNetworkSiblingSetRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateNetworkSiblingSetRequest model = BinaryData.fromString( - "{\"networkSiblingSetId\":\"uconuqszfkbey\",\"subnetId\":\"ewrmjmwvvjektc\",\"networkSiblingSetStateId\":\"senhwlrs\",\"networkFeatures\":\"Basic_Standard\"}") - .toObject(UpdateNetworkSiblingSetRequest.class); - Assertions.assertEquals("uconuqszfkbey", model.networkSiblingSetId()); - Assertions.assertEquals("ewrmjmwvvjektc", model.subnetId()); - Assertions.assertEquals("senhwlrs", model.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.BASIC_STANDARD, model.networkFeatures()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateNetworkSiblingSetRequest model = new UpdateNetworkSiblingSetRequest() - .withNetworkSiblingSetId("uconuqszfkbey").withSubnetId("ewrmjmwvvjektc") - .withNetworkSiblingSetStateId("senhwlrs").withNetworkFeatures(NetworkFeatures.BASIC_STANDARD); - model = BinaryData.fromObject(model).toObject(UpdateNetworkSiblingSetRequest.class); - Assertions.assertEquals("uconuqszfkbey", model.networkSiblingSetId()); - Assertions.assertEquals("ewrmjmwvvjektc", model.subnetId()); - Assertions.assertEquals("senhwlrs", model.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.BASIC_STANDARD, model.networkFeatures()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java deleted file mode 100644 index c0b93beb57d10..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.UserAssignedIdentity; - -public final class UserAssignedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedIdentity model = BinaryData.fromString( - "{\"principalId\":\"e8e27ede-b960-492b-9ad3-2a1eb06a6518\",\"clientId\":\"b50f57c7-03f1-482c-b559-6715bceae11e\"}") - .toObject(UserAssignedIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAssignedIdentity model = new UserAssignedIdentity(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupsTests.java deleted file mode 100644 index f4a64874a6889..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupsTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.VolumeBackups; -import org.junit.jupiter.api.Assertions; - -public final class VolumeBackupsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeBackups model - = BinaryData.fromString("{\"volumeName\":\"wae\",\"backupsCount\":809360205,\"policyEnabled\":true}") - .toObject(VolumeBackups.class); - Assertions.assertEquals("wae", model.volumeName()); - Assertions.assertEquals(809360205, model.backupsCount()); - Assertions.assertEquals(true, model.policyEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeBackups model - = new VolumeBackups().withVolumeName("wae").withBackupsCount(809360205).withPolicyEnabled(true); - model = BinaryData.fromObject(model).toObject(VolumeBackups.class); - Assertions.assertEquals("wae", model.volumeName()); - Assertions.assertEquals(809360205, model.backupsCount()); - Assertions.assertEquals(true, model.policyEnabled()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java deleted file mode 100644 index d2c9a01dd756c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VolumeGroupsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumeGroups().delete("ptfujgicgaaoept", "aqutdewemxswvruu", "zzjgehkfki", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java deleted file mode 100644 index 20f3e77ccc3e9..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; -import com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties; -import org.junit.jupiter.api.Assertions; - -public final class VolumePatchPropertiesDataProtectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumePatchPropertiesDataProtection model = BinaryData.fromString("{\"snapshot\":{\"snapshotPolicyId\":\"d\"}}") - .toObject(VolumePatchPropertiesDataProtection.class); - Assertions.assertEquals("d", model.snapshot().snapshotPolicyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumePatchPropertiesDataProtection model = new VolumePatchPropertiesDataProtection() - .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("d")); - model = BinaryData.fromObject(model).toObject(VolumePatchPropertiesDataProtection.class); - Assertions.assertEquals("d", model.snapshot().snapshotPolicyId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesExportPolicyTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesExportPolicyTests.java deleted file mode 100644 index 7aec6206598e9..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesExportPolicyTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.ChownMode; -import com.azure.resourcemanager.netapp.models.ExportPolicyRule; -import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VolumePatchPropertiesExportPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumePatchPropertiesExportPolicy model = BinaryData.fromString( - "{\"rules\":[{\"ruleIndex\":1757000388,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"naenqpehindo\",\"hasRootAccess\":true,\"chownMode\":\"Restricted\"},{\"ruleIndex\":1448466618,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":false,\"nfsv41\":true,\"allowedClients\":\"lkthu\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"},{\"ruleIndex\":1315398087,\"unixReadOnly\":false,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"fmmdnbbg\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"}]}") - .toObject(VolumePatchPropertiesExportPolicy.class); - Assertions.assertEquals(1757000388, model.rules().get(0).ruleIndex()); - Assertions.assertEquals(true, model.rules().get(0).unixReadOnly()); - Assertions.assertEquals(true, model.rules().get(0).unixReadWrite()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5ReadOnly()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5ReadWrite()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5IReadOnly()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5IReadWrite()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5PReadOnly()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5PReadWrite()); - Assertions.assertEquals(true, model.rules().get(0).cifs()); - Assertions.assertEquals(true, model.rules().get(0).nfsv3()); - Assertions.assertEquals(true, model.rules().get(0).nfsv41()); - Assertions.assertEquals("naenqpehindo", model.rules().get(0).allowedClients()); - Assertions.assertEquals(true, model.rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.RESTRICTED, model.rules().get(0).chownMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumePatchPropertiesExportPolicy model = new VolumePatchPropertiesExportPolicy().withRules(Arrays.asList( - new ExportPolicyRule().withRuleIndex(1757000388).withUnixReadOnly(true).withUnixReadWrite(true) - .withKerberos5ReadOnly(true).withKerberos5ReadWrite(true).withKerberos5IReadOnly(false) - .withKerberos5IReadWrite(false).withKerberos5PReadOnly(true).withKerberos5PReadWrite(true) - .withCifs(true).withNfsv3(true).withNfsv41(true).withAllowedClients("naenqpehindo") - .withHasRootAccess(true).withChownMode(ChownMode.RESTRICTED), - new ExportPolicyRule().withRuleIndex(1448466618).withUnixReadOnly(false).withUnixReadWrite(true) - .withKerberos5ReadOnly(false).withKerberos5ReadWrite(true).withKerberos5IReadOnly(true) - .withKerberos5IReadWrite(false).withKerberos5PReadOnly(false).withKerberos5PReadWrite(true) - .withCifs(false).withNfsv3(false).withNfsv41(true).withAllowedClients("lkthu").withHasRootAccess(false) - .withChownMode(ChownMode.RESTRICTED), - new ExportPolicyRule().withRuleIndex(1315398087).withUnixReadOnly(false).withUnixReadWrite(false) - .withKerberos5ReadOnly(true).withKerberos5ReadWrite(true).withKerberos5IReadOnly(true) - .withKerberos5IReadWrite(false).withKerberos5PReadOnly(true).withKerberos5PReadWrite(true) - .withCifs(true).withNfsv3(true).withNfsv41(true).withAllowedClients("fmmdnbbg").withHasRootAccess(true) - .withChownMode(ChownMode.UNRESTRICTED))); - model = BinaryData.fromObject(model).toObject(VolumePatchPropertiesExportPolicy.class); - Assertions.assertEquals(1757000388, model.rules().get(0).ruleIndex()); - Assertions.assertEquals(true, model.rules().get(0).unixReadOnly()); - Assertions.assertEquals(true, model.rules().get(0).unixReadWrite()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5ReadOnly()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5ReadWrite()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5IReadOnly()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5IReadWrite()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5PReadOnly()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5PReadWrite()); - Assertions.assertEquals(true, model.rules().get(0).cifs()); - Assertions.assertEquals(true, model.rules().get(0).nfsv3()); - Assertions.assertEquals(true, model.rules().get(0).nfsv41()); - Assertions.assertEquals("naenqpehindo", model.rules().get(0).allowedClients()); - Assertions.assertEquals(true, model.rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.RESTRICTED, model.rules().get(0).chownMode()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesTests.java deleted file mode 100644 index 0f977f7ba02d1..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesTests.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.VolumePatchProperties; -import com.azure.resourcemanager.netapp.models.ChownMode; -import com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy; -import com.azure.resourcemanager.netapp.models.ExportPolicyRule; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration; -import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; -import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; -import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy; -import com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VolumePatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumePatchProperties model = BinaryData.fromString( - "{\"serviceLevel\":\"Ultra\",\"usageThreshold\":6774114395187736753,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":309197108,\"unixReadOnly\":true,\"unixReadWrite\":false,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":false,\"nfsv41\":true,\"allowedClients\":\"sqfsubcgjbirxb\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"}]},\"throughputMibps\":16.671253,\"dataProtection\":{\"snapshot\":{\"snapshotPolicyId\":\"twss\"}},\"isDefaultQuotaEnabled\":true,\"defaultUserQuotaInKiBs\":6673655197593346070,\"defaultGroupQuotaInKiBs\":6942246112545525154,\"unixPermissions\":\"xilzznf\",\"coolAccess\":true,\"coolnessPeriod\":1331345486,\"coolAccessRetrievalPolicy\":\"OnRead\",\"snapshotDirectoryVisible\":true,\"smbAccessBasedEnumeration\":\"Disabled\",\"smbNonBrowsable\":\"Enabled\"}") - .toObject(VolumePatchProperties.class); - Assertions.assertEquals(ServiceLevel.ULTRA, model.serviceLevel()); - Assertions.assertEquals(6774114395187736753L, model.usageThreshold()); - Assertions.assertEquals(309197108, model.exportPolicy().rules().get(0).ruleIndex()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).unixReadOnly()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).unixReadWrite()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5ReadOnly()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5ReadWrite()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5IReadOnly()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5IReadWrite()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5PReadOnly()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5PReadWrite()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).cifs()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).nfsv3()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).nfsv41()); - Assertions.assertEquals("sqfsubcgjbirxb", model.exportPolicy().rules().get(0).allowedClients()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.RESTRICTED, model.exportPolicy().rules().get(0).chownMode()); - Assertions.assertEquals(16.671253F, model.throughputMibps()); - Assertions.assertEquals("twss", model.dataProtection().snapshot().snapshotPolicyId()); - Assertions.assertEquals(true, model.isDefaultQuotaEnabled()); - Assertions.assertEquals(6673655197593346070L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(6942246112545525154L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("xilzznf", model.unixPermissions()); - Assertions.assertEquals(true, model.coolAccess()); - Assertions.assertEquals(1331345486, model.coolnessPeriod()); - Assertions.assertEquals(CoolAccessRetrievalPolicy.ON_READ, model.coolAccessRetrievalPolicy()); - Assertions.assertEquals(true, model.snapshotDirectoryVisible()); - Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); - Assertions.assertEquals(SmbNonBrowsable.ENABLED, model.smbNonBrowsable()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumePatchProperties model = new VolumePatchProperties().withServiceLevel(ServiceLevel.ULTRA) - .withUsageThreshold(6774114395187736753L) - .withExportPolicy(new VolumePatchPropertiesExportPolicy().withRules(Arrays - .asList(new ExportPolicyRule().withRuleIndex(309197108).withUnixReadOnly(true).withUnixReadWrite(false) - .withKerberos5ReadOnly(false).withKerberos5ReadWrite(true).withKerberos5IReadOnly(false) - .withKerberos5IReadWrite(false).withKerberos5PReadOnly(true).withKerberos5PReadWrite(true) - .withCifs(false).withNfsv3(false).withNfsv41(true).withAllowedClients("sqfsubcgjbirxb") - .withHasRootAccess(false).withChownMode(ChownMode.RESTRICTED)))) - .withThroughputMibps(16.671253F) - .withDataProtection(new VolumePatchPropertiesDataProtection() - .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("twss"))) - .withIsDefaultQuotaEnabled(true).withDefaultUserQuotaInKiBs(6673655197593346070L) - .withDefaultGroupQuotaInKiBs(6942246112545525154L).withUnixPermissions("xilzznf").withCoolAccess(true) - .withCoolnessPeriod(1331345486).withCoolAccessRetrievalPolicy(CoolAccessRetrievalPolicy.ON_READ) - .withSnapshotDirectoryVisible(true).withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) - .withSmbNonBrowsable(SmbNonBrowsable.ENABLED); - model = BinaryData.fromObject(model).toObject(VolumePatchProperties.class); - Assertions.assertEquals(ServiceLevel.ULTRA, model.serviceLevel()); - Assertions.assertEquals(6774114395187736753L, model.usageThreshold()); - Assertions.assertEquals(309197108, model.exportPolicy().rules().get(0).ruleIndex()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).unixReadOnly()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).unixReadWrite()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5ReadOnly()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5ReadWrite()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5IReadOnly()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5IReadWrite()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5PReadOnly()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5PReadWrite()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).cifs()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).nfsv3()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).nfsv41()); - Assertions.assertEquals("sqfsubcgjbirxb", model.exportPolicy().rules().get(0).allowedClients()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.RESTRICTED, model.exportPolicy().rules().get(0).chownMode()); - Assertions.assertEquals(16.671253F, model.throughputMibps()); - Assertions.assertEquals("twss", model.dataProtection().snapshot().snapshotPolicyId()); - Assertions.assertEquals(true, model.isDefaultQuotaEnabled()); - Assertions.assertEquals(6673655197593346070L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(6942246112545525154L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("xilzznf", model.unixPermissions()); - Assertions.assertEquals(true, model.coolAccess()); - Assertions.assertEquals(1331345486, model.coolnessPeriod()); - Assertions.assertEquals(CoolAccessRetrievalPolicy.ON_READ, model.coolAccessRetrievalPolicy()); - Assertions.assertEquals(true, model.snapshotDirectoryVisible()); - Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); - Assertions.assertEquals(SmbNonBrowsable.ENABLED, model.smbNonBrowsable()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchTests.java deleted file mode 100644 index ff08c9ea417b0..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchTests.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.ChownMode; -import com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy; -import com.azure.resourcemanager.netapp.models.ExportPolicyRule; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration; -import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; -import com.azure.resourcemanager.netapp.models.VolumePatch; -import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; -import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy; -import com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class VolumePatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumePatch model = BinaryData.fromString( - "{\"properties\":{\"serviceLevel\":\"Ultra\",\"usageThreshold\":2245300278286998069,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1252528512,\"unixReadOnly\":true,\"unixReadWrite\":false,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"hcaalnjix\",\"hasRootAccess\":false,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":939698337,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"xhnrztfolhb\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":1904300707,\"unixReadOnly\":false,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"vpgylgqgitxmed\",\"hasRootAccess\":false,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":73392328,\"unixReadOnly\":true,\"unixReadWrite\":false,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":false,\"allowedClients\":\"eoellwptfdygp\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"}]},\"throughputMibps\":82.87768,\"dataProtection\":{\"snapshot\":{\"snapshotPolicyId\":\"fqrhhuaopppc\"}},\"isDefaultQuotaEnabled\":true,\"defaultUserQuotaInKiBs\":2031358735864920909,\"defaultGroupQuotaInKiBs\":1205860539886844150,\"unixPermissions\":\"zxctobgb\",\"coolAccess\":false,\"coolnessPeriod\":1356840761,\"coolAccessRetrievalPolicy\":\"Default\",\"snapshotDirectoryVisible\":true,\"smbAccessBasedEnumeration\":\"Disabled\",\"smbNonBrowsable\":\"Disabled\"},\"location\":\"cfbu\",\"tags\":{\"xxjyngudivkrtsw\":\"fqjhhkxbpvjymj\",\"vjfdx\":\"xqzvszjfa\",\"qtdo\":\"ivetvtcq\"},\"id\":\"mcbxvwvxysl\",\"name\":\"bhsfxob\",\"type\":\"ytkblmpew\"}") - .toObject(VolumePatch.class); - Assertions.assertEquals("cfbu", model.location()); - Assertions.assertEquals("fqjhhkxbpvjymj", model.tags().get("xxjyngudivkrtsw")); - Assertions.assertEquals(ServiceLevel.ULTRA, model.serviceLevel()); - Assertions.assertEquals(2245300278286998069L, model.usageThreshold()); - Assertions.assertEquals(1252528512, model.exportPolicy().rules().get(0).ruleIndex()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).unixReadOnly()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).unixReadWrite()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5ReadOnly()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5ReadWrite()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5IReadOnly()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5IReadWrite()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5PReadOnly()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5PReadWrite()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).cifs()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).nfsv3()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).nfsv41()); - Assertions.assertEquals("hcaalnjix", model.exportPolicy().rules().get(0).allowedClients()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.UNRESTRICTED, model.exportPolicy().rules().get(0).chownMode()); - Assertions.assertEquals(82.87768F, model.throughputMibps()); - Assertions.assertEquals("fqrhhuaopppc", model.dataProtection().snapshot().snapshotPolicyId()); - Assertions.assertEquals(true, model.isDefaultQuotaEnabled()); - Assertions.assertEquals(2031358735864920909L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(1205860539886844150L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("zxctobgb", model.unixPermissions()); - Assertions.assertEquals(false, model.coolAccess()); - Assertions.assertEquals(1356840761, model.coolnessPeriod()); - Assertions.assertEquals(CoolAccessRetrievalPolicy.DEFAULT, model.coolAccessRetrievalPolicy()); - Assertions.assertEquals(true, model.snapshotDirectoryVisible()); - Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); - Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumePatch model = new VolumePatch().withLocation("cfbu") - .withTags(mapOf("xxjyngudivkrtsw", "fqjhhkxbpvjymj", "vjfdx", "xqzvszjfa", "qtdo", "ivetvtcq")) - .withServiceLevel(ServiceLevel.ULTRA).withUsageThreshold(2245300278286998069L) - .withExportPolicy(new VolumePatchPropertiesExportPolicy().withRules(Arrays.asList( - new ExportPolicyRule().withRuleIndex(1252528512).withUnixReadOnly(true).withUnixReadWrite(false) - .withKerberos5ReadOnly(false).withKerberos5ReadWrite(true).withKerberos5IReadOnly(false) - .withKerberos5IReadWrite(false).withKerberos5PReadOnly(true).withKerberos5PReadWrite(true) - .withCifs(true).withNfsv3(false).withNfsv41(false).withAllowedClients("hcaalnjix") - .withHasRootAccess(false).withChownMode(ChownMode.UNRESTRICTED), - new ExportPolicyRule().withRuleIndex(939698337).withUnixReadOnly(true).withUnixReadWrite(true) - .withKerberos5ReadOnly(true).withKerberos5ReadWrite(true).withKerberos5IReadOnly(false) - .withKerberos5IReadWrite(true).withKerberos5PReadOnly(true).withKerberos5PReadWrite(false) - .withCifs(true).withNfsv3(true).withNfsv41(true).withAllowedClients("xhnrztfolhb") - .withHasRootAccess(true).withChownMode(ChownMode.UNRESTRICTED), - new ExportPolicyRule().withRuleIndex(1904300707).withUnixReadOnly(false).withUnixReadWrite(false) - .withKerberos5ReadOnly(true).withKerberos5ReadWrite(true).withKerberos5IReadOnly(true) - .withKerberos5IReadWrite(true).withKerberos5PReadOnly(false).withKerberos5PReadWrite(true) - .withCifs(false).withNfsv3(false).withNfsv41(false).withAllowedClients("vpgylgqgitxmed") - .withHasRootAccess(false).withChownMode(ChownMode.UNRESTRICTED), - new ExportPolicyRule().withRuleIndex(73392328).withUnixReadOnly(true).withUnixReadWrite(false) - .withKerberos5ReadOnly(false).withKerberos5ReadWrite(true).withKerberos5IReadOnly(false) - .withKerberos5IReadWrite(true).withKerberos5PReadOnly(false).withKerberos5PReadWrite(true) - .withCifs(true).withNfsv3(true).withNfsv41(false).withAllowedClients("eoellwptfdygp") - .withHasRootAccess(false).withChownMode(ChownMode.RESTRICTED)))) - .withThroughputMibps(82.87768F) - .withDataProtection(new VolumePatchPropertiesDataProtection() - .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("fqrhhuaopppc"))) - .withIsDefaultQuotaEnabled(true).withDefaultUserQuotaInKiBs(2031358735864920909L) - .withDefaultGroupQuotaInKiBs(1205860539886844150L).withUnixPermissions("zxctobgb").withCoolAccess(false) - .withCoolnessPeriod(1356840761).withCoolAccessRetrievalPolicy(CoolAccessRetrievalPolicy.DEFAULT) - .withSnapshotDirectoryVisible(true).withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) - .withSmbNonBrowsable(SmbNonBrowsable.DISABLED); - model = BinaryData.fromObject(model).toObject(VolumePatch.class); - Assertions.assertEquals("cfbu", model.location()); - Assertions.assertEquals("fqjhhkxbpvjymj", model.tags().get("xxjyngudivkrtsw")); - Assertions.assertEquals(ServiceLevel.ULTRA, model.serviceLevel()); - Assertions.assertEquals(2245300278286998069L, model.usageThreshold()); - Assertions.assertEquals(1252528512, model.exportPolicy().rules().get(0).ruleIndex()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).unixReadOnly()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).unixReadWrite()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5ReadOnly()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5ReadWrite()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5IReadOnly()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5IReadWrite()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5PReadOnly()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5PReadWrite()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).cifs()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).nfsv3()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).nfsv41()); - Assertions.assertEquals("hcaalnjix", model.exportPolicy().rules().get(0).allowedClients()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.UNRESTRICTED, model.exportPolicy().rules().get(0).chownMode()); - Assertions.assertEquals(82.87768F, model.throughputMibps()); - Assertions.assertEquals("fqrhhuaopppc", model.dataProtection().snapshot().snapshotPolicyId()); - Assertions.assertEquals(true, model.isDefaultQuotaEnabled()); - Assertions.assertEquals(2031358735864920909L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(1205860539886844150L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("zxctobgb", model.unixPermissions()); - Assertions.assertEquals(false, model.coolAccess()); - Assertions.assertEquals(1356840761, model.coolnessPeriod()); - Assertions.assertEquals(CoolAccessRetrievalPolicy.DEFAULT, model.coolAccessRetrievalPolicy()); - Assertions.assertEquals(true, model.snapshotDirectoryVisible()); - Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); - Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesDataProtectionTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesDataProtectionTests.java deleted file mode 100644 index 350be53a19c1a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesDataProtectionTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.EndpointType; -import com.azure.resourcemanager.netapp.models.ReplicationObject; -import com.azure.resourcemanager.netapp.models.ReplicationSchedule; -import com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection; -import com.azure.resourcemanager.netapp.models.VolumeRelocationProperties; -import com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties; -import org.junit.jupiter.api.Assertions; - -public final class VolumePropertiesDataProtectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumePropertiesDataProtection model = BinaryData.fromString( - "{\"replication\":{\"replicationId\":\"vgqzcjrvxd\",\"endpointType\":\"dst\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"lxkvu\",\"remoteVolumeRegion\":\"hzovawjvzunlut\"},\"snapshot\":{\"snapshotPolicyId\":\"prnxipeil\"},\"volumeRelocation\":{\"relocationRequested\":true,\"readyToBeFinalized\":false}}") - .toObject(VolumePropertiesDataProtection.class); - Assertions.assertEquals(EndpointType.DST, model.replication().endpointType()); - Assertions.assertEquals(ReplicationSchedule.ONE_ZEROMINUTELY, model.replication().replicationSchedule()); - Assertions.assertEquals("lxkvu", model.replication().remoteVolumeResourceId()); - Assertions.assertEquals("hzovawjvzunlut", model.replication().remoteVolumeRegion()); - Assertions.assertEquals("prnxipeil", model.snapshot().snapshotPolicyId()); - Assertions.assertEquals(true, model.volumeRelocation().relocationRequested()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumePropertiesDataProtection model = new VolumePropertiesDataProtection() - .withReplication(new ReplicationObject().withEndpointType(EndpointType.DST) - .withReplicationSchedule(ReplicationSchedule.ONE_ZEROMINUTELY).withRemoteVolumeResourceId("lxkvu") - .withRemoteVolumeRegion("hzovawjvzunlut")) - .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("prnxipeil")) - .withVolumeRelocation(new VolumeRelocationProperties().withRelocationRequested(true)); - model = BinaryData.fromObject(model).toObject(VolumePropertiesDataProtection.class); - Assertions.assertEquals(EndpointType.DST, model.replication().endpointType()); - Assertions.assertEquals(ReplicationSchedule.ONE_ZEROMINUTELY, model.replication().replicationSchedule()); - Assertions.assertEquals("lxkvu", model.replication().remoteVolumeResourceId()); - Assertions.assertEquals("hzovawjvzunlut", model.replication().remoteVolumeRegion()); - Assertions.assertEquals("prnxipeil", model.snapshot().snapshotPolicyId()); - Assertions.assertEquals(true, model.volumeRelocation().relocationRequested()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesExportPolicyTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesExportPolicyTests.java deleted file mode 100644 index 0fabbbe24966a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesExportPolicyTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.ChownMode; -import com.azure.resourcemanager.netapp.models.ExportPolicyRule; -import com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VolumePropertiesExportPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumePropertiesExportPolicy model = BinaryData.fromString( - "{\"rules\":[{\"ruleIndex\":1149825898,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"jriplrbpbewtghf\",\"hasRootAccess\":true,\"chownMode\":\"Restricted\"},{\"ruleIndex\":1553365340,\"unixReadOnly\":true,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":true,\"allowedClients\":\"loayqcgw\",\"hasRootAccess\":false,\"chownMode\":\"Unrestricted\"}]}") - .toObject(VolumePropertiesExportPolicy.class); - Assertions.assertEquals(1149825898, model.rules().get(0).ruleIndex()); - Assertions.assertEquals(false, model.rules().get(0).unixReadOnly()); - Assertions.assertEquals(true, model.rules().get(0).unixReadWrite()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5ReadOnly()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5ReadWrite()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5IReadOnly()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5IReadWrite()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5PReadOnly()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5PReadWrite()); - Assertions.assertEquals(true, model.rules().get(0).cifs()); - Assertions.assertEquals(true, model.rules().get(0).nfsv3()); - Assertions.assertEquals(true, model.rules().get(0).nfsv41()); - Assertions.assertEquals("jriplrbpbewtghf", model.rules().get(0).allowedClients()); - Assertions.assertEquals(true, model.rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.RESTRICTED, model.rules().get(0).chownMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumePropertiesExportPolicy model = new VolumePropertiesExportPolicy().withRules(Arrays.asList( - new ExportPolicyRule().withRuleIndex(1149825898).withUnixReadOnly(false).withUnixReadWrite(true) - .withKerberos5ReadOnly(false).withKerberos5ReadWrite(true).withKerberos5IReadOnly(false) - .withKerberos5IReadWrite(true).withKerberos5PReadOnly(true).withKerberos5PReadWrite(true).withCifs(true) - .withNfsv3(true).withNfsv41(true).withAllowedClients("jriplrbpbewtghf").withHasRootAccess(true) - .withChownMode(ChownMode.RESTRICTED), - new ExportPolicyRule().withRuleIndex(1553365340).withUnixReadOnly(true).withUnixReadWrite(false) - .withKerberos5ReadOnly(true).withKerberos5ReadWrite(false).withKerberos5IReadOnly(true) - .withKerberos5IReadWrite(true).withKerberos5PReadOnly(false).withKerberos5PReadWrite(false) - .withCifs(true).withNfsv3(false).withNfsv41(true).withAllowedClients("loayqcgw") - .withHasRootAccess(false).withChownMode(ChownMode.UNRESTRICTED))); - model = BinaryData.fromObject(model).toObject(VolumePropertiesExportPolicy.class); - Assertions.assertEquals(1149825898, model.rules().get(0).ruleIndex()); - Assertions.assertEquals(false, model.rules().get(0).unixReadOnly()); - Assertions.assertEquals(true, model.rules().get(0).unixReadWrite()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5ReadOnly()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5ReadWrite()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5IReadOnly()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5IReadWrite()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5PReadOnly()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5PReadWrite()); - Assertions.assertEquals(true, model.rules().get(0).cifs()); - Assertions.assertEquals(true, model.rules().get(0).nfsv3()); - Assertions.assertEquals(true, model.rules().get(0).nfsv41()); - Assertions.assertEquals("jriplrbpbewtghf", model.rules().get(0).allowedClients()); - Assertions.assertEquals(true, model.rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.RESTRICTED, model.rules().get(0).chownMode()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRuleInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRuleInnerTests.java deleted file mode 100644 index 8197628d5438f..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRuleInnerTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRuleInner; -import com.azure.resourcemanager.netapp.models.Type; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class VolumeQuotaRuleInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeQuotaRuleInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Patching\",\"quotaSizeInKiBs\":6449918274697799558,\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"xqi\"},\"location\":\"qunyowxwlmdjr\",\"tags\":{\"vfvpdbodaciz\":\"g\",\"lhkrribdeibqipqk\":\"j\",\"rwkq\":\"hvxndzwmkrefajpj\"},\"id\":\"yhgbijtjivfx\",\"name\":\"sjabibs\",\"type\":\"stawfsdjpvkv\"}") - .toObject(VolumeQuotaRuleInner.class); - Assertions.assertEquals("qunyowxwlmdjr", model.location()); - Assertions.assertEquals("g", model.tags().get("vfvpdbodaciz")); - Assertions.assertEquals(6449918274697799558L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.INDIVIDUAL_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("xqi", model.quotaTarget()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeQuotaRuleInner model = new VolumeQuotaRuleInner().withLocation("qunyowxwlmdjr") - .withTags(mapOf("vfvpdbodaciz", "g", "lhkrribdeibqipqk", "j", "rwkq", "hvxndzwmkrefajpj")) - .withQuotaSizeInKiBs(6449918274697799558L).withQuotaType(Type.INDIVIDUAL_USER_QUOTA).withQuotaTarget("xqi"); - model = BinaryData.fromObject(model).toObject(VolumeQuotaRuleInner.class); - Assertions.assertEquals("qunyowxwlmdjr", model.location()); - Assertions.assertEquals("g", model.tags().get("vfvpdbodaciz")); - Assertions.assertEquals(6449918274697799558L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.INDIVIDUAL_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("xqi", model.quotaTarget()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulePatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulePatchTests.java deleted file mode 100644 index 699f471d90115..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulePatchTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.Type; -import com.azure.resourcemanager.netapp.models.VolumeQuotaRulePatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class VolumeQuotaRulePatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeQuotaRulePatch model = BinaryData.fromString( - "{\"tags\":{\"zhjjklffhmouwq\":\"jabudurgkakmo\",\"eeyebi\":\"gzrf\",\"wrv\":\"ikayuhqlbjbsybb\",\"slthaq\":\"ldgmfpgvmpip\"},\"properties\":{\"provisioningState\":\"Accepted\",\"quotaSizeInKiBs\":152886456423473805,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"dsrezpdrhneuyow\"}}") - .toObject(VolumeQuotaRulePatch.class); - Assertions.assertEquals("jabudurgkakmo", model.tags().get("zhjjklffhmouwq")); - Assertions.assertEquals(152886456423473805L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, model.quotaType()); - Assertions.assertEquals("dsrezpdrhneuyow", model.quotaTarget()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeQuotaRulePatch model = new VolumeQuotaRulePatch() - .withTags(mapOf("zhjjklffhmouwq", "jabudurgkakmo", "eeyebi", "gzrf", "wrv", "ikayuhqlbjbsybb", "slthaq", - "ldgmfpgvmpip")) - .withQuotaSizeInKiBs(152886456423473805L).withQuotaType(Type.DEFAULT_GROUP_QUOTA) - .withQuotaTarget("dsrezpdrhneuyow"); - model = BinaryData.fromObject(model).toObject(VolumeQuotaRulePatch.class); - Assertions.assertEquals("jabudurgkakmo", model.tags().get("zhjjklffhmouwq")); - Assertions.assertEquals(152886456423473805L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, model.quotaType()); - Assertions.assertEquals("dsrezpdrhneuyow", model.quotaTarget()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateMockTests.java deleted file mode 100644 index 18802062903eb..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateMockTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.Type; -import com.azure.resourcemanager.netapp.models.VolumeQuotaRule; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VolumeQuotaRulesCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":1851749746038265021,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"hfqpofv\"},\"location\":\"cblembnkbwv\",\"tags\":{\"qihebw\":\"kdi\"},\"id\":\"swbzuwfmdurage\",\"name\":\"izvcjfe\",\"type\":\"isdju\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - VolumeQuotaRule response = manager.volumeQuotaRules().define("kqscazuawxtzx").withRegion("sflvgsgzwywakoih") - .withExistingVolume("cpopmxel", "wcltyjede", "xm", "f") - .withTags(mapOf("zotqyryuzcb", "mjblmljhlny", "peujlzqn", "qqvxmvwfgtayxons", "nzoibgsxgnx", "cvsql", - "mpqoxw", "yqo")) - .withQuotaSizeInKiBs(5532317119730945052L).withQuotaType(Type.INDIVIDUAL_GROUP_QUOTA) - .withQuotaTarget("vxcushsphaivmx").create(); - - Assertions.assertEquals("cblembnkbwv", response.location()); - Assertions.assertEquals("kdi", response.tags().get("qihebw")); - Assertions.assertEquals(1851749746038265021L, response.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, response.quotaType()); - Assertions.assertEquals("hfqpofv", response.quotaTarget()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteMockTests.java deleted file mode 100644 index b2a093f970f7c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VolumeQuotaRulesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumeQuotaRules().delete("awjutifd", "fmvigorqjbttzh", "aglkafhon", "juj", "ickpz", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetWithResponseMockTests.java deleted file mode 100644 index 0dd2a5918fd06..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetWithResponseMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.Type; -import com.azure.resourcemanager.netapp.models.VolumeQuotaRule; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VolumeQuotaRulesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"provisioningState\":\"Creating\",\"quotaSizeInKiBs\":3265340554220962405,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"ajqglcf\"},\"location\":\"l\",\"tags\":{\"zrdpsovwxznptgoe\":\"yxynq\",\"vntjlrigjk\":\"ybbabpfhvfsl\",\"xwaabzmifrygznmm\":\"kyrioovzid\"},\"id\":\"xrizkzobgop\",\"name\":\"lhslnelxieixyn\",\"type\":\"lxecwcrojphslh\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - VolumeQuotaRule response = manager.volumeQuotaRules().getWithResponse("ids", "ault", "ijjumfq", - "azlnqnmcjngzqdqx", "bjwgnyfus", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("l", response.location()); - Assertions.assertEquals("yxynq", response.tags().get("zrdpsovwxznptgoe")); - Assertions.assertEquals(3265340554220962405L, response.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, response.quotaType()); - Assertions.assertEquals("ajqglcf", response.quotaTarget()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeMockTests.java deleted file mode 100644 index 3f73d4c3866a8..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.Type; -import com.azure.resourcemanager.netapp.models.VolumeQuotaRule; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VolumeQuotaRulesListByVolumeMockTests { - @Test - public void testListByVolume() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":8351814854754932643,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"bwefqsfapaqtfer\"},\"location\":\"wexjkmfxapjwogq\",\"tags\":{\"qwpwyawbzasqbuc\":\"bpudcdab\"},\"id\":\"jg\",\"name\":\"yexaoguy\",\"type\":\"i\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.volumeQuotaRules().listByVolume("cpilj", "a", "zv", - "chndbnwie", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("wexjkmfxapjwogq", response.iterator().next().location()); - Assertions.assertEquals("bpudcdab", response.iterator().next().tags().get("qwpwyawbzasqbuc")); - Assertions.assertEquals(8351814854754932643L, response.iterator().next().quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, response.iterator().next().quotaType()); - Assertions.assertEquals("bwefqsfapaqtfer", response.iterator().next().quotaTarget()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListTests.java deleted file mode 100644 index b343860aea051..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRuleInner; -import com.azure.resourcemanager.netapp.models.Type; -import com.azure.resourcemanager.netapp.models.VolumeQuotaRulesList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class VolumeQuotaRulesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeQuotaRulesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"quotaSizeInKiBs\":4528392326800353907,\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"wem\"},\"location\":\"rncsdtclu\",\"tags\":{\"lfeadcygq\":\"pbsfgytgu\",\"elolppvksrpqvuj\":\"kyhejhzisxgf\",\"wib\":\"raehtwdwrft\",\"cstwity\":\"rcdlbhshfwpr\"},\"id\":\"hevxcced\",\"name\":\"pnmdyodnwzxltjcv\",\"type\":\"hlt\"}]}") - .toObject(VolumeQuotaRulesList.class); - Assertions.assertEquals("rncsdtclu", model.value().get(0).location()); - Assertions.assertEquals("pbsfgytgu", model.value().get(0).tags().get("lfeadcygq")); - Assertions.assertEquals(4528392326800353907L, model.value().get(0).quotaSizeInKiBs()); - Assertions.assertEquals(Type.INDIVIDUAL_GROUP_QUOTA, model.value().get(0).quotaType()); - Assertions.assertEquals("wem", model.value().get(0).quotaTarget()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeQuotaRulesList model - = new VolumeQuotaRulesList().withValue(Arrays.asList(new VolumeQuotaRuleInner().withLocation("rncsdtclu") - .withTags(mapOf("lfeadcygq", "pbsfgytgu", "elolppvksrpqvuj", "kyhejhzisxgf", "wib", "raehtwdwrft", - "cstwity", "rcdlbhshfwpr")) - .withQuotaSizeInKiBs(4528392326800353907L).withQuotaType(Type.INDIVIDUAL_GROUP_QUOTA) - .withQuotaTarget("wem"))); - model = BinaryData.fromObject(model).toObject(VolumeQuotaRulesList.class); - Assertions.assertEquals("rncsdtclu", model.value().get(0).location()); - Assertions.assertEquals("pbsfgytgu", model.value().get(0).tags().get("lfeadcygq")); - Assertions.assertEquals(4528392326800353907L, model.value().get(0).quotaSizeInKiBs()); - Assertions.assertEquals(Type.INDIVIDUAL_GROUP_QUOTA, model.value().get(0).quotaType()); - Assertions.assertEquals("wem", model.value().get(0).quotaTarget()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesPropertiesTests.java deleted file mode 100644 index 4085a07e1e741..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesPropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRulesProperties; -import com.azure.resourcemanager.netapp.models.Type; -import org.junit.jupiter.api.Assertions; - -public final class VolumeQuotaRulesPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeQuotaRulesProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Creating\",\"quotaSizeInKiBs\":7435265632351903503,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"kd\"}") - .toObject(VolumeQuotaRulesProperties.class); - Assertions.assertEquals(7435265632351903503L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, model.quotaType()); - Assertions.assertEquals("kd", model.quotaTarget()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeQuotaRulesProperties model = new VolumeQuotaRulesProperties().withQuotaSizeInKiBs(7435265632351903503L) - .withQuotaType(Type.DEFAULT_GROUP_QUOTA).withQuotaTarget("kd"); - model = BinaryData.fromObject(model).toObject(VolumeQuotaRulesProperties.class); - Assertions.assertEquals(7435265632351903503L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, model.quotaType()); - Assertions.assertEquals("kd", model.quotaTarget()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRelocationPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRelocationPropertiesTests.java deleted file mode 100644 index 0640f8fafd174..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRelocationPropertiesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.VolumeRelocationProperties; -import org.junit.jupiter.api.Assertions; - -public final class VolumeRelocationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeRelocationProperties model - = BinaryData.fromString("{\"relocationRequested\":true,\"readyToBeFinalized\":false}") - .toObject(VolumeRelocationProperties.class); - Assertions.assertEquals(true, model.relocationRequested()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeRelocationProperties model = new VolumeRelocationProperties().withRelocationRequested(true); - model = BinaryData.fromObject(model).toObject(VolumeRelocationProperties.class); - Assertions.assertEquals(true, model.relocationRequested()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRevertTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRevertTests.java deleted file mode 100644 index 5cf8be1577f4e..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRevertTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.VolumeRevert; -import org.junit.jupiter.api.Assertions; - -public final class VolumeRevertTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeRevert model = BinaryData.fromString("{\"snapshotId\":\"wyhzdx\"}").toObject(VolumeRevert.class); - Assertions.assertEquals("wyhzdx", model.snapshotId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeRevert model = new VolumeRevert().withSnapshotId("wyhzdx"); - model = BinaryData.fromObject(model).toObject(VolumeRevert.class); - Assertions.assertEquals("wyhzdx", model.snapshotId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeSnapshotPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeSnapshotPropertiesTests.java deleted file mode 100644 index 1a44683415cc4..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeSnapshotPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties; -import org.junit.jupiter.api.Assertions; - -public final class VolumeSnapshotPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeSnapshotProperties model - = BinaryData.fromString("{\"snapshotPolicyId\":\"p\"}").toObject(VolumeSnapshotProperties.class); - Assertions.assertEquals("p", model.snapshotPolicyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeSnapshotProperties model = new VolumeSnapshotProperties().withSnapshotPolicyId("p"); - model = BinaryData.fromObject(model).toObject(VolumeSnapshotProperties.class); - Assertions.assertEquals("p", model.snapshotPolicyId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationMockTests.java deleted file mode 100644 index 241e2629f0083..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationMockTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.AuthorizeRequest; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VolumesAuthorizeReplicationMockTests { - @Test - public void testAuthorizeReplication() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumes().authorizeReplication("lqxihhrmooiz", "seypxiutcxapz", "y", "petogebjox", - new AuthorizeRequest().withRemoteVolumeResourceId("hvnh"), com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksMockTests.java deleted file mode 100644 index 3d4e77089b28a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksMockTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.BreakFileLocksRequest; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VolumesBreakFileLocksMockTests { - @Test - public void testBreakFileLocks() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumes().breakFileLocks("aspavehhr", "kbunzoz", "dhcxgkmoy", "cdyuibhmfdnbzyd", - new BreakFileLocksRequest().withClientIp("vfcjnaeoisrvhmg").withConfirmRunningDisruptiveOperation(true), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationMockTests.java deleted file mode 100644 index 8c6225ada7855..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationMockTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VolumesBreakReplicationMockTests { - @Test - public void testBreakReplication() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumes().breakReplication("iuagydwqfbylyrfg", "agt", "ojocqwogf", "zjvusfzldmo", - new BreakReplicationRequest().withForceBreakReplication(false), com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationMockTests.java deleted file mode 100644 index 1391fbc7d7179..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VolumesDeleteReplicationMockTests { - @Test - public void testDeleteReplication() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumes().deleteReplication("kvyklxubyjaffmm", "bl", "qcuubgqibrta", "metttwgd", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationMockTests.java deleted file mode 100644 index 083f9aab228fc..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VolumesFinalizeRelocationMockTests { - @Test - public void testFinalizeRelocation() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumes().finalizeRelocation("jhlfzswpchwahf", "ousnfepgfewe", "wlyxgncxyk", "hdjhlimmbcx", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserMockTests.java deleted file mode 100644 index 15cce6e31a623..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserMockTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest; -import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VolumesListGetGroupIdListForLdapUserMockTests { - @Test - public void testListGetGroupIdListForLdapUser() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"groupIdsForLdapUser\":[\"eknlra\",\"iaa\"]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - GetGroupIdListForLdapUserResponse response - = manager.volumes().listGetGroupIdListForLdapUser("fukiscvwmzhw", "lefaxvxilcbtgn", "nzeyqxtjj", "zqlqhyc", - new GetGroupIdListForLdapUserRequest().withUsername("vodggxdbee"), com.azure.core.util.Context.NONE); - - Assertions.assertEquals("eknlra", response.groupIdsForLdapUser().get(0)); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsMockTests.java deleted file mode 100644 index 951af7d00131f..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.EndpointType; -import com.azure.resourcemanager.netapp.models.Replication; -import com.azure.resourcemanager.netapp.models.ReplicationSchedule; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VolumesListReplicationsMockTests { - @Test - public void testListReplications() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"endpointType\":\"src\",\"replicationSchedule\":\"daily\",\"remoteVolumeResourceId\":\"yowc\",\"remoteVolumeRegion\":\"qovekqvgqou\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.volumes().listReplications("plcwkhi", "ihlhzdsqtzb", - "rgnowcjhfgm", "ecactx", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(EndpointType.SRC, response.iterator().next().endpointType()); - Assertions.assertEquals(ReplicationSchedule.DAILY, response.iterator().next().replicationSchedule()); - Assertions.assertEquals("yowc", response.iterator().next().remoteVolumeResourceId()); - Assertions.assertEquals("qovekqvgqou", response.iterator().next().remoteVolumeRegion()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeMockTests.java deleted file mode 100644 index 3f323463a812a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeMockTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.PoolChangeRequest; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VolumesPoolChangeMockTests { - @Test - public void testPoolChange() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumes().poolChange("lftidgfcwqmpim", "qxzhem", "yhohujswtwkozzwc", "lkb", - new PoolChangeRequest().withNewPoolResourceId("wpfaj"), com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationMockTests.java deleted file mode 100644 index d3a017e92be05..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VolumesReInitializeReplicationMockTests { - @Test - public void testReInitializeReplication() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumes().reInitializeReplication("abrqnkkzj", "jb", "rgaehvvibrxjj", "toqbeitpkxztmoob", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusWithResponseMockTests.java deleted file mode 100644 index 70655ef4c536b..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusWithResponseMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.MirrorState; -import com.azure.resourcemanager.netapp.models.RelationshipStatus; -import com.azure.resourcemanager.netapp.models.ReplicationStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VolumesReplicationStatusWithResponseMockTests { - @Test - public void testReplicationStatusWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"healthy\":true,\"relationshipStatus\":\"Transferring\",\"mirrorState\":\"Mirrored\",\"totalProgress\":\"jqctojcmisofie\",\"errorMessage\":\"efojyqdhcupl\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ReplicationStatus response = manager.volumes() - .replicationStatusWithResponse("ylfsbtk", "dp", "s", "wn", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals(true, response.healthy()); - Assertions.assertEquals(RelationshipStatus.TRANSFERRING, response.relationshipStatus()); - Assertions.assertEquals(MirrorState.MIRRORED, response.mirrorState()); - Assertions.assertEquals("jqctojcmisofie", response.totalProgress()); - Assertions.assertEquals("efojyqdhcupl", response.errorMessage()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationMockTests.java deleted file mode 100644 index 1babd90ebb03a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VolumesResyncReplicationMockTests { - @Test - public void testResyncReplication() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumes().resyncReplication("ifzmpjwyivqi", "f", "cvhrfsp", "uagrttikteusqc", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertMockTests.java deleted file mode 100644 index 0eff423a53770..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertMockTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.VolumeRevert; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VolumesRevertMockTests { - @Test - public void testRevert() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumes().revert("hlfkqojpy", "vgtrdcnifmzzs", "ymbrnysuxmpraf", "g", - new VolumeRevert().withSnapshotId("hocxvdfffwafqrou"), com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationMockTests.java deleted file mode 100644 index b93bce96466e5..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VolumesRevertRelocationMockTests { - @Test - public void testRevertRelocation() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumes().revertRelocation("h", "cporxvxcjz", "qizxfpxtgqscjavf", "juhdqazkmtgguwpi", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/WeeklyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/WeeklyScheduleTests.java deleted file mode 100644 index 7e644d5a71613..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/WeeklyScheduleTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.WeeklySchedule; -import org.junit.jupiter.api.Assertions; - -public final class WeeklyScheduleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WeeklySchedule model = BinaryData.fromString( - "{\"snapshotsToKeep\":672785070,\"day\":\"gjhkycubeddg\",\"hour\":947899145,\"minute\":583924547,\"usedBytes\":3778047541183075264}") - .toObject(WeeklySchedule.class); - Assertions.assertEquals(672785070, model.snapshotsToKeep()); - Assertions.assertEquals("gjhkycubeddg", model.day()); - Assertions.assertEquals(947899145, model.hour()); - Assertions.assertEquals(583924547, model.minute()); - Assertions.assertEquals(3778047541183075264L, model.usedBytes()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WeeklySchedule model = new WeeklySchedule().withSnapshotsToKeep(672785070).withDay("gjhkycubeddg") - .withHour(947899145).withMinute(583924547).withUsedBytes(3778047541183075264L); - model = BinaryData.fromObject(model).toObject(WeeklySchedule.class); - Assertions.assertEquals(672785070, model.snapshotsToKeep()); - Assertions.assertEquals("gjhkycubeddg", model.day()); - Assertions.assertEquals(947899145, model.hour()); - Assertions.assertEquals(583924547, model.minute()); - Assertions.assertEquals(3778047541183075264L, model.usedBytes()); - } -}