From f8183aac448daec7665aaee972fcab42a0a308e3 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 4 Feb 2022 15:13:19 +0000 Subject: [PATCH] CodeGen from PR 17296 in Azure/azure-rest-api-specs Merge 243bb48ba6e5bea1f742492cfc6496d572103613 into b5d7781a103c174a5d59572263eafacad30be157 --- .../netapp/NetAppFilesManager.java | 387 -- .../netapp/fluent/AccountBackupsClient.java | 131 - .../netapp/fluent/AccountsClient.java | 266 -- .../netapp/fluent/BackupPoliciesClient.java | 265 -- .../netapp/fluent/BackupsClient.java | 443 -- .../netapp/fluent/NetAppManagementClient.java | 138 - .../NetAppResourceQuotaLimitsClient.java | 67 - .../netapp/fluent/NetAppResourcesClient.java | 101 - .../netapp/fluent/OperationsClient.java | 36 - .../netapp/fluent/PoolsClient.java | 263 -- .../netapp/fluent/SnapshotPoliciesClient.java | 275 -- .../netapp/fluent/SnapshotsClient.java | 358 -- .../netapp/fluent/VaultsClient.java | 41 - .../netapp/fluent/VolumeGroupsClient.java | 207 - .../netapp/fluent/VolumesClient.java | 857 ---- .../fluent/models/AccountProperties.java | 100 - .../netapp/fluent/models/BackupInner.java | 191 - .../fluent/models/BackupPolicyInner.java | 208 - .../fluent/models/BackupPolicyProperties.java | 193 - .../fluent/models/BackupProperties.java | 186 - .../fluent/models/BackupStatusInner.java | 146 - .../fluent/models/CapacityPoolInner.java | 236 - .../CheckAvailabilityResponseInner.java | 120 - .../fluent/models/MountTargetProperties.java | 112 - .../fluent/models/NetAppAccountInner.java | 147 - .../netapp/fluent/models/OperationInner.java | 148 - .../fluent/models/OperationProperties.java | 54 - .../fluent/models/PoolPatchProperties.java | 80 - .../netapp/fluent/models/PoolProperties.java | 229 - .../fluent/models/ReplicationStatusInner.java | 156 - .../fluent/models/RestoreStatusInner.java | 116 - .../netapp/fluent/models/SnapshotInner.java | 102 - .../fluent/models/SnapshotPolicyInner.java | 206 - .../models/SnapshotPolicyProperties.java | 185 - .../models/SnapshotPolicyVolumeListInner.java | 54 - .../fluent/models/SnapshotProperties.java | 70 - .../models/SubscriptionQuotaItemInner.java | 77 - .../SubscriptionQuotaItemProperties.java | 54 - .../netapp/fluent/models/VaultInner.java | 101 - .../netapp/fluent/models/VaultProperties.java | 50 - .../models/VolumeGroupDetailsInner.java | 200 - .../fluent/models/VolumeGroupInner.java | 175 - .../models/VolumeGroupListProperties.java | 69 - .../fluent/models/VolumeGroupProperties.java | 100 - .../netapp/fluent/models/VolumeInner.java | 926 ---- .../fluent/models/VolumePatchProperties.java | 257 -- .../fluent/models/VolumeProperties.java | 1076 ----- .../netapp/fluent/models/package-info.java | 9 - .../netapp/fluent/package-info.java | 9 - .../AccountBackupsClientImpl.java | 686 --- .../implementation/AccountBackupsImpl.java | 80 - .../implementation/AccountsClientImpl.java | 1525 ------- .../netapp/implementation/AccountsImpl.java | 174 - .../netapp/implementation/BackupImpl.java | 226 - .../BackupPoliciesClientImpl.java | 1344 ------ .../implementation/BackupPoliciesImpl.java | 196 - .../implementation/BackupPolicyImpl.java | 257 -- .../implementation/BackupStatusImpl.java | 62 - .../implementation/BackupsClientImpl.java | 2047 --------- .../netapp/implementation/BackupsImpl.java | 324 -- .../implementation/CapacityPoolImpl.java | 252 -- .../CheckAvailabilityResponseImpl.java | 42 - .../implementation/NetAppAccountImpl.java | 216 - .../NetAppManagementClientBuilder.java | 149 - .../NetAppManagementClientImpl.java | 466 -- .../NetAppResourceQuotaLimitsClientImpl.java | 383 -- .../NetAppResourceQuotaLimitsImpl.java | 72 - .../NetAppResourcesClientImpl.java | 557 --- .../implementation/NetAppResourcesImpl.java | 112 - .../netapp/implementation/OperationImpl.java | 45 - .../implementation/OperationsClientImpl.java | 176 - .../netapp/implementation/OperationsImpl.java | 46 - .../implementation/PoolsClientImpl.java | 1386 ------ .../netapp/implementation/PoolsImpl.java | 191 - .../implementation/ReplicationStatusImpl.java | 50 - .../implementation/RestoreStatusImpl.java | 54 - .../netapp/implementation/SnapshotImpl.java | 146 - .../SnapshotPoliciesClientImpl.java | 1412 ------ .../implementation/SnapshotPoliciesImpl.java | 228 - .../implementation/SnapshotPolicyImpl.java | 258 -- .../SnapshotPolicyVolumeListImpl.java | 44 - .../implementation/SnapshotsClientImpl.java | 1629 ------- .../netapp/implementation/SnapshotsImpl.java | 305 -- .../SubscriptionQuotaItemImpl.java | 53 - .../netapp/implementation/Utils.java | 204 - .../netapp/implementation/VaultImpl.java | 47 - .../implementation/VaultsClientImpl.java | 239 - .../netapp/implementation/VaultsImpl.java | 45 - .../VolumeGroupDetailsImpl.java | 166 - .../implementation/VolumeGroupImpl.java | 63 - .../VolumeGroupsClientImpl.java | 1027 ----- .../implementation/VolumeGroupsImpl.java | 197 - .../netapp/implementation/VolumeImpl.java | 629 --- .../implementation/VolumesClientImpl.java | 3988 ----------------- .../netapp/implementation/VolumesImpl.java | 350 -- .../netapp/implementation/package-info.java | 9 - .../netapp/models/AccountBackups.java | 89 - .../netapp/models/AccountEncryption.java | 50 - .../netapp/models/Accounts.java | 156 - .../netapp/models/ActiveDirectory.java | 590 --- .../netapp/models/ActiveDirectoryStatus.java | 43 - .../netapp/models/ApplicationType.java | 31 - .../netapp/models/AuthorizeRequest.java | 50 - .../netapp/models/AvsDataStore.java | 34 - .../resourcemanager/netapp/models/Backup.java | 288 -- .../netapp/models/BackupPatch.java | 184 - .../netapp/models/BackupPolicies.java | 142 - .../netapp/models/BackupPoliciesList.java | 55 - .../netapp/models/BackupPolicy.java | 347 -- .../netapp/models/BackupPolicyPatch.java | 188 - .../netapp/models/BackupStatus.java | 73 - .../netapp/models/BackupType.java | 34 - .../netapp/models/Backups.java | 227 - .../netapp/models/BackupsList.java | 55 - .../models/BreakReplicationRequest.java | 53 - .../netapp/models/CapacityPool.java | 348 -- .../netapp/models/CapacityPoolList.java | 81 - .../netapp/models/CapacityPoolPatch.java | 107 - .../models/CheckAvailabilityResponse.java | 43 - .../netapp/models/CheckNameResourceTypes.java | 44 - .../models/CheckQuotaNameResourceTypes.java | 45 - .../netapp/models/ChownMode.java | 34 - .../netapp/models/DailySchedule.java | 128 - .../netapp/models/Dimension.java | 76 - .../netapp/models/EncryptionType.java | 34 - .../netapp/models/EndpointType.java | 34 - .../netapp/models/ExportPolicyRule.java | 442 -- .../models/FilePathAvailabilityRequest.java | 91 - .../netapp/models/HourlySchedule.java | 102 - .../models/InAvailabilityReasonType.java | 34 - .../netapp/models/LogSpecification.java | 76 - .../netapp/models/MetricAggregationType.java | 31 - .../netapp/models/MetricSpecification.java | 444 -- .../netapp/models/MirrorState.java | 37 - .../netapp/models/MonthlySchedule.java | 157 - .../netapp/models/NetAppAccount.java | 270 -- .../netapp/models/NetAppAccountList.java | 81 - .../netapp/models/NetAppAccountPatch.java | 115 - .../models/NetAppResourceQuotaLimits.java | 60 - .../netapp/models/NetAppResources.java | 89 - .../netapp/models/NetworkFeatures.java | 34 - .../netapp/models/Operation.java | 45 - .../netapp/models/OperationDisplay.java | 128 - .../netapp/models/OperationListResult.java | 58 - .../netapp/models/Operations.java | 31 - .../netapp/models/PlacementKeyValuePairs.java | 90 - .../netapp/models/PoolChangeRequest.java | 56 - .../resourcemanager/netapp/models/Pools.java | 142 - .../netapp/models/QosType.java | 34 - .../models/QuotaAvailabilityRequest.java | 118 - .../netapp/models/RelationshipStatus.java | 34 - .../netapp/models/ReplicationObject.java | 163 - .../netapp/models/ReplicationSchedule.java | 37 - .../netapp/models/ReplicationStatus.java | 52 - .../ResourceNameAvailabilityRequest.java | 120 - .../netapp/models/RestoreStatus.java | 59 - .../netapp/models/SecurityStyle.java | 34 - .../netapp/models/ServiceLevel.java | 40 - .../netapp/models/ServiceSpecification.java | 83 - .../netapp/models/Snapshot.java | 163 - .../netapp/models/SnapshotPolicies.java | 170 - .../netapp/models/SnapshotPoliciesList.java | 55 - .../netapp/models/SnapshotPolicy.java | 354 -- .../netapp/models/SnapshotPolicyPatch.java | 267 -- .../models/SnapshotPolicyVolumeList.java | 25 - .../netapp/models/Snapshots.java | 212 - .../netapp/models/SnapshotsList.java | 55 - .../netapp/models/SubscriptionQuotaItem.java | 60 - .../models/SubscriptionQuotaItemList.java | 55 - .../resourcemanager/netapp/models/Vault.java | 52 - .../netapp/models/VaultList.java | 55 - .../resourcemanager/netapp/models/Vaults.java | 36 - .../resourcemanager/netapp/models/Volume.java | 1149 ----- .../netapp/models/VolumeBackupProperties.java | 128 - .../netapp/models/VolumeBackups.java | 102 - .../netapp/models/VolumeGroup.java | 67 - .../netapp/models/VolumeGroupDetails.java | 199 - .../netapp/models/VolumeGroupList.java | 55 - .../netapp/models/VolumeGroupMetadata.java | 176 - .../models/VolumeGroupVolumeProperties.java | 946 ---- .../netapp/models/VolumeGroups.java | 142 - .../netapp/models/VolumeList.java | 81 - .../netapp/models/VolumePatch.java | 253 -- .../VolumePatchPropertiesDataProtection.java | 82 - .../VolumePatchPropertiesExportPolicy.java | 54 - .../VolumePropertiesDataProtection.java | 111 - .../models/VolumePropertiesExportPolicy.java | 54 - .../netapp/models/VolumeRevert.java | 50 - .../models/VolumeSnapshotProperties.java | 50 - .../VolumeStorageToNetworkProximity.java | 37 - .../netapp/models/Volumes.java | 421 -- .../netapp/models/WeeklySchedule.java | 157 - .../netapp/models/package-info.java | 9 - .../resourcemanager/netapp/package-info.java | 9 - .../src/main/java/module-info.java | 19 - .../AccountBackupsDeleteSamples.java | 22 - .../generated/AccountBackupsGetSamples.java | 22 - .../generated/AccountBackupsListSamples.java | 22 - .../AccountsCreateOrUpdateSamples.java | 42 - .../generated/AccountsDeleteSamples.java | 22 - .../AccountsGetByResourceGroupSamples.java | 22 - .../AccountsListByResourceGroupSamples.java | 22 - .../netapp/generated/AccountsListSamples.java | 22 - .../generated/AccountsUpdateSamples.java | 38 - .../BackupPoliciesCreateSamples.java | 29 - .../BackupPoliciesDeleteSamples.java | 22 - .../generated/BackupPoliciesGetSamples.java | 22 - .../generated/BackupPoliciesListSamples.java | 22 - .../BackupPoliciesUpdateSamples.java | 31 - .../generated/BackupsCreateSamples.java | 26 - .../generated/BackupsDeleteSamples.java | 22 - .../netapp/generated/BackupsGetSamples.java | 22 - .../generated/BackupsGetStatusSamples.java | 22 - .../BackupsGetVolumeRestoreStatusSamples.java | 22 - .../netapp/generated/BackupsListSamples.java | 22 - .../generated/BackupsUpdateSamples.java | 28 - ...ourceCheckFilePathAvailabilitySamples.java | 31 - ...pResourceCheckNameAvailabilitySamples.java | 32 - ...ResourceCheckQuotaAvailabilitySamples.java | 32 - .../NetAppResourceQuotaLimitsGetSamples.java | 24 - .../NetAppResourceQuotaLimitsListSamples.java | 22 - .../generated/PoolsCreateOrUpdateSamples.java | 31 - .../netapp/generated/PoolsDeleteSamples.java | 22 - .../netapp/generated/PoolsGetSamples.java | 22 - .../netapp/generated/PoolsListSamples.java | 22 - .../netapp/generated/PoolsUpdateSamples.java | 24 - .../SnapshotPoliciesCreateSamples.java | 36 - .../SnapshotPoliciesDeleteSamples.java | 22 - .../generated/SnapshotPoliciesGetSamples.java | 22 - .../SnapshotPoliciesListSamples.java | 22 - .../SnapshotPoliciesListVolumesSamples.java | 22 - .../SnapshotPoliciesUpdateSamples.java | 41 - .../generated/SnapshotsCreateSamples.java | 25 - .../generated/SnapshotsDeleteSamples.java | 22 - .../netapp/generated/SnapshotsGetSamples.java | 22 - .../generated/SnapshotsListSamples.java | 22 - .../generated/SnapshotsUpdateSamples.java | 36 - .../netapp/generated/VaultsListSamples.java | 22 - .../generated/VolumeGroupsCreateSamples.java | 79 - .../generated/VolumeGroupsDeleteSamples.java | 22 - .../generated/VolumeGroupsGetSamples.java | 22 - ...olumeGroupsListByNetAppAccountSamples.java | 22 - .../VolumesAuthorizeReplicationSamples.java | 33 - .../VolumesBreakReplicationSamples.java | 31 - .../VolumesCreateOrUpdateSamples.java | 34 - .../VolumesDeleteReplicationSamples.java | 22 - .../generated/VolumesDeleteSamples.java | 22 - .../netapp/generated/VolumesGetSamples.java | 22 - .../netapp/generated/VolumesListSamples.java | 22 - .../generated/VolumesPoolChangeSamples.java | 33 - ...VolumesReInitializeReplicationSamples.java | 22 - .../VolumesReplicationStatusSamples.java | 22 - .../VolumesResyncReplicationSamples.java | 22 - .../generated/VolumesRevertSamples.java | 33 - .../generated/VolumesUpdateSamples.java | 25 - 255 files changed, 46682 deletions(-) delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/AccountBackupsClient.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/AccountsClient.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupPoliciesClient.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsClient.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceQuotaLimitsClient.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourcesClient.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/OperationsClient.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/PoolsClient.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotPoliciesClient.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotsClient.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VaultsClient.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeGroupsClient.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyInner.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyProperties.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CapacityPoolInner.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckAvailabilityResponseInner.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/MountTargetProperties.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationInner.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationProperties.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolPatchProperties.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolProperties.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationStatusInner.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RestoreStatusInner.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotInner.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyInner.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyProperties.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyVolumeListInner.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotProperties.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemInner.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemProperties.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VaultInner.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VaultProperties.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupDetailsInner.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupInner.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupListProperties.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupProperties.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/package-info.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/package-info.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountBackupsClientImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountBackupsImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesClientImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPolicyImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupStatusImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsClientImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CapacityPoolImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CheckAvailabilityResponseImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientBuilder.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsClientImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesClientImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/OperationImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsClientImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsClientImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationStatusImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RestoreStatusImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesClientImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyVolumeListImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsClientImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubscriptionQuotaItemImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/Utils.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VaultImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VaultsClientImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VaultsImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupDetailsImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsClientImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/package-info.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AccountBackups.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AccountEncryption.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Accounts.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectory.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryStatus.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ApplicationType.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AuthorizeRequest.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AvsDataStore.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backup.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicies.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPoliciesList.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicy.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicyPatch.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupStatus.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backups.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsList.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakReplicationRequest.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPool.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolList.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolPatch.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckAvailabilityResponse.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckNameResourceTypes.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckQuotaNameResourceTypes.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChownMode.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DailySchedule.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Dimension.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionType.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EndpointType.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExportPolicyRule.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/FilePathAvailabilityRequest.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/HourlySchedule.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/InAvailabilityReasonType.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LogSpecification.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricAggregationType.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricSpecification.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MirrorState.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MonthlySchedule.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountList.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceQuotaLimits.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppResources.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetworkFeatures.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Operation.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationDisplay.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationListResult.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Operations.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PlacementKeyValuePairs.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PoolChangeRequest.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Pools.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QosType.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QuotaAvailabilityRequest.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RelationshipStatus.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationSchedule.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationStatus.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ResourceNameAvailabilityRequest.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RestoreStatus.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecurityStyle.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceLevel.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceSpecification.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Snapshot.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicies.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPoliciesList.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicy.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyPatch.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyVolumeList.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Snapshots.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotsList.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItem.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItemList.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Vault.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VaultList.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Vaults.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volume.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupProperties.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackups.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroup.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupDetails.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupList.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupMetadata.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroups.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeList.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesExportPolicy.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesExportPolicy.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeRevert.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeSnapshotProperties.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeStorageToNetworkProximity.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/WeeklySchedule.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/package-info.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/package-info.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/main/java/module-info.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsDeleteSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsGetSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsListSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsCreateOrUpdateSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsDeleteSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetByResourceGroupSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListByResourceGroupSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsUpdateSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesUpdateSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsCreateSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsDeleteSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetStatusSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeRestoreStatusSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUpdateSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckFilePathAvailabilitySamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckNameAvailabilitySamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckQuotaAvailabilitySamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsDeleteSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsGetSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsListSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsUpdateSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListVolumesSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesUpdateSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsCreateSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsListSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VaultsListSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsCreateSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsGetSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsListByNetAppAccountSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOrUpdateSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesGetSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertSamples.java delete mode 100644 sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesUpdateSamples.java diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java deleted file mode 100644 index 0fad865db7de3..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java +++ /dev/null @@ -1,387 +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; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.HttpPipelinePosition; -import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.HttpLoggingPolicy; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.http.policy.HttpPolicyProviders; -import com.azure.core.http.policy.RequestIdPolicy; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Configuration; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.NetAppManagementClient; -import com.azure.resourcemanager.netapp.implementation.AccountBackupsImpl; -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.NetAppManagementClientBuilder; -import com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsImpl; -import com.azure.resourcemanager.netapp.implementation.NetAppResourcesImpl; -import com.azure.resourcemanager.netapp.implementation.OperationsImpl; -import com.azure.resourcemanager.netapp.implementation.PoolsImpl; -import com.azure.resourcemanager.netapp.implementation.SnapshotPoliciesImpl; -import com.azure.resourcemanager.netapp.implementation.SnapshotsImpl; -import com.azure.resourcemanager.netapp.implementation.VaultsImpl; -import com.azure.resourcemanager.netapp.implementation.VolumeGroupsImpl; -import com.azure.resourcemanager.netapp.implementation.VolumesImpl; -import com.azure.resourcemanager.netapp.models.AccountBackups; -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.NetAppResourceQuotaLimits; -import com.azure.resourcemanager.netapp.models.NetAppResources; -import com.azure.resourcemanager.netapp.models.Operations; -import com.azure.resourcemanager.netapp.models.Pools; -import com.azure.resourcemanager.netapp.models.SnapshotPolicies; -import com.azure.resourcemanager.netapp.models.Snapshots; -import com.azure.resourcemanager.netapp.models.Vaults; -import com.azure.resourcemanager.netapp.models.VolumeGroups; -import com.azure.resourcemanager.netapp.models.Volumes; -import java.time.Duration; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; - -/** Entry point to NetAppFilesManager. Microsoft NetApp Files Azure Resource Provider specification. */ -public final class NetAppFilesManager { - private Operations operations; - - private NetAppResources netAppResources; - - private NetAppResourceQuotaLimits netAppResourceQuotaLimits; - - private Accounts accounts; - - private Pools pools; - - private Volumes volumes; - - private Snapshots snapshots; - - private SnapshotPolicies snapshotPolicies; - - private Backups backups; - - private AccountBackups accountBackups; - - private BackupPolicies backupPolicies; - - private Vaults vaults; - - private VolumeGroups volumeGroups; - - 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(); - } - - /** - * Creates an instance of NetAppFiles service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the NetAppFiles service API instance. - */ - public static NetAppFilesManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return configure().authenticate(credential, profile); - } - - /** - * Gets a Configurable instance that can be used to create NetAppFilesManager with optional configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new NetAppFilesManager.Configurable(); - } - - /** The Configurable allowing configurations to be set. */ - public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); - - private HttpClient httpClient; - private HttpLogOptions httpLogOptions; - private final List policies = new ArrayList<>(); - private final List scopes = new ArrayList<>(); - private RetryPolicy retryPolicy; - private Duration defaultPollInterval; - - private Configurable() { - } - - /** - * Sets the http client. - * - * @param httpClient the HTTP client. - * @return the configurable object itself. - */ - public Configurable withHttpClient(HttpClient httpClient) { - this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); - return this; - } - - /** - * Sets the logging options to the HTTP pipeline. - * - * @param httpLogOptions the HTTP log options. - * @return the configurable object itself. - */ - public Configurable withLogOptions(HttpLogOptions httpLogOptions) { - this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); - return this; - } - - /** - * Adds the pipeline policy to the HTTP pipeline. - * - * @param policy the HTTP pipeline policy. - * @return the configurable object itself. - */ - public Configurable withPolicy(HttpPipelinePolicy policy) { - this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); - return this; - } - - /** - * Adds the scope to permission sets. - * - * @param scope the scope. - * @return the configurable object itself. - */ - public Configurable withScope(String scope) { - this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); - return this; - } - - /** - * Sets the retry policy to the HTTP pipeline. - * - * @param retryPolicy the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); - return this; - } - - /** - * Sets the default poll interval, used when service does not provide "Retry-After" header. - * - * @param defaultPollInterval the default poll interval. - * @return the configurable object itself. - */ - public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); - if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); - } - return this; - } - - /** - * Creates an instance of NetAppFiles service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the NetAppFiles service API instance. - */ - public NetAppFilesManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - - StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.netapp") - .append("/") - .append("1.0.0-beta.7"); - 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)"); - } else { - userAgentBuilder.append(" (auto-generated)"); - } - - if (scopes.isEmpty()) { - scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); - } - if (retryPolicy == null) { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); - } - List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(userAgentBuilder.toString())); - policies.add(new RequestIdPolicy()); - 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())); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); - return new NetAppFilesManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** @return Resource collection API of Operations. */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** @return Resource collection API of NetAppResources. */ - public NetAppResources netAppResources() { - if (this.netAppResources == null) { - this.netAppResources = new NetAppResourcesImpl(clientObject.getNetAppResources(), this); - } - return netAppResources; - } - - /** @return Resource collection API of NetAppResourceQuotaLimits. */ - public NetAppResourceQuotaLimits netAppResourceQuotaLimits() { - if (this.netAppResourceQuotaLimits == null) { - this.netAppResourceQuotaLimits = - new NetAppResourceQuotaLimitsImpl(clientObject.getNetAppResourceQuotaLimits(), this); - } - return netAppResourceQuotaLimits; - } - - /** @return Resource collection API of Accounts. */ - public Accounts accounts() { - if (this.accounts == null) { - this.accounts = new AccountsImpl(clientObject.getAccounts(), this); - } - return accounts; - } - - /** @return Resource collection API of Pools. */ - public Pools pools() { - if (this.pools == null) { - this.pools = new PoolsImpl(clientObject.getPools(), this); - } - return pools; - } - - /** @return Resource collection API of Volumes. */ - public Volumes volumes() { - if (this.volumes == null) { - this.volumes = new VolumesImpl(clientObject.getVolumes(), this); - } - return volumes; - } - - /** @return Resource collection API of Snapshots. */ - public Snapshots snapshots() { - if (this.snapshots == null) { - this.snapshots = new SnapshotsImpl(clientObject.getSnapshots(), this); - } - return snapshots; - } - - /** @return Resource collection API of SnapshotPolicies. */ - public SnapshotPolicies snapshotPolicies() { - if (this.snapshotPolicies == null) { - this.snapshotPolicies = new SnapshotPoliciesImpl(clientObject.getSnapshotPolicies(), this); - } - return snapshotPolicies; - } - - /** @return Resource collection API of Backups. */ - public Backups backups() { - if (this.backups == null) { - this.backups = new BackupsImpl(clientObject.getBackups(), this); - } - return backups; - } - - /** @return Resource collection API of AccountBackups. */ - public AccountBackups accountBackups() { - if (this.accountBackups == null) { - this.accountBackups = new AccountBackupsImpl(clientObject.getAccountBackups(), this); - } - return accountBackups; - } - - /** @return Resource collection API of BackupPolicies. */ - public BackupPolicies backupPolicies() { - if (this.backupPolicies == null) { - this.backupPolicies = new BackupPoliciesImpl(clientObject.getBackupPolicies(), this); - } - return backupPolicies; - } - - /** @return Resource collection API of Vaults. */ - public Vaults vaults() { - if (this.vaults == null) { - this.vaults = new VaultsImpl(clientObject.getVaults(), this); - } - return vaults; - } - - /** @return Resource collection API of VolumeGroups. */ - public VolumeGroups volumeGroups() { - if (this.volumeGroups == null) { - this.volumeGroups = new VolumeGroupsImpl(clientObject.getVolumeGroups(), this); - } - return volumeGroups; - } - - /** - * @return Wrapped service client NetAppManagementClient providing direct access to the underlying auto-generated - * API implementation, based on Azure REST API. - */ - public NetAppManagementClient serviceClient() { - return this.clientObject; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/AccountBackupsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/AccountBackupsClient.java deleted file mode 100644 index e8e6f27fac636..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/AccountBackupsClient.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.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.BackupInner; - -/** An instance of this class provides access to all the operations defined in AccountBackupsClient. */ -public interface AccountBackupsClient { - /** - * List all Backups for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Backups. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName); - - /** - * List all Backups for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Backups. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName, Context context); - - /** - * Gets the specified backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 for a Netapp Account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupInner get(String resourceGroupName, String accountName, String backupName); - - /** - * Gets the specified backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 for a Netapp Account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String accountName, String backupName, Context context); - - /** - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String backupName); - - /** - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String backupName, Context context); - - /** - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 backupName); - - /** - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 backupName, Context context); -} 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 deleted file mode 100644 index 983803ff4286a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/AccountsClient.java +++ /dev/null @@ -1,266 +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.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.NetAppAccountInner; -import com.azure.resourcemanager.netapp.models.NetAppAccountPatch; - -/** An instance of this class provides access to all the operations defined in AccountsClient. */ -public interface AccountsClient { - /** - * List and describe all NetApp accounts in the subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetApp account resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List and describe all NetApp accounts in the subscription. - * - * @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 NetApp account resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * List and describe all NetApp accounts in the resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 NetApp account resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List and describe all NetApp accounts in the resource group. - * - * @param resourceGroupName The name of the resource group. - * @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 NetApp account resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get the NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 NetApp account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetAppAccountInner getByResourceGroup(String resourceGroupName, String accountName); - - /** - * Get the NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 NetApp account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String accountName, Context context); - - /** - * Create or update the specified NetApp account within the resource group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetAppAccountInner> beginCreateOrUpdate( - String resourceGroupName, String accountName, NetAppAccountInner body); - - /** - * Create or update the specified NetApp account within the resource group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetAppAccountInner> beginCreateOrUpdate( - String resourceGroupName, String accountName, NetAppAccountInner body, Context context); - - /** - * Create or update the specified NetApp account within the resource group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetAppAccountInner createOrUpdate(String resourceGroupName, String accountName, NetAppAccountInner body); - - /** - * Create or update the specified NetApp account within the resource group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetAppAccountInner createOrUpdate( - String resourceGroupName, String accountName, NetAppAccountInner body, Context context); - - /** - * Delete the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String accountName); - - /** - * Delete the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, Context context); - - /** - * Delete the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 delete(String resourceGroupName, String accountName); - - /** - * Delete the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 delete(String resourceGroupName, String accountName, Context context); - - /** - * Patch the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetAppAccountInner> beginUpdate( - String resourceGroupName, String accountName, NetAppAccountPatch body); - - /** - * Patch the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetAppAccountInner> beginUpdate( - String resourceGroupName, String accountName, NetAppAccountPatch body, Context context); - - /** - * Patch the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetAppAccountInner update(String resourceGroupName, String accountName, NetAppAccountPatch body); - - /** - * Patch the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetAppAccountInner update(String resourceGroupName, String accountName, NetAppAccountPatch body, Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupPoliciesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupPoliciesClient.java deleted file mode 100644 index 22a37ebfac990..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupPoliciesClient.java +++ /dev/null @@ -1,265 +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.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.BackupPolicyInner; -import com.azure.resourcemanager.netapp.models.BackupPolicyPatch; - -/** An instance of this class provides access to all the operations defined in BackupPoliciesClient. */ -public interface BackupPoliciesClient { - /** - * List backup policies for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Policies. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName); - - /** - * List backup policies for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Policies. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName, Context context); - - /** - * Get a particular backup Policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 a particular backup Policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupPolicyInner get(String resourceGroupName, String accountName, String backupPolicyName); - - /** - * Get a particular backup Policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @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 a particular backup Policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String accountName, String backupPolicyName, Context context); - - /** - * Create a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BackupPolicyInner> beginCreate( - String resourceGroupName, String accountName, String backupPolicyName, BackupPolicyInner body); - - /** - * Create a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BackupPolicyInner> beginCreate( - String resourceGroupName, String accountName, String backupPolicyName, BackupPolicyInner body, Context context); - - /** - * Create a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupPolicyInner create( - String resourceGroupName, String accountName, String backupPolicyName, BackupPolicyInner body); - - /** - * Create a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupPolicyInner create( - String resourceGroupName, String accountName, String backupPolicyName, BackupPolicyInner body, Context context); - - /** - * Patch a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BackupPolicyInner> beginUpdate( - String resourceGroupName, String accountName, String backupPolicyName, BackupPolicyPatch body); - - /** - * Patch a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BackupPolicyInner> beginUpdate( - String resourceGroupName, String accountName, String backupPolicyName, BackupPolicyPatch body, Context context); - - /** - * Patch a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupPolicyInner update( - String resourceGroupName, String accountName, String backupPolicyName, BackupPolicyPatch body); - - /** - * Patch a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupPolicyInner update( - String resourceGroupName, String accountName, String backupPolicyName, BackupPolicyPatch body, Context context); - - /** - * Delete backup policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String backupPolicyName); - - /** - * Delete backup policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String backupPolicyName, Context context); - - /** - * Delete backup policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 backupPolicyName); - - /** - * Delete backup policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @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 backupPolicyName, 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 deleted file mode 100644 index 7315362cba49f..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsClient.java +++ /dev/null @@ -1,443 +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.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.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 the status of the backup for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of the backup for a volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupStatusInner getStatus(String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Get the status of the backup for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of the backup for a volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getStatusWithResponse( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * Get the status of the restore for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of the restore for a volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RestoreStatusInner getVolumeRestoreStatus( - String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Get the status of the restore for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of the restore for a volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getVolumeRestoreStatusWithResponse( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * List all backups for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Backups. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * List all backups for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Backups. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * Gets the specified backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of the volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupInner get( - String resourceGroupName, String accountName, String poolName, String volumeName, String backupName); - - /** - * Gets the specified backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of the volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - Context context); - - /** - * Create a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BackupInner> beginCreate( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupInner body); - - /** - * Create a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BackupInner> beginCreate( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupInner body, - Context context); - - /** - * Create a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupInner create( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupInner body); - - /** - * Create a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupInner create( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupInner body, - Context context); - - /** - * Patch a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BackupInner> beginUpdate( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupPatch body); - - /** - * Patch a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BackupInner> beginUpdate( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupPatch body, - Context context); - - /** - * Patch a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupInner update( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupPatch body); - - /** - * Patch a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupInner update( - String resourceGroupName, String accountName, String poolName, String volumeName, String backupName); - - /** - * Patch a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupInner update( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupPatch body, - Context context); - - /** - * Delete a backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String poolName, String volumeName, String backupName); - - /** - * Delete a backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - Context context); - - /** - * Delete a backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 poolName, String volumeName, String backupName); - - /** - * Delete a backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 poolName, - String volumeName, - String backupName, - 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 deleted file mode 100644 index 72180430fb963..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java +++ /dev/null @@ -1,138 +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.fluent; - -import com.azure.core.http.HttpPipeline; -import java.time.Duration; - -/** The interface for NetAppManagementClient class. */ -public interface NetAppManagementClient { - /** - * Gets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms - * part of the URI for every service call. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - String getEndpoint(); - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - String getApiVersion(); - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - HttpPipeline getHttpPipeline(); - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - Duration getDefaultPollInterval(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the NetAppResourcesClient object to access its operations. - * - * @return the NetAppResourcesClient object. - */ - NetAppResourcesClient getNetAppResources(); - - /** - * Gets the NetAppResourceQuotaLimitsClient object to access its operations. - * - * @return the NetAppResourceQuotaLimitsClient object. - */ - NetAppResourceQuotaLimitsClient getNetAppResourceQuotaLimits(); - - /** - * Gets the AccountsClient object to access its operations. - * - * @return the AccountsClient object. - */ - AccountsClient getAccounts(); - - /** - * Gets the PoolsClient object to access its operations. - * - * @return the PoolsClient object. - */ - PoolsClient getPools(); - - /** - * Gets the VolumesClient object to access its operations. - * - * @return the VolumesClient object. - */ - VolumesClient getVolumes(); - - /** - * Gets the SnapshotsClient object to access its operations. - * - * @return the SnapshotsClient object. - */ - SnapshotsClient getSnapshots(); - - /** - * Gets the SnapshotPoliciesClient object to access its operations. - * - * @return the SnapshotPoliciesClient object. - */ - SnapshotPoliciesClient getSnapshotPolicies(); - - /** - * Gets the BackupsClient object to access its operations. - * - * @return the BackupsClient object. - */ - BackupsClient getBackups(); - - /** - * Gets the AccountBackupsClient object to access its operations. - * - * @return the AccountBackupsClient object. - */ - AccountBackupsClient getAccountBackups(); - - /** - * Gets the BackupPoliciesClient object to access its operations. - * - * @return the BackupPoliciesClient object. - */ - BackupPoliciesClient getBackupPolicies(); - - /** - * Gets the VaultsClient object to access its operations. - * - * @return the VaultsClient object. - */ - VaultsClient getVaults(); - - /** - * Gets the VolumeGroupsClient object to access its operations. - * - * @return the VolumeGroupsClient object. - */ - VolumeGroupsClient getVolumeGroups(); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceQuotaLimitsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceQuotaLimitsClient.java deleted file mode 100644 index a619a31c06773..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceQuotaLimitsClient.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.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.SubscriptionQuotaItemInner; - -/** An instance of this class provides access to all the operations defined in NetAppResourceQuotaLimitsClient. */ -public interface NetAppResourceQuotaLimitsClient { - /** - * Get the default and current limits for quotas. - * - * @param location The location. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 default and current limits for quotas. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location); - - /** - * Get the default and current limits for quotas. - * - * @param location The location. - * @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 default and current limits for quotas. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location, Context context); - - /** - * Get the default and current subscription quota limit. - * - * @param location The location. - * @param quotaLimitName The name of the Quota Limit. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 default and current subscription quota limit. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SubscriptionQuotaItemInner get(String location, String quotaLimitName); - - /** - * Get the default and current subscription quota limit. - * - * @param location The location. - * @param quotaLimitName The name of the Quota Limit. - * @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 default and current subscription quota limit. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String location, String quotaLimitName, Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourcesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourcesClient.java deleted file mode 100644 index 70423da8c5bc2..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourcesClient.java +++ /dev/null @@ -1,101 +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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.netapp.fluent.models.CheckAvailabilityResponseInner; -import com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest; -import com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest; -import com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest; - -/** An instance of this class provides access to all the operations defined in NetAppResourcesClient. */ -public interface NetAppResourcesClient { - /** - * Check if a resource name is available. - * - * @param location The location. - * @param body Name availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CheckAvailabilityResponseInner checkNameAvailability(String location, ResourceNameAvailabilityRequest body); - - /** - * Check if a resource name is available. - * - * @param location The location. - * @param body Name availability request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response checkNameAvailabilityWithResponse( - String location, ResourceNameAvailabilityRequest body, Context context); - - /** - * Check if a file path is available. - * - * @param location The location. - * @param body File path availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CheckAvailabilityResponseInner checkFilePathAvailability(String location, FilePathAvailabilityRequest body); - - /** - * Check if a file path is available. - * - * @param location The location. - * @param body File path availability request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response checkFilePathAvailabilityWithResponse( - String location, FilePathAvailabilityRequest body, Context context); - - /** - * Check if a quota is available. - * - * @param location The location. - * @param body Quota availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CheckAvailabilityResponseInner checkQuotaAvailability(String location, QuotaAvailabilityRequest body); - - /** - * Check if a quota is available. - * - * @param location The location. - * @param body Quota availability request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response checkQuotaAvailabilityWithResponse( - String location, QuotaAvailabilityRequest body, Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/OperationsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/OperationsClient.java deleted file mode 100644 index a894048f61e28..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/OperationsClient.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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.netapp.fluent.models.OperationInner; - -/** An instance of this class provides access to all the operations defined in OperationsClient. */ -public interface OperationsClient { - /** - * Lists all of the available Microsoft.NetApp Rest API operations. - * - * @throws com.azure.core.management.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 result of the request to list Cloud Volume operations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists all of the available Microsoft.NetApp Rest API operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Cloud Volume operations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/PoolsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/PoolsClient.java deleted file mode 100644 index 9cf02121a0892..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/PoolsClient.java +++ /dev/null @@ -1,263 +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.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.CapacityPoolInner; -import com.azure.resourcemanager.netapp.models.CapacityPoolPatch; - -/** An instance of this class provides access to all the operations defined in PoolsClient. */ -public interface PoolsClient { - /** - * List all capacity pools in the NetApp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 capacity pool resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName); - - /** - * List all capacity pools in the NetApp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 capacity pool resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName, Context context); - - /** - * Get details of the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified capacity pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CapacityPoolInner get(String resourceGroupName, String accountName, String poolName); - - /** - * Get details of the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified capacity pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String accountName, String poolName, Context context); - - /** - * Create or Update a capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CapacityPoolInner> beginCreateOrUpdate( - String resourceGroupName, String accountName, String poolName, CapacityPoolInner body); - - /** - * Create or Update a capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CapacityPoolInner> beginCreateOrUpdate( - String resourceGroupName, String accountName, String poolName, CapacityPoolInner body, Context context); - - /** - * Create or Update a capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CapacityPoolInner createOrUpdate( - String resourceGroupName, String accountName, String poolName, CapacityPoolInner body); - - /** - * Create or Update a capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CapacityPoolInner createOrUpdate( - String resourceGroupName, String accountName, String poolName, CapacityPoolInner body, Context context); - - /** - * Patch the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CapacityPoolInner> beginUpdate( - String resourceGroupName, String accountName, String poolName, CapacityPoolPatch body); - - /** - * Patch the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CapacityPoolInner> beginUpdate( - String resourceGroupName, String accountName, String poolName, CapacityPoolPatch body, Context context); - - /** - * Patch the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CapacityPoolInner update(String resourceGroupName, String accountName, String poolName, CapacityPoolPatch body); - - /** - * Patch the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CapacityPoolInner update( - String resourceGroupName, String accountName, String poolName, CapacityPoolPatch body, Context context); - - /** - * Delete the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String poolName); - - /** - * Delete the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String poolName, Context context); - - /** - * Delete the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String poolName); - - /** - * Delete the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String poolName, Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotPoliciesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotPoliciesClient.java deleted file mode 100644 index 2a2cb79317a7b..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotPoliciesClient.java +++ /dev/null @@ -1,275 +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.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.SnapshotPolicyInner; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyVolumeListInner; -import com.azure.resourcemanager.netapp.models.SnapshotPolicyPatch; - -/** An instance of this class provides access to all the operations defined in SnapshotPoliciesClient. */ -public interface SnapshotPoliciesClient { - /** - * List snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @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 Snapshot Policies. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName); - - /** - * List snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @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 Snapshot Policies. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName, Context context); - - /** - * Get a snapshot Policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 a snapshot Policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SnapshotPolicyInner get(String resourceGroupName, String accountName, String snapshotPolicyName); - - /** - * Get a snapshot Policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @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 a snapshot Policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String accountName, String snapshotPolicyName, Context context); - - /** - * Create a snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param body Snapshot policy 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 snapshot policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SnapshotPolicyInner create( - String resourceGroupName, String accountName, String snapshotPolicyName, SnapshotPolicyInner body); - - /** - * Create a snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param body Snapshot policy 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 snapshot policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, - String accountName, - String snapshotPolicyName, - SnapshotPolicyInner body, - Context context); - - /** - * Patch a snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param body Snapshot policy 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 snapshot policy information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SnapshotPolicyInner> beginUpdate( - String resourceGroupName, String accountName, String snapshotPolicyName, SnapshotPolicyPatch body); - - /** - * Patch a snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param body Snapshot policy 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 snapshot policy information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SnapshotPolicyInner> beginUpdate( - String resourceGroupName, - String accountName, - String snapshotPolicyName, - SnapshotPolicyPatch body, - Context context); - - /** - * Patch a snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param body Snapshot policy 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 snapshot policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SnapshotPolicyInner update( - String resourceGroupName, String accountName, String snapshotPolicyName, SnapshotPolicyPatch body); - - /** - * Patch a snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param body Snapshot policy 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 snapshot policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SnapshotPolicyInner update( - String resourceGroupName, - String accountName, - String snapshotPolicyName, - SnapshotPolicyPatch body, - Context context); - - /** - * Delete snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String snapshotPolicyName); - - /** - * Delete snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String snapshotPolicyName, Context context); - - /** - * Delete snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 snapshotPolicyName); - - /** - * Delete snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @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 snapshotPolicyName, Context context); - - /** - * Get volumes associated with snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 volumes associated with snapshot policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SnapshotPolicyVolumeListInner listVolumes(String resourceGroupName, String accountName, String snapshotPolicyName); - - /** - * Get volumes associated with snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @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 volumes associated with snapshot policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listVolumesWithResponse( - String resourceGroupName, String accountName, String snapshotPolicyName, Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotsClient.java deleted file mode 100644 index 01063b085d242..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotsClient.java +++ /dev/null @@ -1,358 +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.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.SnapshotInner; - -/** An instance of this class provides access to all the operations defined in SnapshotsClient. */ -public interface SnapshotsClient { - /** - * List all snapshots associated with the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Snapshots. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * List all snapshots associated with the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Snapshots. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * Get details of the specified snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified snapshot. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SnapshotInner get( - String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName); - - /** - * Get details of the specified snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified snapshot. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Context context); - - /** - * Create the specified snapshot within the given volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SnapshotInner> beginCreate( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - SnapshotInner body); - - /** - * Create the specified snapshot within the given volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SnapshotInner> beginCreate( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - SnapshotInner body, - Context context); - - /** - * Create the specified snapshot within the given volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SnapshotInner create( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - SnapshotInner body); - - /** - * Create the specified snapshot within the given volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SnapshotInner create( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - SnapshotInner body, - Context context); - - /** - * Patch a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SnapshotInner> beginUpdate( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Object body); - - /** - * Patch a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SnapshotInner> beginUpdate( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Object body, - Context context); - - /** - * Patch a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SnapshotInner update( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Object body); - - /** - * Patch a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SnapshotInner update( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Object body, - Context context); - - /** - * Delete snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName); - - /** - * Delete snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Context context); - - /** - * Delete snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName); - - /** - * Delete snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VaultsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VaultsClient.java deleted file mode 100644 index e654be3034623..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VaultsClient.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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.netapp.fluent.models.VaultInner; - -/** An instance of this class provides access to all the operations defined in VaultsClient. */ -public interface VaultsClient { - /** - * List vaults for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Vaults. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName); - - /** - * List vaults for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Vaults. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName, Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeGroupsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeGroupsClient.java deleted file mode 100644 index 117fc6dbf7260..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeGroupsClient.java +++ /dev/null @@ -1,207 +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.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.VolumeGroupDetailsInner; -import com.azure.resourcemanager.netapp.fluent.models.VolumeGroupInner; - -/** An instance of this class provides access to all the operations defined in VolumeGroupsClient. */ -public interface VolumeGroupsClient { - /** - * List all volume groups for given account. - * - * @param resourceGroupName The name of the resource group. - * @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 volume group resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByNetAppAccount(String resourceGroupName, String accountName); - - /** - * List all volume groups for given account. - * - * @param resourceGroupName The name of the resource group. - * @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 volume group resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByNetAppAccount(String resourceGroupName, String accountName, Context context); - - /** - * Get details of the specified volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified volume group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VolumeGroupDetailsInner get(String resourceGroupName, String accountName, String volumeGroupName); - - /** - * Get details of the specified volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified volume group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String accountName, String volumeGroupName, Context context); - - /** - * Create a volume group along with specified volumes. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param body Volume Group 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 volume group resource for create. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VolumeGroupDetailsInner> beginCreate( - String resourceGroupName, String accountName, String volumeGroupName, VolumeGroupDetailsInner body); - - /** - * Create a volume group along with specified volumes. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param body Volume Group 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 volume group resource for create. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VolumeGroupDetailsInner> beginCreate( - String resourceGroupName, - String accountName, - String volumeGroupName, - VolumeGroupDetailsInner body, - Context context); - - /** - * Create a volume group along with specified volumes. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param body Volume Group 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 volume group resource for create. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VolumeGroupDetailsInner create( - String resourceGroupName, String accountName, String volumeGroupName, VolumeGroupDetailsInner body); - - /** - * Create a volume group along with specified volumes. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param body Volume Group 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 volume group resource for create. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VolumeGroupDetailsInner create( - String resourceGroupName, - String accountName, - String volumeGroupName, - VolumeGroupDetailsInner body, - Context context); - - /** - * Delete the specified volume group only if there are no volumes under volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String volumeGroupName); - - /** - * Delete the specified volume group only if there are no volumes under volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String volumeGroupName, Context context); - - /** - * Delete the specified volume group only if there are no volumes under volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 volumeGroupName); - - /** - * Delete the specified volume group only if there are no volumes under volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @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 volumeGroupName, Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java deleted file mode 100644 index 6b6ec426d65b0..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java +++ /dev/null @@ -1,857 +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.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.ReplicationStatusInner; -import com.azure.resourcemanager.netapp.fluent.models.VolumeInner; -import com.azure.resourcemanager.netapp.models.AuthorizeRequest; -import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; -import com.azure.resourcemanager.netapp.models.PoolChangeRequest; -import com.azure.resourcemanager.netapp.models.VolumePatch; -import com.azure.resourcemanager.netapp.models.VolumeRevert; - -/** An instance of this class provides access to all the operations defined in VolumesClient. */ -public interface VolumesClient { - /** - * List all volumes within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of volume resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName, String poolName); - - /** - * List all volumes within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of volume resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName, String poolName, Context context); - - /** - * Get the details of the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VolumeInner get(String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Get the details of the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * Create or update the specified volume within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VolumeInner> beginCreateOrUpdate( - String resourceGroupName, String accountName, String poolName, String volumeName, VolumeInner body); - - /** - * Create or update the specified volume within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VolumeInner> beginCreateOrUpdate( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumeInner body, - Context context); - - /** - * Create or update the specified volume within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VolumeInner createOrUpdate( - String resourceGroupName, String accountName, String poolName, String volumeName, VolumeInner body); - - /** - * Create or update the specified volume within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VolumeInner createOrUpdate( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumeInner body, - Context context); - - /** - * Patch the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VolumeInner> beginUpdate( - String resourceGroupName, String accountName, String poolName, String volumeName, VolumePatch body); - - /** - * Patch the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VolumeInner> beginUpdate( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumePatch body, - Context context); - - /** - * Patch the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VolumeInner update( - String resourceGroupName, String accountName, String poolName, String volumeName, VolumePatch body); - - /** - * Patch the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VolumeInner update( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumePatch body, - Context context); - - /** - * Delete the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Delete the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * Delete the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Delete the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * Revert a volume to the snapshot specified in the body. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Object for snapshot to revert 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRevert( - String resourceGroupName, String accountName, String poolName, String volumeName, VolumeRevert body); - - /** - * Revert a volume to the snapshot specified in the body. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Object for snapshot to revert 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRevert( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumeRevert body, - Context context); - - /** - * Revert a volume to the snapshot specified in the body. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Object for snapshot to revert 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 revert(String resourceGroupName, String accountName, String poolName, String volumeName, VolumeRevert body); - - /** - * Revert a volume to the snapshot specified in the body. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Object for snapshot to revert 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 revert( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumeRevert body, - Context context); - - /** - * Break the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginBreakReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, BreakReplicationRequest body); - - /** - * Break the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginBreakReplication( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - BreakReplicationRequest body, - Context context); - - /** - * Break the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 breakReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, BreakReplicationRequest body); - - /** - * Break the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 breakReplication(String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Break the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 breakReplication( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - BreakReplicationRequest body, - Context context); - - /** - * Get the status of the replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 replication. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationStatusInner replicationStatus( - String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Get the status of the replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 replication. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response replicationStatusWithResponse( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginResyncReplication( - String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginResyncReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void resyncReplication(String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 resyncReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * Delete the replication connection on the destination volume, and send release to the source replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteReplication( - String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Delete the replication connection on the destination volume, and send release to the source replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * Delete the replication connection on the destination volume, and send release to the source replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 deleteReplication(String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Delete the replication connection on the destination volume, and send release to the source replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 deleteReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * Authorize the replication connection on the source volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginAuthorizeReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, AuthorizeRequest body); - - /** - * Authorize the replication connection on the source volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginAuthorizeReplication( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - AuthorizeRequest body, - Context context); - - /** - * Authorize the replication connection on the source volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 authorizeReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, AuthorizeRequest body); - - /** - * Authorize the replication connection on the source volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 authorizeReplication( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - AuthorizeRequest body, - Context context); - - /** - * Re-Initializes the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginReInitializeReplication( - String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Re-Initializes the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginReInitializeReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * Re-Initializes the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 reInitializeReplication(String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Re-Initializes the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 reInitializeReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * Moves volume to another pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPoolChange( - String resourceGroupName, String accountName, String poolName, String volumeName, PoolChangeRequest body); - - /** - * Moves volume to another pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPoolChange( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - PoolChangeRequest body, - Context context); - - /** - * Moves volume to another pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 poolChange( - String resourceGroupName, String accountName, String poolName, String volumeName, PoolChangeRequest body); - - /** - * Moves volume to another pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 poolChange( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - PoolChangeRequest body, - Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java deleted file mode 100644 index 742cb02e4c7c0..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java +++ /dev/null @@ -1,100 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.AccountEncryption; -import com.azure.resourcemanager.netapp.models.ActiveDirectory; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** NetApp account properties. */ -@Fluent -public final class AccountProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountProperties.class); - - /* - * Azure lifecycle management - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /* - * Active Directories - */ - @JsonProperty(value = "activeDirectories") - private List activeDirectories; - - /* - * Encryption settings - */ - @JsonProperty(value = "encryption") - private AccountEncryption encryption; - - /** - * Get the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the activeDirectories property: Active Directories. - * - * @return the activeDirectories value. - */ - public List activeDirectories() { - return this.activeDirectories; - } - - /** - * Set the activeDirectories property: Active Directories. - * - * @param activeDirectories the activeDirectories value to set. - * @return the AccountProperties object itself. - */ - public AccountProperties withActiveDirectories(List activeDirectories) { - this.activeDirectories = activeDirectories; - return this; - } - - /** - * Get the encryption property: Encryption settings. - * - * @return the encryption value. - */ - public AccountEncryption encryption() { - return this.encryption; - } - - /** - * Set the encryption property: Encryption settings. - * - * @param encryption the encryption value to set. - * @return the AccountProperties object itself. - */ - public AccountProperties withEncryption(AccountEncryption encryption) { - this.encryption = encryption; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (activeDirectories() != null) { - activeDirectories().forEach(e -> e.validate()); - } - if (encryption() != null) { - encryption().validate(); - } - } -} 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 deleted file mode 100644 index 0882880be3555..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java +++ /dev/null @@ -1,191 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.BackupType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Backup of a Volume. */ -@Fluent -public final class BackupInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupInner.class); - - /* - * Resource location - */ - @JsonProperty(value = "location", required = true) - private String location; - - /* - * Backup Properties - */ - @JsonProperty(value = "properties", required = true) - private BackupProperties innerProperties = new BackupProperties(); - - /** - * Get the location property: Resource location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource location. - * - * @param location the location value to set. - * @return the BackupInner object itself. - */ - public BackupInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the innerProperties property: Backup Properties. - * - * @return the innerProperties value. - */ - private BackupProperties innerProperties() { - return this.innerProperties; - } - - /** - * 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: name 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. - * - * @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 volumeName property: Volume name. - * - * @return the volumeName value. - */ - public String volumeName() { - return this.innerProperties() == null ? null : this.innerProperties().volumeName(); - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (location() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property location in model BackupInner")); - } - if (innerProperties() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property innerProperties in model BackupInner")); - } else { - innerProperties().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 deleted file mode 100644 index 0c28a037d31f3..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyInner.java +++ /dev/null @@ -1,208 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.VolumeBackups; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** Backup policy information. */ -@Fluent -public final class BackupPolicyInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupPolicyInner.class); - - /* - * A unique read-only string that changes whenever the resource is updated. - */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; - - /* - * Backup policy Properties - */ - @JsonProperty(value = "properties", required = true) - private BackupPolicyProperties innerProperties = new BackupPolicyProperties(); - - /** - * Get the etag property: A unique read-only string that changes whenever the resource is updated. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Get the innerProperties property: Backup policy Properties. - * - * @return the innerProperties value. - */ - private BackupPolicyProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public BackupPolicyInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public BackupPolicyInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the backupPolicyId property: Backup Policy Resource ID. - * - * @return the backupPolicyId value. - */ - public String backupPolicyId() { - return this.innerProperties() == null ? null : this.innerProperties().backupPolicyId(); - } - - /** - * Get the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the dailyBackupsToKeep property: Daily backups count to keep. - * - * @return the dailyBackupsToKeep value. - */ - public Integer dailyBackupsToKeep() { - return this.innerProperties() == null ? null : this.innerProperties().dailyBackupsToKeep(); - } - - /** - * Set the dailyBackupsToKeep property: Daily backups count to keep. - * - * @param dailyBackupsToKeep the dailyBackupsToKeep value to set. - * @return the BackupPolicyInner object itself. - */ - public BackupPolicyInner withDailyBackupsToKeep(Integer dailyBackupsToKeep) { - if (this.innerProperties() == null) { - this.innerProperties = new BackupPolicyProperties(); - } - this.innerProperties().withDailyBackupsToKeep(dailyBackupsToKeep); - return this; - } - - /** - * Get the weeklyBackupsToKeep property: Weekly backups count to keep. - * - * @return the weeklyBackupsToKeep value. - */ - public Integer weeklyBackupsToKeep() { - return this.innerProperties() == null ? null : this.innerProperties().weeklyBackupsToKeep(); - } - - /** - * Set the weeklyBackupsToKeep property: Weekly backups count to keep. - * - * @param weeklyBackupsToKeep the weeklyBackupsToKeep value to set. - * @return the BackupPolicyInner object itself. - */ - public BackupPolicyInner withWeeklyBackupsToKeep(Integer weeklyBackupsToKeep) { - if (this.innerProperties() == null) { - this.innerProperties = new BackupPolicyProperties(); - } - this.innerProperties().withWeeklyBackupsToKeep(weeklyBackupsToKeep); - return this; - } - - /** - * Get the monthlyBackupsToKeep property: Monthly backups count to keep. - * - * @return the monthlyBackupsToKeep value. - */ - public Integer monthlyBackupsToKeep() { - return this.innerProperties() == null ? null : this.innerProperties().monthlyBackupsToKeep(); - } - - /** - * Set the monthlyBackupsToKeep property: Monthly backups count to keep. - * - * @param monthlyBackupsToKeep the monthlyBackupsToKeep value to set. - * @return the BackupPolicyInner object itself. - */ - public BackupPolicyInner withMonthlyBackupsToKeep(Integer monthlyBackupsToKeep) { - if (this.innerProperties() == null) { - this.innerProperties = new BackupPolicyProperties(); - } - this.innerProperties().withMonthlyBackupsToKeep(monthlyBackupsToKeep); - return this; - } - - /** - * Get the volumesAssigned property: Volumes using current backup policy. - * - * @return the volumesAssigned value. - */ - public Integer volumesAssigned() { - return this.innerProperties() == null ? null : this.innerProperties().volumesAssigned(); - } - - /** - * Get the enabled property: The property to decide policy is enabled or not. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.innerProperties() == null ? null : this.innerProperties().enabled(); - } - - /** - * Set the enabled property: The property to decide policy is enabled or not. - * - * @param enabled the enabled value to set. - * @return the BackupPolicyInner object itself. - */ - public BackupPolicyInner withEnabled(Boolean enabled) { - if (this.innerProperties() == null) { - this.innerProperties = new BackupPolicyProperties(); - } - this.innerProperties().withEnabled(enabled); - return this; - } - - /** - * Get the volumeBackups property: A list of volumes assigned to this policy. - * - * @return the volumeBackups value. - */ - public List volumeBackups() { - return this.innerProperties() == null ? null : this.innerProperties().volumeBackups(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw logger - .logExceptionAsError( - 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/BackupPolicyProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyProperties.java deleted file mode 100644 index 493e91eaa8766..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyProperties.java +++ /dev/null @@ -1,193 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.VolumeBackups; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Backup policy properties. */ -@Fluent -public final class BackupPolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupPolicyProperties.class); - - /* - * Backup Policy Resource ID - */ - @JsonProperty(value = "backupPolicyId", access = JsonProperty.Access.WRITE_ONLY) - private String backupPolicyId; - - /* - * Azure lifecycle management - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /* - * Daily backups count to keep - */ - @JsonProperty(value = "dailyBackupsToKeep") - private Integer dailyBackupsToKeep; - - /* - * Weekly backups count to keep - */ - @JsonProperty(value = "weeklyBackupsToKeep") - private Integer weeklyBackupsToKeep; - - /* - * Monthly backups count to keep - */ - @JsonProperty(value = "monthlyBackupsToKeep") - private Integer monthlyBackupsToKeep; - - /* - * Volumes using current backup policy - */ - @JsonProperty(value = "volumesAssigned", access = JsonProperty.Access.WRITE_ONLY) - private Integer volumesAssigned; - - /* - * The property to decide policy is enabled or not - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /* - * A list of volumes assigned to this policy - */ - @JsonProperty(value = "volumeBackups", access = JsonProperty.Access.WRITE_ONLY) - private List volumeBackups; - - /** - * Get the backupPolicyId property: Backup Policy Resource ID. - * - * @return the backupPolicyId value. - */ - public String backupPolicyId() { - return this.backupPolicyId; - } - - /** - * Get the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the dailyBackupsToKeep property: Daily backups count to keep. - * - * @return the dailyBackupsToKeep value. - */ - public Integer dailyBackupsToKeep() { - return this.dailyBackupsToKeep; - } - - /** - * Set the dailyBackupsToKeep property: Daily backups count to keep. - * - * @param dailyBackupsToKeep the dailyBackupsToKeep value to set. - * @return the BackupPolicyProperties object itself. - */ - public BackupPolicyProperties withDailyBackupsToKeep(Integer dailyBackupsToKeep) { - this.dailyBackupsToKeep = dailyBackupsToKeep; - return this; - } - - /** - * Get the weeklyBackupsToKeep property: Weekly backups count to keep. - * - * @return the weeklyBackupsToKeep value. - */ - public Integer weeklyBackupsToKeep() { - return this.weeklyBackupsToKeep; - } - - /** - * Set the weeklyBackupsToKeep property: Weekly backups count to keep. - * - * @param weeklyBackupsToKeep the weeklyBackupsToKeep value to set. - * @return the BackupPolicyProperties object itself. - */ - public BackupPolicyProperties withWeeklyBackupsToKeep(Integer weeklyBackupsToKeep) { - this.weeklyBackupsToKeep = weeklyBackupsToKeep; - return this; - } - - /** - * Get the monthlyBackupsToKeep property: Monthly backups count to keep. - * - * @return the monthlyBackupsToKeep value. - */ - public Integer monthlyBackupsToKeep() { - return this.monthlyBackupsToKeep; - } - - /** - * Set the monthlyBackupsToKeep property: Monthly backups count to keep. - * - * @param monthlyBackupsToKeep the monthlyBackupsToKeep value to set. - * @return the BackupPolicyProperties object itself. - */ - public BackupPolicyProperties withMonthlyBackupsToKeep(Integer monthlyBackupsToKeep) { - this.monthlyBackupsToKeep = monthlyBackupsToKeep; - return this; - } - - /** - * Get the volumesAssigned property: Volumes using current backup policy. - * - * @return the volumesAssigned value. - */ - public Integer volumesAssigned() { - return this.volumesAssigned; - } - - /** - * Get the enabled property: The property to decide policy is enabled or not. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: The property to decide policy is enabled or not. - * - * @param enabled the enabled value to set. - * @return the BackupPolicyProperties object itself. - */ - public BackupPolicyProperties withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the volumeBackups property: A list of volumes assigned to this policy. - * - * @return the volumeBackups value. - */ - public List volumeBackups() { - return this.volumeBackups; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (volumeBackups() != null) { - volumeBackups().forEach(e -> e.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 deleted file mode 100644 index eecf71f5aaa78..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java +++ /dev/null @@ -1,186 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.BackupType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Backup properties. */ -@Fluent -public final class BackupProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupProperties.class); - - /* - * backupId UUID v4 used to identify the Backup - */ - @JsonProperty(value = "backupId", access = JsonProperty.Access.WRITE_ONLY) - private String backupId; - - /* - * name 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 - */ - @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; - - /* - * Volume name - */ - @JsonProperty(value = "volumeName", access = JsonProperty.Access.WRITE_ONLY) - private String volumeName; - - /* - * 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; - - /** - * 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: name 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. - * - * @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 volumeName property: Volume name. - * - * @return the volumeName value. - */ - public String volumeName() { - return this.volumeName; - } - - /** - * 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; - } - - /** - * 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/BackupStatusInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java deleted file mode 100644 index 9e95ebd57afbc..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java +++ /dev/null @@ -1,146 +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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.MirrorState; -import com.azure.resourcemanager.netapp.models.RelationshipStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Backup status. */ -@Immutable -public final class BackupStatusInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupStatusInner.class); - - /* - * Backup health status - */ - @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; - - /** - * 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; - } - - /** - * 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 deleted file mode 100644 index fb2d1a8a5ddf9..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CapacityPoolInner.java +++ /dev/null @@ -1,236 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.EncryptionType; -import com.azure.resourcemanager.netapp.models.QosType; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Capacity pool resource. */ -@Fluent -public final class CapacityPoolInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CapacityPoolInner.class); - - /* - * A unique read-only string that changes whenever the resource is updated. - */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; - - /* - * Capacity pool properties - */ - @JsonProperty(value = "properties", required = true) - private PoolProperties innerProperties = new PoolProperties(); - - /** - * Get the etag property: A unique read-only string that changes whenever the resource is updated. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Get the innerProperties property: Capacity pool properties. - * - * @return the innerProperties value. - */ - private PoolProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public CapacityPoolInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public CapacityPoolInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the poolId property: poolId UUID v4 used to identify the Pool. - * - * @return the poolId value. - */ - public String poolId() { - return this.innerProperties() == null ? null : this.innerProperties().poolId(); - } - - /** - * Get the size property: size Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value - * must be multiply of 4398046511104). - * - * @return the size value. - */ - public long size() { - return this.innerProperties() == null ? 0L : this.innerProperties().size(); - } - - /** - * Set the size property: size Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value - * must be multiply of 4398046511104). - * - * @param size the size value to set. - * @return the CapacityPoolInner object itself. - */ - public CapacityPoolInner withSize(long size) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withSize(size); - return this; - } - - /** - * Get the serviceLevel property: serviceLevel The service level of the file system. - * - * @return the serviceLevel value. - */ - public ServiceLevel serviceLevel() { - return this.innerProperties() == null ? null : this.innerProperties().serviceLevel(); - } - - /** - * Set the serviceLevel property: serviceLevel The service level of the file system. - * - * @param serviceLevel the serviceLevel value to set. - * @return the CapacityPoolInner object itself. - */ - public CapacityPoolInner withServiceLevel(ServiceLevel serviceLevel) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withServiceLevel(serviceLevel); - return this; - } - - /** - * Get the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the totalThroughputMibps property: Total throughput of pool in Mibps. - * - * @return the totalThroughputMibps value. - */ - public Float totalThroughputMibps() { - return this.innerProperties() == null ? null : this.innerProperties().totalThroughputMibps(); - } - - /** - * Get the utilizedThroughputMibps property: Utilized throughput of pool in Mibps. - * - * @return the utilizedThroughputMibps value. - */ - public Float utilizedThroughputMibps() { - return this.innerProperties() == null ? null : this.innerProperties().utilizedThroughputMibps(); - } - - /** - * Get the qosType property: The qos type of the pool. - * - * @return the qosType value. - */ - public QosType qosType() { - return this.innerProperties() == null ? null : this.innerProperties().qosType(); - } - - /** - * Set the qosType property: The qos type of the pool. - * - * @param qosType the qosType value to set. - * @return the CapacityPoolInner object itself. - */ - public CapacityPoolInner withQosType(QosType qosType) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withQosType(qosType); - return this; - } - - /** - * Get the coolAccess property: If enabled (true) the pool can contain cool Access enabled volumes. - * - * @return the coolAccess value. - */ - public Boolean coolAccess() { - return this.innerProperties() == null ? null : this.innerProperties().coolAccess(); - } - - /** - * Set the coolAccess property: If enabled (true) the pool can contain cool Access enabled volumes. - * - * @param coolAccess the coolAccess value to set. - * @return the CapacityPoolInner object itself. - */ - public CapacityPoolInner withCoolAccess(Boolean coolAccess) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withCoolAccess(coolAccess); - return this; - } - - /** - * Get the encryptionType property: 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. - * - * @return the encryptionType value. - */ - public EncryptionType encryptionType() { - return this.innerProperties() == null ? null : this.innerProperties().encryptionType(); - } - - /** - * Set the encryptionType property: 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. - * - * @param encryptionType the encryptionType value to set. - * @return the CapacityPoolInner object itself. - */ - public CapacityPoolInner withEncryptionType(EncryptionType encryptionType) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withEncryptionType(encryptionType); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw logger - .logExceptionAsError( - 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 deleted file mode 100644 index d161dbac43e78..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckAvailabilityResponseInner.java +++ /dev/null @@ -1,120 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.InAvailabilityReasonType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Information regarding availability of a resource. */ -@Fluent -public final class CheckAvailabilityResponseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckAvailabilityResponseInner.class); - - /* - * true indicates name is valid and available. - * false indicates the name is invalid, unavailable, or both. - */ - @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. - */ - @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. - */ - @JsonProperty(value = "message") - private String message; - - /** - * Get the isAvailable property: <code>true</code> indicates name is valid and available. - * <code>false</code> indicates the name is invalid, unavailable, or both. - * - * @return the isAvailable value. - */ - public Boolean isAvailable() { - return this.isAvailable; - } - - /** - * Set the isAvailable property: <code>true</code> indicates name is valid and available. - * <code>false</code> indicates the name is invalid, unavailable, or both. - * - * @param isAvailable the isAvailable value to set. - * @return the CheckAvailabilityResponseInner object itself. - */ - public CheckAvailabilityResponseInner withIsAvailable(Boolean isAvailable) { - this.isAvailable = isAvailable; - return this; - } - - /** - * 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. - * - * @return the reason value. - */ - public InAvailabilityReasonType reason() { - return this.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. - * - * @param reason the reason value to set. - * @return the CheckAvailabilityResponseInner object itself. - */ - public CheckAvailabilityResponseInner withReason(InAvailabilityReasonType reason) { - this.reason = reason; - return this; - } - - /** - * Get the message property: 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. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: 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. - * - * @param message the message value to set. - * @return the CheckAvailabilityResponseInner object itself. - */ - public CheckAvailabilityResponseInner withMessage(String message) { - this.message = message; - 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 deleted file mode 100644 index e1f9505a02125..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/MountTargetProperties.java +++ /dev/null @@ -1,112 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Mount target properties. */ -@Fluent -public final class MountTargetProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MountTargetProperties.class); - - /* - * mountTargetId UUID v4 used to identify the MountTarget - */ - @JsonProperty(value = "mountTargetId", access = JsonProperty.Access.WRITE_ONLY) - private String mountTargetId; - - /* - * fileSystemId UUID v4 used to identify the MountTarget - */ - @JsonProperty(value = "fileSystemId", required = true) - private String fileSystemId; - - /* - * ipAddress The mount target's IPv4 address - */ - @JsonProperty(value = "ipAddress", access = JsonProperty.Access.WRITE_ONLY) - private String ipAddress; - - /* - * smbServerFQDN The SMB server's Fully Qualified Domain Name, FQDN - */ - @JsonProperty(value = "smbServerFqdn") - private String smbServerFqdn; - - /** - * Get the mountTargetId property: mountTargetId UUID v4 used to identify the MountTarget. - * - * @return the mountTargetId value. - */ - public String mountTargetId() { - return this.mountTargetId; - } - - /** - * Get the fileSystemId property: fileSystemId UUID v4 used to identify the MountTarget. - * - * @return the fileSystemId value. - */ - public String fileSystemId() { - return this.fileSystemId; - } - - /** - * Set the fileSystemId property: fileSystemId UUID v4 used to identify the MountTarget. - * - * @param fileSystemId the fileSystemId value to set. - * @return the MountTargetProperties object itself. - */ - public MountTargetProperties withFileSystemId(String fileSystemId) { - this.fileSystemId = fileSystemId; - return this; - } - - /** - * Get the ipAddress property: ipAddress The mount target's IPv4 address. - * - * @return the ipAddress value. - */ - public String ipAddress() { - return this.ipAddress; - } - - /** - * Get the smbServerFqdn property: smbServerFQDN The SMB server's Fully Qualified Domain Name, FQDN. - * - * @return the smbServerFqdn value. - */ - public String smbServerFqdn() { - return this.smbServerFqdn; - } - - /** - * Set the smbServerFqdn property: smbServerFQDN The SMB server's Fully Qualified Domain Name, FQDN. - * - * @param smbServerFqdn the smbServerFqdn value to set. - * @return the MountTargetProperties object itself. - */ - public MountTargetProperties withSmbServerFqdn(String smbServerFqdn) { - this.smbServerFqdn = smbServerFqdn; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (fileSystemId() == null) { - throw logger - .logExceptionAsError( - 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 deleted file mode 100644 index c282eeb78e76b..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.AccountEncryption; -import com.azure.resourcemanager.netapp.models.ActiveDirectory; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** NetApp account resource. */ -@Fluent -public final class NetAppAccountInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetAppAccountInner.class); - - /* - * A unique read-only string that changes whenever the resource is updated. - */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; - - /* - * NetApp Account properties - */ - @JsonProperty(value = "properties") - private AccountProperties innerProperties; - - /* - * The system meta data relating to this resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the etag property: A unique read-only string that changes whenever the resource is updated. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Get the innerProperties property: NetApp Account properties. - * - * @return the innerProperties value. - */ - private AccountProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: The system meta data relating to this resource. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public NetAppAccountInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public NetAppAccountInner 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(); - } - - /** - * Get the activeDirectories property: Active Directories. - * - * @return the activeDirectories value. - */ - public List activeDirectories() { - return this.innerProperties() == null ? null : this.innerProperties().activeDirectories(); - } - - /** - * Set the activeDirectories property: Active Directories. - * - * @param activeDirectories the activeDirectories value to set. - * @return the NetAppAccountInner object itself. - */ - public NetAppAccountInner withActiveDirectories(List activeDirectories) { - if (this.innerProperties() == null) { - this.innerProperties = new AccountProperties(); - } - this.innerProperties().withActiveDirectories(activeDirectories); - return this; - } - - /** - * Get the encryption property: Encryption settings. - * - * @return the encryption value. - */ - public AccountEncryption encryption() { - return this.innerProperties() == null ? null : this.innerProperties().encryption(); - } - - /** - * Set the encryption property: Encryption settings. - * - * @param encryption the encryption value to set. - * @return the NetAppAccountInner object itself. - */ - public NetAppAccountInner withEncryption(AccountEncryption encryption) { - if (this.innerProperties() == null) { - this.innerProperties = new AccountProperties(); - } - this.innerProperties().withEncryption(encryption); - 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/OperationInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationInner.java deleted file mode 100644 index 2a4977ad8d34a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationInner.java +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.OperationDisplay; -import com.azure.resourcemanager.netapp.models.ServiceSpecification; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Microsoft.NetApp REST API operation definition. */ -@Fluent -public final class OperationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class); - - /* - * Operation name: {provider}/{resource}/{operation} - */ - @JsonProperty(value = "name") - private String name; - - /* - * Display metadata associated with the operation. - */ - @JsonProperty(value = "display") - private OperationDisplay display; - - /* - * The origin of operations. - */ - @JsonProperty(value = "origin") - private String origin; - - /* - * Properties of operation, include metric specifications. - */ - @JsonProperty(value = "properties") - private OperationProperties innerProperties; - - /** - * Get the name property: Operation name: {provider}/{resource}/{operation}. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Operation name: {provider}/{resource}/{operation}. - * - * @param name the name value to set. - * @return the OperationInner object itself. - */ - public OperationInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the display property: Display metadata associated with the operation. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Set the display property: Display metadata associated with the operation. - * - * @param display the display value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - - /** - * Get the origin property: The origin of operations. - * - * @return the origin value. - */ - public String origin() { - return this.origin; - } - - /** - * Set the origin property: The origin of operations. - * - * @param origin the origin value to set. - * @return the OperationInner object itself. - */ - public OperationInner withOrigin(String origin) { - this.origin = origin; - return this; - } - - /** - * Get the innerProperties property: Properties of operation, include metric specifications. - * - * @return the innerProperties value. - */ - private OperationProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the serviceSpecification property: One property of operation, include metric specifications. - * - * @return the serviceSpecification value. - */ - public ServiceSpecification serviceSpecification() { - return this.innerProperties() == null ? null : this.innerProperties().serviceSpecification(); - } - - /** - * Set the serviceSpecification property: One property of operation, include metric specifications. - * - * @param serviceSpecification the serviceSpecification value to set. - * @return the OperationInner object itself. - */ - public OperationInner withServiceSpecification(ServiceSpecification serviceSpecification) { - if (this.innerProperties() == null) { - this.innerProperties = new OperationProperties(); - } - this.innerProperties().withServiceSpecification(serviceSpecification); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationProperties.java deleted file mode 100644 index 4ce35159cf1e0..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationProperties.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.ServiceSpecification; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of operation, include metric specifications. */ -@Fluent -public final class OperationProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationProperties.class); - - /* - * One property of operation, include metric specifications. - */ - @JsonProperty(value = "serviceSpecification") - private ServiceSpecification serviceSpecification; - - /** - * Get the serviceSpecification property: One property of operation, include metric specifications. - * - * @return the serviceSpecification value. - */ - public ServiceSpecification serviceSpecification() { - return this.serviceSpecification; - } - - /** - * Set the serviceSpecification property: One property of operation, include metric specifications. - * - * @param serviceSpecification the serviceSpecification value to set. - * @return the OperationProperties object itself. - */ - public OperationProperties withServiceSpecification(ServiceSpecification serviceSpecification) { - this.serviceSpecification = serviceSpecification; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (serviceSpecification() != null) { - serviceSpecification().validate(); - } - } -} 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 deleted file mode 100644 index e5675217c1225..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolPatchProperties.java +++ /dev/null @@ -1,80 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.QosType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Patchable pool properties. */ -@Fluent -public final class PoolPatchProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PoolPatchProperties.class); - - /* - * size Provisioned size of the pool (in bytes). Allowed values are in 4TiB - * chunks (value must be multiply of 4398046511104). - */ - @JsonProperty(value = "size") - private Long size; - - /* - * The qos type of the pool - */ - @JsonProperty(value = "qosType") - private QosType qosType; - - /** - * Get the size property: size Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value - * must be multiply of 4398046511104). - * - * @return the size value. - */ - public Long size() { - return this.size; - } - - /** - * Set the size property: size Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value - * must be multiply of 4398046511104). - * - * @param size the size value to set. - * @return the PoolPatchProperties object itself. - */ - public PoolPatchProperties withSize(Long size) { - this.size = size; - return this; - } - - /** - * Get the qosType property: The qos type of the pool. - * - * @return the qosType value. - */ - public QosType qosType() { - return this.qosType; - } - - /** - * Set the qosType property: The qos type of the pool. - * - * @param qosType the qosType value to set. - * @return the PoolPatchProperties object itself. - */ - public PoolPatchProperties withQosType(QosType qosType) { - this.qosType = qosType; - 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/PoolProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolProperties.java deleted file mode 100644 index 6efdd5cf566ca..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolProperties.java +++ /dev/null @@ -1,229 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.EncryptionType; -import com.azure.resourcemanager.netapp.models.QosType; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Pool properties. */ -@Fluent -public final class PoolProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PoolProperties.class); - - /* - * poolId UUID v4 used to identify the Pool - */ - @JsonProperty(value = "poolId", access = JsonProperty.Access.WRITE_ONLY) - private String poolId; - - /* - * size Provisioned size of the pool (in bytes). Allowed values are in 4TiB - * chunks (value must be multiply of 4398046511104). - */ - @JsonProperty(value = "size", required = true) - private long size; - - /* - * serviceLevel The service level of the file system - */ - @JsonProperty(value = "serviceLevel", required = true) - private ServiceLevel serviceLevel; - - /* - * Azure lifecycle management - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /* - * Total throughput of pool in Mibps - */ - @JsonProperty(value = "totalThroughputMibps", access = JsonProperty.Access.WRITE_ONLY) - private Float totalThroughputMibps; - - /* - * Utilized throughput of pool in Mibps - */ - @JsonProperty(value = "utilizedThroughputMibps", access = JsonProperty.Access.WRITE_ONLY) - private Float utilizedThroughputMibps; - - /* - * The qos type of the pool - */ - @JsonProperty(value = "qosType") - private QosType qosType; - - /* - * If enabled (true) the pool can contain cool Access enabled volumes. - */ - @JsonProperty(value = "coolAccess") - private Boolean coolAccess; - - /* - * 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. - */ - @JsonProperty(value = "encryptionType") - private EncryptionType encryptionType; - - /** - * Get the poolId property: poolId UUID v4 used to identify the Pool. - * - * @return the poolId value. - */ - public String poolId() { - return this.poolId; - } - - /** - * Get the size property: size Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value - * must be multiply of 4398046511104). - * - * @return the size value. - */ - public long size() { - return this.size; - } - - /** - * Set the size property: size Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value - * must be multiply of 4398046511104). - * - * @param size the size value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withSize(long size) { - this.size = size; - return this; - } - - /** - * Get the serviceLevel property: serviceLevel The service level of the file system. - * - * @return the serviceLevel value. - */ - public ServiceLevel serviceLevel() { - return this.serviceLevel; - } - - /** - * Set the serviceLevel property: serviceLevel The service level of the file system. - * - * @param serviceLevel the serviceLevel value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withServiceLevel(ServiceLevel serviceLevel) { - this.serviceLevel = serviceLevel; - return this; - } - - /** - * Get the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the totalThroughputMibps property: Total throughput of pool in Mibps. - * - * @return the totalThroughputMibps value. - */ - public Float totalThroughputMibps() { - return this.totalThroughputMibps; - } - - /** - * Get the utilizedThroughputMibps property: Utilized throughput of pool in Mibps. - * - * @return the utilizedThroughputMibps value. - */ - public Float utilizedThroughputMibps() { - return this.utilizedThroughputMibps; - } - - /** - * Get the qosType property: The qos type of the pool. - * - * @return the qosType value. - */ - public QosType qosType() { - return this.qosType; - } - - /** - * Set the qosType property: The qos type of the pool. - * - * @param qosType the qosType value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withQosType(QosType qosType) { - this.qosType = qosType; - return this; - } - - /** - * Get the coolAccess property: If enabled (true) the pool can contain cool Access enabled volumes. - * - * @return the coolAccess value. - */ - public Boolean coolAccess() { - return this.coolAccess; - } - - /** - * Set the coolAccess property: If enabled (true) the pool can contain cool Access enabled volumes. - * - * @param coolAccess the coolAccess value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withCoolAccess(Boolean coolAccess) { - this.coolAccess = coolAccess; - return this; - } - - /** - * Get the encryptionType property: 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. - * - * @return the encryptionType value. - */ - public EncryptionType encryptionType() { - return this.encryptionType; - } - - /** - * Set the encryptionType property: 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. - * - * @param encryptionType the encryptionType value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withEncryptionType(EncryptionType encryptionType) { - this.encryptionType = encryptionType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (serviceLevel() == null) { - throw logger - .logExceptionAsError( - 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/ReplicationStatusInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationStatusInner.java deleted file mode 100644 index dfeae58906d3f..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationStatusInner.java +++ /dev/null @@ -1,156 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.MirrorState; -import com.azure.resourcemanager.netapp.models.RelationshipStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Replication status. */ -@Fluent -public final class ReplicationStatusInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReplicationStatusInner.class); - - /* - * Replication health check - */ - @JsonProperty(value = "healthy") - private Boolean healthy; - - /* - * Status of the mirror relationship - */ - @JsonProperty(value = "relationshipStatus") - private RelationshipStatus relationshipStatus; - - /* - * The status of the replication - */ - @JsonProperty(value = "mirrorState") - private MirrorState mirrorState; - - /* - * The progress of the replication - */ - @JsonProperty(value = "totalProgress") - private String totalProgress; - - /* - * Displays error message if the replication is in an error state - */ - @JsonProperty(value = "errorMessage") - private String errorMessage; - - /** - * Get the healthy property: Replication health check. - * - * @return the healthy value. - */ - public Boolean healthy() { - return this.healthy; - } - - /** - * Set the healthy property: Replication health check. - * - * @param healthy the healthy value to set. - * @return the ReplicationStatusInner object itself. - */ - public ReplicationStatusInner withHealthy(Boolean healthy) { - this.healthy = healthy; - return this; - } - - /** - * Get the relationshipStatus property: Status of the mirror relationship. - * - * @return the relationshipStatus value. - */ - public RelationshipStatus relationshipStatus() { - return this.relationshipStatus; - } - - /** - * Set the relationshipStatus property: Status of the mirror relationship. - * - * @param relationshipStatus the relationshipStatus value to set. - * @return the ReplicationStatusInner object itself. - */ - public ReplicationStatusInner withRelationshipStatus(RelationshipStatus relationshipStatus) { - this.relationshipStatus = relationshipStatus; - return this; - } - - /** - * Get the mirrorState property: The status of the replication. - * - * @return the mirrorState value. - */ - public MirrorState mirrorState() { - return this.mirrorState; - } - - /** - * Set the mirrorState property: The status of the replication. - * - * @param mirrorState the mirrorState value to set. - * @return the ReplicationStatusInner object itself. - */ - public ReplicationStatusInner withMirrorState(MirrorState mirrorState) { - this.mirrorState = mirrorState; - return this; - } - - /** - * Get the totalProgress property: The progress of the replication. - * - * @return the totalProgress value. - */ - public String totalProgress() { - return this.totalProgress; - } - - /** - * Set the totalProgress property: The progress of the replication. - * - * @param totalProgress the totalProgress value to set. - * @return the ReplicationStatusInner object itself. - */ - public ReplicationStatusInner withTotalProgress(String totalProgress) { - this.totalProgress = totalProgress; - return this; - } - - /** - * Get the errorMessage property: Displays error message if the replication is in an error state. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Set the errorMessage property: Displays error message if the replication is in an error state. - * - * @param errorMessage the errorMessage value to set. - * @return the ReplicationStatusInner object itself. - */ - public ReplicationStatusInner withErrorMessage(String errorMessage) { - this.errorMessage = errorMessage; - 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/RestoreStatusInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RestoreStatusInner.java deleted file mode 100644 index 2316df0c254b1..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RestoreStatusInner.java +++ /dev/null @@ -1,116 +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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.MirrorState; -import com.azure.resourcemanager.netapp.models.RelationshipStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Restore status. */ -@Immutable -public final class RestoreStatusInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RestoreStatusInner.class); - - /* - * Restore health status - */ - @JsonProperty(value = "healthy", access = JsonProperty.Access.WRITE_ONLY) - private Boolean healthy; - - /* - * Status of the restore SnapMirror relationship - */ - @JsonProperty(value = "relationshipStatus", access = JsonProperty.Access.WRITE_ONLY) - private RelationshipStatus relationshipStatus; - - /* - * The status of the restore - */ - @JsonProperty(value = "mirrorState", access = JsonProperty.Access.WRITE_ONLY) - private MirrorState mirrorState; - - /* - * Reason for the unhealthy restore relationship - */ - @JsonProperty(value = "unhealthyReason", access = JsonProperty.Access.WRITE_ONLY) - private String unhealthyReason; - - /* - * Displays error message if the restore is in an error state - */ - @JsonProperty(value = "errorMessage", access = JsonProperty.Access.WRITE_ONLY) - private String errorMessage; - - /* - * Displays the total bytes transferred - */ - @JsonProperty(value = "totalTransferBytes", access = JsonProperty.Access.WRITE_ONLY) - private Long totalTransferBytes; - - /** - * Get the healthy property: Restore health status. - * - * @return the healthy value. - */ - public Boolean healthy() { - return this.healthy; - } - - /** - * Get the relationshipStatus property: Status of the restore SnapMirror relationship. - * - * @return the relationshipStatus value. - */ - public RelationshipStatus relationshipStatus() { - return this.relationshipStatus; - } - - /** - * Get the mirrorState property: The status of the restore. - * - * @return the mirrorState value. - */ - public MirrorState mirrorState() { - return this.mirrorState; - } - - /** - * Get the unhealthyReason property: Reason for the unhealthy restore relationship. - * - * @return the unhealthyReason value. - */ - public String unhealthyReason() { - return this.unhealthyReason; - } - - /** - * Get the errorMessage property: Displays error message if the restore is in an error state. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Get the totalTransferBytes property: Displays the total bytes transferred. - * - * @return the totalTransferBytes value. - */ - public Long totalTransferBytes() { - return this.totalTransferBytes; - } - - /** - * 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/SnapshotInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotInner.java deleted file mode 100644 index 48777cd6f8070..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotInner.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Snapshot of a Volume. */ -@Fluent -public final class SnapshotInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotInner.class); - - /* - * Resource location - */ - @JsonProperty(value = "location", required = true) - private String location; - - /* - * Snapshot Properties - */ - @JsonProperty(value = "properties") - private SnapshotProperties innerProperties; - - /** - * Get the location property: Resource location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource location. - * - * @param location the location value to set. - * @return the SnapshotInner object itself. - */ - public SnapshotInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the innerProperties property: Snapshot Properties. - * - * @return the innerProperties value. - */ - private SnapshotProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the snapshotId property: snapshotId UUID v4 used to identify the Snapshot. - * - * @return the snapshotId value. - */ - public String snapshotId() { - return this.innerProperties() == null ? null : this.innerProperties().snapshotId(); - } - - /** - * Get the created property: name The creation date of the snapshot. - * - * @return the created value. - */ - public OffsetDateTime created() { - return this.innerProperties() == null ? null : this.innerProperties().created(); - } - - /** - * 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 (location() == null) { - throw logger - .logExceptionAsError( - 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 deleted file mode 100644 index 28896810b2bee..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyInner.java +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.DailySchedule; -import com.azure.resourcemanager.netapp.models.HourlySchedule; -import com.azure.resourcemanager.netapp.models.MonthlySchedule; -import com.azure.resourcemanager.netapp.models.WeeklySchedule; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Snapshot policy information. */ -@Fluent -public final class SnapshotPolicyInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotPolicyInner.class); - - /* - * A unique read-only string that changes whenever the resource is updated. - */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; - - /* - * Snapshot policy Properties - */ - @JsonProperty(value = "properties", required = true) - private SnapshotPolicyProperties innerProperties = new SnapshotPolicyProperties(); - - /** - * Get the etag property: A unique read-only string that changes whenever the resource is updated. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Get the innerProperties property: Snapshot policy Properties. - * - * @return the innerProperties value. - */ - private SnapshotPolicyProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public SnapshotPolicyInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public SnapshotPolicyInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the hourlySchedule property: Schedule for hourly snapshots. - * - * @return the hourlySchedule value. - */ - public HourlySchedule hourlySchedule() { - return this.innerProperties() == null ? null : this.innerProperties().hourlySchedule(); - } - - /** - * Set the hourlySchedule property: Schedule for hourly snapshots. - * - * @param hourlySchedule the hourlySchedule value to set. - * @return the SnapshotPolicyInner object itself. - */ - public SnapshotPolicyInner withHourlySchedule(HourlySchedule hourlySchedule) { - if (this.innerProperties() == null) { - this.innerProperties = new SnapshotPolicyProperties(); - } - this.innerProperties().withHourlySchedule(hourlySchedule); - return this; - } - - /** - * Get the dailySchedule property: Schedule for daily snapshots. - * - * @return the dailySchedule value. - */ - public DailySchedule dailySchedule() { - return this.innerProperties() == null ? null : this.innerProperties().dailySchedule(); - } - - /** - * Set the dailySchedule property: Schedule for daily snapshots. - * - * @param dailySchedule the dailySchedule value to set. - * @return the SnapshotPolicyInner object itself. - */ - public SnapshotPolicyInner withDailySchedule(DailySchedule dailySchedule) { - if (this.innerProperties() == null) { - this.innerProperties = new SnapshotPolicyProperties(); - } - this.innerProperties().withDailySchedule(dailySchedule); - return this; - } - - /** - * Get the weeklySchedule property: Schedule for weekly snapshots. - * - * @return the weeklySchedule value. - */ - public WeeklySchedule weeklySchedule() { - return this.innerProperties() == null ? null : this.innerProperties().weeklySchedule(); - } - - /** - * Set the weeklySchedule property: Schedule for weekly snapshots. - * - * @param weeklySchedule the weeklySchedule value to set. - * @return the SnapshotPolicyInner object itself. - */ - public SnapshotPolicyInner withWeeklySchedule(WeeklySchedule weeklySchedule) { - if (this.innerProperties() == null) { - this.innerProperties = new SnapshotPolicyProperties(); - } - this.innerProperties().withWeeklySchedule(weeklySchedule); - return this; - } - - /** - * Get the monthlySchedule property: Schedule for monthly snapshots. - * - * @return the monthlySchedule value. - */ - public MonthlySchedule monthlySchedule() { - return this.innerProperties() == null ? null : this.innerProperties().monthlySchedule(); - } - - /** - * Set the monthlySchedule property: Schedule for monthly snapshots. - * - * @param monthlySchedule the monthlySchedule value to set. - * @return the SnapshotPolicyInner object itself. - */ - public SnapshotPolicyInner withMonthlySchedule(MonthlySchedule monthlySchedule) { - if (this.innerProperties() == null) { - this.innerProperties = new SnapshotPolicyProperties(); - } - this.innerProperties().withMonthlySchedule(monthlySchedule); - return this; - } - - /** - * Get the enabled property: The property to decide policy is enabled or not. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.innerProperties() == null ? null : this.innerProperties().enabled(); - } - - /** - * Set the enabled property: The property to decide policy is enabled or not. - * - * @param enabled the enabled value to set. - * @return the SnapshotPolicyInner object itself. - */ - public SnapshotPolicyInner withEnabled(Boolean enabled) { - if (this.innerProperties() == null) { - this.innerProperties = new SnapshotPolicyProperties(); - } - this.innerProperties().withEnabled(enabled); - 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) { - throw logger - .logExceptionAsError( - 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/SnapshotPolicyProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyProperties.java deleted file mode 100644 index 910410b147b65..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyProperties.java +++ /dev/null @@ -1,185 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.DailySchedule; -import com.azure.resourcemanager.netapp.models.HourlySchedule; -import com.azure.resourcemanager.netapp.models.MonthlySchedule; -import com.azure.resourcemanager.netapp.models.WeeklySchedule; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Snapshot policy properties. */ -@Fluent -public final class SnapshotPolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotPolicyProperties.class); - - /* - * Schedule for hourly snapshots - */ - @JsonProperty(value = "hourlySchedule") - private HourlySchedule hourlySchedule; - - /* - * Schedule for daily snapshots - */ - @JsonProperty(value = "dailySchedule") - private DailySchedule dailySchedule; - - /* - * Schedule for weekly snapshots - */ - @JsonProperty(value = "weeklySchedule") - private WeeklySchedule weeklySchedule; - - /* - * Schedule for monthly snapshots - */ - @JsonProperty(value = "monthlySchedule") - private MonthlySchedule monthlySchedule; - - /* - * The property to decide policy is enabled or not - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /* - * Azure lifecycle management - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /** - * Get the hourlySchedule property: Schedule for hourly snapshots. - * - * @return the hourlySchedule value. - */ - public HourlySchedule hourlySchedule() { - return this.hourlySchedule; - } - - /** - * Set the hourlySchedule property: Schedule for hourly snapshots. - * - * @param hourlySchedule the hourlySchedule value to set. - * @return the SnapshotPolicyProperties object itself. - */ - public SnapshotPolicyProperties withHourlySchedule(HourlySchedule hourlySchedule) { - this.hourlySchedule = hourlySchedule; - return this; - } - - /** - * Get the dailySchedule property: Schedule for daily snapshots. - * - * @return the dailySchedule value. - */ - public DailySchedule dailySchedule() { - return this.dailySchedule; - } - - /** - * Set the dailySchedule property: Schedule for daily snapshots. - * - * @param dailySchedule the dailySchedule value to set. - * @return the SnapshotPolicyProperties object itself. - */ - public SnapshotPolicyProperties withDailySchedule(DailySchedule dailySchedule) { - this.dailySchedule = dailySchedule; - return this; - } - - /** - * Get the weeklySchedule property: Schedule for weekly snapshots. - * - * @return the weeklySchedule value. - */ - public WeeklySchedule weeklySchedule() { - return this.weeklySchedule; - } - - /** - * Set the weeklySchedule property: Schedule for weekly snapshots. - * - * @param weeklySchedule the weeklySchedule value to set. - * @return the SnapshotPolicyProperties object itself. - */ - public SnapshotPolicyProperties withWeeklySchedule(WeeklySchedule weeklySchedule) { - this.weeklySchedule = weeklySchedule; - return this; - } - - /** - * Get the monthlySchedule property: Schedule for monthly snapshots. - * - * @return the monthlySchedule value. - */ - public MonthlySchedule monthlySchedule() { - return this.monthlySchedule; - } - - /** - * Set the monthlySchedule property: Schedule for monthly snapshots. - * - * @param monthlySchedule the monthlySchedule value to set. - * @return the SnapshotPolicyProperties object itself. - */ - public SnapshotPolicyProperties withMonthlySchedule(MonthlySchedule monthlySchedule) { - this.monthlySchedule = monthlySchedule; - return this; - } - - /** - * Get the enabled property: The property to decide policy is enabled or not. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: The property to decide policy is enabled or not. - * - * @param enabled the enabled value to set. - * @return the SnapshotPolicyProperties object itself. - */ - public SnapshotPolicyProperties withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * 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() { - if (hourlySchedule() != null) { - hourlySchedule().validate(); - } - if (dailySchedule() != null) { - dailySchedule().validate(); - } - if (weeklySchedule() != null) { - weeklySchedule().validate(); - } - if (monthlySchedule() != null) { - monthlySchedule().validate(); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyVolumeListInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyVolumeListInner.java deleted file mode 100644 index 1424329cf5ced..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyVolumeListInner.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Volumes associated with snapshot policy. */ -@Fluent -public final class SnapshotPolicyVolumeListInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotPolicyVolumeListInner.class); - - /* - * List of volumes - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value property: List of volumes. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of volumes. - * - * @param value the value value to set. - * @return the SnapshotPolicyVolumeListInner object itself. - */ - public SnapshotPolicyVolumeListInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotProperties.java deleted file mode 100644 index 0f6d1ae6981fc..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotProperties.java +++ /dev/null @@ -1,70 +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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Snapshot properties. */ -@Immutable -public final class SnapshotProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotProperties.class); - - /* - * snapshotId UUID v4 used to identify the Snapshot - */ - @JsonProperty(value = "snapshotId", access = JsonProperty.Access.WRITE_ONLY) - private String snapshotId; - - /* - * name The creation date of the snapshot - */ - @JsonProperty(value = "created", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime created; - - /* - * Azure lifecycle management - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /** - * Get the snapshotId property: snapshotId UUID v4 used to identify the Snapshot. - * - * @return the snapshotId value. - */ - public String snapshotId() { - return this.snapshotId; - } - - /** - * Get the created property: name The creation date of the snapshot. - * - * @return the created value. - */ - public OffsetDateTime created() { - return this.created; - } - - /** - * 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/SubscriptionQuotaItemInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemInner.java deleted file mode 100644 index 50bfde34117e4..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemInner.java +++ /dev/null @@ -1,77 +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.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.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Information regarding Subscription Quota Item. */ -@Fluent -public final class SubscriptionQuotaItemInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SubscriptionQuotaItemInner.class); - - /* - * SubscriptionQuotaItem properties - */ - @JsonProperty(value = "properties") - private SubscriptionQuotaItemProperties innerProperties; - - /* - * The system meta data relating to this resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the innerProperties property: SubscriptionQuotaItem properties. - * - * @return the innerProperties value. - */ - private SubscriptionQuotaItemProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: The system meta data relating to this resource. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the current property: The current quota value. - * - * @return the current value. - */ - public Integer current() { - return this.innerProperties() == null ? null : this.innerProperties().current(); - } - - /** - * Get the defaultProperty property: The default quota value. - * - * @return the defaultProperty value. - */ - public Integer defaultProperty() { - return this.innerProperties() == null ? null : this.innerProperties().defaultProperty(); - } - - /** - * 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/SubscriptionQuotaItemProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemProperties.java deleted file mode 100644 index b6d4675311652..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemProperties.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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** SubscriptionQuotaItem Properties. */ -@Immutable -public final class SubscriptionQuotaItemProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SubscriptionQuotaItemProperties.class); - - /* - * The current quota value. - */ - @JsonProperty(value = "current", access = JsonProperty.Access.WRITE_ONLY) - private Integer current; - - /* - * The default quota value. - */ - @JsonProperty(value = "default", access = JsonProperty.Access.WRITE_ONLY) - private Integer defaultProperty; - - /** - * Get the current property: The current quota value. - * - * @return the current value. - */ - public Integer current() { - return this.current; - } - - /** - * Get the defaultProperty property: The default quota value. - * - * @return the defaultProperty value. - */ - public Integer defaultProperty() { - return this.defaultProperty; - } - - /** - * 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/VaultInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VaultInner.java deleted file mode 100644 index 6fe4f732175e6..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VaultInner.java +++ /dev/null @@ -1,101 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Vault information. */ -@Fluent -public final class VaultInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VaultInner.class); - - /* - * Resource location - */ - @JsonProperty(value = "location", required = true) - private String location; - - /* - * Vault Properties - */ - @JsonProperty(value = "properties", required = true) - private VaultProperties innerProperties = new VaultProperties(); - - /** - * Get the location property: Resource location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource location. - * - * @param location the location value to set. - * @return the VaultInner object itself. - */ - public VaultInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the innerProperties property: Vault Properties. - * - * @return the innerProperties value. - */ - private VaultProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the vaultName property: Vault Name. - * - * @return the vaultName value. - */ - public String vaultName() { - return this.innerProperties() == null ? null : this.innerProperties().vaultName(); - } - - /** - * Set the vaultName property: Vault Name. - * - * @param vaultName the vaultName value to set. - * @return the VaultInner object itself. - */ - public VaultInner withVaultName(String vaultName) { - if (this.innerProperties() == null) { - this.innerProperties = new VaultProperties(); - } - this.innerProperties().withVaultName(vaultName); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (location() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property location in model VaultInner")); - } - if (innerProperties() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property innerProperties in model VaultInner")); - } else { - innerProperties().validate(); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VaultProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VaultProperties.java deleted file mode 100644 index 21295214eddeb..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VaultProperties.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Vault properties. */ -@Fluent -public final class VaultProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VaultProperties.class); - - /* - * Vault Name - */ - @JsonProperty(value = "vaultName") - private String vaultName; - - /** - * Get the vaultName property: Vault Name. - * - * @return the vaultName value. - */ - public String vaultName() { - return this.vaultName; - } - - /** - * Set the vaultName property: Vault Name. - * - * @param vaultName the vaultName value to set. - * @return the VaultProperties object itself. - */ - public VaultProperties withVaultName(String vaultName) { - this.vaultName = vaultName; - 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/VolumeGroupDetailsInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupDetailsInner.java deleted file mode 100644 index 838ac7cdc7d6a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupDetailsInner.java +++ /dev/null @@ -1,200 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.VolumeGroupMetadata; -import com.azure.resourcemanager.netapp.models.VolumeGroupVolumeProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** Volume group resource for create. */ -@Fluent -public final class VolumeGroupDetailsInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeGroupDetailsInner.class); - - /* - * Resource location - */ - @JsonProperty(value = "location") - private String location; - - /* - * Resource Id - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * Resource name - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * Resource type - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /* - * Resource tags - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /* - * Volume group properties - */ - @JsonProperty(value = "properties") - private VolumeGroupProperties innerProperties; - - /** - * Get the location property: Resource location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource location. - * - * @param location the location value to set. - * @return the VolumeGroupDetailsInner object itself. - */ - public VolumeGroupDetailsInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the id property: Resource Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: Resource name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the type property: Resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the VolumeGroupDetailsInner object itself. - */ - public VolumeGroupDetailsInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the innerProperties property: Volume group properties. - * - * @return the innerProperties value. - */ - private VolumeGroupProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the groupMetadata property: Volume group details. - * - * @return the groupMetadata value. - */ - public VolumeGroupMetadata groupMetadata() { - return this.innerProperties() == null ? null : this.innerProperties().groupMetadata(); - } - - /** - * Set the groupMetadata property: Volume group details. - * - * @param groupMetadata the groupMetadata value to set. - * @return the VolumeGroupDetailsInner object itself. - */ - public VolumeGroupDetailsInner withGroupMetadata(VolumeGroupMetadata groupMetadata) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeGroupProperties(); - } - this.innerProperties().withGroupMetadata(groupMetadata); - return this; - } - - /** - * Get the volumes property: List of volumes from group. - * - * @return the volumes value. - */ - public List volumes() { - return this.innerProperties() == null ? null : this.innerProperties().volumes(); - } - - /** - * Set the volumes property: List of volumes from group. - * - * @param volumes the volumes value to set. - * @return the VolumeGroupDetailsInner object itself. - */ - public VolumeGroupDetailsInner withVolumes(List volumes) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeGroupProperties(); - } - this.innerProperties().withVolumes(volumes); - 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/VolumeGroupInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupInner.java deleted file mode 100644 index c10124f594129..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupInner.java +++ /dev/null @@ -1,175 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.VolumeGroupMetadata; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Volume group resource. */ -@Fluent -public final class VolumeGroupInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeGroupInner.class); - - /* - * Resource location - */ - @JsonProperty(value = "location") - private String location; - - /* - * Resource Id - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * Resource name - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * Resource type - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /* - * Resource tags - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /* - * Volume group properties - */ - @JsonProperty(value = "properties") - private VolumeGroupListProperties innerProperties; - - /** - * Get the location property: Resource location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource location. - * - * @param location the location value to set. - * @return the VolumeGroupInner object itself. - */ - public VolumeGroupInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the id property: Resource Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: Resource name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the type property: Resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the VolumeGroupInner object itself. - */ - public VolumeGroupInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the innerProperties property: Volume group properties. - * - * @return the innerProperties value. - */ - private VolumeGroupListProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the groupMetadata property: Volume group details. - * - * @return the groupMetadata value. - */ - public VolumeGroupMetadata groupMetadata() { - return this.innerProperties() == null ? null : this.innerProperties().groupMetadata(); - } - - /** - * Set the groupMetadata property: Volume group details. - * - * @param groupMetadata the groupMetadata value to set. - * @return the VolumeGroupInner object itself. - */ - public VolumeGroupInner withGroupMetadata(VolumeGroupMetadata groupMetadata) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeGroupListProperties(); - } - this.innerProperties().withGroupMetadata(groupMetadata); - 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/VolumeGroupListProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupListProperties.java deleted file mode 100644 index 3dbed5328b864..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupListProperties.java +++ /dev/null @@ -1,69 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.VolumeGroupMetadata; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Volume group properties. */ -@Fluent -public final class VolumeGroupListProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeGroupListProperties.class); - - /* - * Azure lifecycle management - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /* - * Volume group details - */ - @JsonProperty(value = "groupMetaData") - private VolumeGroupMetadata groupMetadata; - - /** - * Get the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the groupMetadata property: Volume group details. - * - * @return the groupMetadata value. - */ - public VolumeGroupMetadata groupMetadata() { - return this.groupMetadata; - } - - /** - * Set the groupMetadata property: Volume group details. - * - * @param groupMetadata the groupMetadata value to set. - * @return the VolumeGroupListProperties object itself. - */ - public VolumeGroupListProperties withGroupMetadata(VolumeGroupMetadata groupMetadata) { - this.groupMetadata = groupMetadata; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (groupMetadata() != null) { - groupMetadata().validate(); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupProperties.java deleted file mode 100644 index 15ed0c8828943..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupProperties.java +++ /dev/null @@ -1,100 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.VolumeGroupMetadata; -import com.azure.resourcemanager.netapp.models.VolumeGroupVolumeProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Volume group properties. */ -@Fluent -public final class VolumeGroupProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeGroupProperties.class); - - /* - * Azure lifecycle management - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /* - * Volume group details - */ - @JsonProperty(value = "groupMetaData") - private VolumeGroupMetadata groupMetadata; - - /* - * List of volumes from group - */ - @JsonProperty(value = "volumes") - private List volumes; - - /** - * Get the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the groupMetadata property: Volume group details. - * - * @return the groupMetadata value. - */ - public VolumeGroupMetadata groupMetadata() { - return this.groupMetadata; - } - - /** - * Set the groupMetadata property: Volume group details. - * - * @param groupMetadata the groupMetadata value to set. - * @return the VolumeGroupProperties object itself. - */ - public VolumeGroupProperties withGroupMetadata(VolumeGroupMetadata groupMetadata) { - this.groupMetadata = groupMetadata; - return this; - } - - /** - * Get the volumes property: List of volumes from group. - * - * @return the volumes value. - */ - public List volumes() { - return this.volumes; - } - - /** - * Set the volumes property: List of volumes from group. - * - * @param volumes the volumes value to set. - * @return the VolumeGroupProperties object itself. - */ - public VolumeGroupProperties withVolumes(List volumes) { - this.volumes = volumes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (groupMetadata() != null) { - groupMetadata().validate(); - } - if (volumes() != null) { - volumes().forEach(e -> e.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 deleted file mode 100644 index a6fcefb8ce952..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java +++ /dev/null @@ -1,926 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.AvsDataStore; -import com.azure.resourcemanager.netapp.models.NetworkFeatures; -import com.azure.resourcemanager.netapp.models.PlacementKeyValuePairs; -import com.azure.resourcemanager.netapp.models.SecurityStyle; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection; -import com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy; -import com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** Volume resource. */ -@Fluent -public final class VolumeInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeInner.class); - - /* - * A unique read-only string that changes whenever the resource is updated. - */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; - - /* - * Volume properties - */ - @JsonProperty(value = "properties", required = true) - private VolumeProperties innerProperties = new VolumeProperties(); - - /** - * Get the etag property: A unique read-only string that changes whenever the resource is updated. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Get the innerProperties property: Volume properties. - * - * @return the innerProperties value. - */ - private VolumeProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public VolumeInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public VolumeInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the fileSystemId property: FileSystem ID Unique FileSystem Identifier. - * - * @return the fileSystemId value. - */ - public String fileSystemId() { - return this.innerProperties() == null ? null : this.innerProperties().fileSystemId(); - } - - /** - * Get the creationToken property: Creation Token or File Path A unique file path for the volume. Used when creating - * mount targets. - * - * @return the creationToken value. - */ - public String creationToken() { - return this.innerProperties() == null ? null : this.innerProperties().creationToken(); - } - - /** - * Set the creationToken property: Creation Token or File Path A unique file path for the volume. Used when creating - * mount targets. - * - * @param creationToken the creationToken value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withCreationToken(String creationToken) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withCreationToken(creationToken); - return this; - } - - /** - * Get the serviceLevel property: serviceLevel The service level of the file system. - * - * @return the serviceLevel value. - */ - public ServiceLevel serviceLevel() { - return this.innerProperties() == null ? null : this.innerProperties().serviceLevel(); - } - - /** - * Set the serviceLevel property: serviceLevel The service level of the file system. - * - * @param serviceLevel the serviceLevel value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withServiceLevel(ServiceLevel serviceLevel) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withServiceLevel(serviceLevel); - return this; - } - - /** - * Get the usageThreshold property: 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. Specified in bytes. - * - * @return the usageThreshold value. - */ - public long usageThreshold() { - return this.innerProperties() == null ? 0L : this.innerProperties().usageThreshold(); - } - - /** - * Set the usageThreshold property: 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. Specified in bytes. - * - * @param usageThreshold the usageThreshold value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withUsageThreshold(long usageThreshold) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withUsageThreshold(usageThreshold); - return this; - } - - /** - * Get the exportPolicy property: exportPolicy Set of export policy rules. - * - * @return the exportPolicy value. - */ - public VolumePropertiesExportPolicy exportPolicy() { - return this.innerProperties() == null ? null : this.innerProperties().exportPolicy(); - } - - /** - * Set the exportPolicy property: exportPolicy Set of export policy rules. - * - * @param exportPolicy the exportPolicy value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withExportPolicy(VolumePropertiesExportPolicy exportPolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withExportPolicy(exportPolicy); - return this; - } - - /** - * Get the protocolTypes property: protocolTypes Set of protocol types, default NFSv3, CIFS for SMB protocol. - * - * @return the protocolTypes value. - */ - public List protocolTypes() { - return this.innerProperties() == null ? null : this.innerProperties().protocolTypes(); - } - - /** - * Set the protocolTypes property: protocolTypes Set of protocol types, default NFSv3, CIFS for SMB protocol. - * - * @param protocolTypes the protocolTypes value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withProtocolTypes(List protocolTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withProtocolTypes(protocolTypes); - return this; - } - - /** - * Get the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the snapshotId property: Snapshot ID UUID v4 or resource identifier used to identify the Snapshot. - * - * @return the snapshotId value. - */ - public String snapshotId() { - return this.innerProperties() == null ? null : this.innerProperties().snapshotId(); - } - - /** - * Set the snapshotId property: Snapshot ID UUID v4 or resource identifier used to identify the Snapshot. - * - * @param snapshotId the snapshotId value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withSnapshotId(String snapshotId) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withSnapshotId(snapshotId); - return this; - } - - /** - * Get the backupId property: Backup ID UUID v4 or resource identifier used to identify the Backup. - * - * @return the backupId value. - */ - public String backupId() { - return this.innerProperties() == null ? null : this.innerProperties().backupId(); - } - - /** - * Set the backupId property: Backup ID UUID v4 or resource identifier used to identify the Backup. - * - * @param backupId the backupId value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withBackupId(String backupId) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withBackupId(backupId); - return this; - } - - /** - * Get the baremetalTenantId property: Baremetal Tenant ID Unique Baremetal Tenant Identifier. - * - * @return the baremetalTenantId value. - */ - public String baremetalTenantId() { - return this.innerProperties() == null ? null : this.innerProperties().baremetalTenantId(); - } - - /** - * Get the subnetId property: The Azure Resource URI for a delegated subnet. Must have the delegation - * Microsoft.NetApp/volumes. - * - * @return the subnetId value. - */ - public String subnetId() { - return this.innerProperties() == null ? null : this.innerProperties().subnetId(); - } - - /** - * Set the subnetId property: The Azure Resource URI for a delegated subnet. Must have the delegation - * Microsoft.NetApp/volumes. - * - * @param subnetId the subnetId value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withSubnetId(String subnetId) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withSubnetId(subnetId); - return this; - } - - /** - * Get the networkFeatures property: Network features Basic network, or Standard features available to the volume. - * - * @return the networkFeatures value. - */ - public NetworkFeatures networkFeatures() { - return this.innerProperties() == null ? null : this.innerProperties().networkFeatures(); - } - - /** - * Set the networkFeatures property: Network features Basic network, or Standard features available to the volume. - * - * @param networkFeatures the networkFeatures value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withNetworkFeatures(NetworkFeatures networkFeatures) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withNetworkFeatures(networkFeatures); - return this; - } - - /** - * Get the networkSiblingSetId property: Network Sibling Set ID Network Sibling Set ID for the the group of volumes - * sharing networking resources. - * - * @return the networkSiblingSetId value. - */ - public String networkSiblingSetId() { - return this.innerProperties() == null ? null : this.innerProperties().networkSiblingSetId(); - } - - /** - * Get the storageToNetworkProximity property: Storage to Network Proximity Provides storage to network proximity - * information for the volume. - * - * @return the storageToNetworkProximity value. - */ - public VolumeStorageToNetworkProximity storageToNetworkProximity() { - return this.innerProperties() == null ? null : this.innerProperties().storageToNetworkProximity(); - } - - /** - * Get the mountTargets property: mountTargets List of mount targets. - * - * @return the mountTargets value. - */ - public List mountTargets() { - return this.innerProperties() == null ? null : this.innerProperties().mountTargets(); - } - - /** - * Get the volumeType property: What type of volume is this. For destination volumes in Cross Region Replication, - * set type to DataProtection. - * - * @return the volumeType value. - */ - public String volumeType() { - return this.innerProperties() == null ? null : this.innerProperties().volumeType(); - } - - /** - * Set the volumeType property: What type of volume is this. For destination volumes in Cross Region Replication, - * set type to DataProtection. - * - * @param volumeType the volumeType value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withVolumeType(String volumeType) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withVolumeType(volumeType); - return this; - } - - /** - * Get the dataProtection property: DataProtection DataProtection type volumes include an object containing details - * of the replication. - * - * @return the dataProtection value. - */ - public VolumePropertiesDataProtection dataProtection() { - return this.innerProperties() == null ? null : this.innerProperties().dataProtection(); - } - - /** - * Set the dataProtection property: DataProtection DataProtection type volumes include an object containing details - * of the replication. - * - * @param dataProtection the dataProtection value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withDataProtection(VolumePropertiesDataProtection dataProtection) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withDataProtection(dataProtection); - return this; - } - - /** - * Get the isRestoring property: Restoring. - * - * @return the isRestoring value. - */ - public Boolean isRestoring() { - return this.innerProperties() == null ? null : this.innerProperties().isRestoring(); - } - - /** - * Set the isRestoring property: Restoring. - * - * @param isRestoring the isRestoring value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withIsRestoring(Boolean isRestoring) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withIsRestoring(isRestoring); - return this; - } - - /** - * Get the snapshotDirectoryVisible property: If enabled (true) the volume will contain a read-only snapshot - * directory which provides access to each of the volume's snapshots (default to true). - * - * @return the snapshotDirectoryVisible value. - */ - public Boolean snapshotDirectoryVisible() { - return this.innerProperties() == null ? null : this.innerProperties().snapshotDirectoryVisible(); - } - - /** - * Set the snapshotDirectoryVisible property: If enabled (true) the volume will contain a read-only snapshot - * directory which provides access to each of the volume's snapshots (default to true). - * - * @param snapshotDirectoryVisible the snapshotDirectoryVisible value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withSnapshotDirectoryVisible(Boolean snapshotDirectoryVisible) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withSnapshotDirectoryVisible(snapshotDirectoryVisible); - return this; - } - - /** - * Get the kerberosEnabled property: Describe if a volume is KerberosEnabled. To be use with swagger version - * 2020-05-01 or later. - * - * @return the kerberosEnabled value. - */ - public Boolean kerberosEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().kerberosEnabled(); - } - - /** - * Set the kerberosEnabled property: Describe if a volume is KerberosEnabled. To be use with swagger version - * 2020-05-01 or later. - * - * @param kerberosEnabled the kerberosEnabled value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withKerberosEnabled(Boolean kerberosEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withKerberosEnabled(kerberosEnabled); - return this; - } - - /** - * Get the securityStyle property: The security style of volume, default unix, defaults to ntfs for dual protocol or - * CIFS protocol. - * - * @return the securityStyle value. - */ - public SecurityStyle securityStyle() { - return this.innerProperties() == null ? null : this.innerProperties().securityStyle(); - } - - /** - * 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. - */ - public VolumeInner withSecurityStyle(SecurityStyle securityStyle) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withSecurityStyle(securityStyle); - return this; - } - - /** - * Get the smbEncryption property: Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol - * volume. To be used with swagger version 2020-08-01 or later. - * - * @return the smbEncryption value. - */ - public Boolean smbEncryption() { - return this.innerProperties() == null ? null : this.innerProperties().smbEncryption(); - } - - /** - * Set the smbEncryption property: Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol - * volume. To be used with swagger version 2020-08-01 or later. - * - * @param smbEncryption the smbEncryption value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withSmbEncryption(Boolean smbEncryption) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withSmbEncryption(smbEncryption); - return this; - } - - /** - * Get the smbContinuouslyAvailable property: Enables continuously available share property for smb volume. Only - * applicable for SMB volume. - * - * @return the smbContinuouslyAvailable value. - */ - public Boolean smbContinuouslyAvailable() { - return this.innerProperties() == null ? null : this.innerProperties().smbContinuouslyAvailable(); - } - - /** - * Set the smbContinuouslyAvailable property: Enables continuously available share property for smb volume. Only - * applicable for SMB volume. - * - * @param smbContinuouslyAvailable the smbContinuouslyAvailable value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withSmbContinuouslyAvailable(Boolean smbContinuouslyAvailable) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withSmbContinuouslyAvailable(smbContinuouslyAvailable); - return this; - } - - /** - * Get the throughputMibps property: Maximum throughput in Mibps that can be achieved by this volume and this will - * be accepted as input only for manual qosType volume. - * - * @return the throughputMibps value. - */ - public Float throughputMibps() { - return this.innerProperties() == null ? null : this.innerProperties().throughputMibps(); - } - - /** - * Set the throughputMibps property: Maximum throughput in Mibps that can be achieved by this volume and this will - * be accepted as input only for manual qosType volume. - * - * @param throughputMibps the throughputMibps value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withThroughputMibps(Float throughputMibps) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withThroughputMibps(throughputMibps); - return this; - } - - /** - * Get the encryptionKeySource property: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. - * - * @return the encryptionKeySource value. - */ - public String encryptionKeySource() { - return this.innerProperties() == null ? null : this.innerProperties().encryptionKeySource(); - } - - /** - * Set the encryptionKeySource property: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. - * - * @param encryptionKeySource the encryptionKeySource value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withEncryptionKeySource(String encryptionKeySource) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withEncryptionKeySource(encryptionKeySource); - return this; - } - - /** - * Get the ldapEnabled property: Specifies whether LDAP is enabled or not for a given NFS volume. - * - * @return the ldapEnabled value. - */ - public Boolean ldapEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().ldapEnabled(); - } - - /** - * Set the ldapEnabled property: Specifies whether LDAP is enabled or not for a given NFS volume. - * - * @param ldapEnabled the ldapEnabled value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withLdapEnabled(Boolean ldapEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withLdapEnabled(ldapEnabled); - return this; - } - - /** - * Get the coolAccess property: Specifies whether Cool Access(tiering) is enabled for the volume. - * - * @return the coolAccess value. - */ - public Boolean coolAccess() { - return this.innerProperties() == null ? null : this.innerProperties().coolAccess(); - } - - /** - * Set the coolAccess property: Specifies whether Cool Access(tiering) is enabled for the volume. - * - * @param coolAccess the coolAccess value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withCoolAccess(Boolean coolAccess) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withCoolAccess(coolAccess); - return this; - } - - /** - * Get the coolnessPeriod property: Specifies the number of days after which data that is not accessed by clients - * will be tiered. - * - * @return the coolnessPeriod value. - */ - public Integer coolnessPeriod() { - return this.innerProperties() == null ? null : this.innerProperties().coolnessPeriod(); - } - - /** - * Set the coolnessPeriod property: Specifies the number of days after which data that is not accessed by clients - * will be tiered. - * - * @param coolnessPeriod the coolnessPeriod value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withCoolnessPeriod(Integer coolnessPeriod) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withCoolnessPeriod(coolnessPeriod); - return this; - } - - /** - * Get the unixPermissions property: 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. - * - * @return the unixPermissions value. - */ - public String unixPermissions() { - return this.innerProperties() == null ? null : this.innerProperties().unixPermissions(); - } - - /** - * Set the unixPermissions property: 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. - * - * @param unixPermissions the unixPermissions value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withUnixPermissions(String unixPermissions) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withUnixPermissions(unixPermissions); - return this; - } - - /** - * Get the cloneProgress property: 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. - * - * @return the cloneProgress value. - */ - public Integer cloneProgress() { - return this.innerProperties() == null ? null : this.innerProperties().cloneProgress(); - } - - /** - * Get the avsDataStore property: avsDataStore Specifies whether the volume is enabled for Azure VMware Solution - * (AVS) datastore purpose. - * - * @return the avsDataStore value. - */ - public AvsDataStore avsDataStore() { - return this.innerProperties() == null ? null : this.innerProperties().avsDataStore(); - } - - /** - * Set the avsDataStore property: avsDataStore Specifies whether the volume is enabled for Azure VMware Solution - * (AVS) datastore purpose. - * - * @param avsDataStore the avsDataStore value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withAvsDataStore(AvsDataStore avsDataStore) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withAvsDataStore(avsDataStore); - return this; - } - - /** - * Get the isDefaultQuotaEnabled property: Specifies if default quota is enabled for the volume. - * - * @return the isDefaultQuotaEnabled value. - */ - public Boolean isDefaultQuotaEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().isDefaultQuotaEnabled(); - } - - /** - * Set the isDefaultQuotaEnabled property: Specifies if default quota is enabled for the volume. - * - * @param isDefaultQuotaEnabled the isDefaultQuotaEnabled value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withIsDefaultQuotaEnabled(Boolean isDefaultQuotaEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withIsDefaultQuotaEnabled(isDefaultQuotaEnabled); - return this; - } - - /** - * Get the defaultUserQuotaInKiBs property: Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, - * the minimum value of 4 KiBs applies . - * - * @return the defaultUserQuotaInKiBs value. - */ - public Long defaultUserQuotaInKiBs() { - return this.innerProperties() == null ? null : this.innerProperties().defaultUserQuotaInKiBs(); - } - - /** - * Set the defaultUserQuotaInKiBs property: Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, - * the minimum value of 4 KiBs applies . - * - * @param defaultUserQuotaInKiBs the defaultUserQuotaInKiBs value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withDefaultUserQuotaInKiBs(Long defaultUserQuotaInKiBs) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withDefaultUserQuotaInKiBs(defaultUserQuotaInKiBs); - return this; - } - - /** - * Get the defaultGroupQuotaInKiBs property: Default group quota for volume in KiBs. If isDefaultQuotaEnabled is - * set, the minimum value of 4 KiBs applies. - * - * @return the defaultGroupQuotaInKiBs value. - */ - public Long defaultGroupQuotaInKiBs() { - return this.innerProperties() == null ? null : this.innerProperties().defaultGroupQuotaInKiBs(); - } - - /** - * Set the defaultGroupQuotaInKiBs property: Default group quota for volume in KiBs. If isDefaultQuotaEnabled is - * set, the minimum value of 4 KiBs applies. - * - * @param defaultGroupQuotaInKiBs the defaultGroupQuotaInKiBs value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withDefaultGroupQuotaInKiBs(Long defaultGroupQuotaInKiBs) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withDefaultGroupQuotaInKiBs(defaultGroupQuotaInKiBs); - return this; - } - - /** - * Get the volumeGroupName property: Volume Group Name. - * - * @return the volumeGroupName value. - */ - public String volumeGroupName() { - return this.innerProperties() == null ? null : this.innerProperties().volumeGroupName(); - } - - /** - * Get the capacityPoolResourceId property: Pool Resource Id used in case of creating a volume through volume group. - * - * @return the capacityPoolResourceId value. - */ - public String capacityPoolResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().capacityPoolResourceId(); - } - - /** - * 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. - */ - public VolumeInner withCapacityPoolResourceId(String capacityPoolResourceId) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withCapacityPoolResourceId(capacityPoolResourceId); - return this; - } - - /** - * Get the proximityPlacementGroup property: Proximity placement group associated with the volume. - * - * @return the proximityPlacementGroup value. - */ - public String proximityPlacementGroup() { - return this.innerProperties() == null ? null : this.innerProperties().proximityPlacementGroup(); - } - - /** - * Set the proximityPlacementGroup property: Proximity placement group associated with the volume. - * - * @param proximityPlacementGroup the proximityPlacementGroup value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withProximityPlacementGroup(String proximityPlacementGroup) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withProximityPlacementGroup(proximityPlacementGroup); - return this; - } - - /** - * Get the t2Network property: T2 network information. - * - * @return the t2Network value. - */ - public String t2Network() { - return this.innerProperties() == null ? null : this.innerProperties().t2Network(); - } - - /** - * Get the volumeSpecName property: Volume spec name is the application specific designation or identifier for the - * particular volume in a volume group for e.g. data, log. - * - * @return the volumeSpecName value. - */ - public String volumeSpecName() { - return this.innerProperties() == null ? null : this.innerProperties().volumeSpecName(); - } - - /** - * Set the volumeSpecName property: Volume spec name is the application specific designation or identifier for the - * particular volume in a volume group for e.g. data, log. - * - * @param volumeSpecName the volumeSpecName value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withVolumeSpecName(String volumeSpecName) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withVolumeSpecName(volumeSpecName); - return this; - } - - /** - * Get the placementRules property: Volume placement rules Application specific placement rules for the particular - * volume. - * - * @return the placementRules value. - */ - public List placementRules() { - return this.innerProperties() == null ? null : this.innerProperties().placementRules(); - } - - /** - * Set the placementRules property: Volume placement rules Application specific placement rules for the particular - * volume. - * - * @param placementRules the placementRules value to set. - * @return the VolumeInner object itself. - */ - public VolumeInner withPlacementRules(List placementRules) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withPlacementRules(placementRules); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw logger - .logExceptionAsError( - 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 deleted file mode 100644 index b3aabd2251ae9..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java +++ /dev/null @@ -1,257 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; -import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Patchable volume properties. */ -@Fluent -public final class VolumePatchProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumePatchProperties.class); - - /* - * serviceLevel The service level of the file system - */ - @JsonProperty(value = "serviceLevel") - private ServiceLevel serviceLevel; - - /* - * 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. Specified in bytes. - */ - @JsonProperty(value = "usageThreshold") - private Long usageThreshold; - - /* - * exportPolicy Set of export policy rules - */ - @JsonProperty(value = "exportPolicy") - private VolumePatchPropertiesExportPolicy exportPolicy; - - /* - * Maximum throughput in Mibps 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; - - /* - * DataProtection DataProtection type volumes include an object containing - * details of the replication - */ - @JsonProperty(value = "dataProtection") - private VolumePatchPropertiesDataProtection dataProtection; - - /* - * Specifies if default quota is enabled for the volume. - */ - @JsonProperty(value = "isDefaultQuotaEnabled") - private Boolean isDefaultQuotaEnabled; - - /* - * Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, - * the minimum value of 4 KiBs applies . - */ - @JsonProperty(value = "defaultUserQuotaInKiBs") - private Long defaultUserQuotaInKiBs; - - /* - * Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, - * the minimum value of 4 KiBs applies. - */ - @JsonProperty(value = "defaultGroupQuotaInKiBs") - private Long defaultGroupQuotaInKiBs; - - /** - * Get the serviceLevel property: serviceLevel The service level of the file system. - * - * @return the serviceLevel value. - */ - public ServiceLevel serviceLevel() { - return this.serviceLevel; - } - - /** - * Set the serviceLevel property: serviceLevel The service level of the file system. - * - * @param serviceLevel the serviceLevel value to set. - * @return the VolumePatchProperties object itself. - */ - public VolumePatchProperties withServiceLevel(ServiceLevel serviceLevel) { - this.serviceLevel = serviceLevel; - return this; - } - - /** - * Get the usageThreshold property: 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. Specified in bytes. - * - * @return the usageThreshold value. - */ - public Long usageThreshold() { - return this.usageThreshold; - } - - /** - * Set the usageThreshold property: 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. Specified in bytes. - * - * @param usageThreshold the usageThreshold value to set. - * @return the VolumePatchProperties object itself. - */ - public VolumePatchProperties withUsageThreshold(Long usageThreshold) { - this.usageThreshold = usageThreshold; - return this; - } - - /** - * Get the exportPolicy property: exportPolicy Set of export policy rules. - * - * @return the exportPolicy value. - */ - public VolumePatchPropertiesExportPolicy exportPolicy() { - return this.exportPolicy; - } - - /** - * Set the exportPolicy property: exportPolicy Set of export policy rules. - * - * @param exportPolicy the exportPolicy value to set. - * @return the VolumePatchProperties object itself. - */ - public VolumePatchProperties withExportPolicy(VolumePatchPropertiesExportPolicy exportPolicy) { - this.exportPolicy = exportPolicy; - return this; - } - - /** - * Get the throughputMibps property: Maximum throughput in Mibps that can be achieved by this volume and this will - * be accepted as input only for manual qosType volume. - * - * @return the throughputMibps value. - */ - public Float throughputMibps() { - return this.throughputMibps; - } - - /** - * Set the throughputMibps property: Maximum throughput in Mibps that can be achieved by this volume and this will - * be accepted as input only for manual qosType volume. - * - * @param throughputMibps the throughputMibps value to set. - * @return the VolumePatchProperties object itself. - */ - public VolumePatchProperties withThroughputMibps(Float throughputMibps) { - this.throughputMibps = throughputMibps; - return this; - } - - /** - * Get the dataProtection property: DataProtection DataProtection type volumes include an object containing details - * of the replication. - * - * @return the dataProtection value. - */ - public VolumePatchPropertiesDataProtection dataProtection() { - return this.dataProtection; - } - - /** - * Set the dataProtection property: DataProtection DataProtection type volumes include an object containing details - * of the replication. - * - * @param dataProtection the dataProtection value to set. - * @return the VolumePatchProperties object itself. - */ - public VolumePatchProperties withDataProtection(VolumePatchPropertiesDataProtection dataProtection) { - this.dataProtection = dataProtection; - return this; - } - - /** - * Get the isDefaultQuotaEnabled property: Specifies if default quota is enabled for the volume. - * - * @return the isDefaultQuotaEnabled value. - */ - public Boolean isDefaultQuotaEnabled() { - return this.isDefaultQuotaEnabled; - } - - /** - * Set the isDefaultQuotaEnabled property: Specifies if default quota is enabled for the volume. - * - * @param isDefaultQuotaEnabled the isDefaultQuotaEnabled value to set. - * @return the VolumePatchProperties object itself. - */ - public VolumePatchProperties withIsDefaultQuotaEnabled(Boolean isDefaultQuotaEnabled) { - this.isDefaultQuotaEnabled = isDefaultQuotaEnabled; - return this; - } - - /** - * Get the defaultUserQuotaInKiBs property: Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, - * the minimum value of 4 KiBs applies . - * - * @return the defaultUserQuotaInKiBs value. - */ - public Long defaultUserQuotaInKiBs() { - return this.defaultUserQuotaInKiBs; - } - - /** - * Set the defaultUserQuotaInKiBs property: Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, - * the minimum value of 4 KiBs applies . - * - * @param defaultUserQuotaInKiBs the defaultUserQuotaInKiBs value to set. - * @return the VolumePatchProperties object itself. - */ - public VolumePatchProperties withDefaultUserQuotaInKiBs(Long defaultUserQuotaInKiBs) { - this.defaultUserQuotaInKiBs = defaultUserQuotaInKiBs; - return this; - } - - /** - * Get the defaultGroupQuotaInKiBs property: Default group quota for volume in KiBs. If isDefaultQuotaEnabled is - * set, the minimum value of 4 KiBs applies. - * - * @return the defaultGroupQuotaInKiBs value. - */ - public Long defaultGroupQuotaInKiBs() { - return this.defaultGroupQuotaInKiBs; - } - - /** - * Set the defaultGroupQuotaInKiBs property: Default group quota for volume in KiBs. If isDefaultQuotaEnabled is - * set, the minimum value of 4 KiBs applies. - * - * @param defaultGroupQuotaInKiBs the defaultGroupQuotaInKiBs value to set. - * @return the VolumePatchProperties object itself. - */ - public VolumePatchProperties withDefaultGroupQuotaInKiBs(Long defaultGroupQuotaInKiBs) { - this.defaultGroupQuotaInKiBs = defaultGroupQuotaInKiBs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (exportPolicy() != null) { - exportPolicy().validate(); - } - if (dataProtection() != null) { - dataProtection().validate(); - } - } -} 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 deleted file mode 100644 index 2ae7afb4aff19..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java +++ /dev/null @@ -1,1076 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.AvsDataStore; -import com.azure.resourcemanager.netapp.models.NetworkFeatures; -import com.azure.resourcemanager.netapp.models.PlacementKeyValuePairs; -import com.azure.resourcemanager.netapp.models.SecurityStyle; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection; -import com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy; -import com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Volume properties. */ -@Fluent -public final class VolumeProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeProperties.class); - - /* - * FileSystem ID Unique FileSystem Identifier. - */ - @JsonProperty(value = "fileSystemId", access = JsonProperty.Access.WRITE_ONLY) - private String fileSystemId; - - /* - * Creation Token or File Path A unique file path for the volume. Used when - * creating mount targets - */ - @JsonProperty(value = "creationToken", required = true) - private String creationToken; - - /* - * serviceLevel The service level of the file system - */ - @JsonProperty(value = "serviceLevel") - private ServiceLevel serviceLevel; - - /* - * 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. Specified in bytes. - */ - @JsonProperty(value = "usageThreshold", required = true) - private long usageThreshold; - - /* - * exportPolicy Set of export policy rules - */ - @JsonProperty(value = "exportPolicy") - private VolumePropertiesExportPolicy exportPolicy; - - /* - * protocolTypes Set of protocol types, default NFSv3, CIFS for SMB - * protocol - */ - @JsonProperty(value = "protocolTypes") - private List protocolTypes; - - /* - * Azure lifecycle management - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /* - * Snapshot ID UUID v4 or resource identifier used to identify the - * Snapshot. - */ - @JsonProperty(value = "snapshotId") - private String snapshotId; - - /* - * Backup ID UUID v4 or resource identifier used to identify the Backup. - */ - @JsonProperty(value = "backupId") - private String backupId; - - /* - * Baremetal Tenant ID Unique Baremetal Tenant Identifier. - */ - @JsonProperty(value = "baremetalTenantId", access = JsonProperty.Access.WRITE_ONLY) - private String baremetalTenantId; - - /* - * The Azure Resource URI for a delegated subnet. Must have the delegation - * Microsoft.NetApp/volumes - */ - @JsonProperty(value = "subnetId", required = true) - private String subnetId; - - /* - * Network features Basic network, or Standard features available to the - * volume. - */ - @JsonProperty(value = "networkFeatures") - private NetworkFeatures networkFeatures; - - /* - * Network Sibling Set ID Network Sibling Set ID for the the group of - * volumes sharing networking resources. - */ - @JsonProperty(value = "networkSiblingSetId", access = JsonProperty.Access.WRITE_ONLY) - private String networkSiblingSetId; - - /* - * Storage to Network Proximity Provides storage to network proximity - * information for the volume. - */ - @JsonProperty(value = "storageToNetworkProximity", access = JsonProperty.Access.WRITE_ONLY) - private VolumeStorageToNetworkProximity storageToNetworkProximity; - - /* - * mountTargets List of mount targets - */ - @JsonProperty(value = "mountTargets", access = JsonProperty.Access.WRITE_ONLY) - private List mountTargets; - - /* - * What type of volume is this. For destination volumes in Cross Region - * Replication, set type to DataProtection - */ - @JsonProperty(value = "volumeType") - private String volumeType; - - /* - * DataProtection DataProtection type volumes include an object containing - * details of the replication - */ - @JsonProperty(value = "dataProtection") - private VolumePropertiesDataProtection dataProtection; - - /* - * Restoring - */ - @JsonProperty(value = "isRestoring") - 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 (default to - * true). - */ - @JsonProperty(value = "snapshotDirectoryVisible") - private Boolean snapshotDirectoryVisible; - - /* - * Describe if a volume is KerberosEnabled. To be use with swagger version - * 2020-05-01 or later - */ - @JsonProperty(value = "kerberosEnabled") - private Boolean kerberosEnabled; - - /* - * The security style of volume, default unix, defaults to ntfs for dual - * protocol or CIFS protocol - */ - @JsonProperty(value = "securityStyle") - 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 - */ - @JsonProperty(value = "smbEncryption") - private Boolean smbEncryption; - - /* - * Enables continuously available share property for smb volume. Only - * applicable for SMB volume - */ - @JsonProperty(value = "smbContinuouslyAvailable") - private Boolean smbContinuouslyAvailable; - - /* - * Maximum throughput in Mibps 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; - - /* - * Encryption Key Source. Possible values are: 'Microsoft.NetApp' - */ - @JsonProperty(value = "encryptionKeySource") - private String encryptionKeySource; - - /* - * Specifies whether LDAP is enabled or not for a given NFS volume. - */ - @JsonProperty(value = "ldapEnabled") - private Boolean ldapEnabled; - - /* - * Specifies whether Cool Access(tiering) is enabled for the volume. - */ - @JsonProperty(value = "coolAccess") - private Boolean coolAccess; - - /* - * Specifies the number of days after which data that is not accessed by - * clients will be tiered. - */ - @JsonProperty(value = "coolnessPeriod") - private Integer coolnessPeriod; - - /* - * 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. - */ - @JsonProperty(value = "cloneProgress", access = JsonProperty.Access.WRITE_ONLY) - private Integer cloneProgress; - - /* - * avsDataStore Specifies whether the volume is enabled for Azure VMware - * Solution (AVS) datastore purpose - */ - @JsonProperty(value = "avsDataStore") - private AvsDataStore avsDataStore; - - /* - * Specifies if default quota is enabled for the volume. - */ - @JsonProperty(value = "isDefaultQuotaEnabled") - private Boolean isDefaultQuotaEnabled; - - /* - * Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, - * the minimum value of 4 KiBs applies . - */ - @JsonProperty(value = "defaultUserQuotaInKiBs") - private Long defaultUserQuotaInKiBs; - - /* - * Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, - * the minimum value of 4 KiBs applies. - */ - @JsonProperty(value = "defaultGroupQuotaInKiBs") - private Long defaultGroupQuotaInKiBs; - - /* - * Volume Group Name - */ - @JsonProperty(value = "volumeGroupName", access = JsonProperty.Access.WRITE_ONLY) - private String volumeGroupName; - - /* - * Pool Resource Id used in case of creating a volume through volume group - */ - @JsonProperty(value = "capacityPoolResourceId") - private String capacityPoolResourceId; - - /* - * Proximity placement group associated with the volume - */ - @JsonProperty(value = "proximityPlacementGroup") - private String proximityPlacementGroup; - - /* - * T2 network information - */ - @JsonProperty(value = "t2Network", access = JsonProperty.Access.WRITE_ONLY) - 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 - */ - @JsonProperty(value = "volumeSpecName") - private String volumeSpecName; - - /* - * Volume placement rules Application specific placement rules for the - * particular volume - */ - @JsonProperty(value = "placementRules") - private List placementRules; - - /** - * Get the fileSystemId property: FileSystem ID Unique FileSystem Identifier. - * - * @return the fileSystemId value. - */ - public String fileSystemId() { - return this.fileSystemId; - } - - /** - * Get the creationToken property: Creation Token or File Path A unique file path for the volume. Used when creating - * mount targets. - * - * @return the creationToken value. - */ - public String creationToken() { - return this.creationToken; - } - - /** - * Set the creationToken property: Creation Token or File Path A unique file path for the volume. Used when creating - * mount targets. - * - * @param creationToken the creationToken value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withCreationToken(String creationToken) { - this.creationToken = creationToken; - return this; - } - - /** - * Get the serviceLevel property: serviceLevel The service level of the file system. - * - * @return the serviceLevel value. - */ - public ServiceLevel serviceLevel() { - return this.serviceLevel; - } - - /** - * Set the serviceLevel property: serviceLevel The service level of the file system. - * - * @param serviceLevel the serviceLevel value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withServiceLevel(ServiceLevel serviceLevel) { - this.serviceLevel = serviceLevel; - return this; - } - - /** - * Get the usageThreshold property: 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. Specified in bytes. - * - * @return the usageThreshold value. - */ - public long usageThreshold() { - return this.usageThreshold; - } - - /** - * Set the usageThreshold property: 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. Specified in bytes. - * - * @param usageThreshold the usageThreshold value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withUsageThreshold(long usageThreshold) { - this.usageThreshold = usageThreshold; - return this; - } - - /** - * Get the exportPolicy property: exportPolicy Set of export policy rules. - * - * @return the exportPolicy value. - */ - public VolumePropertiesExportPolicy exportPolicy() { - return this.exportPolicy; - } - - /** - * Set the exportPolicy property: exportPolicy Set of export policy rules. - * - * @param exportPolicy the exportPolicy value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withExportPolicy(VolumePropertiesExportPolicy exportPolicy) { - this.exportPolicy = exportPolicy; - return this; - } - - /** - * Get the protocolTypes property: protocolTypes Set of protocol types, default NFSv3, CIFS for SMB protocol. - * - * @return the protocolTypes value. - */ - public List protocolTypes() { - return this.protocolTypes; - } - - /** - * Set the protocolTypes property: protocolTypes Set of protocol types, default NFSv3, CIFS for SMB protocol. - * - * @param protocolTypes the protocolTypes value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withProtocolTypes(List protocolTypes) { - this.protocolTypes = protocolTypes; - return this; - } - - /** - * Get the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the snapshotId property: Snapshot ID UUID v4 or resource identifier used to identify the Snapshot. - * - * @return the snapshotId value. - */ - public String snapshotId() { - return this.snapshotId; - } - - /** - * Set the snapshotId property: Snapshot ID UUID v4 or resource identifier used to identify the Snapshot. - * - * @param snapshotId the snapshotId value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withSnapshotId(String snapshotId) { - this.snapshotId = snapshotId; - return this; - } - - /** - * Get the backupId property: Backup ID UUID v4 or resource identifier used to identify the Backup. - * - * @return the backupId value. - */ - public String backupId() { - return this.backupId; - } - - /** - * Set the backupId property: Backup ID UUID v4 or resource identifier used to identify the Backup. - * - * @param backupId the backupId value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withBackupId(String backupId) { - this.backupId = backupId; - return this; - } - - /** - * Get the baremetalTenantId property: Baremetal Tenant ID Unique Baremetal Tenant Identifier. - * - * @return the baremetalTenantId value. - */ - public String baremetalTenantId() { - return this.baremetalTenantId; - } - - /** - * Get the subnetId property: The Azure Resource URI for a delegated subnet. Must have the delegation - * Microsoft.NetApp/volumes. - * - * @return the subnetId value. - */ - public String subnetId() { - return this.subnetId; - } - - /** - * Set the subnetId property: The Azure Resource URI for a delegated subnet. Must have the delegation - * Microsoft.NetApp/volumes. - * - * @param subnetId the subnetId value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withSubnetId(String subnetId) { - this.subnetId = subnetId; - return this; - } - - /** - * Get the networkFeatures property: Network features Basic network, or Standard features available to the volume. - * - * @return the networkFeatures value. - */ - public NetworkFeatures networkFeatures() { - return this.networkFeatures; - } - - /** - * Set the networkFeatures property: Network features Basic network, or Standard features available to the volume. - * - * @param networkFeatures the networkFeatures value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withNetworkFeatures(NetworkFeatures networkFeatures) { - this.networkFeatures = networkFeatures; - return this; - } - - /** - * Get the networkSiblingSetId property: Network Sibling Set ID Network Sibling Set ID for the the group of volumes - * sharing networking resources. - * - * @return the networkSiblingSetId value. - */ - public String networkSiblingSetId() { - return this.networkSiblingSetId; - } - - /** - * Get the storageToNetworkProximity property: Storage to Network Proximity Provides storage to network proximity - * information for the volume. - * - * @return the storageToNetworkProximity value. - */ - public VolumeStorageToNetworkProximity storageToNetworkProximity() { - return this.storageToNetworkProximity; - } - - /** - * Get the mountTargets property: mountTargets List of mount targets. - * - * @return the mountTargets value. - */ - public List mountTargets() { - return this.mountTargets; - } - - /** - * Get the volumeType property: What type of volume is this. For destination volumes in Cross Region Replication, - * set type to DataProtection. - * - * @return the volumeType value. - */ - public String volumeType() { - return this.volumeType; - } - - /** - * Set the volumeType property: What type of volume is this. For destination volumes in Cross Region Replication, - * set type to DataProtection. - * - * @param volumeType the volumeType value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withVolumeType(String volumeType) { - this.volumeType = volumeType; - return this; - } - - /** - * Get the dataProtection property: DataProtection DataProtection type volumes include an object containing details - * of the replication. - * - * @return the dataProtection value. - */ - public VolumePropertiesDataProtection dataProtection() { - return this.dataProtection; - } - - /** - * Set the dataProtection property: DataProtection DataProtection type volumes include an object containing details - * of the replication. - * - * @param dataProtection the dataProtection value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withDataProtection(VolumePropertiesDataProtection dataProtection) { - this.dataProtection = dataProtection; - return this; - } - - /** - * Get the isRestoring property: Restoring. - * - * @return the isRestoring value. - */ - public Boolean isRestoring() { - return this.isRestoring; - } - - /** - * Set the isRestoring property: Restoring. - * - * @param isRestoring the isRestoring value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withIsRestoring(Boolean isRestoring) { - this.isRestoring = isRestoring; - return this; - } - - /** - * Get the snapshotDirectoryVisible property: If enabled (true) the volume will contain a read-only snapshot - * directory which provides access to each of the volume's snapshots (default to true). - * - * @return the snapshotDirectoryVisible value. - */ - public Boolean snapshotDirectoryVisible() { - return this.snapshotDirectoryVisible; - } - - /** - * Set the snapshotDirectoryVisible property: If enabled (true) the volume will contain a read-only snapshot - * directory which provides access to each of the volume's snapshots (default to true). - * - * @param snapshotDirectoryVisible the snapshotDirectoryVisible value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withSnapshotDirectoryVisible(Boolean snapshotDirectoryVisible) { - this.snapshotDirectoryVisible = snapshotDirectoryVisible; - return this; - } - - /** - * Get the kerberosEnabled property: Describe if a volume is KerberosEnabled. To be use with swagger version - * 2020-05-01 or later. - * - * @return the kerberosEnabled value. - */ - public Boolean kerberosEnabled() { - return this.kerberosEnabled; - } - - /** - * Set the kerberosEnabled property: Describe if a volume is KerberosEnabled. To be use with swagger version - * 2020-05-01 or later. - * - * @param kerberosEnabled the kerberosEnabled value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withKerberosEnabled(Boolean kerberosEnabled) { - this.kerberosEnabled = kerberosEnabled; - return this; - } - - /** - * Get the securityStyle property: The security style of volume, default unix, defaults to ntfs for dual protocol or - * CIFS protocol. - * - * @return the securityStyle value. - */ - public SecurityStyle securityStyle() { - return this.securityStyle; - } - - /** - * 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. - */ - public VolumeProperties withSecurityStyle(SecurityStyle securityStyle) { - this.securityStyle = securityStyle; - return this; - } - - /** - * Get the smbEncryption property: Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol - * volume. To be used with swagger version 2020-08-01 or later. - * - * @return the smbEncryption value. - */ - public Boolean smbEncryption() { - return this.smbEncryption; - } - - /** - * Set the smbEncryption property: Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol - * volume. To be used with swagger version 2020-08-01 or later. - * - * @param smbEncryption the smbEncryption value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withSmbEncryption(Boolean smbEncryption) { - this.smbEncryption = smbEncryption; - return this; - } - - /** - * Get the smbContinuouslyAvailable property: Enables continuously available share property for smb volume. Only - * applicable for SMB volume. - * - * @return the smbContinuouslyAvailable value. - */ - public Boolean smbContinuouslyAvailable() { - return this.smbContinuouslyAvailable; - } - - /** - * Set the smbContinuouslyAvailable property: Enables continuously available share property for smb volume. Only - * applicable for SMB volume. - * - * @param smbContinuouslyAvailable the smbContinuouslyAvailable value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withSmbContinuouslyAvailable(Boolean smbContinuouslyAvailable) { - this.smbContinuouslyAvailable = smbContinuouslyAvailable; - return this; - } - - /** - * Get the throughputMibps property: Maximum throughput in Mibps that can be achieved by this volume and this will - * be accepted as input only for manual qosType volume. - * - * @return the throughputMibps value. - */ - public Float throughputMibps() { - return this.throughputMibps; - } - - /** - * Set the throughputMibps property: Maximum throughput in Mibps that can be achieved by this volume and this will - * be accepted as input only for manual qosType volume. - * - * @param throughputMibps the throughputMibps value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withThroughputMibps(Float throughputMibps) { - this.throughputMibps = throughputMibps; - return this; - } - - /** - * Get the encryptionKeySource property: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. - * - * @return the encryptionKeySource value. - */ - public String encryptionKeySource() { - return this.encryptionKeySource; - } - - /** - * Set the encryptionKeySource property: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. - * - * @param encryptionKeySource the encryptionKeySource value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withEncryptionKeySource(String encryptionKeySource) { - this.encryptionKeySource = encryptionKeySource; - return this; - } - - /** - * Get the ldapEnabled property: Specifies whether LDAP is enabled or not for a given NFS volume. - * - * @return the ldapEnabled value. - */ - public Boolean ldapEnabled() { - return this.ldapEnabled; - } - - /** - * Set the ldapEnabled property: Specifies whether LDAP is enabled or not for a given NFS volume. - * - * @param ldapEnabled the ldapEnabled value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withLdapEnabled(Boolean ldapEnabled) { - this.ldapEnabled = ldapEnabled; - return this; - } - - /** - * Get the coolAccess property: Specifies whether Cool Access(tiering) is enabled for the volume. - * - * @return the coolAccess value. - */ - public Boolean coolAccess() { - return this.coolAccess; - } - - /** - * Set the coolAccess property: Specifies whether Cool Access(tiering) is enabled for the volume. - * - * @param coolAccess the coolAccess value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withCoolAccess(Boolean coolAccess) { - this.coolAccess = coolAccess; - return this; - } - - /** - * Get the coolnessPeriod property: Specifies the number of days after which data that is not accessed by clients - * will be tiered. - * - * @return the coolnessPeriod value. - */ - public Integer coolnessPeriod() { - return this.coolnessPeriod; - } - - /** - * Set the coolnessPeriod property: Specifies the number of days after which data that is not accessed by clients - * will be tiered. - * - * @param coolnessPeriod the coolnessPeriod value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withCoolnessPeriod(Integer coolnessPeriod) { - this.coolnessPeriod = coolnessPeriod; - return this; - } - - /** - * Get the unixPermissions property: 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. - * - * @return the unixPermissions value. - */ - public String unixPermissions() { - return this.unixPermissions; - } - - /** - * Set the unixPermissions property: 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. - * - * @param unixPermissions the unixPermissions value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withUnixPermissions(String unixPermissions) { - this.unixPermissions = unixPermissions; - return this; - } - - /** - * Get the cloneProgress property: 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. - * - * @return the cloneProgress value. - */ - public Integer cloneProgress() { - return this.cloneProgress; - } - - /** - * Get the avsDataStore property: avsDataStore Specifies whether the volume is enabled for Azure VMware Solution - * (AVS) datastore purpose. - * - * @return the avsDataStore value. - */ - public AvsDataStore avsDataStore() { - return this.avsDataStore; - } - - /** - * Set the avsDataStore property: avsDataStore Specifies whether the volume is enabled for Azure VMware Solution - * (AVS) datastore purpose. - * - * @param avsDataStore the avsDataStore value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withAvsDataStore(AvsDataStore avsDataStore) { - this.avsDataStore = avsDataStore; - return this; - } - - /** - * Get the isDefaultQuotaEnabled property: Specifies if default quota is enabled for the volume. - * - * @return the isDefaultQuotaEnabled value. - */ - public Boolean isDefaultQuotaEnabled() { - return this.isDefaultQuotaEnabled; - } - - /** - * Set the isDefaultQuotaEnabled property: Specifies if default quota is enabled for the volume. - * - * @param isDefaultQuotaEnabled the isDefaultQuotaEnabled value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withIsDefaultQuotaEnabled(Boolean isDefaultQuotaEnabled) { - this.isDefaultQuotaEnabled = isDefaultQuotaEnabled; - return this; - } - - /** - * Get the defaultUserQuotaInKiBs property: Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, - * the minimum value of 4 KiBs applies . - * - * @return the defaultUserQuotaInKiBs value. - */ - public Long defaultUserQuotaInKiBs() { - return this.defaultUserQuotaInKiBs; - } - - /** - * Set the defaultUserQuotaInKiBs property: Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, - * the minimum value of 4 KiBs applies . - * - * @param defaultUserQuotaInKiBs the defaultUserQuotaInKiBs value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withDefaultUserQuotaInKiBs(Long defaultUserQuotaInKiBs) { - this.defaultUserQuotaInKiBs = defaultUserQuotaInKiBs; - return this; - } - - /** - * Get the defaultGroupQuotaInKiBs property: Default group quota for volume in KiBs. If isDefaultQuotaEnabled is - * set, the minimum value of 4 KiBs applies. - * - * @return the defaultGroupQuotaInKiBs value. - */ - public Long defaultGroupQuotaInKiBs() { - return this.defaultGroupQuotaInKiBs; - } - - /** - * Set the defaultGroupQuotaInKiBs property: Default group quota for volume in KiBs. If isDefaultQuotaEnabled is - * set, the minimum value of 4 KiBs applies. - * - * @param defaultGroupQuotaInKiBs the defaultGroupQuotaInKiBs value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withDefaultGroupQuotaInKiBs(Long defaultGroupQuotaInKiBs) { - this.defaultGroupQuotaInKiBs = defaultGroupQuotaInKiBs; - return this; - } - - /** - * Get the volumeGroupName property: Volume Group Name. - * - * @return the volumeGroupName value. - */ - public String volumeGroupName() { - return this.volumeGroupName; - } - - /** - * Get the capacityPoolResourceId property: Pool Resource Id used in case of creating a volume through volume group. - * - * @return the capacityPoolResourceId value. - */ - public String capacityPoolResourceId() { - return this.capacityPoolResourceId; - } - - /** - * 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. - */ - public VolumeProperties withCapacityPoolResourceId(String capacityPoolResourceId) { - this.capacityPoolResourceId = capacityPoolResourceId; - return this; - } - - /** - * Get the proximityPlacementGroup property: Proximity placement group associated with the volume. - * - * @return the proximityPlacementGroup value. - */ - public String proximityPlacementGroup() { - return this.proximityPlacementGroup; - } - - /** - * Set the proximityPlacementGroup property: Proximity placement group associated with the volume. - * - * @param proximityPlacementGroup the proximityPlacementGroup value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withProximityPlacementGroup(String proximityPlacementGroup) { - this.proximityPlacementGroup = proximityPlacementGroup; - return this; - } - - /** - * Get the t2Network property: T2 network information. - * - * @return the t2Network value. - */ - public String t2Network() { - return this.t2Network; - } - - /** - * Get the volumeSpecName property: Volume spec name is the application specific designation or identifier for the - * particular volume in a volume group for e.g. data, log. - * - * @return the volumeSpecName value. - */ - public String volumeSpecName() { - return this.volumeSpecName; - } - - /** - * Set the volumeSpecName property: Volume spec name is the application specific designation or identifier for the - * particular volume in a volume group for e.g. data, log. - * - * @param volumeSpecName the volumeSpecName value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withVolumeSpecName(String volumeSpecName) { - this.volumeSpecName = volumeSpecName; - return this; - } - - /** - * Get the placementRules property: Volume placement rules Application specific placement rules for the particular - * volume. - * - * @return the placementRules value. - */ - public List placementRules() { - return this.placementRules; - } - - /** - * Set the placementRules property: Volume placement rules Application specific placement rules for the particular - * volume. - * - * @param placementRules the placementRules value to set. - * @return the VolumeProperties object itself. - */ - public VolumeProperties withPlacementRules(List placementRules) { - this.placementRules = placementRules; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (creationToken() == null) { - throw logger - .logExceptionAsError( - 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")); - } - if (mountTargets() != null) { - mountTargets().forEach(e -> e.validate()); - } - if (dataProtection() != null) { - dataProtection().validate(); - } - if (placementRules() != null) { - placementRules().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/package-info.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/package-info.java deleted file mode 100644 index 9f8720a7ef746..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the inner data models for NetAppManagementClient. Microsoft NetApp Files Azure Resource Provider - * specification. - */ -package com.azure.resourcemanager.netapp.fluent.models; diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/package-info.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/package-info.java deleted file mode 100644 index 56e832f71b8d4..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the service clients for NetAppManagementClient. Microsoft NetApp Files Azure Resource Provider - * specification. - */ -package com.azure.resourcemanager.netapp.fluent; diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountBackupsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountBackupsClientImpl.java deleted file mode 100644 index 3823199cd4411..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountBackupsClientImpl.java +++ /dev/null @@ -1,686 +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.implementation; - -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.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.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.netapp.fluent.AccountBackupsClient; -import com.azure.resourcemanager.netapp.fluent.models.BackupInner; -import com.azure.resourcemanager.netapp.models.BackupsList; -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 AccountBackupsClient. */ -public final class AccountBackupsClientImpl implements AccountBackupsClient { - private final ClientLogger logger = new ClientLogger(AccountBackupsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final AccountBackupsService service; - - /** The service client containing this operation class. */ - private final NetAppManagementClientImpl client; - - /** - * Initializes an instance of AccountBackupsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - AccountBackupsClientImpl(NetAppManagementClientImpl client) { - this.service = - RestProxy.create(AccountBackupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for NetAppManagementClientAccountBackups to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "NetAppManagementClie") - private interface AccountBackupsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/accountBackups") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @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}/accountBackups/{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("backupName") String backupName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/accountBackups/{backupName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("backupName") String backupName, - @QueryParam("api-version") String apiVersion, - Context context); - } - - /** - * List all Backups for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Backups. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(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 - .list( - 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(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List all Backups for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Backups. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - 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 - .list( - 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(), null, null)); - } - - /** - * List all Backups for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Backups. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName)); - } - - /** - * List all Backups for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Backups. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, context)); - } - - /** - * List all Backups for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Backups. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName)); - } - - /** - * List all Backups for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Backups. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName, context)); - } - - /** - * Gets the specified backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 for a Netapp Account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String accountName, 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 (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, - backupName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the specified backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 for a Netapp Account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String accountName, 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 (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, - backupName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Gets the specified backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 for a Netapp Account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, String backupName) { - return getWithResponseAsync(resourceGroupName, accountName, backupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets the specified backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 for a Netapp Account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupInner get(String resourceGroupName, String accountName, String backupName) { - return getAsync(resourceGroupName, accountName, backupName).block(); - } - - /** - * Gets the specified backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 for a Netapp Account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String accountName, String backupName, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, backupName, context).block(); - } - - /** - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String accountName, 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 (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - backupName, - this.client.getApiVersion(), - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String accountName, 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 (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - backupName, - this.client.getApiVersion(), - context); - } - - /** - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String accountName, String backupName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName, backupName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String accountName, String backupName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, accountName, backupName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String backupName) { - return beginDeleteAsync(resourceGroupName, accountName, backupName).getSyncPoller(); - } - - /** - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String backupName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, backupName, context).getSyncPoller(); - } - - /** - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String backupName) { - return beginDeleteAsync(resourceGroupName, accountName, backupName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String backupName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, backupName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 backupName) { - deleteAsync(resourceGroupName, accountName, backupName).block(); - } - - /** - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 backupName, Context context) { - deleteAsync(resourceGroupName, accountName, backupName, context).block(); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountBackupsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountBackupsImpl.java deleted file mode 100644 index bb26b306532ea..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountBackupsImpl.java +++ /dev/null @@ -1,80 +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.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.AccountBackupsClient; -import com.azure.resourcemanager.netapp.fluent.models.BackupInner; -import com.azure.resourcemanager.netapp.models.AccountBackups; -import com.azure.resourcemanager.netapp.models.Backup; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class AccountBackupsImpl implements AccountBackups { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountBackupsImpl.class); - - private final AccountBackupsClient innerClient; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - public AccountBackupsImpl( - AccountBackupsClient innerClient, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String accountName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName); - return Utils.mapPage(inner, inner1 -> new BackupImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String accountName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName, context); - return Utils.mapPage(inner, inner1 -> new BackupImpl(inner1, this.manager())); - } - - public Backup get(String resourceGroupName, String accountName, String backupName) { - BackupInner inner = this.serviceClient().get(resourceGroupName, accountName, backupName); - if (inner != null) { - return new BackupImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String accountName, String backupName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, accountName, backupName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new BackupImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String accountName, String backupName) { - this.serviceClient().delete(resourceGroupName, accountName, backupName); - } - - public void delete(String resourceGroupName, String accountName, String backupName, Context context) { - this.serviceClient().delete(resourceGroupName, accountName, backupName, context); - } - - private AccountBackupsClient 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/AccountsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java deleted file mode 100644 index 037e7ae455844..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java +++ /dev/null @@ -1,1525 +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.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.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -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.NetAppAccountList; -import com.azure.resourcemanager.netapp.models.NetAppAccountPatch; -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 AccountsClient. */ -public final class AccountsClientImpl implements AccountsClient { - private final ClientLogger logger = new ClientLogger(AccountsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final AccountsService service; - - /** The service client containing this operation class. */ - private final NetAppManagementClientImpl client; - - /** - * Initializes an instance of AccountsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - AccountsClientImpl(NetAppManagementClientImpl client) { - this.service = RestProxy.create(AccountsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for NetAppManagementClientAccounts to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "NetAppManagementClie") - private interface AccountsService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/netAppAccounts") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @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") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @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}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @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"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") NetAppAccountInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}") - @ExpectedResponses({202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") NetAppAccountPatch body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @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); - } - - /** - * List and describe all NetApp accounts in the subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetApp account resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - 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 and describe all NetApp accounts in the subscription. - * - * @param context The 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 NetApp account resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List and describe all NetApp accounts in the subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetApp account resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List and describe all NetApp accounts in the subscription. - * - * @param context The 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 NetApp account resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * List and describe all NetApp accounts in the subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetApp account resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * List and describe all NetApp accounts in the subscription. - * - * @param context The 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 NetApp account resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * List and describe all NetApp accounts in the resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 NetApp account resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - 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 and describe all NetApp accounts in the resource group. - * - * @param resourceGroupName The name of the resource group. - * @param context The 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 NetApp account resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List and describe all NetApp accounts in the resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 NetApp account resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List and describe all NetApp accounts in the resource group. - * - * @param resourceGroupName The name of the resource group. - * @param context The 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 NetApp account resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List and describe all NetApp accounts in the resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 NetApp account resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * List and describe all NetApp accounts in the resource group. - * - * @param resourceGroupName The name of the resource group. - * @param context The 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 NetApp account resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Get the NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 NetApp account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - 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 - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 NetApp account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - 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 - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get the NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 NetApp account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String accountName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, accountName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get the NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 NetApp account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetAppAccountInner getByResourceGroup(String resourceGroupName, String accountName) { - return getByResourceGroupAsync(resourceGroupName, accountName).block(); - } - - /** - * Get the NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 NetApp account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String accountName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, accountName, context).block(); - } - - /** - * Create or update the specified NetApp account within the resource group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String accountName, NetAppAccountInner 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 - .createOrUpdate( - 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 or update the specified NetApp account within the resource group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String accountName, NetAppAccountInner 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 - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Create or update the specified NetApp account within the resource group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetAppAccountInner> beginCreateOrUpdateAsync( - String resourceGroupName, String accountName, NetAppAccountInner body) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, accountName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - NetAppAccountInner.class, - NetAppAccountInner.class, - this.client.getContext()); - } - - /** - * Create or update the specified NetApp account within the resource group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetAppAccountInner> beginCreateOrUpdateAsync( - String resourceGroupName, String accountName, NetAppAccountInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, accountName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), NetAppAccountInner.class, NetAppAccountInner.class, context); - } - - /** - * Create or update the specified NetApp account within the resource group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetAppAccountInner> beginCreateOrUpdate( - String resourceGroupName, String accountName, NetAppAccountInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, accountName, body).getSyncPoller(); - } - - /** - * Create or update the specified NetApp account within the resource group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetAppAccountInner> beginCreateOrUpdate( - String resourceGroupName, String accountName, NetAppAccountInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, accountName, body, context).getSyncPoller(); - } - - /** - * Create or update the specified NetApp account within the resource group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String accountName, NetAppAccountInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, accountName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update the specified NetApp account within the resource group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String accountName, NetAppAccountInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, accountName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update the specified NetApp account within the resource group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetAppAccountInner createOrUpdate(String resourceGroupName, String accountName, NetAppAccountInner body) { - return createOrUpdateAsync(resourceGroupName, accountName, body).block(); - } - - /** - * Create or update the specified NetApp account within the resource group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetAppAccountInner createOrUpdate( - String resourceGroupName, String accountName, NetAppAccountInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, accountName, body, context).block(); - } - - /** - * Delete the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(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.")); - } - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - this.client.getApiVersion(), - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - 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.")); - } - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - this.client.getApiVersion(), - context); - } - - /** - * Delete the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String accountName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName) { - return beginDeleteAsync(resourceGroupName, accountName).getSyncPoller(); - } - - /** - * Delete the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, context).getSyncPoller(); - } - - /** - * Delete the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName) { - return beginDeleteAsync(resourceGroupName, accountName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 delete(String resourceGroupName, String accountName) { - deleteAsync(resourceGroupName, accountName).block(); - } - - /** - * Delete the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 delete(String resourceGroupName, String accountName, Context context) { - deleteAsync(resourceGroupName, accountName, context).block(); - } - - /** - * Patch the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String accountName, NetAppAccountPatch 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 - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Patch the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String accountName, NetAppAccountPatch 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 - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Patch the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetAppAccountInner> beginUpdateAsync( - String resourceGroupName, String accountName, NetAppAccountPatch body) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, accountName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - NetAppAccountInner.class, - NetAppAccountInner.class, - this.client.getContext()); - } - - /** - * Patch the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetAppAccountInner> beginUpdateAsync( - String resourceGroupName, String accountName, NetAppAccountPatch body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, accountName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), NetAppAccountInner.class, NetAppAccountInner.class, context); - } - - /** - * Patch the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetAppAccountInner> beginUpdate( - String resourceGroupName, String accountName, NetAppAccountPatch body) { - return beginUpdateAsync(resourceGroupName, accountName, body).getSyncPoller(); - } - - /** - * Patch the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetAppAccountInner> beginUpdate( - String resourceGroupName, String accountName, NetAppAccountPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, accountName, body, context).getSyncPoller(); - } - - /** - * Patch the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String accountName, NetAppAccountPatch body) { - return beginUpdateAsync(resourceGroupName, accountName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Patch the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String accountName, NetAppAccountPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, accountName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Patch the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetAppAccountInner update(String resourceGroupName, String accountName, NetAppAccountPatch body) { - return updateAsync(resourceGroupName, accountName, body).block(); - } - - /** - * Patch the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param body NetApp Account 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 netApp account resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetAppAccountInner update( - String resourceGroupName, String accountName, NetAppAccountPatch body, Context context) { - return updateAsync(resourceGroupName, accountName, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink 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 NetApp account resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The 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 NetApp account resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink 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 NetApp account resources. - */ - @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 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 NetApp account resources. - */ - @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/AccountsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsImpl.java deleted file mode 100644 index 6958ee3434aca..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsImpl.java +++ /dev/null @@ -1,174 +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.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.AccountsClient; -import com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner; -import com.azure.resourcemanager.netapp.models.Accounts; -import com.azure.resourcemanager.netapp.models.NetAppAccount; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class AccountsImpl implements Accounts { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountsImpl.class); - - private final AccountsClient innerClient; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - public AccountsImpl( - AccountsClient innerClient, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new NetAppAccountImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new NetAppAccountImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new NetAppAccountImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new NetAppAccountImpl(inner1, this.manager())); - } - - public NetAppAccount getByResourceGroup(String resourceGroupName, String accountName) { - NetAppAccountInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, accountName); - if (inner != null) { - return new NetAppAccountImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getByResourceGroupWithResponse( - String resourceGroupName, String accountName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, accountName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new NetAppAccountImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String accountName) { - this.serviceClient().delete(resourceGroupName, accountName); - } - - public void delete(String resourceGroupName, String accountName, Context context) { - this.serviceClient().delete(resourceGroupName, accountName, context); - } - - public NetAppAccount getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, accountName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - this.delete(resourceGroupName, accountName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - this.delete(resourceGroupName, accountName, context); - } - - private AccountsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } - - public NetAppAccountImpl define(String name) { - return new NetAppAccountImpl(name, this.manager()); - } -} 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 deleted file mode 100644 index 3e7f48717f2f7..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupImpl.java +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.implementation; - -import com.azure.core.management.Region; -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; -import java.util.Map; - -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 String location() { - return this.innerModel().location(); - } - - 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 volumeName() { - return this.innerModel().volumeName(); - } - - public Boolean useExistingSnapshot() { - return this.innerModel().useExistingSnapshot(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public BackupInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String poolName; - - private String volumeName; - - private String backupName; - - private BackupPatch updateBody; - - public BackupImpl withExistingVolume( - String resourceGroupName, String accountName, String poolName, String volumeName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - this.poolName = poolName; - this.volumeName = volumeName; - return this; - } - - public Backup create() { - this.innerObject = - serviceManager - .serviceClient() - .getBackups() - .create( - resourceGroupName, accountName, poolName, volumeName, backupName, this.innerModel(), Context.NONE); - return this; - } - - public Backup create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBackups() - .create(resourceGroupName, accountName, poolName, volumeName, 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, poolName, volumeName, backupName, updateBody, Context.NONE); - return this; - } - - public Backup apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBackups() - .update(resourceGroupName, accountName, poolName, volumeName, backupName, updateBody, context); - return this; - } - - BackupImpl(BackupInner innerObject, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); - this.poolName = Utils.getValueFromIdByName(innerObject.id(), "capacityPools"); - this.volumeName = Utils.getValueFromIdByName(innerObject.id(), "volumes"); - this.backupName = Utils.getValueFromIdByName(innerObject.id(), "backups"); - } - - public Backup refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getBackups() - .getWithResponse(resourceGroupName, accountName, poolName, volumeName, backupName, Context.NONE) - .getValue(); - return this; - } - - public Backup refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBackups() - .getWithResponse(resourceGroupName, accountName, poolName, volumeName, backupName, context) - .getValue(); - return this; - } - - public BackupImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public BackupImpl withRegion(String location) { - this.innerModel().withLocation(location); - 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) { - if (isInCreateMode()) { - this.innerModel().withUseExistingSnapshot(useExistingSnapshot); - return this; - } else { - this.updateBody.withUseExistingSnapshot(useExistingSnapshot); - return this; - } - } - - public BackupImpl withTags(Map tags) { - 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/BackupPoliciesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesClientImpl.java deleted file mode 100644 index dab0938483a1a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesClientImpl.java +++ /dev/null @@ -1,1344 +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.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.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient; -import com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner; -import com.azure.resourcemanager.netapp.models.BackupPoliciesList; -import com.azure.resourcemanager.netapp.models.BackupPolicyPatch; -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 BackupPoliciesClient. */ -public final class BackupPoliciesClientImpl implements BackupPoliciesClient { - private final ClientLogger logger = new ClientLogger(BackupPoliciesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final BackupPoliciesService service; - - /** The service client containing this operation class. */ - private final NetAppManagementClientImpl client; - - /** - * Initializes an instance of BackupPoliciesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BackupPoliciesClientImpl(NetAppManagementClientImpl client) { - this.service = - RestProxy.create(BackupPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for NetAppManagementClientBackupPolicies to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "NetAppManagementClie") - private interface BackupPoliciesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/backupPolicies") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @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}/backupPolicies/{backupPolicyName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("backupPolicyName") String backupPolicyName, - @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}/backupPolicies/{backupPolicyName}") - @ExpectedResponses({200, 201, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("backupPolicyName") String backupPolicyName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") BackupPolicyInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}") - @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("backupPolicyName") String backupPolicyName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") BackupPolicyPatch body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("backupPolicyName") String backupPolicyName, - @QueryParam("api-version") String apiVersion, - Context context); - } - - /** - * List backup policies for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Policies. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(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 - .list( - 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(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List backup policies for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Policies. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - 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 - .list( - 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(), null, null)); - } - - /** - * List backup policies for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Policies. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName)); - } - - /** - * List backup policies for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Policies. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, context)); - } - - /** - * List backup policies for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Policies. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName)); - } - - /** - * List backup policies for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Policies. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName, context)); - } - - /** - * Get a particular backup Policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 particular backup Policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String accountName, String backupPolicyName) { - 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 (backupPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupPolicyName 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, - backupPolicyName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a particular backup Policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param context The 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 particular backup Policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String accountName, String backupPolicyName, 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 (backupPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupPolicyName 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, - backupPolicyName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get a particular backup Policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 particular backup Policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, String backupPolicyName) { - return getWithResponseAsync(resourceGroupName, accountName, backupPolicyName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get a particular backup Policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 particular backup Policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupPolicyInner get(String resourceGroupName, String accountName, String backupPolicyName) { - return getAsync(resourceGroupName, accountName, backupPolicyName).block(); - } - - /** - * Get a particular backup Policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param context The 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 particular backup Policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String accountName, String backupPolicyName, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, backupPolicyName, context).block(); - } - - /** - * Create a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, String accountName, String backupPolicyName, BackupPolicyInner 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 (backupPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupPolicyName 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, - backupPolicyName, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, - String accountName, - String backupPolicyName, - BackupPolicyInner 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 (backupPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupPolicyName 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, - backupPolicyName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Create a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BackupPolicyInner> beginCreateAsync( - String resourceGroupName, String accountName, String backupPolicyName, BackupPolicyInner body) { - Mono>> mono = - createWithResponseAsync(resourceGroupName, accountName, backupPolicyName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BackupPolicyInner.class, - BackupPolicyInner.class, - this.client.getContext()); - } - - /** - * Create a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BackupPolicyInner> beginCreateAsync( - String resourceGroupName, - String accountName, - String backupPolicyName, - BackupPolicyInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createWithResponseAsync(resourceGroupName, accountName, backupPolicyName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), BackupPolicyInner.class, BackupPolicyInner.class, context); - } - - /** - * Create a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BackupPolicyInner> beginCreate( - String resourceGroupName, String accountName, String backupPolicyName, BackupPolicyInner body) { - return beginCreateAsync(resourceGroupName, accountName, backupPolicyName, body).getSyncPoller(); - } - - /** - * Create a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BackupPolicyInner> beginCreate( - String resourceGroupName, - String accountName, - String backupPolicyName, - BackupPolicyInner body, - Context context) { - return beginCreateAsync(resourceGroupName, accountName, backupPolicyName, body, context).getSyncPoller(); - } - - /** - * Create a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String accountName, String backupPolicyName, BackupPolicyInner body) { - return beginCreateAsync(resourceGroupName, accountName, backupPolicyName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, - String accountName, - String backupPolicyName, - BackupPolicyInner body, - Context context) { - return beginCreateAsync(resourceGroupName, accountName, backupPolicyName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupPolicyInner create( - String resourceGroupName, String accountName, String backupPolicyName, BackupPolicyInner body) { - return createAsync(resourceGroupName, accountName, backupPolicyName, body).block(); - } - - /** - * Create a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupPolicyInner create( - String resourceGroupName, - String accountName, - String backupPolicyName, - BackupPolicyInner body, - Context context) { - return createAsync(resourceGroupName, accountName, backupPolicyName, body, context).block(); - } - - /** - * Patch a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String accountName, String backupPolicyName, BackupPolicyPatch 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 (backupPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupPolicyName 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, - backupPolicyName, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Patch a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String accountName, - String backupPolicyName, - BackupPolicyPatch 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 (backupPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupPolicyName 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, - backupPolicyName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Patch a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BackupPolicyInner> beginUpdateAsync( - String resourceGroupName, String accountName, String backupPolicyName, BackupPolicyPatch body) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, accountName, backupPolicyName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BackupPolicyInner.class, - BackupPolicyInner.class, - this.client.getContext()); - } - - /** - * Patch a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BackupPolicyInner> beginUpdateAsync( - String resourceGroupName, - String accountName, - String backupPolicyName, - BackupPolicyPatch body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, accountName, backupPolicyName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), BackupPolicyInner.class, BackupPolicyInner.class, context); - } - - /** - * Patch a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BackupPolicyInner> beginUpdate( - String resourceGroupName, String accountName, String backupPolicyName, BackupPolicyPatch body) { - return beginUpdateAsync(resourceGroupName, accountName, backupPolicyName, body).getSyncPoller(); - } - - /** - * Patch a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BackupPolicyInner> beginUpdate( - String resourceGroupName, - String accountName, - String backupPolicyName, - BackupPolicyPatch body, - Context context) { - return beginUpdateAsync(resourceGroupName, accountName, backupPolicyName, body, context).getSyncPoller(); - } - - /** - * Patch a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String accountName, String backupPolicyName, BackupPolicyPatch body) { - return beginUpdateAsync(resourceGroupName, accountName, backupPolicyName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Patch a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String accountName, - String backupPolicyName, - BackupPolicyPatch body, - Context context) { - return beginUpdateAsync(resourceGroupName, accountName, backupPolicyName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Patch a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupPolicyInner update( - String resourceGroupName, String accountName, String backupPolicyName, BackupPolicyPatch body) { - return updateAsync(resourceGroupName, accountName, backupPolicyName, body).block(); - } - - /** - * Patch a backup policy for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param body Backup policy 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 policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupPolicyInner update( - String resourceGroupName, - String accountName, - String backupPolicyName, - BackupPolicyPatch body, - Context context) { - return updateAsync(resourceGroupName, accountName, backupPolicyName, body, context).block(); - } - - /** - * Delete backup policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String accountName, String backupPolicyName) { - 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 (backupPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - backupPolicyName, - this.client.getApiVersion(), - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete backup policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param context The 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String accountName, String backupPolicyName, 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 (backupPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - backupPolicyName, - this.client.getApiVersion(), - context); - } - - /** - * Delete backup policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String accountName, String backupPolicyName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, accountName, backupPolicyName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete backup policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param context The 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String accountName, String backupPolicyName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, accountName, backupPolicyName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete backup policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String backupPolicyName) { - return beginDeleteAsync(resourceGroupName, accountName, backupPolicyName).getSyncPoller(); - } - - /** - * Delete backup policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param context The 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String backupPolicyName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, backupPolicyName, context).getSyncPoller(); - } - - /** - * Delete backup policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String backupPolicyName) { - return beginDeleteAsync(resourceGroupName, accountName, backupPolicyName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete backup policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param context The 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String accountName, String backupPolicyName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, backupPolicyName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete backup policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 backupPolicyName) { - deleteAsync(resourceGroupName, accountName, backupPolicyName).block(); - } - - /** - * Delete backup policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @param context The 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 backupPolicyName, Context context) { - deleteAsync(resourceGroupName, accountName, backupPolicyName, context).block(); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesImpl.java deleted file mode 100644 index fd0b0279c8680..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesImpl.java +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.BackupPoliciesClient; -import com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner; -import com.azure.resourcemanager.netapp.models.BackupPolicies; -import com.azure.resourcemanager.netapp.models.BackupPolicy; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class BackupPoliciesImpl implements BackupPolicies { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupPoliciesImpl.class); - - private final BackupPoliciesClient innerClient; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - public BackupPoliciesImpl( - BackupPoliciesClient innerClient, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String accountName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName); - return Utils.mapPage(inner, inner1 -> new BackupPolicyImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String accountName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName, context); - return Utils.mapPage(inner, inner1 -> new BackupPolicyImpl(inner1, this.manager())); - } - - public BackupPolicy get(String resourceGroupName, String accountName, String backupPolicyName) { - BackupPolicyInner inner = this.serviceClient().get(resourceGroupName, accountName, backupPolicyName); - if (inner != null) { - return new BackupPolicyImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String accountName, String backupPolicyName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, accountName, backupPolicyName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new BackupPolicyImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String accountName, String backupPolicyName) { - this.serviceClient().delete(resourceGroupName, accountName, backupPolicyName); - } - - public void delete(String resourceGroupName, String accountName, String backupPolicyName, Context context) { - this.serviceClient().delete(resourceGroupName, accountName, backupPolicyName, context); - } - - public BackupPolicy getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies"); - if (backupPolicyName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, backupPolicyName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies"); - if (backupPolicyName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, backupPolicyName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies"); - if (backupPolicyName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id))); - } - this.delete(resourceGroupName, accountName, backupPolicyName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies"); - if (backupPolicyName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id))); - } - this.delete(resourceGroupName, accountName, backupPolicyName, context); - } - - private BackupPoliciesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } - - public BackupPolicyImpl define(String name) { - return new BackupPolicyImpl(name, this.manager()); - } -} 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 deleted file mode 100644 index e1c51521b7c88..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPolicyImpl.java +++ /dev/null @@ -1,257 +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.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner; -import com.azure.resourcemanager.netapp.models.BackupPolicy; -import com.azure.resourcemanager.netapp.models.BackupPolicyPatch; -import com.azure.resourcemanager.netapp.models.VolumeBackups; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class BackupPolicyImpl implements BackupPolicy, BackupPolicy.Definition, BackupPolicy.Update { - private BackupPolicyInner 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 String etag() { - return this.innerModel().etag(); - } - - public String backupPolicyId() { - return this.innerModel().backupPolicyId(); - } - - public String provisioningState() { - return this.innerModel().provisioningState(); - } - - public Integer dailyBackupsToKeep() { - return this.innerModel().dailyBackupsToKeep(); - } - - public Integer weeklyBackupsToKeep() { - return this.innerModel().weeklyBackupsToKeep(); - } - - public Integer monthlyBackupsToKeep() { - return this.innerModel().monthlyBackupsToKeep(); - } - - public Integer volumesAssigned() { - return this.innerModel().volumesAssigned(); - } - - public Boolean enabled() { - return this.innerModel().enabled(); - } - - public List volumeBackups() { - List inner = this.innerModel().volumeBackups(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public BackupPolicyInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String backupPolicyName; - - private BackupPolicyPatch updateBody; - - public BackupPolicyImpl withExistingNetAppAccount(String resourceGroupName, String accountName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - return this; - } - - public BackupPolicy create() { - 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); - return this; - } - - BackupPolicyImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = new BackupPolicyInner(); - this.serviceManager = serviceManager; - this.backupPolicyName = name; - } - - public BackupPolicyImpl update() { - this.updateBody = new BackupPolicyPatch(); - return this; - } - - public BackupPolicy apply() { - 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); - return this; - } - - BackupPolicyImpl( - BackupPolicyInner innerObject, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); - this.backupPolicyName = Utils.getValueFromIdByName(innerObject.id(), "backupPolicies"); - } - - public BackupPolicy refresh() { - 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(); - return this; - } - - public BackupPolicyImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public BackupPolicyImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public BackupPolicyImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public BackupPolicyImpl withDailyBackupsToKeep(Integer dailyBackupsToKeep) { - if (isInCreateMode()) { - this.innerModel().withDailyBackupsToKeep(dailyBackupsToKeep); - return this; - } else { - this.updateBody.withDailyBackupsToKeep(dailyBackupsToKeep); - return this; - } - } - - public BackupPolicyImpl withWeeklyBackupsToKeep(Integer weeklyBackupsToKeep) { - if (isInCreateMode()) { - this.innerModel().withWeeklyBackupsToKeep(weeklyBackupsToKeep); - return this; - } else { - this.updateBody.withWeeklyBackupsToKeep(weeklyBackupsToKeep); - return this; - } - } - - public BackupPolicyImpl withMonthlyBackupsToKeep(Integer monthlyBackupsToKeep) { - if (isInCreateMode()) { - this.innerModel().withMonthlyBackupsToKeep(monthlyBackupsToKeep); - return this; - } else { - this.updateBody.withMonthlyBackupsToKeep(monthlyBackupsToKeep); - return this; - } - } - - public BackupPolicyImpl withEnabled(Boolean enabled) { - if (isInCreateMode()) { - this.innerModel().withEnabled(enabled); - return this; - } else { - this.updateBody.withEnabled(enabled); - 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/BackupStatusImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupStatusImpl.java deleted file mode 100644 index b5e2bf27d99d8..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupStatusImpl.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.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 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/BackupsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsClientImpl.java deleted file mode 100644 index b82d18339c92e..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsClientImpl.java +++ /dev/null @@ -1,2047 +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.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.logging.ClientLogger; -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; - -/** An instance of this class provides access to all the operations defined in BackupsClient. */ -public final class BackupsClientImpl implements BackupsClient { - private final ClientLogger logger = new ClientLogger(BackupsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final BackupsService service; - - /** The service client containing this operation class. */ - private final NetAppManagementClientImpl client; - - /** - * Initializes an instance of BackupsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BackupsClientImpl(NetAppManagementClientImpl client) { - this.service = RestProxy.create(BackupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for NetAppManagementClientBackups to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "NetAppManagementClie") - private interface BackupsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backupStatus") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getStatus( - @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}/restoreStatus") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getVolumeRestoreStatus( - @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}/backups") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @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}/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("poolName") String poolName, - @PathParam("volumeName") String volumeName, - @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}/capacityPools/{poolName}/volumes/{volumeName}/backups/{backupName}") - @ExpectedResponses({200, 201, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, - @PathParam("volumeName") String volumeName, - @PathParam("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}/capacityPools/{poolName}/volumes/{volumeName}/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("poolName") String poolName, - @PathParam("volumeName") String volumeName, - @PathParam("backupName") String backupName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") BackupPatch body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups/{backupName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, - @PathParam("volumeName") String volumeName, - @PathParam("backupName") String backupName, - @QueryParam("api-version") String apiVersion, - Context context); - } - - /** - * Get the status of the backup for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of the backup for a volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getStatusWithResponseAsync( - 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 - .getStatus( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the status of the backup for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of the backup for a volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getStatusWithResponseAsync( - 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 - .getStatus( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get the status of the backup for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of the backup for a volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getStatusAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { - return getStatusWithResponseAsync(resourceGroupName, accountName, poolName, volumeName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get the status of the backup for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of the backup for a volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupStatusInner getStatus( - String resourceGroupName, String accountName, String poolName, String volumeName) { - return getStatusAsync(resourceGroupName, accountName, poolName, volumeName).block(); - } - - /** - * Get the status of the backup for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of the backup for a volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getStatusWithResponse( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return getStatusWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); - } - - /** - * Get the status of the restore for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of the restore for a volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getVolumeRestoreStatusWithResponseAsync( - 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 - .getVolumeRestoreStatus( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the status of the restore for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of the restore for a volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getVolumeRestoreStatusWithResponseAsync( - 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 - .getVolumeRestoreStatus( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get the status of the restore for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of the restore for a volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getVolumeRestoreStatusAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { - return getVolumeRestoreStatusWithResponseAsync(resourceGroupName, accountName, poolName, volumeName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get the status of the restore for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of the restore for a volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RestoreStatusInner getVolumeRestoreStatus( - String resourceGroupName, String accountName, String poolName, String volumeName) { - return getVolumeRestoreStatusAsync(resourceGroupName, accountName, poolName, volumeName).block(); - } - - /** - * Get the status of the restore for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of the restore for a volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getVolumeRestoreStatusWithResponse( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return getVolumeRestoreStatusWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context) - .block(); - } - - /** - * List all backups for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Backups. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - 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 - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List all backups for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Backups. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - 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 - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); - } - - /** - * List all backups for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Backups. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, poolName, volumeName)); - } - - /** - * List all backups for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Backups. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, accountName, poolName, volumeName, context)); - } - - /** - * List all backups for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Backups. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String accountName, String poolName, String volumeName) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName, poolName, volumeName)); - } - - /** - * List all backups for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Backups. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName, poolName, volumeName, context)); - } - - /** - * Gets the specified backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of the volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, 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 (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 (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, - poolName, - volumeName, - backupName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the specified backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of the volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - 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 (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 (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, - poolName, - volumeName, - backupName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Gets the specified backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of the volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, String backupName) { - return getWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, backupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets the specified backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of the volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupInner get( - String resourceGroupName, String accountName, String poolName, String volumeName, String backupName) { - return getAsync(resourceGroupName, accountName, poolName, volumeName, backupName).block(); - } - - /** - * Gets the specified backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of the volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - Context context) { - return getWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, backupName, context).block(); - } - - /** - * Create a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - 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 (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 (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, - poolName, - volumeName, - backupName, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - 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 (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 (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, - poolName, - volumeName, - backupName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Create a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BackupInner> beginCreateAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupInner body) { - Mono>> mono = - createWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, backupName, body); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), BackupInner.class, BackupInner.class, this.client.getContext()); - } - - /** - * Create a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BackupInner> beginCreateAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, backupName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), BackupInner.class, BackupInner.class, context); - } - - /** - * Create a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BackupInner> beginCreate( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupInner body) { - return beginCreateAsync(resourceGroupName, accountName, poolName, volumeName, backupName, body).getSyncPoller(); - } - - /** - * Create a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BackupInner> beginCreate( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupInner body, - Context context) { - return beginCreateAsync(resourceGroupName, accountName, poolName, volumeName, backupName, body, context) - .getSyncPoller(); - } - - /** - * Create a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupInner body) { - return beginCreateAsync(resourceGroupName, accountName, poolName, volumeName, backupName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupInner body, - Context context) { - return beginCreateAsync(resourceGroupName, accountName, poolName, volumeName, backupName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupInner create( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupInner body) { - return createAsync(resourceGroupName, accountName, poolName, volumeName, backupName, body).block(); - } - - /** - * Create a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupInner create( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupInner body, - Context context) { - return createAsync(resourceGroupName, accountName, poolName, volumeName, backupName, body, context).block(); - } - - /** - * Patch a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - 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 (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 (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, - poolName, - volumeName, - backupName, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Patch a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - 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 (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 (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, - poolName, - volumeName, - backupName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Patch a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BackupInner> beginUpdateAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupPatch body) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, backupName, body); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), BackupInner.class, BackupInner.class, this.client.getContext()); - } - - /** - * Patch a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BackupInner> beginUpdateAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupPatch body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, backupName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), BackupInner.class, BackupInner.class, context); - } - - /** - * Patch a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BackupInner> beginUpdate( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupPatch body) { - return beginUpdateAsync(resourceGroupName, accountName, poolName, volumeName, backupName, body).getSyncPoller(); - } - - /** - * Patch a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BackupInner> beginUpdate( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupPatch body, - Context context) { - return beginUpdateAsync(resourceGroupName, accountName, poolName, volumeName, backupName, body, context) - .getSyncPoller(); - } - - /** - * Patch a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupPatch body) { - return beginUpdateAsync(resourceGroupName, accountName, poolName, volumeName, backupName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Patch a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, String backupName) { - final BackupPatch body = null; - return beginUpdateAsync(resourceGroupName, accountName, poolName, volumeName, backupName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Patch a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupPatch body, - Context context) { - return beginUpdateAsync(resourceGroupName, accountName, poolName, volumeName, backupName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Patch a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupInner update( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupPatch body) { - return updateAsync(resourceGroupName, accountName, poolName, volumeName, backupName, body).block(); - } - - /** - * Patch a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupInner update( - String resourceGroupName, String accountName, String poolName, String volumeName, String backupName) { - final BackupPatch body = null; - return updateAsync(resourceGroupName, accountName, poolName, volumeName, backupName, body).block(); - } - - /** - * Patch a backup for the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupInner update( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - BackupPatch body, - Context context) { - return updateAsync(resourceGroupName, accountName, poolName, volumeName, backupName, body, context).block(); - } - - /** - * Delete a backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, 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 (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 (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - backupName, - this.client.getApiVersion(), - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - 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 (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 (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - backupName, - this.client.getApiVersion(), - context); - } - - /** - * Delete a backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, String backupName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, backupName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete a backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, backupName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete a backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String poolName, String volumeName, String backupName) { - return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName, backupName).getSyncPoller(); - } - - /** - * Delete a backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - Context context) { - return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName, backupName, context) - .getSyncPoller(); - } - - /** - * Delete a backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, String backupName) { - return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName, backupName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - Context context) { - return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName, backupName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 poolName, String volumeName, String backupName) { - deleteAsync(resourceGroupName, accountName, poolName, volumeName, backupName).block(); - } - - /** - * Delete a backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 poolName, - String volumeName, - String backupName, - Context context) { - deleteAsync(resourceGroupName, accountName, poolName, volumeName, backupName, context).block(); - } -} 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 deleted file mode 100644 index e9271be237e4e..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsImpl.java +++ /dev/null @@ -1,324 +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.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.BackupStatus; -import com.azure.resourcemanager.netapp.models.Backups; -import com.azure.resourcemanager.netapp.models.RestoreStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class BackupsImpl implements Backups { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupsImpl.class); - - private final BackupsClient innerClient; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - public BackupsImpl(BackupsClient innerClient, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public BackupStatus getStatus(String resourceGroupName, String accountName, String poolName, String volumeName) { - BackupStatusInner inner = this.serviceClient().getStatus(resourceGroupName, accountName, poolName, volumeName); - if (inner != null) { - return new BackupStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getStatusWithResponse( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - Response inner = - this.serviceClient().getStatusWithResponse(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 RestoreStatus getVolumeRestoreStatus( - String resourceGroupName, String accountName, String poolName, String volumeName) { - RestoreStatusInner inner = - this.serviceClient().getVolumeRestoreStatus(resourceGroupName, accountName, poolName, volumeName); - if (inner != null) { - return new RestoreStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getVolumeRestoreStatusWithResponse( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - Response inner = - this - .serviceClient() - .getVolumeRestoreStatusWithResponse(resourceGroupName, accountName, poolName, volumeName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new RestoreStatusImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PagedIterable list( - String resourceGroupName, String accountName, String poolName, String volumeName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, accountName, poolName, volumeName); - return Utils.mapPage(inner, inner1 -> new BackupImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, accountName, poolName, volumeName, context); - return Utils.mapPage(inner, inner1 -> new BackupImpl(inner1, this.manager())); - } - - public Backup get( - String resourceGroupName, String accountName, String poolName, String volumeName, String backupName) { - BackupInner inner = this.serviceClient().get(resourceGroupName, accountName, poolName, volumeName, backupName); - if (inner != null) { - return new BackupImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, accountName, poolName, volumeName, backupName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new BackupImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete( - String resourceGroupName, String accountName, String poolName, String volumeName, String backupName) { - this.serviceClient().delete(resourceGroupName, accountName, poolName, volumeName, backupName); - } - - public void delete( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - Context context) { - this.serviceClient().delete(resourceGroupName, accountName, poolName, volumeName, backupName, context); - } - - public Backup getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); - if (poolName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); - } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); - if (volumeName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); - } - String backupName = Utils.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, poolName, volumeName, backupName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); - if (poolName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); - } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); - if (volumeName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); - } - String backupName = Utils.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, poolName, volumeName, backupName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); - if (poolName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); - } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); - if (volumeName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); - } - String backupName = Utils.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, poolName, volumeName, backupName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); - if (poolName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); - } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); - if (volumeName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); - } - String backupName = Utils.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, poolName, volumeName, backupName, context); - } - - private BackupsClient serviceClient() { - return this.innerClient; - } - - 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/CapacityPoolImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CapacityPoolImpl.java deleted file mode 100644 index 988874d5083bc..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CapacityPoolImpl.java +++ /dev/null @@ -1,252 +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.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner; -import com.azure.resourcemanager.netapp.models.CapacityPool; -import com.azure.resourcemanager.netapp.models.CapacityPoolPatch; -import com.azure.resourcemanager.netapp.models.EncryptionType; -import com.azure.resourcemanager.netapp.models.QosType; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import java.util.Collections; -import java.util.Map; - -public final class CapacityPoolImpl implements CapacityPool, CapacityPool.Definition, CapacityPool.Update { - private CapacityPoolInner 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 String etag() { - return this.innerModel().etag(); - } - - public String poolId() { - return this.innerModel().poolId(); - } - - public long size() { - return this.innerModel().size(); - } - - public ServiceLevel serviceLevel() { - return this.innerModel().serviceLevel(); - } - - public String provisioningState() { - return this.innerModel().provisioningState(); - } - - public Float totalThroughputMibps() { - return this.innerModel().totalThroughputMibps(); - } - - public Float utilizedThroughputMibps() { - return this.innerModel().utilizedThroughputMibps(); - } - - public QosType qosType() { - return this.innerModel().qosType(); - } - - public Boolean coolAccess() { - return this.innerModel().coolAccess(); - } - - public EncryptionType encryptionType() { - return this.innerModel().encryptionType(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public CapacityPoolInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String poolName; - - private CapacityPoolPatch updateBody; - - public CapacityPoolImpl withExistingNetAppAccount(String resourceGroupName, String accountName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - return this; - } - - public CapacityPool create() { - 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); - return this; - } - - CapacityPoolImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = new CapacityPoolInner(); - this.serviceManager = serviceManager; - this.poolName = name; - } - - public CapacityPoolImpl update() { - this.updateBody = new CapacityPoolPatch(); - return this; - } - - public CapacityPool apply() { - 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); - return this; - } - - CapacityPoolImpl( - CapacityPoolInner innerObject, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); - this.poolName = Utils.getValueFromIdByName(innerObject.id(), "capacityPools"); - } - - public CapacityPool refresh() { - 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(); - return this; - } - - public CapacityPoolImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public CapacityPoolImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public CapacityPoolImpl withSize(long size) { - this.innerModel().withSize(size); - return this; - } - - public CapacityPoolImpl withServiceLevel(ServiceLevel serviceLevel) { - this.innerModel().withServiceLevel(serviceLevel); - return this; - } - - public CapacityPoolImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public CapacityPoolImpl withQosType(QosType qosType) { - if (isInCreateMode()) { - this.innerModel().withQosType(qosType); - return this; - } else { - this.updateBody.withQosType(qosType); - return this; - } - } - - public CapacityPoolImpl withCoolAccess(Boolean coolAccess) { - this.innerModel().withCoolAccess(coolAccess); - return this; - } - - public CapacityPoolImpl withEncryptionType(EncryptionType encryptionType) { - this.innerModel().withEncryptionType(encryptionType); - return this; - } - - public CapacityPoolImpl withSize(Long size) { - this.updateBody.withSize(size); - 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/CheckAvailabilityResponseImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CheckAvailabilityResponseImpl.java deleted file mode 100644 index c88d1e8d7d9a4..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CheckAvailabilityResponseImpl.java +++ /dev/null @@ -1,42 +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.implementation; - -import com.azure.resourcemanager.netapp.fluent.models.CheckAvailabilityResponseInner; -import com.azure.resourcemanager.netapp.models.CheckAvailabilityResponse; -import com.azure.resourcemanager.netapp.models.InAvailabilityReasonType; - -public final class CheckAvailabilityResponseImpl implements CheckAvailabilityResponse { - private CheckAvailabilityResponseInner innerObject; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - CheckAvailabilityResponseImpl( - CheckAvailabilityResponseInner innerObject, - com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public Boolean isAvailable() { - return this.innerModel().isAvailable(); - } - - public InAvailabilityReasonType reason() { - return this.innerModel().reason(); - } - - public String message() { - return this.innerModel().message(); - } - - public CheckAvailabilityResponseInner 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 deleted file mode 100644 index 97599b9591a34..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java +++ /dev/null @@ -1,216 +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.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner; -import com.azure.resourcemanager.netapp.models.AccountEncryption; -import com.azure.resourcemanager.netapp.models.ActiveDirectory; -import com.azure.resourcemanager.netapp.models.NetAppAccount; -import com.azure.resourcemanager.netapp.models.NetAppAccountPatch; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class NetAppAccountImpl implements NetAppAccount, NetAppAccount.Definition, NetAppAccount.Update { - private NetAppAccountInner 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 String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String provisioningState() { - return this.innerModel().provisioningState(); - } - - public List activeDirectories() { - List inner = this.innerModel().activeDirectories(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public AccountEncryption encryption() { - return this.innerModel().encryption(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public NetAppAccountInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private NetAppAccountPatch updateBody; - - public NetAppAccountImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public NetAppAccount create() { - 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); - return this; - } - - NetAppAccountImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = new NetAppAccountInner(); - this.serviceManager = serviceManager; - this.accountName = name; - } - - public NetAppAccountImpl update() { - this.updateBody = new NetAppAccountPatch(); - return this; - } - - public NetAppAccount apply() { - this.innerObject = - serviceManager - .serviceClient() - .getAccounts() - .update(resourceGroupName, accountName, updateBody, Context.NONE); - return this; - } - - public NetAppAccount apply(Context context) { - this.innerObject = - serviceManager.serviceClient().getAccounts().update(resourceGroupName, accountName, updateBody, context); - return this; - } - - NetAppAccountImpl( - NetAppAccountInner innerObject, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); - } - - public NetAppAccount refresh() { - 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(); - return this; - } - - public NetAppAccountImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public NetAppAccountImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public NetAppAccountImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public NetAppAccountImpl withActiveDirectories(List activeDirectories) { - if (isInCreateMode()) { - this.innerModel().withActiveDirectories(activeDirectories); - return this; - } else { - this.updateBody.withActiveDirectories(activeDirectories); - return this; - } - } - - public NetAppAccountImpl withEncryption(AccountEncryption encryption) { - if (isInCreateMode()) { - this.innerModel().withEncryption(encryption); - return this; - } else { - this.updateBody.withEncryption(encryption); - 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 deleted file mode 100644 index 15875b653aa3e..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientBuilder.java +++ /dev/null @@ -1,149 +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.implementation; - -import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerAdapter; -import java.time.Duration; - -/** A builder for creating a new instance of the NetAppManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = {NetAppManagementClientImpl.class}) -public final class NetAppManagementClientBuilder { - /* - * Subscription credentials which uniquely identify Microsoft Azure - * subscription. The subscription ID forms part of the URI for every - * service call. - */ - private String subscriptionId; - - /** - * Sets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms - * part of the URI for every service call. - * - * @param subscriptionId the subscriptionId value. - * @return the NetAppManagementClientBuilder. - */ - public NetAppManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * server parameter - */ - private String endpoint; - - /** - * Sets server parameter. - * - * @param endpoint the endpoint value. - * @return the NetAppManagementClientBuilder. - */ - public NetAppManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /* - * The environment to connect to - */ - private AzureEnvironment environment; - - /** - * Sets The environment to connect to. - * - * @param environment the environment value. - * @return the NetAppManagementClientBuilder. - */ - public NetAppManagementClientBuilder environment(AzureEnvironment environment) { - this.environment = environment; - return this; - } - - /* - * The default poll interval for long-running operation - */ - private Duration defaultPollInterval; - - /** - * Sets The default poll interval for long-running operation. - * - * @param defaultPollInterval the defaultPollInterval value. - * @return the NetAppManagementClientBuilder. - */ - public NetAppManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the NetAppManagementClientBuilder. - */ - public NetAppManagementClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /* - * The serializer to serialize an object into a string - */ - private SerializerAdapter serializerAdapter; - - /** - * Sets The serializer to serialize an object into a string. - * - * @param serializerAdapter the serializerAdapter value. - * @return the NetAppManagementClientBuilder. - */ - public NetAppManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of NetAppManagementClientImpl with the provided parameters. - * - * @return an instance of NetAppManagementClientImpl. - */ - public NetAppManagementClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (pipeline == null) { - this.pipeline = - new HttpPipelineBuilder() - .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) - .build(); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } - NetAppManagementClientImpl client = - new NetAppManagementClientImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); - return client; - } -} 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 deleted file mode 100644 index 188582bfdb99f..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java +++ /dev/null @@ -1,466 +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.implementation; - -import com.azure.core.annotation.ServiceClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.Response; -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.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.AsyncPollResponse; -import com.azure.core.util.polling.LongRunningOperationStatus; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.netapp.fluent.AccountBackupsClient; -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.NetAppManagementClient; -import com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient; -import com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient; -import com.azure.resourcemanager.netapp.fluent.OperationsClient; -import com.azure.resourcemanager.netapp.fluent.PoolsClient; -import com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient; -import com.azure.resourcemanager.netapp.fluent.SnapshotsClient; -import com.azure.resourcemanager.netapp.fluent.VaultsClient; -import com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient; -import com.azure.resourcemanager.netapp.fluent.VolumesClient; -import java.io.IOException; -import java.lang.reflect.Type; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import java.util.Map; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** Initializes a new instance of the NetAppManagementClientImpl type. */ -@ServiceClient(builder = NetAppManagementClientBuilder.class) -public final class NetAppManagementClientImpl implements NetAppManagementClient { - private final ClientLogger logger = new ClientLogger(NetAppManagementClientImpl.class); - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of - * the URI for every service call. - */ - private final String subscriptionId; - - /** - * Gets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms - * part of the URI for every service call. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** server parameter. */ - private final String endpoint; - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - public String getEndpoint() { - return this.endpoint; - } - - /** Api Version. */ - private final String apiVersion; - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - public String getApiVersion() { - return this.apiVersion; - } - - /** The HTTP pipeline to send requests through. */ - private final HttpPipeline httpPipeline; - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - public HttpPipeline getHttpPipeline() { - return this.httpPipeline; - } - - /** The serializer to serialize an object into a string. */ - private final SerializerAdapter serializerAdapter; - - /** - * Gets The serializer to serialize an object into a string. - * - * @return the serializerAdapter value. - */ - SerializerAdapter getSerializerAdapter() { - return this.serializerAdapter; - } - - /** The default poll interval for long-running operation. */ - private final Duration defaultPollInterval; - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - public Duration getDefaultPollInterval() { - return this.defaultPollInterval; - } - - /** The OperationsClient object to access its operations. */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** The NetAppResourcesClient object to access its operations. */ - private final NetAppResourcesClient netAppResources; - - /** - * Gets the NetAppResourcesClient object to access its operations. - * - * @return the NetAppResourcesClient object. - */ - public NetAppResourcesClient getNetAppResources() { - return this.netAppResources; - } - - /** The NetAppResourceQuotaLimitsClient object to access its operations. */ - private final NetAppResourceQuotaLimitsClient netAppResourceQuotaLimits; - - /** - * Gets the NetAppResourceQuotaLimitsClient object to access its operations. - * - * @return the NetAppResourceQuotaLimitsClient object. - */ - public NetAppResourceQuotaLimitsClient getNetAppResourceQuotaLimits() { - return this.netAppResourceQuotaLimits; - } - - /** The AccountsClient object to access its operations. */ - private final AccountsClient accounts; - - /** - * Gets the AccountsClient object to access its operations. - * - * @return the AccountsClient object. - */ - public AccountsClient getAccounts() { - return this.accounts; - } - - /** The PoolsClient object to access its operations. */ - private final PoolsClient pools; - - /** - * Gets the PoolsClient object to access its operations. - * - * @return the PoolsClient object. - */ - public PoolsClient getPools() { - return this.pools; - } - - /** The VolumesClient object to access its operations. */ - private final VolumesClient volumes; - - /** - * Gets the VolumesClient object to access its operations. - * - * @return the VolumesClient object. - */ - public VolumesClient getVolumes() { - return this.volumes; - } - - /** The SnapshotsClient object to access its operations. */ - private final SnapshotsClient snapshots; - - /** - * Gets the SnapshotsClient object to access its operations. - * - * @return the SnapshotsClient object. - */ - public SnapshotsClient getSnapshots() { - return this.snapshots; - } - - /** The SnapshotPoliciesClient object to access its operations. */ - private final SnapshotPoliciesClient snapshotPolicies; - - /** - * Gets the SnapshotPoliciesClient object to access its operations. - * - * @return the SnapshotPoliciesClient object. - */ - 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 AccountBackupsClient object to access its operations. */ - private final AccountBackupsClient accountBackups; - - /** - * Gets the AccountBackupsClient object to access its operations. - * - * @return the AccountBackupsClient object. - */ - public AccountBackupsClient getAccountBackups() { - return this.accountBackups; - } - - /** The BackupPoliciesClient object to access its operations. */ - private final BackupPoliciesClient backupPolicies; - - /** - * Gets the BackupPoliciesClient object to access its operations. - * - * @return the BackupPoliciesClient object. - */ - public BackupPoliciesClient getBackupPolicies() { - return this.backupPolicies; - } - - /** The VaultsClient object to access its operations. */ - private final VaultsClient vaults; - - /** - * Gets the VaultsClient object to access its operations. - * - * @return the VaultsClient object. - */ - public VaultsClient getVaults() { - return this.vaults; - } - - /** The VolumeGroupsClient object to access its operations. */ - private final VolumeGroupsClient volumeGroups; - - /** - * Gets the VolumeGroupsClient object to access its operations. - * - * @return the VolumeGroupsClient object. - */ - public VolumeGroupsClient getVolumeGroups() { - return this.volumeGroups; - } - - /** - * Initializes an instance of NetAppManagementClient client. - * - * @param httpPipeline The HTTP pipeline to send requests through. - * @param serializerAdapter The serializer to serialize an object into a string. - * @param defaultPollInterval The default poll interval for long-running operation. - * @param environment The Azure environment. - * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure subscription. The - * subscription ID forms part of the URI for every service call. - * @param endpoint server parameter. - */ - NetAppManagementClientImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { - this.httpPipeline = httpPipeline; - this.serializerAdapter = serializerAdapter; - this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = "2021-08-01"; - this.operations = new OperationsClientImpl(this); - this.netAppResources = new NetAppResourcesClientImpl(this); - this.netAppResourceQuotaLimits = new NetAppResourceQuotaLimitsClientImpl(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.accountBackups = new AccountBackupsClientImpl(this); - this.backupPolicies = new BackupPoliciesClientImpl(this); - this.vaults = new VaultsClientImpl(this); - this.volumeGroups = new VolumeGroupsClientImpl(this); - } - - /** - * Gets default client context. - * - * @return the default client context. - */ - public Context getContext() { - return Context.NONE; - } - - /** - * Merges default client context with provided context. - * - * @param context the context to be merged with default client context. - * @return the merged context. - */ - public Context mergeContext(Context context) { - for (Map.Entry entry : this.getContext().getValues().entrySet()) { - context = context.addData(entry.getKey(), entry.getValue()); - } - return context; - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param httpPipeline the http pipeline. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return poller flux for poll result and final result. - */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); - } - - /** - * Gets the final result, or an error, based on last async poll response. - * - * @param response the last async poll response. - * @param type of poll result. - * @param type of final result. - * @return the final result, or an error. - */ - public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { - if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { - String errorMessage; - ManagementError managementError = null; - HttpResponse errorResponse = null; - PollResult.Error lroError = response.getValue().getError(); - if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); - - errorMessage = response.getValue().getError().getMessage(); - String errorBody = response.getValue().getError().getResponseBody(); - if (errorBody != null) { - // try to deserialize error body to ManagementError - try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); - if (managementError.getCode() == null || managementError.getMessage() == null) { - managementError = null; - } - } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); - } - } - } else { - // fallback to default error message - errorMessage = "Long running operation failed."; - } - if (managementError == null) { - // fallback to default ManagementError - managementError = new ManagementError(response.getStatus().toString(), errorMessage); - } - return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); - } else { - return response.getFinalResult(); - } - } - - private static final class HttpResponseImpl extends HttpResponse { - private final int statusCode; - - private final byte[] responseBody; - - private final HttpHeaders httpHeaders; - - HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { - super(null); - this.statusCode = statusCode; - this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); - } - - public int getStatusCode() { - return statusCode; - } - - public String getHeaderValue(String s) { - return httpHeaders.getValue(s); - } - - public HttpHeaders getHeaders() { - return httpHeaders; - } - - public Flux getBody() { - return Flux.just(ByteBuffer.wrap(responseBody)); - } - - public Mono getBodyAsByteArray() { - return Mono.just(responseBody); - } - - public Mono getBodyAsString() { - return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); - } - - public Mono getBodyAsString(Charset charset) { - return Mono.just(new String(responseBody, charset)); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsClientImpl.java deleted file mode 100644 index 3382e3b72693e..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsClientImpl.java +++ /dev/null @@ -1,383 +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.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.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient; -import com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner; -import com.azure.resourcemanager.netapp.models.SubscriptionQuotaItemList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in NetAppResourceQuotaLimitsClient. */ -public final class NetAppResourceQuotaLimitsClientImpl implements NetAppResourceQuotaLimitsClient { - private final ClientLogger logger = new ClientLogger(NetAppResourceQuotaLimitsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final NetAppResourceQuotaLimitsService service; - - /** The service client containing this operation class. */ - private final NetAppManagementClientImpl client; - - /** - * Initializes an instance of NetAppResourceQuotaLimitsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - NetAppResourceQuotaLimitsClientImpl(NetAppManagementClientImpl client) { - this.service = - RestProxy - .create( - NetAppResourceQuotaLimitsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for NetAppManagementClientNetAppResourceQuotaLimits to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "NetAppManagementClie") - private interface NetAppResourceQuotaLimitsService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits") - @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}/quotaLimits" - + "/{quotaLimitName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, - @PathParam("quotaLimitName") String quotaLimitName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get the default and current limits for quotas. - * - * @param location The location. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the default and current limits for quotas. - */ - @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(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the default and current limits for quotas. - * - * @param location The location. - * @param context The 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 default and current limits for quotas. - */ - @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(), null, null)); - } - - /** - * Get the default and current limits for quotas. - * - * @param location The location. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the default and current limits for quotas. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location) { - return new PagedFlux<>(() -> listSinglePageAsync(location)); - } - - /** - * Get the default and current limits for quotas. - * - * @param location The location. - * @param context The 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 default and current limits for quotas. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(location, context)); - } - - /** - * Get the default and current limits for quotas. - * - * @param location The location. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the default and current limits for quotas. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location) { - return new PagedIterable<>(listAsync(location)); - } - - /** - * Get the default and current limits for quotas. - * - * @param location The location. - * @param context The 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 default and current limits for quotas. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location, Context context) { - return new PagedIterable<>(listAsync(location, context)); - } - - /** - * Get the default and current subscription quota limit. - * - * @param location The location. - * @param quotaLimitName The name of the Quota Limit. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the default and current subscription quota limit. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, String quotaLimitName) { - 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.")); - } - if (quotaLimitName == null) { - return Mono.error(new IllegalArgumentException("Parameter quotaLimitName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - quotaLimitName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the default and current subscription quota limit. - * - * @param location The location. - * @param quotaLimitName The name of the Quota Limit. - * @param context The 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 default and current subscription quota limit. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String location, String quotaLimitName, 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.")); - } - if (quotaLimitName == null) { - return Mono.error(new IllegalArgumentException("Parameter quotaLimitName 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, - quotaLimitName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get the default and current subscription quota limit. - * - * @param location The location. - * @param quotaLimitName The name of the Quota Limit. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the default and current subscription quota limit. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String location, String quotaLimitName) { - return getWithResponseAsync(location, quotaLimitName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get the default and current subscription quota limit. - * - * @param location The location. - * @param quotaLimitName The name of the Quota Limit. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the default and current subscription quota limit. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SubscriptionQuotaItemInner get(String location, String quotaLimitName) { - return getAsync(location, quotaLimitName).block(); - } - - /** - * Get the default and current subscription quota limit. - * - * @param location The location. - * @param quotaLimitName The name of the Quota Limit. - * @param context The 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 default and current subscription quota limit. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String location, String quotaLimitName, Context context) { - return getWithResponseAsync(location, quotaLimitName, context).block(); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsImpl.java deleted file mode 100644 index 4ad68db430cb2..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsImpl.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.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.NetAppResourceQuotaLimitsClient; -import com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner; -import com.azure.resourcemanager.netapp.models.NetAppResourceQuotaLimits; -import com.azure.resourcemanager.netapp.models.SubscriptionQuotaItem; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class NetAppResourceQuotaLimitsImpl implements NetAppResourceQuotaLimits { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetAppResourceQuotaLimitsImpl.class); - - private final NetAppResourceQuotaLimitsClient innerClient; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - public NetAppResourceQuotaLimitsImpl( - NetAppResourceQuotaLimitsClient 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 Utils.mapPage(inner, inner1 -> new SubscriptionQuotaItemImpl(inner1, this.manager())); - } - - public PagedIterable list(String location, Context context) { - PagedIterable inner = this.serviceClient().list(location, context); - return Utils.mapPage(inner, inner1 -> new SubscriptionQuotaItemImpl(inner1, this.manager())); - } - - public SubscriptionQuotaItem get(String location, String quotaLimitName) { - SubscriptionQuotaItemInner inner = this.serviceClient().get(location, quotaLimitName); - if (inner != null) { - return new SubscriptionQuotaItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String location, String quotaLimitName, Context context) { - Response inner = - this.serviceClient().getWithResponse(location, quotaLimitName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new SubscriptionQuotaItemImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private NetAppResourceQuotaLimitsClient 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 deleted file mode 100644 index 816334e453874..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesClientImpl.java +++ /dev/null @@ -1,557 +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.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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient; -import com.azure.resourcemanager.netapp.fluent.models.CheckAvailabilityResponseInner; -import com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest; -import com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest; -import com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in NetAppResourcesClient. */ -public final class NetAppResourcesClientImpl implements NetAppResourcesClient { - private final ClientLogger logger = new ClientLogger(NetAppResourcesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final NetAppResourcesService service; - - /** The service client containing this operation class. */ - private final NetAppManagementClientImpl client; - - /** - * Initializes an instance of NetAppResourcesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - NetAppResourcesClientImpl(NetAppManagementClientImpl client) { - this.service = - RestProxy.create(NetAppResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for NetAppManagementClientNetAppResources to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "NetAppManagementClie") - private interface NetAppResourcesService { - @Headers({"Content-Type: application/json"}) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkNameAvailability") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkNameAvailability( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ResourceNameAvailabilityRequest body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkFilePathAvailability") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkFilePathAvailability( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") FilePathAvailabilityRequest body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkQuotaAvailability") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkQuotaAvailability( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") QuotaAvailabilityRequest body, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Check if a resource name is available. - * - * @param location The location. - * @param body Name availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - String location, ResourceNameAvailabilityRequest 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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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 - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Check if a resource name is available. - * - * @param location The location. - * @param body Name availability request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - String location, ResourceNameAvailabilityRequest 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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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 - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Check if a resource name is available. - * - * @param location The location. - * @param body Name availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkNameAvailabilityAsync( - String location, ResourceNameAvailabilityRequest body) { - return checkNameAvailabilityWithResponseAsync(location, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Check if a resource name is available. - * - * @param location The location. - * @param body Name availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CheckAvailabilityResponseInner checkNameAvailability(String location, ResourceNameAvailabilityRequest body) { - return checkNameAvailabilityAsync(location, body).block(); - } - - /** - * Check if a resource name is available. - * - * @param location The location. - * @param body Name availability request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkNameAvailabilityWithResponse( - String location, ResourceNameAvailabilityRequest body, Context context) { - return checkNameAvailabilityWithResponseAsync(location, body, context).block(); - } - - /** - * Check if a file path is available. - * - * @param location The location. - * @param body File path availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkFilePathAvailabilityWithResponseAsync( - String location, FilePathAvailabilityRequest 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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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 - .checkFilePathAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Check if a file path is available. - * - * @param location The location. - * @param body File path availability request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkFilePathAvailabilityWithResponseAsync( - String location, FilePathAvailabilityRequest 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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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 - .checkFilePathAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Check if a file path is available. - * - * @param location The location. - * @param body File path availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkFilePathAvailabilityAsync( - String location, FilePathAvailabilityRequest body) { - return checkFilePathAvailabilityWithResponseAsync(location, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Check if a file path is available. - * - * @param location The location. - * @param body File path availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CheckAvailabilityResponseInner checkFilePathAvailability(String location, FilePathAvailabilityRequest body) { - return checkFilePathAvailabilityAsync(location, body).block(); - } - - /** - * Check if a file path is available. - * - * @param location The location. - * @param body File path availability request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkFilePathAvailabilityWithResponse( - String location, FilePathAvailabilityRequest body, Context context) { - return checkFilePathAvailabilityWithResponseAsync(location, body, context).block(); - } - - /** - * Check if a quota is available. - * - * @param location The location. - * @param body Quota availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkQuotaAvailabilityWithResponseAsync( - String location, QuotaAvailabilityRequest 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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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 - .checkQuotaAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Check if a quota is available. - * - * @param location The location. - * @param body Quota availability request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkQuotaAvailabilityWithResponseAsync( - String location, QuotaAvailabilityRequest 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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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 - .checkQuotaAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Check if a quota is available. - * - * @param location The location. - * @param body Quota availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkQuotaAvailabilityAsync( - String location, QuotaAvailabilityRequest body) { - return checkQuotaAvailabilityWithResponseAsync(location, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Check if a quota is available. - * - * @param location The location. - * @param body Quota availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CheckAvailabilityResponseInner checkQuotaAvailability(String location, QuotaAvailabilityRequest body) { - return checkQuotaAvailabilityAsync(location, body).block(); - } - - /** - * Check if a quota is available. - * - * @param location The location. - * @param body Quota availability request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkQuotaAvailabilityWithResponse( - String location, QuotaAvailabilityRequest body, Context context) { - return checkQuotaAvailabilityWithResponseAsync(location, body, context).block(); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesImpl.java deleted file mode 100644 index d8602db57aab3..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesImpl.java +++ /dev/null @@ -1,112 +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.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient; -import com.azure.resourcemanager.netapp.fluent.models.CheckAvailabilityResponseInner; -import com.azure.resourcemanager.netapp.models.CheckAvailabilityResponse; -import com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest; -import com.azure.resourcemanager.netapp.models.NetAppResources; -import com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest; -import com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class NetAppResourcesImpl implements NetAppResources { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetAppResourcesImpl.class); - - private final NetAppResourcesClient innerClient; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - public NetAppResourcesImpl( - NetAppResourcesClient innerClient, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public CheckAvailabilityResponse checkNameAvailability(String location, ResourceNameAvailabilityRequest body) { - CheckAvailabilityResponseInner inner = this.serviceClient().checkNameAvailability(location, body); - if (inner != null) { - return new CheckAvailabilityResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response checkNameAvailabilityWithResponse( - String location, ResourceNameAvailabilityRequest body, Context context) { - Response inner = - this.serviceClient().checkNameAvailabilityWithResponse(location, body, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new CheckAvailabilityResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public CheckAvailabilityResponse checkFilePathAvailability(String location, FilePathAvailabilityRequest body) { - CheckAvailabilityResponseInner inner = this.serviceClient().checkFilePathAvailability(location, body); - if (inner != null) { - return new CheckAvailabilityResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response checkFilePathAvailabilityWithResponse( - String location, FilePathAvailabilityRequest body, Context context) { - Response inner = - this.serviceClient().checkFilePathAvailabilityWithResponse(location, body, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new CheckAvailabilityResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public CheckAvailabilityResponse checkQuotaAvailability(String location, QuotaAvailabilityRequest body) { - CheckAvailabilityResponseInner inner = this.serviceClient().checkQuotaAvailability(location, body); - if (inner != null) { - return new CheckAvailabilityResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response checkQuotaAvailabilityWithResponse( - String location, QuotaAvailabilityRequest body, Context context) { - Response inner = - this.serviceClient().checkQuotaAvailabilityWithResponse(location, body, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new CheckAvailabilityResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private NetAppResourcesClient 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/OperationImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/OperationImpl.java deleted file mode 100644 index 39de63d0d0f44..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/OperationImpl.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.implementation; - -import com.azure.resourcemanager.netapp.fluent.models.OperationInner; -import com.azure.resourcemanager.netapp.models.Operation; -import com.azure.resourcemanager.netapp.models.OperationDisplay; -import com.azure.resourcemanager.netapp.models.ServiceSpecification; - -public final class OperationImpl implements Operation { - private OperationInner innerObject; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - OperationImpl(OperationInner innerObject, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public OperationDisplay display() { - return this.innerModel().display(); - } - - public String origin() { - return this.innerModel().origin(); - } - - public ServiceSpecification serviceSpecification() { - return this.innerModel().serviceSpecification(); - } - - public OperationInner 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/OperationsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsClientImpl.java deleted file mode 100644 index 3c181be6098f6..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,176 +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.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.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.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.OperationsClient; -import com.azure.resourcemanager.netapp.fluent.models.OperationInner; -import com.azure.resourcemanager.netapp.models.OperationListResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in OperationsClient. */ -public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final OperationsService service; - - /** The service client containing this operation class. */ - private final NetAppManagementClientImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(NetAppManagementClientImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for NetAppManagementClientOperations to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "NetAppManagementClie") - private interface OperationsService { - @Headers({"Content-Type: application/json"}) - @Get("/providers/Microsoft.NetApp/operations") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Lists all of the available Microsoft.NetApp Rest API operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Cloud Volume operations. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - 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.list(this.client.getEndpoint(), 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())); - } - - /** - * Lists all of the available Microsoft.NetApp Rest API operations. - * - * @param context The 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 result of the request to list Cloud Volume operations. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - 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 - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); - } - - /** - * Lists all of the available Microsoft.NetApp Rest API operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Cloud Volume operations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync()); - } - - /** - * Lists all of the available Microsoft.NetApp Rest API operations. - * - * @param context The 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 result of the request to list Cloud Volume operations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context)); - } - - /** - * Lists all of the available Microsoft.NetApp Rest API operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Cloud Volume operations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Lists all of the available Microsoft.NetApp Rest API operations. - * - * @param context The 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 result of the request to list Cloud Volume operations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsImpl.java deleted file mode 100644 index 0701a4f76fed1..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsImpl.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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.OperationsClient; -import com.azure.resourcemanager.netapp.fluent.models.OperationInner; -import com.azure.resourcemanager.netapp.models.Operation; -import com.azure.resourcemanager.netapp.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); - - private final OperationsClient innerClient; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - public OperationsImpl( - OperationsClient innerClient, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - private OperationsClient 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/PoolsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsClientImpl.java deleted file mode 100644 index de099e3368256..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsClientImpl.java +++ /dev/null @@ -1,1386 +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.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.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.netapp.fluent.PoolsClient; -import com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner; -import com.azure.resourcemanager.netapp.models.CapacityPoolList; -import com.azure.resourcemanager.netapp.models.CapacityPoolPatch; -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 PoolsClient. */ -public final class PoolsClientImpl implements PoolsClient { - private final ClientLogger logger = new ClientLogger(PoolsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final PoolsService service; - - /** The service client containing this operation class. */ - private final NetAppManagementClientImpl client; - - /** - * Initializes an instance of PoolsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PoolsClientImpl(NetAppManagementClientImpl client) { - this.service = RestProxy.create(PoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for NetAppManagementClientPools to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "NetAppManagementClie") - private interface PoolsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/capacityPools") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @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}/capacityPools/{poolName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/capacityPools/{poolName}") - @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("poolName") String poolName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CapacityPoolInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/capacityPools/{poolName}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CapacityPoolPatch body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/capacityPools/{poolName}") - @ExpectedResponses({202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, - @QueryParam("api-version") String apiVersion, - 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); - } - - /** - * List all capacity pools in the NetApp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 capacity pool resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(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 - .list( - 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())); - } - - /** - * List all capacity pools in the NetApp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 capacity pool resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - 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 - .list( - 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)); - } - - /** - * List all capacity pools in the NetApp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 capacity pool resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, accountName), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List all capacity pools in the NetApp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 capacity pool resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, accountName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List all capacity pools in the NetApp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 capacity pool resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName)); - } - - /** - * List all capacity pools in the NetApp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 capacity pool resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName, context)); - } - - /** - * Get details of the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified capacity pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String accountName, String poolName) { - 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.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get details of the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified capacity pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String accountName, String poolName, 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get details of the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified capacity pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, String poolName) { - return getWithResponseAsync(resourceGroupName, accountName, poolName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get details of the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified capacity pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CapacityPoolInner get(String resourceGroupName, String accountName, String poolName) { - return getAsync(resourceGroupName, accountName, poolName).block(); - } - - /** - * Get details of the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified capacity pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String accountName, String poolName, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, poolName, context).block(); - } - - /** - * Create or Update a capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String accountName, String poolName, CapacityPoolInner 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 (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, - poolName, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or Update a capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String accountName, String poolName, CapacityPoolInner 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 (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, - poolName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Create or Update a capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CapacityPoolInner> beginCreateOrUpdateAsync( - String resourceGroupName, String accountName, String poolName, CapacityPoolInner body) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, accountName, poolName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - CapacityPoolInner.class, - CapacityPoolInner.class, - this.client.getContext()); - } - - /** - * Create or Update a capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CapacityPoolInner> beginCreateOrUpdateAsync( - String resourceGroupName, String accountName, String poolName, CapacityPoolInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, accountName, poolName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), CapacityPoolInner.class, CapacityPoolInner.class, context); - } - - /** - * Create or Update a capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CapacityPoolInner> beginCreateOrUpdate( - String resourceGroupName, String accountName, String poolName, CapacityPoolInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, accountName, poolName, body).getSyncPoller(); - } - - /** - * Create or Update a capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CapacityPoolInner> beginCreateOrUpdate( - String resourceGroupName, String accountName, String poolName, CapacityPoolInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, accountName, poolName, body, context).getSyncPoller(); - } - - /** - * Create or Update a capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String accountName, String poolName, CapacityPoolInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, accountName, poolName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or Update a capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String accountName, String poolName, CapacityPoolInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, accountName, poolName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or Update a capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CapacityPoolInner createOrUpdate( - String resourceGroupName, String accountName, String poolName, CapacityPoolInner body) { - return createOrUpdateAsync(resourceGroupName, accountName, poolName, body).block(); - } - - /** - * Create or Update a capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CapacityPoolInner createOrUpdate( - String resourceGroupName, String accountName, String poolName, CapacityPoolInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, accountName, poolName, body, context).block(); - } - - /** - * Patch the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String accountName, String poolName, CapacityPoolPatch 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 (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Patch the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String accountName, String poolName, CapacityPoolPatch 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 (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Patch the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CapacityPoolInner> beginUpdateAsync( - String resourceGroupName, String accountName, String poolName, CapacityPoolPatch body) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, accountName, poolName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - CapacityPoolInner.class, - CapacityPoolInner.class, - this.client.getContext()); - } - - /** - * Patch the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CapacityPoolInner> beginUpdateAsync( - String resourceGroupName, String accountName, String poolName, CapacityPoolPatch body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, accountName, poolName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), CapacityPoolInner.class, CapacityPoolInner.class, context); - } - - /** - * Patch the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CapacityPoolInner> beginUpdate( - String resourceGroupName, String accountName, String poolName, CapacityPoolPatch body) { - return beginUpdateAsync(resourceGroupName, accountName, poolName, body).getSyncPoller(); - } - - /** - * Patch the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CapacityPoolInner> beginUpdate( - String resourceGroupName, String accountName, String poolName, CapacityPoolPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, accountName, poolName, body, context).getSyncPoller(); - } - - /** - * Patch the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String accountName, String poolName, CapacityPoolPatch body) { - return beginUpdateAsync(resourceGroupName, accountName, poolName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Patch the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String accountName, String poolName, CapacityPoolPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, accountName, poolName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Patch the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CapacityPoolInner update( - String resourceGroupName, String accountName, String poolName, CapacityPoolPatch body) { - return updateAsync(resourceGroupName, accountName, poolName, body).block(); - } - - /** - * Patch the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param body Capacity pool 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 capacity pool resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CapacityPoolInner update( - String resourceGroupName, String accountName, String poolName, CapacityPoolPatch body, Context context) { - return updateAsync(resourceGroupName, accountName, poolName, body, context).block(); - } - - /** - * Delete the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String accountName, String poolName) { - 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.")); - } - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - this.client.getApiVersion(), - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param context The 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String accountName, String poolName, 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.")); - } - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - this.client.getApiVersion(), - context); - } - - /** - * Delete the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String accountName, String poolName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName, poolName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param context The 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String accountName, String poolName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, accountName, poolName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String poolName) { - return beginDeleteAsync(resourceGroupName, accountName, poolName).getSyncPoller(); - } - - /** - * Delete the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param context The 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String poolName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, poolName, context).getSyncPoller(); - } - - /** - * Delete the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String poolName) { - return beginDeleteAsync(resourceGroupName, accountName, poolName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param context The 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String poolName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, poolName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String poolName) { - deleteAsync(resourceGroupName, accountName, poolName).block(); - } - - /** - * Delete the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String poolName, Context context) { - deleteAsync(resourceGroupName, accountName, poolName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink 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 capacity pool resources. - */ - @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 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 capacity pool resources. - */ - @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/PoolsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsImpl.java deleted file mode 100644 index 8052c1eff8d36..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsImpl.java +++ /dev/null @@ -1,191 +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.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.PoolsClient; -import com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner; -import com.azure.resourcemanager.netapp.models.CapacityPool; -import com.azure.resourcemanager.netapp.models.Pools; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class PoolsImpl implements Pools { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PoolsImpl.class); - - private final PoolsClient innerClient; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - public PoolsImpl(PoolsClient innerClient, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String accountName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName); - return Utils.mapPage(inner, inner1 -> new CapacityPoolImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String accountName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName, context); - return Utils.mapPage(inner, inner1 -> new CapacityPoolImpl(inner1, this.manager())); - } - - public CapacityPool get(String resourceGroupName, String accountName, String poolName) { - CapacityPoolInner inner = this.serviceClient().get(resourceGroupName, accountName, poolName); - if (inner != null) { - return new CapacityPoolImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String accountName, String poolName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, accountName, poolName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new CapacityPoolImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String accountName, String poolName) { - this.serviceClient().delete(resourceGroupName, accountName, poolName); - } - - public void delete(String resourceGroupName, String accountName, String poolName, Context context) { - this.serviceClient().delete(resourceGroupName, accountName, poolName, context); - } - - public CapacityPool getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); - if (poolName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, poolName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); - if (poolName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, poolName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); - if (poolName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); - } - this.delete(resourceGroupName, accountName, poolName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); - if (poolName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); - } - this.delete(resourceGroupName, accountName, poolName, context); - } - - private PoolsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } - - public CapacityPoolImpl define(String name) { - return new CapacityPoolImpl(name, this.manager()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationStatusImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationStatusImpl.java deleted file mode 100644 index 53bad537232ea..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationStatusImpl.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.implementation; - -import com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner; -import com.azure.resourcemanager.netapp.models.MirrorState; -import com.azure.resourcemanager.netapp.models.RelationshipStatus; -import com.azure.resourcemanager.netapp.models.ReplicationStatus; - -public final class ReplicationStatusImpl implements ReplicationStatus { - private ReplicationStatusInner innerObject; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - ReplicationStatusImpl( - ReplicationStatusInner 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 totalProgress() { - return this.innerModel().totalProgress(); - } - - public String errorMessage() { - return this.innerModel().errorMessage(); - } - - public ReplicationStatusInner 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/RestoreStatusImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RestoreStatusImpl.java deleted file mode 100644 index e8877d0ff83fb..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RestoreStatusImpl.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.implementation; - -import com.azure.resourcemanager.netapp.fluent.models.RestoreStatusInner; -import com.azure.resourcemanager.netapp.models.MirrorState; -import com.azure.resourcemanager.netapp.models.RelationshipStatus; -import com.azure.resourcemanager.netapp.models.RestoreStatus; - -public final class RestoreStatusImpl implements RestoreStatus { - private RestoreStatusInner innerObject; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - RestoreStatusImpl( - RestoreStatusInner 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 totalTransferBytes() { - return this.innerModel().totalTransferBytes(); - } - - public RestoreStatusInner 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/SnapshotImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotImpl.java deleted file mode 100644 index f765c5583c871..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotImpl.java +++ /dev/null @@ -1,146 +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.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotInner; -import com.azure.resourcemanager.netapp.models.Snapshot; -import java.time.OffsetDateTime; - -public final class SnapshotImpl implements Snapshot, Snapshot.Definition { - private SnapshotInner innerObject; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - SnapshotImpl(SnapshotInner 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 String location() { - return this.innerModel().location(); - } - - public String snapshotId() { - return this.innerModel().snapshotId(); - } - - public OffsetDateTime created() { - return this.innerModel().created(); - } - - public String provisioningState() { - return this.innerModel().provisioningState(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public SnapshotInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String poolName; - - private String volumeName; - - private String snapshotName; - - public SnapshotImpl withExistingVolume( - String resourceGroupName, String accountName, String poolName, String volumeName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - this.poolName = poolName; - this.volumeName = volumeName; - return this; - } - - public Snapshot create() { - 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); - return this; - } - - SnapshotImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = new SnapshotInner(); - this.serviceManager = serviceManager; - this.snapshotName = name; - } - - public Snapshot refresh() { - 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(); - return this; - } - - public SnapshotImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public SnapshotImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesClientImpl.java deleted file mode 100644 index d165ae424af91..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesClientImpl.java +++ /dev/null @@ -1,1412 +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.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.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyInner; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyVolumeListInner; -import com.azure.resourcemanager.netapp.models.SnapshotPoliciesList; -import com.azure.resourcemanager.netapp.models.SnapshotPolicyPatch; -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 SnapshotPoliciesClient. */ -public final class SnapshotPoliciesClientImpl implements SnapshotPoliciesClient { - private final ClientLogger logger = new ClientLogger(SnapshotPoliciesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final SnapshotPoliciesService service; - - /** The service client containing this operation class. */ - private final NetAppManagementClientImpl client; - - /** - * Initializes an instance of SnapshotPoliciesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SnapshotPoliciesClientImpl(NetAppManagementClientImpl client) { - this.service = - RestProxy.create(SnapshotPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for NetAppManagementClientSnapshotPolicies to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "NetAppManagementClie") - private interface SnapshotPoliciesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/snapshotPolicies") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @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}/snapshotPolicies/{snapshotPolicyName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("snapshotPolicyName") String snapshotPolicyName, - @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}/snapshotPolicies/{snapshotPolicyName}") - @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("snapshotPolicyName") String snapshotPolicyName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SnapshotPolicyInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}") - @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("snapshotPolicyName") String snapshotPolicyName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SnapshotPolicyPatch body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("snapshotPolicyName") String snapshotPolicyName, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}/volumes") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listVolumes( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("snapshotPolicyName") String snapshotPolicyName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @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 Snapshot Policies. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(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 - .list( - 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(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @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 Snapshot Policies. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - 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 - .list( - 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(), null, null)); - } - - /** - * List snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @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 Snapshot Policies. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName)); - } - - /** - * List snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @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 Snapshot Policies. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, context)); - } - - /** - * List snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @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 Snapshot Policies. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName)); - } - - /** - * List snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @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 Snapshot Policies. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName, context)); - } - - /** - * Get a snapshot Policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 snapshot Policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String accountName, String snapshotPolicyName) { - 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 (snapshotPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter snapshotPolicyName 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, - snapshotPolicyName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a snapshot Policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param context The 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 snapshot Policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String accountName, String snapshotPolicyName, 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 (snapshotPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter snapshotPolicyName 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, - snapshotPolicyName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get a snapshot Policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 snapshot Policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String accountName, String snapshotPolicyName) { - return getWithResponseAsync(resourceGroupName, accountName, snapshotPolicyName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get a snapshot Policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 snapshot Policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SnapshotPolicyInner get(String resourceGroupName, String accountName, String snapshotPolicyName) { - return getAsync(resourceGroupName, accountName, snapshotPolicyName).block(); - } - - /** - * Get a snapshot Policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param context The 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 snapshot Policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String accountName, String snapshotPolicyName, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, snapshotPolicyName, context).block(); - } - - /** - * Create a snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param body Snapshot policy 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 snapshot policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String accountName, String snapshotPolicyName, SnapshotPolicyInner 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 (snapshotPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter snapshotPolicyName 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, - snapshotPolicyName, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param body Snapshot policy 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 snapshot policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String accountName, - String snapshotPolicyName, - SnapshotPolicyInner 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 (snapshotPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter snapshotPolicyName 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, - snapshotPolicyName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Create a snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param body Snapshot policy 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 snapshot policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String accountName, String snapshotPolicyName, SnapshotPolicyInner body) { - return createWithResponseAsync(resourceGroupName, accountName, snapshotPolicyName, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Create a snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param body Snapshot policy 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 snapshot policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SnapshotPolicyInner create( - String resourceGroupName, String accountName, String snapshotPolicyName, SnapshotPolicyInner body) { - return createAsync(resourceGroupName, accountName, snapshotPolicyName, body).block(); - } - - /** - * Create a snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param body Snapshot policy 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 snapshot policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String accountName, - String snapshotPolicyName, - SnapshotPolicyInner body, - Context context) { - return createWithResponseAsync(resourceGroupName, accountName, snapshotPolicyName, body, context).block(); - } - - /** - * Patch a snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param body Snapshot policy 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 snapshot policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String accountName, String snapshotPolicyName, SnapshotPolicyPatch 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 (snapshotPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter snapshotPolicyName 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, - snapshotPolicyName, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Patch a snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param body Snapshot policy 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 snapshot policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String accountName, - String snapshotPolicyName, - SnapshotPolicyPatch 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 (snapshotPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter snapshotPolicyName 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, - snapshotPolicyName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Patch a snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param body Snapshot policy 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 snapshot policy information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SnapshotPolicyInner> beginUpdateAsync( - String resourceGroupName, String accountName, String snapshotPolicyName, SnapshotPolicyPatch body) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, accountName, snapshotPolicyName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - SnapshotPolicyInner.class, - SnapshotPolicyInner.class, - this.client.getContext()); - } - - /** - * Patch a snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param body Snapshot policy 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 snapshot policy information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SnapshotPolicyInner> beginUpdateAsync( - String resourceGroupName, - String accountName, - String snapshotPolicyName, - SnapshotPolicyPatch body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, accountName, snapshotPolicyName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), SnapshotPolicyInner.class, SnapshotPolicyInner.class, context); - } - - /** - * Patch a snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param body Snapshot policy 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 snapshot policy information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SnapshotPolicyInner> beginUpdate( - String resourceGroupName, String accountName, String snapshotPolicyName, SnapshotPolicyPatch body) { - return beginUpdateAsync(resourceGroupName, accountName, snapshotPolicyName, body).getSyncPoller(); - } - - /** - * Patch a snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param body Snapshot policy 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 snapshot policy information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SnapshotPolicyInner> beginUpdate( - String resourceGroupName, - String accountName, - String snapshotPolicyName, - SnapshotPolicyPatch body, - Context context) { - return beginUpdateAsync(resourceGroupName, accountName, snapshotPolicyName, body, context).getSyncPoller(); - } - - /** - * Patch a snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param body Snapshot policy 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 snapshot policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String accountName, String snapshotPolicyName, SnapshotPolicyPatch body) { - return beginUpdateAsync(resourceGroupName, accountName, snapshotPolicyName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Patch a snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param body Snapshot policy 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 snapshot policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String accountName, - String snapshotPolicyName, - SnapshotPolicyPatch body, - Context context) { - return beginUpdateAsync(resourceGroupName, accountName, snapshotPolicyName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Patch a snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param body Snapshot policy 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 snapshot policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SnapshotPolicyInner update( - String resourceGroupName, String accountName, String snapshotPolicyName, SnapshotPolicyPatch body) { - return updateAsync(resourceGroupName, accountName, snapshotPolicyName, body).block(); - } - - /** - * Patch a snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param body Snapshot policy 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 snapshot policy information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SnapshotPolicyInner update( - String resourceGroupName, - String accountName, - String snapshotPolicyName, - SnapshotPolicyPatch body, - Context context) { - return updateAsync(resourceGroupName, accountName, snapshotPolicyName, body, context).block(); - } - - /** - * Delete snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String accountName, String snapshotPolicyName) { - 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 (snapshotPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - snapshotPolicyName, - this.client.getApiVersion(), - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param context The 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String accountName, String snapshotPolicyName, 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 (snapshotPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - snapshotPolicyName, - this.client.getApiVersion(), - context); - } - - /** - * Delete snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String accountName, String snapshotPolicyName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, accountName, snapshotPolicyName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param context The 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String accountName, String snapshotPolicyName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, accountName, snapshotPolicyName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String snapshotPolicyName) { - return beginDeleteAsync(resourceGroupName, accountName, snapshotPolicyName).getSyncPoller(); - } - - /** - * Delete snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param context The 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String snapshotPolicyName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, snapshotPolicyName, context).getSyncPoller(); - } - - /** - * Delete snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String snapshotPolicyName) { - return beginDeleteAsync(resourceGroupName, accountName, snapshotPolicyName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param context The 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String accountName, String snapshotPolicyName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, snapshotPolicyName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 snapshotPolicyName) { - deleteAsync(resourceGroupName, accountName, snapshotPolicyName).block(); - } - - /** - * Delete snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param context The 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 snapshotPolicyName, Context context) { - deleteAsync(resourceGroupName, accountName, snapshotPolicyName, context).block(); - } - - /** - * Get volumes associated with snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return volumes associated with snapshot policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVolumesWithResponseAsync( - String resourceGroupName, String accountName, String snapshotPolicyName) { - 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 (snapshotPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listVolumes( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - snapshotPolicyName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get volumes associated with snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param context The 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 volumes associated with snapshot policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVolumesWithResponseAsync( - String resourceGroupName, String accountName, String snapshotPolicyName, 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 (snapshotPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listVolumes( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - snapshotPolicyName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get volumes associated with snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return volumes associated with snapshot policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listVolumesAsync( - String resourceGroupName, String accountName, String snapshotPolicyName) { - return listVolumesWithResponseAsync(resourceGroupName, accountName, snapshotPolicyName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get volumes associated with snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return volumes associated with snapshot policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SnapshotPolicyVolumeListInner listVolumes( - String resourceGroupName, String accountName, String snapshotPolicyName) { - return listVolumesAsync(resourceGroupName, accountName, snapshotPolicyName).block(); - } - - /** - * Get volumes associated with snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @param context The 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 volumes associated with snapshot policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listVolumesWithResponse( - String resourceGroupName, String accountName, String snapshotPolicyName, Context context) { - return listVolumesWithResponseAsync(resourceGroupName, accountName, snapshotPolicyName, context).block(); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesImpl.java deleted file mode 100644 index 77390c932f2d9..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesImpl.java +++ /dev/null @@ -1,228 +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.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.SnapshotPoliciesClient; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyInner; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyVolumeListInner; -import com.azure.resourcemanager.netapp.models.SnapshotPolicies; -import com.azure.resourcemanager.netapp.models.SnapshotPolicy; -import com.azure.resourcemanager.netapp.models.SnapshotPolicyVolumeList; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class SnapshotPoliciesImpl implements SnapshotPolicies { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotPoliciesImpl.class); - - private final SnapshotPoliciesClient innerClient; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - public SnapshotPoliciesImpl( - SnapshotPoliciesClient innerClient, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String accountName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName); - return Utils.mapPage(inner, inner1 -> new SnapshotPolicyImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String accountName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName, context); - return Utils.mapPage(inner, inner1 -> new SnapshotPolicyImpl(inner1, this.manager())); - } - - public SnapshotPolicy get(String resourceGroupName, String accountName, String snapshotPolicyName) { - SnapshotPolicyInner inner = this.serviceClient().get(resourceGroupName, accountName, snapshotPolicyName); - if (inner != null) { - return new SnapshotPolicyImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String accountName, String snapshotPolicyName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, accountName, snapshotPolicyName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new SnapshotPolicyImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String accountName, String snapshotPolicyName) { - this.serviceClient().delete(resourceGroupName, accountName, snapshotPolicyName); - } - - public void delete(String resourceGroupName, String accountName, String snapshotPolicyName, Context context) { - this.serviceClient().delete(resourceGroupName, accountName, snapshotPolicyName, context); - } - - public SnapshotPolicyVolumeList listVolumes( - String resourceGroupName, String accountName, String snapshotPolicyName) { - SnapshotPolicyVolumeListInner inner = - this.serviceClient().listVolumes(resourceGroupName, accountName, snapshotPolicyName); - if (inner != null) { - return new SnapshotPolicyVolumeListImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listVolumesWithResponse( - String resourceGroupName, String accountName, String snapshotPolicyName, Context context) { - Response inner = - this.serviceClient().listVolumesWithResponse(resourceGroupName, accountName, snapshotPolicyName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new SnapshotPolicyVolumeListImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public SnapshotPolicy getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String snapshotPolicyName = Utils.getValueFromIdByName(id, "snapshotPolicies"); - if (snapshotPolicyName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'snapshotPolicies'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, snapshotPolicyName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String snapshotPolicyName = Utils.getValueFromIdByName(id, "snapshotPolicies"); - if (snapshotPolicyName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'snapshotPolicies'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, snapshotPolicyName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String snapshotPolicyName = Utils.getValueFromIdByName(id, "snapshotPolicies"); - if (snapshotPolicyName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'snapshotPolicies'.", id))); - } - this.delete(resourceGroupName, accountName, snapshotPolicyName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String snapshotPolicyName = Utils.getValueFromIdByName(id, "snapshotPolicies"); - if (snapshotPolicyName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'snapshotPolicies'.", id))); - } - this.delete(resourceGroupName, accountName, snapshotPolicyName, context); - } - - private SnapshotPoliciesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } - - public SnapshotPolicyImpl define(String name) { - return new SnapshotPolicyImpl(name, this.manager()); - } -} 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 deleted file mode 100644 index a40834ad9ad39..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyImpl.java +++ /dev/null @@ -1,258 +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.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -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.SnapshotPolicy; -import com.azure.resourcemanager.netapp.models.SnapshotPolicyPatch; -import com.azure.resourcemanager.netapp.models.WeeklySchedule; -import java.util.Collections; -import java.util.Map; - -public final class SnapshotPolicyImpl implements SnapshotPolicy, SnapshotPolicy.Definition, SnapshotPolicy.Update { - private SnapshotPolicyInner 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 String etag() { - return this.innerModel().etag(); - } - - public HourlySchedule hourlySchedule() { - return this.innerModel().hourlySchedule(); - } - - public DailySchedule dailySchedule() { - return this.innerModel().dailySchedule(); - } - - public WeeklySchedule weeklySchedule() { - return this.innerModel().weeklySchedule(); - } - - public MonthlySchedule monthlySchedule() { - return this.innerModel().monthlySchedule(); - } - - public Boolean enabled() { - return this.innerModel().enabled(); - } - - public String provisioningState() { - return this.innerModel().provisioningState(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public SnapshotPolicyInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String snapshotPolicyName; - - private SnapshotPolicyPatch updateBody; - - public SnapshotPolicyImpl withExistingNetAppAccount(String resourceGroupName, String accountName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - return this; - } - - public SnapshotPolicy create() { - 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() - .createWithResponse(resourceGroupName, accountName, snapshotPolicyName, this.innerModel(), context) - .getValue(); - return this; - } - - SnapshotPolicyImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = new SnapshotPolicyInner(); - this.serviceManager = serviceManager; - this.snapshotPolicyName = name; - } - - public SnapshotPolicyImpl update() { - this.updateBody = new SnapshotPolicyPatch(); - return this; - } - - public SnapshotPolicy apply() { - 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); - return this; - } - - SnapshotPolicyImpl( - SnapshotPolicyInner innerObject, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); - this.snapshotPolicyName = Utils.getValueFromIdByName(innerObject.id(), "snapshotPolicies"); - } - - public SnapshotPolicy refresh() { - 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(); - return this; - } - - public SnapshotPolicyImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public SnapshotPolicyImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public SnapshotPolicyImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public SnapshotPolicyImpl withHourlySchedule(HourlySchedule hourlySchedule) { - if (isInCreateMode()) { - this.innerModel().withHourlySchedule(hourlySchedule); - return this; - } else { - this.updateBody.withHourlySchedule(hourlySchedule); - return this; - } - } - - public SnapshotPolicyImpl withDailySchedule(DailySchedule dailySchedule) { - if (isInCreateMode()) { - this.innerModel().withDailySchedule(dailySchedule); - return this; - } else { - this.updateBody.withDailySchedule(dailySchedule); - return this; - } - } - - public SnapshotPolicyImpl withWeeklySchedule(WeeklySchedule weeklySchedule) { - if (isInCreateMode()) { - this.innerModel().withWeeklySchedule(weeklySchedule); - return this; - } else { - this.updateBody.withWeeklySchedule(weeklySchedule); - return this; - } - } - - public SnapshotPolicyImpl withMonthlySchedule(MonthlySchedule monthlySchedule) { - if (isInCreateMode()) { - this.innerModel().withMonthlySchedule(monthlySchedule); - return this; - } else { - this.updateBody.withMonthlySchedule(monthlySchedule); - return this; - } - } - - public SnapshotPolicyImpl withEnabled(Boolean enabled) { - if (isInCreateMode()) { - this.innerModel().withEnabled(enabled); - return this; - } else { - this.updateBody.withEnabled(enabled); - 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/SnapshotPolicyVolumeListImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyVolumeListImpl.java deleted file mode 100644 index cea619124a2aa..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyVolumeListImpl.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.implementation; - -import com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyVolumeListInner; -import com.azure.resourcemanager.netapp.fluent.models.VolumeInner; -import com.azure.resourcemanager.netapp.models.SnapshotPolicyVolumeList; -import com.azure.resourcemanager.netapp.models.Volume; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class SnapshotPolicyVolumeListImpl implements SnapshotPolicyVolumeList { - private SnapshotPolicyVolumeListInner innerObject; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - SnapshotPolicyVolumeListImpl( - SnapshotPolicyVolumeListInner innerObject, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections - .unmodifiableList( - inner.stream().map(inner1 -> new VolumeImpl(inner1, this.manager())).collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public SnapshotPolicyVolumeListInner 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/SnapshotsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsClientImpl.java deleted file mode 100644 index 5d08542d4f950..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsClientImpl.java +++ /dev/null @@ -1,1629 +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.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.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.netapp.fluent.SnapshotsClient; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotInner; -import com.azure.resourcemanager.netapp.models.SnapshotsList; -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 SnapshotsClient. */ -public final class SnapshotsClientImpl implements SnapshotsClient { - private final ClientLogger logger = new ClientLogger(SnapshotsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final SnapshotsService service; - - /** The service client containing this operation class. */ - private final NetAppManagementClientImpl client; - - /** - * Initializes an instance of SnapshotsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SnapshotsClientImpl(NetAppManagementClientImpl client) { - this.service = - RestProxy.create(SnapshotsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for NetAppManagementClientSnapshots to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "NetAppManagementClie") - private interface SnapshotsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @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}/snapshots" - + "/{snapshotName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, - @PathParam("volumeName") String volumeName, - @PathParam("snapshotName") String snapshotName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots" - + "/{snapshotName}") - @ExpectedResponses({201, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, - @PathParam("volumeName") String volumeName, - @PathParam("snapshotName") String snapshotName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SnapshotInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots" - + "/{snapshotName}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, - @PathParam("volumeName") String volumeName, - @PathParam("snapshotName") String snapshotName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") Object body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots" - + "/{snapshotName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, - @PathParam("volumeName") String volumeName, - @PathParam("snapshotName") String snapshotName, - @QueryParam("api-version") String apiVersion, - Context context); - } - - /** - * List all snapshots associated with the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Snapshots. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - 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 - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List all snapshots associated with the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Snapshots. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - 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 - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); - } - - /** - * List all snapshots associated with the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Snapshots. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, poolName, volumeName)); - } - - /** - * List all snapshots associated with the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Snapshots. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, accountName, poolName, volumeName, context)); - } - - /** - * List all snapshots associated with the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Snapshots. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String accountName, String poolName, String volumeName) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName, poolName, volumeName)); - } - - /** - * List all snapshots associated with the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Snapshots. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName, poolName, volumeName, context)); - } - - /** - * Get details of the specified snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified snapshot. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName) { - 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 (snapshotName == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - snapshotName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get details of the specified snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified snapshot. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - 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 (snapshotName == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - snapshotName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get details of the specified snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified snapshot. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName) { - return getWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get details of the specified snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified snapshot. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SnapshotInner get( - String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName) { - return getAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName).block(); - } - - /** - * Get details of the specified snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified snapshot. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Context context) { - return getWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, context) - .block(); - } - - /** - * Create the specified snapshot within the given volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - SnapshotInner 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 (snapshotName == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - snapshotName, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create the specified snapshot within the given volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - SnapshotInner 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 (snapshotName == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - snapshotName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Create the specified snapshot within the given volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SnapshotInner> beginCreateAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - SnapshotInner body) { - Mono>> mono = - createWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - SnapshotInner.class, - SnapshotInner.class, - this.client.getContext()); - } - - /** - * Create the specified snapshot within the given volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SnapshotInner> beginCreateAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - SnapshotInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), SnapshotInner.class, SnapshotInner.class, context); - } - - /** - * Create the specified snapshot within the given volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SnapshotInner> beginCreate( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - SnapshotInner body) { - return beginCreateAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body) - .getSyncPoller(); - } - - /** - * Create the specified snapshot within the given volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SnapshotInner> beginCreate( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - SnapshotInner body, - Context context) { - return beginCreateAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body, context) - .getSyncPoller(); - } - - /** - * Create the specified snapshot within the given volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - SnapshotInner body) { - return beginCreateAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create the specified snapshot within the given volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - 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); - } - - /** - * Create the specified snapshot within the given volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SnapshotInner create( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - SnapshotInner body) { - return createAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body).block(); - } - - /** - * Create the specified snapshot within the given volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SnapshotInner create( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - SnapshotInner body, - Context context) { - return createAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body, context).block(); - } - - /** - * Patch a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Object 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 (snapshotName == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - snapshotName, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Patch a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Object 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 (snapshotName == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - snapshotName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Patch a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SnapshotInner> beginUpdateAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Object body) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - SnapshotInner.class, - SnapshotInner.class, - this.client.getContext()); - } - - /** - * Patch a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SnapshotInner> beginUpdateAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Object body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), SnapshotInner.class, SnapshotInner.class, context); - } - - /** - * Patch a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SnapshotInner> beginUpdate( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Object body) { - return beginUpdateAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body) - .getSyncPoller(); - } - - /** - * Patch a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SnapshotInner> beginUpdate( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Object body, - Context context) { - return beginUpdateAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body, context) - .getSyncPoller(); - } - - /** - * Patch a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Object body) { - return beginUpdateAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Patch a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - 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); - } - - /** - * Patch a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SnapshotInner update( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Object body) { - return updateAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body).block(); - } - - /** - * Patch a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SnapshotInner update( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Object body, - Context context) { - return updateAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body, context).block(); - } - - /** - * Delete snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName) { - 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 (snapshotName == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - snapshotName, - this.client.getApiVersion(), - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param context The 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - 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 (snapshotName == null) { - return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - snapshotName, - this.client.getApiVersion(), - context); - } - - /** - * Delete snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param context The 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName) { - return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName).getSyncPoller(); - } - - /** - * Delete snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param context The 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Context context) { - return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, context) - .getSyncPoller(); - } - - /** - * Delete snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName) { - return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param context The 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Context context) { - return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName) { - deleteAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName).block(); - } - - /** - * Delete snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Context context) { - deleteAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, context).block(); - } -} 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 deleted file mode 100644 index 9ae6f415572a2..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsImpl.java +++ /dev/null @@ -1,305 +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.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.SnapshotsClient; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotInner; -import com.azure.resourcemanager.netapp.models.Snapshot; -import com.azure.resourcemanager.netapp.models.Snapshots; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class SnapshotsImpl implements Snapshots { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotsImpl.class); - - private final SnapshotsClient innerClient; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - public SnapshotsImpl( - SnapshotsClient innerClient, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list( - String resourceGroupName, String accountName, String poolName, String volumeName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, accountName, poolName, volumeName); - return Utils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, accountName, poolName, volumeName, context); - return Utils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); - } - - public Snapshot get( - String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName) { - SnapshotInner inner = - this.serviceClient().get(resourceGroupName, accountName, poolName, volumeName, snapshotName); - if (inner != null) { - return new SnapshotImpl(inner, this.manager()); - } else { - return null; - } - } - - 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); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new SnapshotImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Snapshot update( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Object body) { - SnapshotInner inner = - this.serviceClient().update(resourceGroupName, accountName, poolName, volumeName, snapshotName, body); - if (inner != null) { - return new SnapshotImpl(inner, this.manager()); - } else { - return null; - } - } - - 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); - if (inner != null) { - return new SnapshotImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete( - String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName) { - this.serviceClient().delete(resourceGroupName, accountName, poolName, volumeName, snapshotName); - } - - public void delete( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Context context) { - this.serviceClient().delete(resourceGroupName, accountName, poolName, volumeName, snapshotName, context); - } - - public Snapshot getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); - if (poolName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); - } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); - if (volumeName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); - } - String snapshotName = Utils.getValueFromIdByName(id, "snapshots"); - if (snapshotName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); - } - return this - .getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); - if (poolName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); - } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); - if (volumeName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); - } - String snapshotName = Utils.getValueFromIdByName(id, "snapshots"); - if (snapshotName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); - if (poolName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); - } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); - if (volumeName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); - } - String snapshotName = Utils.getValueFromIdByName(id, "snapshots"); - if (snapshotName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); - } - this.delete(resourceGroupName, accountName, poolName, volumeName, snapshotName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); - if (poolName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); - } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); - if (volumeName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); - } - String snapshotName = Utils.getValueFromIdByName(id, "snapshots"); - if (snapshotName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); - } - this.delete(resourceGroupName, accountName, poolName, volumeName, snapshotName, context); - } - - private SnapshotsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } - - public SnapshotImpl define(String name) { - return new SnapshotImpl(name, this.manager()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubscriptionQuotaItemImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubscriptionQuotaItemImpl.java deleted file mode 100644 index 3960f0d4352b6..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubscriptionQuotaItemImpl.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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner; -import com.azure.resourcemanager.netapp.models.SubscriptionQuotaItem; - -public final class SubscriptionQuotaItemImpl implements SubscriptionQuotaItem { - private SubscriptionQuotaItemInner innerObject; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - SubscriptionQuotaItemImpl( - SubscriptionQuotaItemInner 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 Integer current() { - return this.innerModel().current(); - } - - public Integer defaultProperty() { - return this.innerModel().defaultProperty(); - } - - public SubscriptionQuotaItemInner 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/Utils.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/Utils.java deleted file mode 100644 index 4137645519648..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/Utils.java +++ /dev/null @@ -1,204 +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.implementation; - -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.util.CoreUtils; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import reactor.core.publisher.Flux; - -final class Utils { - static String getValueFromIdByName(String id, String name) { - if (id == null) { - return null; - } - Iterator itr = Arrays.stream(id.split("/")).iterator(); - while (itr.hasNext()) { - String part = itr.next(); - if (part != null && !part.trim().isEmpty()) { - if (part.equalsIgnoreCase(name)) { - if (itr.hasNext()) { - return itr.next(); - } else { - return null; - } - } - } - } - return null; - } - - static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { - if (id == null || pathTemplate == null) { - return null; - } - String parameterNameParentheses = "{" + parameterName + "}"; - List idSegmentsReverted = Arrays.asList(id.split("/")); - List pathSegments = Arrays.asList(pathTemplate.split("/")); - Collections.reverse(idSegmentsReverted); - Iterator idItrReverted = idSegmentsReverted.iterator(); - int pathIndex = pathSegments.size(); - while (idItrReverted.hasNext() && pathIndex > 0) { - String idSegment = idItrReverted.next(); - String pathSegment = pathSegments.get(--pathIndex); - if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { - if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { - if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { - List segments = new ArrayList<>(); - segments.add(idSegment); - idItrReverted.forEachRemaining(segments::add); - Collections.reverse(segments); - if (segments.size() > 0 && segments.get(0).isEmpty()) { - segments.remove(0); - } - return String.join("/", segments); - } else { - return idSegment; - } - } - } - } - return null; - } - - static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl(pageIterable, mapper); - } - - private static final class PagedIterableImpl extends PagedIterable { - - private final PagedIterable pagedIterable; - private final Function mapper; - private final Function, PagedResponse> pageMapper; - - private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); - this.pagedIterable = pagedIterable; - this.mapper = mapper; - this.pageMapper = getPageMapper(mapper); - } - - private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); - } - - @Override - public Stream stream() { - return pagedIterable.stream().map(mapper); - } - - @Override - public Stream> streamByPage() { - return pagedIterable.streamByPage().map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken) { - return pagedIterable.streamByPage(continuationToken).map(pageMapper); - } - - @Override - public Stream> streamByPage(int preferredPageSize) { - return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken, int preferredPageSize) { - return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); - } - - @Override - public Iterator iterator() { - return new IteratorImpl(pagedIterable.iterator(), mapper); - } - - @Override - public Iterable> iterableByPage() { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken), pageMapper); - } - - @Override - public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(preferredPageSize), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); - } - } - - private static final class IteratorImpl implements Iterator { - - private final Iterator iterator; - private final Function mapper; - - private IteratorImpl(Iterator iterator, Function mapper) { - this.iterator = iterator; - this.mapper = mapper; - } - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public S next() { - return mapper.apply(iterator.next()); - } - - @Override - public void remove() { - iterator.remove(); - } - } - - private static final class IterableImpl implements Iterable { - - private final Iterable iterable; - private final Function mapper; - - private IterableImpl(Iterable iterable, Function mapper) { - this.iterable = iterable; - this.mapper = mapper; - } - - @Override - public Iterator iterator() { - return new IteratorImpl(iterable.iterator(), mapper); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VaultImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VaultImpl.java deleted file mode 100644 index c7976e9dc19a5..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VaultImpl.java +++ /dev/null @@ -1,47 +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.implementation; - -import com.azure.resourcemanager.netapp.fluent.models.VaultInner; -import com.azure.resourcemanager.netapp.models.Vault; - -public final class VaultImpl implements Vault { - private VaultInner innerObject; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - VaultImpl(VaultInner 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 String location() { - return this.innerModel().location(); - } - - public String vaultName() { - return this.innerModel().vaultName(); - } - - public VaultInner 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/VaultsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VaultsClientImpl.java deleted file mode 100644 index dcbf07947b0d5..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VaultsClientImpl.java +++ /dev/null @@ -1,239 +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.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.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.VaultsClient; -import com.azure.resourcemanager.netapp.fluent.models.VaultInner; -import com.azure.resourcemanager.netapp.models.VaultList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in VaultsClient. */ -public final class VaultsClientImpl implements VaultsClient { - private final ClientLogger logger = new ClientLogger(VaultsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final VaultsService service; - - /** The service client containing this operation class. */ - private final NetAppManagementClientImpl client; - - /** - * Initializes an instance of VaultsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - VaultsClientImpl(NetAppManagementClientImpl client) { - this.service = RestProxy.create(VaultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for NetAppManagementClientVaults to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "NetAppManagementClie") - private interface VaultsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/vaults") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @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); - } - - /** - * List vaults for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Vaults. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(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 - .list( - 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(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List vaults for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Vaults. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - 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 - .list( - 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(), null, null)); - } - - /** - * List vaults for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Vaults. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName)); - } - - /** - * List vaults for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Vaults. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, context)); - } - - /** - * List vaults for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Vaults. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName)); - } - - /** - * List vaults for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Vaults. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName, context)); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VaultsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VaultsImpl.java deleted file mode 100644 index 30878336324b3..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VaultsImpl.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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.VaultsClient; -import com.azure.resourcemanager.netapp.fluent.models.VaultInner; -import com.azure.resourcemanager.netapp.models.Vault; -import com.azure.resourcemanager.netapp.models.Vaults; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class VaultsImpl implements Vaults { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VaultsImpl.class); - - private final VaultsClient innerClient; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - public VaultsImpl(VaultsClient innerClient, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String accountName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName); - return Utils.mapPage(inner, inner1 -> new VaultImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String accountName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName, context); - return Utils.mapPage(inner, inner1 -> new VaultImpl(inner1, this.manager())); - } - - private VaultsClient 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/VolumeGroupDetailsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupDetailsImpl.java deleted file mode 100644 index ec5b35b9e87a5..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupDetailsImpl.java +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.netapp.fluent.models.VolumeGroupDetailsInner; -import com.azure.resourcemanager.netapp.models.VolumeGroupDetails; -import com.azure.resourcemanager.netapp.models.VolumeGroupMetadata; -import com.azure.resourcemanager.netapp.models.VolumeGroupVolumeProperties; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class VolumeGroupDetailsImpl implements VolumeGroupDetails, VolumeGroupDetails.Definition { - private VolumeGroupDetailsInner innerObject; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - VolumeGroupDetailsImpl( - VolumeGroupDetailsInner innerObject, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String location() { - return this.innerModel().location(); - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public String provisioningState() { - return this.innerModel().provisioningState(); - } - - public VolumeGroupMetadata groupMetadata() { - return this.innerModel().groupMetadata(); - } - - public List volumes() { - List inner = this.innerModel().volumes(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public VolumeGroupDetailsInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String volumeGroupName; - - public VolumeGroupDetailsImpl withExistingNetAppAccount(String resourceGroupName, String accountName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - return this; - } - - public VolumeGroupDetails create() { - 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); - return this; - } - - VolumeGroupDetailsImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = new VolumeGroupDetailsInner(); - this.serviceManager = serviceManager; - this.volumeGroupName = name; - } - - public VolumeGroupDetails refresh() { - 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(); - return this; - } - - public VolumeGroupDetailsImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public VolumeGroupDetailsImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public VolumeGroupDetailsImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; - } - - public VolumeGroupDetailsImpl withGroupMetadata(VolumeGroupMetadata groupMetadata) { - this.innerModel().withGroupMetadata(groupMetadata); - return this; - } - - public VolumeGroupDetailsImpl withVolumes(List volumes) { - this.innerModel().withVolumes(volumes); - return this; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupImpl.java deleted file mode 100644 index ef47dc7481e48..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupImpl.java +++ /dev/null @@ -1,63 +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.implementation; - -import com.azure.resourcemanager.netapp.fluent.models.VolumeGroupInner; -import com.azure.resourcemanager.netapp.models.VolumeGroup; -import com.azure.resourcemanager.netapp.models.VolumeGroupMetadata; -import java.util.Collections; -import java.util.Map; - -public final class VolumeGroupImpl implements VolumeGroup { - private VolumeGroupInner innerObject; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - VolumeGroupImpl(VolumeGroupInner innerObject, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String location() { - return this.innerModel().location(); - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public String provisioningState() { - return this.innerModel().provisioningState(); - } - - public VolumeGroupMetadata groupMetadata() { - return this.innerModel().groupMetadata(); - } - - public VolumeGroupInner 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/VolumeGroupsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsClientImpl.java deleted file mode 100644 index 51f9f7c2a8089..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsClientImpl.java +++ /dev/null @@ -1,1027 +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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.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.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient; -import com.azure.resourcemanager.netapp.fluent.models.VolumeGroupDetailsInner; -import com.azure.resourcemanager.netapp.fluent.models.VolumeGroupInner; -import com.azure.resourcemanager.netapp.models.VolumeGroupList; -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 VolumeGroupsClient. */ -public final class VolumeGroupsClientImpl implements VolumeGroupsClient { - private final ClientLogger logger = new ClientLogger(VolumeGroupsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final VolumeGroupsService service; - - /** The service client containing this operation class. */ - private final NetAppManagementClientImpl client; - - /** - * Initializes an instance of VolumeGroupsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - VolumeGroupsClientImpl(NetAppManagementClientImpl client) { - this.service = - RestProxy.create(VolumeGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for NetAppManagementClientVolumeGroups to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "NetAppManagementClie") - private interface VolumeGroupsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/volumeGroups") - @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}/volumeGroups/{volumeGroupName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("volumeGroupName") String volumeGroupName, - @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}/volumeGroups/{volumeGroupName}") - @ExpectedResponses({201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("volumeGroupName") String volumeGroupName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") VolumeGroupDetailsInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("volumeGroupName") String volumeGroupName, - @QueryParam("api-version") String apiVersion, - Context context); - } - - /** - * List all volume groups for given account. - * - * @param resourceGroupName The name of the resource group. - * @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 volume group resources. - */ - @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(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List all volume groups for given account. - * - * @param resourceGroupName The name of the resource group. - * @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 volume group resources. - */ - @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(), null, null)); - } - - /** - * List all volume groups for given account. - * - * @param resourceGroupName The name of the resource group. - * @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 volume group resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByNetAppAccountAsync(String resourceGroupName, String accountName) { - return new PagedFlux<>(() -> listByNetAppAccountSinglePageAsync(resourceGroupName, accountName)); - } - - /** - * List all volume groups for given account. - * - * @param resourceGroupName The name of the resource group. - * @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 volume group resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByNetAppAccountAsync( - String resourceGroupName, String accountName, Context context) { - return new PagedFlux<>(() -> listByNetAppAccountSinglePageAsync(resourceGroupName, accountName, context)); - } - - /** - * List all volume groups for given account. - * - * @param resourceGroupName The name of the resource group. - * @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 volume group resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByNetAppAccount(String resourceGroupName, String accountName) { - return new PagedIterable<>(listByNetAppAccountAsync(resourceGroupName, accountName)); - } - - /** - * List all volume groups for given account. - * - * @param resourceGroupName The name of the resource group. - * @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 volume group resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByNetAppAccount( - String resourceGroupName, String accountName, Context context) { - return new PagedIterable<>(listByNetAppAccountAsync(resourceGroupName, accountName, context)); - } - - /** - * Get details of the specified volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified volume group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String accountName, String volumeGroupName) { - 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 (volumeGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter volumeGroupName 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, - volumeGroupName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get details of the specified volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified volume group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String accountName, String volumeGroupName, 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 (volumeGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter volumeGroupName 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, - volumeGroupName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get details of the specified volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified volume group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String accountName, String volumeGroupName) { - return getWithResponseAsync(resourceGroupName, accountName, volumeGroupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get details of the specified volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified volume group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VolumeGroupDetailsInner get(String resourceGroupName, String accountName, String volumeGroupName) { - return getAsync(resourceGroupName, accountName, volumeGroupName).block(); - } - - /** - * Get details of the specified volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified volume group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String accountName, String volumeGroupName, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, volumeGroupName, context).block(); - } - - /** - * Create a volume group along with specified volumes. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param body Volume Group 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 volume group resource for create. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, String accountName, String volumeGroupName, VolumeGroupDetailsInner 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 (volumeGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter volumeGroupName 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, - volumeGroupName, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a volume group along with specified volumes. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param body Volume Group 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 volume group resource for create. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, - String accountName, - String volumeGroupName, - VolumeGroupDetailsInner 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 (volumeGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter volumeGroupName 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, - volumeGroupName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Create a volume group along with specified volumes. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param body Volume Group 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 volume group resource for create. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VolumeGroupDetailsInner> beginCreateAsync( - String resourceGroupName, String accountName, String volumeGroupName, VolumeGroupDetailsInner body) { - Mono>> mono = - createWithResponseAsync(resourceGroupName, accountName, volumeGroupName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - VolumeGroupDetailsInner.class, - VolumeGroupDetailsInner.class, - this.client.getContext()); - } - - /** - * Create a volume group along with specified volumes. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param body Volume Group 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 volume group resource for create. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VolumeGroupDetailsInner> beginCreateAsync( - String resourceGroupName, - String accountName, - String volumeGroupName, - VolumeGroupDetailsInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createWithResponseAsync(resourceGroupName, accountName, volumeGroupName, body, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - VolumeGroupDetailsInner.class, - VolumeGroupDetailsInner.class, - context); - } - - /** - * Create a volume group along with specified volumes. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param body Volume Group 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 volume group resource for create. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VolumeGroupDetailsInner> beginCreate( - String resourceGroupName, String accountName, String volumeGroupName, VolumeGroupDetailsInner body) { - return beginCreateAsync(resourceGroupName, accountName, volumeGroupName, body).getSyncPoller(); - } - - /** - * Create a volume group along with specified volumes. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param body Volume Group 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 volume group resource for create. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VolumeGroupDetailsInner> beginCreate( - String resourceGroupName, - String accountName, - String volumeGroupName, - VolumeGroupDetailsInner body, - Context context) { - return beginCreateAsync(resourceGroupName, accountName, volumeGroupName, body, context).getSyncPoller(); - } - - /** - * Create a volume group along with specified volumes. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param body Volume Group 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 volume group resource for create. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String accountName, String volumeGroupName, VolumeGroupDetailsInner body) { - return beginCreateAsync(resourceGroupName, accountName, volumeGroupName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a volume group along with specified volumes. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param body Volume Group 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 volume group resource for create. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, - String accountName, - String volumeGroupName, - VolumeGroupDetailsInner body, - Context context) { - return beginCreateAsync(resourceGroupName, accountName, volumeGroupName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a volume group along with specified volumes. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param body Volume Group 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 volume group resource for create. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VolumeGroupDetailsInner create( - String resourceGroupName, String accountName, String volumeGroupName, VolumeGroupDetailsInner body) { - return createAsync(resourceGroupName, accountName, volumeGroupName, body).block(); - } - - /** - * Create a volume group along with specified volumes. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param body Volume Group 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 volume group resource for create. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VolumeGroupDetailsInner create( - String resourceGroupName, - String accountName, - String volumeGroupName, - VolumeGroupDetailsInner body, - Context context) { - return createAsync(resourceGroupName, accountName, volumeGroupName, body, context).block(); - } - - /** - * Delete the specified volume group only if there are no volumes under volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String accountName, String volumeGroupName) { - 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 (volumeGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter volumeGroupName is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - volumeGroupName, - this.client.getApiVersion(), - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the specified volume group only if there are no volumes under volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param context The 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String accountName, String volumeGroupName, 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 (volumeGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter volumeGroupName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - volumeGroupName, - this.client.getApiVersion(), - context); - } - - /** - * Delete the specified volume group only if there are no volumes under volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String accountName, String volumeGroupName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, accountName, volumeGroupName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete the specified volume group only if there are no volumes under volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param context The 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String accountName, String volumeGroupName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, accountName, volumeGroupName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete the specified volume group only if there are no volumes under volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String volumeGroupName) { - return beginDeleteAsync(resourceGroupName, accountName, volumeGroupName).getSyncPoller(); - } - - /** - * Delete the specified volume group only if there are no volumes under volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param context The 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String volumeGroupName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, volumeGroupName, context).getSyncPoller(); - } - - /** - * Delete the specified volume group only if there are no volumes under volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String volumeGroupName) { - return beginDeleteAsync(resourceGroupName, accountName, volumeGroupName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete the specified volume group only if there are no volumes under volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param context The 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String accountName, String volumeGroupName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, volumeGroupName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete the specified volume group only if there are no volumes under volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 volumeGroupName) { - deleteAsync(resourceGroupName, accountName, volumeGroupName).block(); - } - - /** - * Delete the specified volume group only if there are no volumes under volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param context The 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 volumeGroupName, Context context) { - deleteAsync(resourceGroupName, accountName, volumeGroupName, context).block(); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsImpl.java deleted file mode 100644 index 5dfbdeb34c1a4..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsImpl.java +++ /dev/null @@ -1,197 +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.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.VolumeGroupsClient; -import com.azure.resourcemanager.netapp.fluent.models.VolumeGroupDetailsInner; -import com.azure.resourcemanager.netapp.fluent.models.VolumeGroupInner; -import com.azure.resourcemanager.netapp.models.VolumeGroup; -import com.azure.resourcemanager.netapp.models.VolumeGroupDetails; -import com.azure.resourcemanager.netapp.models.VolumeGroups; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class VolumeGroupsImpl implements VolumeGroups { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeGroupsImpl.class); - - private final VolumeGroupsClient innerClient; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - public VolumeGroupsImpl( - VolumeGroupsClient 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 Utils.mapPage(inner, inner1 -> new VolumeGroupImpl(inner1, this.manager())); - } - - public PagedIterable listByNetAppAccount( - String resourceGroupName, String accountName, Context context) { - PagedIterable inner = - this.serviceClient().listByNetAppAccount(resourceGroupName, accountName, context); - return Utils.mapPage(inner, inner1 -> new VolumeGroupImpl(inner1, this.manager())); - } - - public VolumeGroupDetails get(String resourceGroupName, String accountName, String volumeGroupName) { - VolumeGroupDetailsInner inner = this.serviceClient().get(resourceGroupName, accountName, volumeGroupName); - if (inner != null) { - return new VolumeGroupDetailsImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String accountName, String volumeGroupName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, accountName, volumeGroupName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new VolumeGroupDetailsImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String accountName, String volumeGroupName) { - this.serviceClient().delete(resourceGroupName, accountName, volumeGroupName); - } - - public void delete(String resourceGroupName, String accountName, String volumeGroupName, Context context) { - this.serviceClient().delete(resourceGroupName, accountName, volumeGroupName, context); - } - - public VolumeGroupDetails getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String volumeGroupName = Utils.getValueFromIdByName(id, "volumeGroups"); - if (volumeGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, volumeGroupName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String volumeGroupName = Utils.getValueFromIdByName(id, "volumeGroups"); - if (volumeGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, volumeGroupName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String volumeGroupName = Utils.getValueFromIdByName(id, "volumeGroups"); - if (volumeGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); - } - this.delete(resourceGroupName, accountName, volumeGroupName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String volumeGroupName = Utils.getValueFromIdByName(id, "volumeGroups"); - if (volumeGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); - } - this.delete(resourceGroupName, accountName, volumeGroupName, context); - } - - private VolumeGroupsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } - - public VolumeGroupDetailsImpl define(String name) { - return new VolumeGroupDetailsImpl(name, this.manager()); - } -} 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 deleted file mode 100644 index 677c8ca77df6e..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java +++ /dev/null @@ -1,629 +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.implementation; - -import com.azure.core.management.Region; -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.AuthorizeRequest; -import com.azure.resourcemanager.netapp.models.AvsDataStore; -import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; -import com.azure.resourcemanager.netapp.models.NetworkFeatures; -import com.azure.resourcemanager.netapp.models.PlacementKeyValuePairs; -import com.azure.resourcemanager.netapp.models.PoolChangeRequest; -import com.azure.resourcemanager.netapp.models.SecurityStyle; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import com.azure.resourcemanager.netapp.models.Volume; -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.VolumePropertiesDataProtection; -import com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy; -import com.azure.resourcemanager.netapp.models.VolumeRevert; -import com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class VolumeImpl implements Volume, Volume.Definition, Volume.Update { - private VolumeInner 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 String etag() { - return this.innerModel().etag(); - } - - public String fileSystemId() { - return this.innerModel().fileSystemId(); - } - - public String creationToken() { - return this.innerModel().creationToken(); - } - - public ServiceLevel serviceLevel() { - return this.innerModel().serviceLevel(); - } - - public long usageThreshold() { - return this.innerModel().usageThreshold(); - } - - public VolumePropertiesExportPolicy exportPolicy() { - return this.innerModel().exportPolicy(); - } - - public List protocolTypes() { - List inner = this.innerModel().protocolTypes(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String provisioningState() { - return this.innerModel().provisioningState(); - } - - public String snapshotId() { - return this.innerModel().snapshotId(); - } - - public String backupId() { - return this.innerModel().backupId(); - } - - public String baremetalTenantId() { - return this.innerModel().baremetalTenantId(); - } - - public String subnetId() { - return this.innerModel().subnetId(); - } - - public NetworkFeatures networkFeatures() { - return this.innerModel().networkFeatures(); - } - - public String networkSiblingSetId() { - return this.innerModel().networkSiblingSetId(); - } - - public VolumeStorageToNetworkProximity storageToNetworkProximity() { - return this.innerModel().storageToNetworkProximity(); - } - - public List mountTargets() { - List inner = this.innerModel().mountTargets(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String volumeType() { - return this.innerModel().volumeType(); - } - - public VolumePropertiesDataProtection dataProtection() { - return this.innerModel().dataProtection(); - } - - public Boolean isRestoring() { - return this.innerModel().isRestoring(); - } - - public Boolean snapshotDirectoryVisible() { - return this.innerModel().snapshotDirectoryVisible(); - } - - public Boolean kerberosEnabled() { - return this.innerModel().kerberosEnabled(); - } - - public SecurityStyle securityStyle() { - return this.innerModel().securityStyle(); - } - - public Boolean smbEncryption() { - return this.innerModel().smbEncryption(); - } - - public Boolean smbContinuouslyAvailable() { - return this.innerModel().smbContinuouslyAvailable(); - } - - public Float throughputMibps() { - return this.innerModel().throughputMibps(); - } - - public String encryptionKeySource() { - return this.innerModel().encryptionKeySource(); - } - - public Boolean ldapEnabled() { - return this.innerModel().ldapEnabled(); - } - - public Boolean coolAccess() { - return this.innerModel().coolAccess(); - } - - public Integer coolnessPeriod() { - return this.innerModel().coolnessPeriod(); - } - - public String unixPermissions() { - return this.innerModel().unixPermissions(); - } - - public Integer cloneProgress() { - return this.innerModel().cloneProgress(); - } - - public AvsDataStore avsDataStore() { - return this.innerModel().avsDataStore(); - } - - public Boolean isDefaultQuotaEnabled() { - return this.innerModel().isDefaultQuotaEnabled(); - } - - public Long defaultUserQuotaInKiBs() { - return this.innerModel().defaultUserQuotaInKiBs(); - } - - public Long defaultGroupQuotaInKiBs() { - return this.innerModel().defaultGroupQuotaInKiBs(); - } - - public String volumeGroupName() { - return this.innerModel().volumeGroupName(); - } - - public String capacityPoolResourceId() { - return this.innerModel().capacityPoolResourceId(); - } - - public String proximityPlacementGroup() { - return this.innerModel().proximityPlacementGroup(); - } - - public String t2Network() { - return this.innerModel().t2Network(); - } - - public String volumeSpecName() { - return this.innerModel().volumeSpecName(); - } - - public List placementRules() { - List inner = this.innerModel().placementRules(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public VolumeInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String poolName; - - private String volumeName; - - private VolumePatch updateBody; - - public VolumeImpl withExistingCapacityPool(String resourceGroupName, String accountName, String poolName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - this.poolName = poolName; - return this; - } - - public Volume create() { - 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); - return this; - } - - VolumeImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = new VolumeInner(); - this.serviceManager = serviceManager; - this.volumeName = name; - } - - public VolumeImpl update() { - this.updateBody = new VolumePatch(); - return this; - } - - public Volume apply() { - 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); - return this; - } - - VolumeImpl(VolumeInner innerObject, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); - this.poolName = Utils.getValueFromIdByName(innerObject.id(), "capacityPools"); - this.volumeName = Utils.getValueFromIdByName(innerObject.id(), "volumes"); - } - - public Volume refresh() { - 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(); - return this; - } - - public void revert(VolumeRevert body) { - serviceManager.volumes().revert(resourceGroupName, accountName, poolName, volumeName, body); - } - - public void revert(VolumeRevert body, Context context) { - serviceManager.volumes().revert(resourceGroupName, accountName, poolName, volumeName, body, context); - } - - public void breakReplication(BreakReplicationRequest body) { - serviceManager.volumes().breakReplication(resourceGroupName, accountName, poolName, volumeName, body); - } - - public void breakReplication() { - serviceManager.volumes().breakReplication(resourceGroupName, accountName, poolName, volumeName); - } - - public void breakReplication(BreakReplicationRequest body, Context context) { - serviceManager.volumes().breakReplication(resourceGroupName, accountName, poolName, volumeName, body, context); - } - - public void resyncReplication() { - serviceManager.volumes().resyncReplication(resourceGroupName, accountName, poolName, volumeName); - } - - public void resyncReplication(Context context) { - serviceManager.volumes().resyncReplication(resourceGroupName, accountName, poolName, volumeName, context); - } - - public void deleteReplication() { - serviceManager.volumes().deleteReplication(resourceGroupName, accountName, poolName, volumeName); - } - - public void deleteReplication(Context context) { - serviceManager.volumes().deleteReplication(resourceGroupName, accountName, poolName, volumeName, context); - } - - public void authorizeReplication(AuthorizeRequest body) { - serviceManager.volumes().authorizeReplication(resourceGroupName, accountName, poolName, volumeName, body); - } - - public void authorizeReplication(AuthorizeRequest body, Context context) { - serviceManager - .volumes() - .authorizeReplication(resourceGroupName, accountName, poolName, volumeName, body, context); - } - - public void reInitializeReplication() { - serviceManager.volumes().reInitializeReplication(resourceGroupName, accountName, poolName, volumeName); - } - - public void reInitializeReplication(Context context) { - serviceManager.volumes().reInitializeReplication(resourceGroupName, accountName, poolName, volumeName, context); - } - - public void poolChange(PoolChangeRequest body) { - serviceManager.volumes().poolChange(resourceGroupName, accountName, poolName, volumeName, body); - } - - public void poolChange(PoolChangeRequest body, Context context) { - serviceManager.volumes().poolChange(resourceGroupName, accountName, poolName, volumeName, body, context); - } - - public VolumeImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public VolumeImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public VolumeImpl withCreationToken(String creationToken) { - this.innerModel().withCreationToken(creationToken); - return this; - } - - public VolumeImpl withUsageThreshold(long usageThreshold) { - this.innerModel().withUsageThreshold(usageThreshold); - return this; - } - - public VolumeImpl withSubnetId(String subnetId) { - this.innerModel().withSubnetId(subnetId); - return this; - } - - public VolumeImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public VolumeImpl withServiceLevel(ServiceLevel serviceLevel) { - if (isInCreateMode()) { - this.innerModel().withServiceLevel(serviceLevel); - return this; - } else { - this.updateBody.withServiceLevel(serviceLevel); - return this; - } - } - - public VolumeImpl withExportPolicy(VolumePropertiesExportPolicy exportPolicy) { - this.innerModel().withExportPolicy(exportPolicy); - return this; - } - - public VolumeImpl withProtocolTypes(List protocolTypes) { - this.innerModel().withProtocolTypes(protocolTypes); - return this; - } - - public VolumeImpl withSnapshotId(String snapshotId) { - this.innerModel().withSnapshotId(snapshotId); - return this; - } - - public VolumeImpl withBackupId(String backupId) { - this.innerModel().withBackupId(backupId); - return this; - } - - public VolumeImpl withNetworkFeatures(NetworkFeatures networkFeatures) { - this.innerModel().withNetworkFeatures(networkFeatures); - return this; - } - - public VolumeImpl withVolumeType(String volumeType) { - this.innerModel().withVolumeType(volumeType); - return this; - } - - public VolumeImpl withDataProtection(VolumePropertiesDataProtection dataProtection) { - this.innerModel().withDataProtection(dataProtection); - return this; - } - - public VolumeImpl withIsRestoring(Boolean isRestoring) { - this.innerModel().withIsRestoring(isRestoring); - return this; - } - - public VolumeImpl withSnapshotDirectoryVisible(Boolean snapshotDirectoryVisible) { - this.innerModel().withSnapshotDirectoryVisible(snapshotDirectoryVisible); - return this; - } - - public VolumeImpl withKerberosEnabled(Boolean kerberosEnabled) { - this.innerModel().withKerberosEnabled(kerberosEnabled); - return this; - } - - public VolumeImpl withSecurityStyle(SecurityStyle securityStyle) { - this.innerModel().withSecurityStyle(securityStyle); - return this; - } - - public VolumeImpl withSmbEncryption(Boolean smbEncryption) { - this.innerModel().withSmbEncryption(smbEncryption); - return this; - } - - public VolumeImpl withSmbContinuouslyAvailable(Boolean smbContinuouslyAvailable) { - this.innerModel().withSmbContinuouslyAvailable(smbContinuouslyAvailable); - return this; - } - - public VolumeImpl withThroughputMibps(Float throughputMibps) { - if (isInCreateMode()) { - this.innerModel().withThroughputMibps(throughputMibps); - return this; - } else { - this.updateBody.withThroughputMibps(throughputMibps); - return this; - } - } - - public VolumeImpl withEncryptionKeySource(String encryptionKeySource) { - this.innerModel().withEncryptionKeySource(encryptionKeySource); - return this; - } - - public VolumeImpl withLdapEnabled(Boolean ldapEnabled) { - this.innerModel().withLdapEnabled(ldapEnabled); - return this; - } - - public VolumeImpl withCoolAccess(Boolean coolAccess) { - this.innerModel().withCoolAccess(coolAccess); - return this; - } - - public VolumeImpl withCoolnessPeriod(Integer coolnessPeriod) { - this.innerModel().withCoolnessPeriod(coolnessPeriod); - return this; - } - - public VolumeImpl withUnixPermissions(String unixPermissions) { - this.innerModel().withUnixPermissions(unixPermissions); - return this; - } - - public VolumeImpl withAvsDataStore(AvsDataStore avsDataStore) { - this.innerModel().withAvsDataStore(avsDataStore); - return this; - } - - public VolumeImpl withIsDefaultQuotaEnabled(Boolean isDefaultQuotaEnabled) { - if (isInCreateMode()) { - this.innerModel().withIsDefaultQuotaEnabled(isDefaultQuotaEnabled); - return this; - } else { - this.updateBody.withIsDefaultQuotaEnabled(isDefaultQuotaEnabled); - return this; - } - } - - public VolumeImpl withDefaultUserQuotaInKiBs(Long defaultUserQuotaInKiBs) { - if (isInCreateMode()) { - this.innerModel().withDefaultUserQuotaInKiBs(defaultUserQuotaInKiBs); - return this; - } else { - this.updateBody.withDefaultUserQuotaInKiBs(defaultUserQuotaInKiBs); - return this; - } - } - - public VolumeImpl withDefaultGroupQuotaInKiBs(Long defaultGroupQuotaInKiBs) { - if (isInCreateMode()) { - this.innerModel().withDefaultGroupQuotaInKiBs(defaultGroupQuotaInKiBs); - return this; - } else { - this.updateBody.withDefaultGroupQuotaInKiBs(defaultGroupQuotaInKiBs); - return this; - } - } - - public VolumeImpl withCapacityPoolResourceId(String capacityPoolResourceId) { - this.innerModel().withCapacityPoolResourceId(capacityPoolResourceId); - return this; - } - - public VolumeImpl withProximityPlacementGroup(String proximityPlacementGroup) { - this.innerModel().withProximityPlacementGroup(proximityPlacementGroup); - return this; - } - - public VolumeImpl withVolumeSpecName(String volumeSpecName) { - this.innerModel().withVolumeSpecName(volumeSpecName); - return this; - } - - public VolumeImpl withPlacementRules(List placementRules) { - this.innerModel().withPlacementRules(placementRules); - return this; - } - - public VolumeImpl withUsageThreshold(Long usageThreshold) { - this.updateBody.withUsageThreshold(usageThreshold); - return this; - } - - public VolumeImpl withExportPolicy(VolumePatchPropertiesExportPolicy exportPolicy) { - this.updateBody.withExportPolicy(exportPolicy); - return this; - } - - public VolumeImpl withDataProtection(VolumePatchPropertiesDataProtection dataProtection) { - this.updateBody.withDataProtection(dataProtection); - 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/VolumesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java deleted file mode 100644 index 6d0dab7e4e038..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java +++ /dev/null @@ -1,3988 +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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.netapp.fluent.VolumesClient; -import com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner; -import com.azure.resourcemanager.netapp.fluent.models.VolumeInner; -import com.azure.resourcemanager.netapp.models.AuthorizeRequest; -import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; -import com.azure.resourcemanager.netapp.models.PoolChangeRequest; -import com.azure.resourcemanager.netapp.models.VolumeList; -import com.azure.resourcemanager.netapp.models.VolumePatch; -import com.azure.resourcemanager.netapp.models.VolumeRevert; -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 VolumesClient. */ -public final class VolumesClientImpl implements VolumesClient { - private final ClientLogger logger = new ClientLogger(VolumesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final VolumesService service; - - /** The service client containing this operation class. */ - private final NetAppManagementClientImpl client; - - /** - * Initializes an instance of VolumesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - VolumesClientImpl(NetAppManagementClientImpl client) { - this.service = RestProxy.create(VolumesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for NetAppManagementClientVolumes to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "NetAppManagementClie") - private interface VolumesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, - @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}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, - @PathParam("volumeName") String volumeName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}") - @ExpectedResponses({200, 201, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @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") VolumeInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, - @PathParam("volumeName") String volumeName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") VolumePatch body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}") - @ExpectedResponses({202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, - @PathParam("volumeName") String volumeName, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/revert") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> revert( - @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") VolumeRevert body, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/breakReplication") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> breakReplication( - @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") BreakReplicationRequest body, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/replicationStatus") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> replicationStatus( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, - @PathParam("volumeName") String volumeName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/resyncReplication") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resyncReplication( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, - @PathParam("volumeName") String volumeName, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/deleteReplication") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteReplication( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, - @PathParam("volumeName") String volumeName, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/authorizeReplication") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> authorizeReplication( - @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") AuthorizeRequest body, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/reinitializeReplication") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> reInitializeReplication( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, - @PathParam("volumeName") String volumeName, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp" - + "/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/poolChange") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> poolChange( - @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") PoolChangeRequest body, - 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); - } - - /** - * List all volumes within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of volume resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String accountName, String poolName) { - 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.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - 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 all volumes within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of volume resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String accountName, String poolName, 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List all volumes within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of volume resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, String poolName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, accountName, poolName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List all volumes within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of volume resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String accountName, String poolName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, accountName, poolName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List all volumes within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of volume resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName, String poolName) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName, poolName)); - } - - /** - * List all volumes within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of volume resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String accountName, String poolName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName, poolName, context)); - } - - /** - * Get the details of the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - 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 - .get( - 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 details of the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - 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 - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get the details of the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { - return getWithResponseAsync(resourceGroupName, accountName, poolName, volumeName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get the details of the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VolumeInner get(String resourceGroupName, String accountName, String poolName, String volumeName) { - return getAsync(resourceGroupName, accountName, poolName, volumeName).block(); - } - - /** - * Get the details of the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); - } - - /** - * Create or update the specified volume within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, VolumeInner 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 - .createOrUpdate( - 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 or update the specified volume within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumeInner 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 - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Create or update the specified volume within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VolumeInner> beginCreateOrUpdateAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, VolumeInner body) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), VolumeInner.class, VolumeInner.class, this.client.getContext()); - } - - /** - * Create or update the specified volume within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VolumeInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumeInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), VolumeInner.class, VolumeInner.class, context); - } - - /** - * Create or update the specified volume within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VolumeInner> beginCreateOrUpdate( - String resourceGroupName, String accountName, String poolName, String volumeName, VolumeInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, accountName, poolName, volumeName, body).getSyncPoller(); - } - - /** - * Create or update the specified volume within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VolumeInner> beginCreateOrUpdate( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumeInner body, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, accountName, poolName, volumeName, body, context) - .getSyncPoller(); - } - - /** - * Create or update the specified volume within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, VolumeInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, accountName, poolName, volumeName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update the specified volume within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumeInner body, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, accountName, poolName, volumeName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update the specified volume within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VolumeInner createOrUpdate( - String resourceGroupName, String accountName, String poolName, String volumeName, VolumeInner body) { - return createOrUpdateAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); - } - - /** - * Create or update the specified volume within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VolumeInner createOrUpdate( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumeInner body, - Context context) { - return createOrUpdateAsync(resourceGroupName, accountName, poolName, volumeName, body, context).block(); - } - - /** - * Patch the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, VolumePatch 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 - .update( - 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())); - } - - /** - * Patch the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumePatch 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 - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Patch the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VolumeInner> beginUpdateAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, VolumePatch body) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), VolumeInner.class, VolumeInner.class, this.client.getContext()); - } - - /** - * Patch the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VolumeInner> beginUpdateAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumePatch body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), VolumeInner.class, VolumeInner.class, context); - } - - /** - * Patch the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VolumeInner> beginUpdate( - String resourceGroupName, String accountName, String poolName, String volumeName, VolumePatch body) { - return beginUpdateAsync(resourceGroupName, accountName, poolName, volumeName, body).getSyncPoller(); - } - - /** - * Patch the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VolumeInner> beginUpdate( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumePatch body, - Context context) { - return beginUpdateAsync(resourceGroupName, accountName, poolName, volumeName, body, context).getSyncPoller(); - } - - /** - * Patch the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, VolumePatch body) { - return beginUpdateAsync(resourceGroupName, accountName, poolName, volumeName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Patch the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumePatch body, - Context context) { - return beginUpdateAsync(resourceGroupName, accountName, poolName, volumeName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Patch the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VolumeInner update( - String resourceGroupName, String accountName, String poolName, String volumeName, VolumePatch body) { - return updateAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); - } - - /** - * Patch the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Volume 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 volume resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VolumeInner update( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumePatch body, - Context context) { - return updateAsync(resourceGroupName, accountName, poolName, volumeName, body, context).block(); - } - - /** - * Delete the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - context); - } - - /** - * Delete the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String poolName, String volumeName) { - return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName).getSyncPoller(); - } - - /** - * Delete the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName, context).getSyncPoller(); - } - - /** - * Delete the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String poolName, String volumeName) { - return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String poolName, String volumeName) { - deleteAsync(resourceGroupName, accountName, poolName, volumeName).block(); - } - - /** - * Delete the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - deleteAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); - } - - /** - * Revert a volume to the snapshot specified in the body. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Object for snapshot to revert 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> revertWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, VolumeRevert body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - return FluxUtil - .withContext( - context -> - service - .revert( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - body, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Revert a volume to the snapshot specified in the body. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Object for snapshot to revert 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> revertWithResponseAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumeRevert body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - context = this.client.mergeContext(context); - return service - .revert( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - body, - context); - } - - /** - * Revert a volume to the snapshot specified in the body. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Object for snapshot to revert 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRevertAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, VolumeRevert body) { - Mono>> mono = - revertWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Revert a volume to the snapshot specified in the body. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Object for snapshot to revert 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRevertAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumeRevert body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - revertWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Revert a volume to the snapshot specified in the body. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Object for snapshot to revert 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRevert( - String resourceGroupName, String accountName, String poolName, String volumeName, VolumeRevert body) { - return beginRevertAsync(resourceGroupName, accountName, poolName, volumeName, body).getSyncPoller(); - } - - /** - * Revert a volume to the snapshot specified in the body. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Object for snapshot to revert 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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRevert( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumeRevert body, - Context context) { - return beginRevertAsync(resourceGroupName, accountName, poolName, volumeName, body, context).getSyncPoller(); - } - - /** - * Revert a volume to the snapshot specified in the body. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Object for snapshot to revert 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono revertAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, VolumeRevert body) { - return beginRevertAsync(resourceGroupName, accountName, poolName, volumeName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Revert a volume to the snapshot specified in the body. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Object for snapshot to revert 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono revertAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumeRevert body, - Context context) { - return beginRevertAsync(resourceGroupName, accountName, poolName, volumeName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Revert a volume to the snapshot specified in the body. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Object for snapshot to revert 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 revert( - String resourceGroupName, String accountName, String poolName, String volumeName, VolumeRevert body) { - revertAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); - } - - /** - * Revert a volume to the snapshot specified in the body. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Object for snapshot to revert 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 revert( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumeRevert body, - Context context) { - revertAsync(resourceGroupName, accountName, poolName, volumeName, body, context).block(); - } - - /** - * Break the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - 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.")); - } - 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) { - body.validate(); - } - return FluxUtil - .withContext( - context -> - service - .breakReplication( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - body, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Break the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - 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.")); - } - 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) { - body.validate(); - } - context = this.client.mergeContext(context); - return service - .breakReplication( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - body, - context); - } - - /** - * Break the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginBreakReplicationAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - BreakReplicationRequest body) { - Mono>> mono = - breakReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Break the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginBreakReplicationAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - BreakReplicationRequest body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - breakReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Break the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginBreakReplication( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - BreakReplicationRequest body) { - return beginBreakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body).getSyncPoller(); - } - - /** - * Break the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginBreakReplication( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - BreakReplicationRequest body, - Context context) { - return beginBreakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context) - .getSyncPoller(); - } - - /** - * Break the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono breakReplicationAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - BreakReplicationRequest body) { - return beginBreakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Break the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono breakReplicationAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { - final BreakReplicationRequest body = null; - return beginBreakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Break the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono breakReplicationAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - BreakReplicationRequest body, - Context context) { - return beginBreakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Break the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void breakReplication( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - BreakReplicationRequest body) { - breakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); - } - - /** - * Break the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void breakReplication(String resourceGroupName, String accountName, String poolName, String volumeName) { - final BreakReplicationRequest body = null; - breakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); - } - - /** - * Break the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void breakReplication( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - BreakReplicationRequest body, - Context context) { - breakReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context).block(); - } - - /** - * Get the status of the replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of the replication. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> replicationStatusWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .replicationStatus( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the status of the replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of the replication. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> replicationStatusWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .replicationStatus( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get the status of the replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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) - private Mono replicationStatusAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { - return replicationStatusWithResponseAsync(resourceGroupName, accountName, poolName, volumeName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get the status of the replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of the replication. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationStatusInner replicationStatus( - String resourceGroupName, String accountName, String poolName, String volumeName) { - return replicationStatusAsync(resourceGroupName, accountName, poolName, volumeName).block(); - } - - /** - * Get the status of the replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of the replication. - */ - @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(); - } - - /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resyncReplicationWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .resyncReplication( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resyncReplicationWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service - .resyncReplication( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - context); - } - - /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginResyncReplicationAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { - Mono>> mono = - resyncReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginResyncReplicationAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - resyncReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResyncReplication( - String resourceGroupName, String accountName, String poolName, String volumeName) { - return beginResyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName).getSyncPoller(); - } - - /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResyncReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return beginResyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) - .getSyncPoller(); - } - - /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resyncReplicationAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { - return beginResyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resyncReplicationAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return beginResyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void resyncReplication(String resourceGroupName, String accountName, String poolName, String volumeName) { - resyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName).block(); - } - - /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void resyncReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - resyncReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); - } - - /** - * Delete the replication connection on the destination volume, and send release to the source replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteReplicationWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .deleteReplication( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the replication connection on the destination volume, and send release to the source replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteReplicationWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service - .deleteReplication( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - context); - } - - /** - * Delete the replication connection on the destination volume, and send release to the source replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteReplicationAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { - Mono>> mono = - deleteReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete the replication connection on the destination volume, and send release to the source replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteReplicationAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete the replication connection on the destination volume, and send release to the source replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteReplication( - String resourceGroupName, String accountName, String poolName, String volumeName) { - return beginDeleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName).getSyncPoller(); - } - - /** - * Delete the replication connection on the destination volume, and send release to the source replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return beginDeleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) - .getSyncPoller(); - } - - /** - * Delete the replication connection on the destination volume, and send release to the source replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteReplicationAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { - return beginDeleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete the replication connection on the destination volume, and send release to the source replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteReplicationAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return beginDeleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete the replication connection on the destination volume, and send release to the source replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteReplication(String resourceGroupName, String accountName, String poolName, String volumeName) { - deleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName).block(); - } - - /** - * Delete the replication connection on the destination volume, and send release to the source replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - deleteReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); - } - - /** - * Authorize the replication connection on the source volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> authorizeReplicationWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, AuthorizeRequest body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - return FluxUtil - .withContext( - context -> - service - .authorizeReplication( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - body, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Authorize the replication connection on the source volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> authorizeReplicationWithResponseAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - AuthorizeRequest body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - context = this.client.mergeContext(context); - return service - .authorizeReplication( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - body, - context); - } - - /** - * Authorize the replication connection on the source volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginAuthorizeReplicationAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, AuthorizeRequest body) { - Mono>> mono = - authorizeReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Authorize the replication connection on the source volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginAuthorizeReplicationAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - AuthorizeRequest body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - authorizeReplicationWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Authorize the replication connection on the source volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginAuthorizeReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, AuthorizeRequest body) { - return beginAuthorizeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body) - .getSyncPoller(); - } - - /** - * Authorize the replication connection on the source volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginAuthorizeReplication( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - AuthorizeRequest body, - Context context) { - return beginAuthorizeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body, context) - .getSyncPoller(); - } - - /** - * Authorize the replication connection on the source volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono authorizeReplicationAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, AuthorizeRequest body) { - return beginAuthorizeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Authorize the replication connection on the source volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @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); - } - - /** - * Authorize the replication connection on the source volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void authorizeReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, AuthorizeRequest body) { - authorizeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); - } - - /** - * Authorize the replication connection on the source volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @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(); - } - - /** - * Re-Initializes the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reInitializeReplicationWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .reInitializeReplication( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Re-Initializes the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reInitializeReplicationWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service - .reInitializeReplication( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - context); - } - - /** - * Re-Initializes the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 completion. - */ - @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()); - } - - /** - * Re-Initializes the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 completion. - */ - @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); - } - - /** - * Re-Initializes the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginReInitializeReplication( - String resourceGroupName, String accountName, String poolName, String volumeName) { - return beginReInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName).getSyncPoller(); - } - - /** - * Re-Initializes the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginReInitializeReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - return beginReInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName, context) - .getSyncPoller(); - } - - /** - * Re-Initializes the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reInitializeReplicationAsync( - String resourceGroupName, String accountName, String poolName, String volumeName) { - return beginReInitializeReplicationAsync(resourceGroupName, accountName, poolName, volumeName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Re-Initializes the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 completion. - */ - @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); - } - - /** - * Re-Initializes the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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(); - } - - /** - * Re-Initializes the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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(); - } - - /** - * Moves volume to another pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> poolChangeWithResponseAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, PoolChangeRequest body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - return FluxUtil - .withContext( - context -> - service - .poolChange( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - body, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Moves volume to another pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> poolChangeWithResponseAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - PoolChangeRequest body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - context = this.client.mergeContext(context); - return service - .poolChange( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - poolName, - volumeName, - this.client.getApiVersion(), - body, - context); - } - - /** - * Moves volume to another pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPoolChangeAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, PoolChangeRequest body) { - Mono>> mono = - poolChangeWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Moves volume to another pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPoolChangeAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - PoolChangeRequest body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - poolChangeWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Moves volume to another pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPoolChange( - String resourceGroupName, String accountName, String poolName, String volumeName, PoolChangeRequest body) { - return beginPoolChangeAsync(resourceGroupName, accountName, poolName, volumeName, body).getSyncPoller(); - } - - /** - * Moves volume to another pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPoolChange( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - PoolChangeRequest body, - Context context) { - return beginPoolChangeAsync(resourceGroupName, accountName, poolName, volumeName, body, context) - .getSyncPoller(); - } - - /** - * Moves volume to another pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono poolChangeAsync( - String resourceGroupName, String accountName, String poolName, String volumeName, PoolChangeRequest body) { - return beginPoolChangeAsync(resourceGroupName, accountName, poolName, volumeName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Moves volume to another pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono poolChangeAsync( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - PoolChangeRequest body, - Context context) { - return beginPoolChangeAsync(resourceGroupName, accountName, poolName, volumeName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Moves volume to another pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void poolChange( - String resourceGroupName, String accountName, String poolName, String volumeName, PoolChangeRequest body) { - poolChangeAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); - } - - /** - * Moves volume to another pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void poolChange( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - PoolChangeRequest body, - Context context) { - poolChangeAsync(resourceGroupName, accountName, poolName, volumeName, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink 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 volume resources. - */ - @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 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 volume resources. - */ - @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/VolumesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java deleted file mode 100644 index 67942f92d8918..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java +++ /dev/null @@ -1,350 +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.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.VolumesClient; -import com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner; -import com.azure.resourcemanager.netapp.fluent.models.VolumeInner; -import com.azure.resourcemanager.netapp.models.AuthorizeRequest; -import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; -import com.azure.resourcemanager.netapp.models.PoolChangeRequest; -import com.azure.resourcemanager.netapp.models.ReplicationStatus; -import com.azure.resourcemanager.netapp.models.Volume; -import com.azure.resourcemanager.netapp.models.VolumeRevert; -import com.azure.resourcemanager.netapp.models.Volumes; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class VolumesImpl implements Volumes { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumesImpl.class); - - private final VolumesClient innerClient; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - public VolumesImpl(VolumesClient innerClient, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String accountName, String poolName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName, poolName); - return Utils.mapPage(inner, inner1 -> new VolumeImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String accountName, String poolName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName, poolName, context); - return Utils.mapPage(inner, inner1 -> new VolumeImpl(inner1, this.manager())); - } - - public Volume get(String resourceGroupName, String accountName, String poolName, String volumeName) { - VolumeInner inner = this.serviceClient().get(resourceGroupName, accountName, poolName, volumeName); - if (inner != null) { - return new VolumeImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, accountName, poolName, volumeName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new VolumeImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String accountName, String poolName, String volumeName) { - this.serviceClient().delete(resourceGroupName, accountName, poolName, volumeName); - } - - public void delete( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - this.serviceClient().delete(resourceGroupName, accountName, poolName, volumeName, context); - } - - public void revert( - String resourceGroupName, String accountName, String poolName, String volumeName, VolumeRevert body) { - this.serviceClient().revert(resourceGroupName, accountName, poolName, volumeName, body); - } - - public void revert( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumeRevert body, - Context context) { - this.serviceClient().revert(resourceGroupName, accountName, poolName, volumeName, body, context); - } - - public void breakReplication( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - BreakReplicationRequest body) { - this.serviceClient().breakReplication(resourceGroupName, accountName, poolName, volumeName, body); - } - - public void breakReplication(String resourceGroupName, String accountName, String poolName, String volumeName) { - this.serviceClient().breakReplication(resourceGroupName, accountName, poolName, volumeName); - } - - public void breakReplication( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - BreakReplicationRequest body, - Context context) { - this.serviceClient().breakReplication(resourceGroupName, accountName, poolName, volumeName, body, context); - } - - public ReplicationStatus replicationStatus( - String resourceGroupName, String accountName, String poolName, String volumeName) { - ReplicationStatusInner inner = - this.serviceClient().replicationStatus(resourceGroupName, accountName, poolName, volumeName); - if (inner != null) { - return new ReplicationStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response replicationStatusWithResponse( - String resourceGroupName, String accountName, String poolName, String volumeName, Context 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())); - } else { - return null; - } - } - - public void resyncReplication(String resourceGroupName, String accountName, String poolName, String volumeName) { - this.serviceClient().resyncReplication(resourceGroupName, accountName, poolName, volumeName); - } - - public void resyncReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - this.serviceClient().resyncReplication(resourceGroupName, accountName, poolName, volumeName, context); - } - - public void deleteReplication(String resourceGroupName, String accountName, String poolName, String volumeName) { - this.serviceClient().deleteReplication(resourceGroupName, accountName, poolName, volumeName); - } - - public void deleteReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - this.serviceClient().deleteReplication(resourceGroupName, accountName, poolName, volumeName, context); - } - - public void authorizeReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, AuthorizeRequest body) { - this.serviceClient().authorizeReplication(resourceGroupName, accountName, poolName, volumeName, body); - } - - public void authorizeReplication( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - AuthorizeRequest body, - Context context) { - this.serviceClient().authorizeReplication(resourceGroupName, accountName, poolName, volumeName, body, context); - } - - public void reInitializeReplication( - String resourceGroupName, String accountName, String poolName, String volumeName) { - this.serviceClient().reInitializeReplication(resourceGroupName, accountName, poolName, volumeName); - } - - public void reInitializeReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { - this.serviceClient().reInitializeReplication(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); - } - - public void poolChange( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - PoolChangeRequest body, - Context context) { - this.serviceClient().poolChange(resourceGroupName, accountName, poolName, volumeName, body, context); - } - - public Volume getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); - if (poolName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); - } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); - if (volumeName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, poolName, volumeName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); - if (poolName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); - } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); - if (volumeName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, poolName, volumeName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); - if (poolName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); - } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); - if (volumeName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); - } - this.delete(resourceGroupName, accountName, poolName, volumeName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); - if (poolName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); - } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); - if (volumeName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); - } - this.delete(resourceGroupName, accountName, poolName, volumeName, context); - } - - private VolumesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } - - public VolumeImpl define(String name) { - return new VolumeImpl(name, this.manager()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/package-info.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/package-info.java deleted file mode 100644 index b191a2355b400..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the implementations for NetAppManagementClient. Microsoft NetApp Files Azure Resource Provider - * specification. - */ -package com.azure.resourcemanager.netapp.implementation; diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AccountBackups.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AccountBackups.java deleted file mode 100644 index 2142e002b4093..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AccountBackups.java +++ /dev/null @@ -1,89 +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.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 AccountBackups. */ -public interface AccountBackups { - /** - * List all Backups for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Backups. - */ - PagedIterable list(String resourceGroupName, String accountName); - - /** - * List all Backups for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Backups. - */ - PagedIterable list(String resourceGroupName, String accountName, Context context); - - /** - * Gets the specified backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 for a Netapp Account. - */ - Backup get(String resourceGroupName, String accountName, String backupName); - - /** - * Gets the specified backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 for a Netapp Account. - */ - Response getWithResponse(String resourceGroupName, String accountName, String backupName, Context context); - - /** - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 backupName); - - /** - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 backupName, Context context); -} 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 deleted file mode 100644 index c1aabf218b63a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AccountEncryption.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Encryption settings. */ -@Fluent -public final class AccountEncryption { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountEncryption.class); - - /* - * Encryption Key Source. Possible values are: 'Microsoft.NetApp'. - */ - @JsonProperty(value = "keySource") - private String keySource; - - /** - * Get the keySource property: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. - * - * @return the keySource value. - */ - public String keySource() { - return this.keySource; - } - - /** - * Set the keySource property: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. - * - * @param keySource the keySource value to set. - * @return the AccountEncryption object itself. - */ - public AccountEncryption withKeySource(String keySource) { - this.keySource = keySource; - 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/Accounts.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Accounts.java deleted file mode 100644 index b1cf1b7272a7f..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Accounts.java +++ /dev/null @@ -1,156 +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.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 Accounts. */ -public interface Accounts { - /** - * List and describe all NetApp accounts in the subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetApp account resources. - */ - PagedIterable list(); - - /** - * List and describe all NetApp accounts in the subscription. - * - * @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 NetApp account resources. - */ - PagedIterable list(Context context); - - /** - * List and describe all NetApp accounts in the resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 NetApp account resources. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List and describe all NetApp accounts in the resource group. - * - * @param resourceGroupName The name of the resource group. - * @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 NetApp account resources. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get the NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 NetApp account. - */ - NetAppAccount getByResourceGroup(String resourceGroupName, String accountName); - - /** - * Get the NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 NetApp account. - */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String accountName, Context context); - - /** - * Delete the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 deleteByResourceGroup(String resourceGroupName, String accountName); - - /** - * Delete the specified NetApp account. - * - * @param resourceGroupName The name of the resource group. - * @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 delete(String resourceGroupName, String accountName, Context context); - - /** - * Get the NetApp account. - * - * @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 NetApp account. - */ - NetAppAccount getById(String id); - - /** - * Get the NetApp account. - * - * @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 NetApp account. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete the specified NetApp account. - * - * @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 the specified NetApp account. - * - * @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 NetAppAccount resource. - * - * @param name resource name. - * @return the first stage of the new NetAppAccount definition. - */ - NetAppAccount.DefinitionStages.Blank define(String name); -} 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 deleted file mode 100644 index 14ebab7180e50..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectory.java +++ /dev/null @@ -1,590 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Active Directory. */ -@Fluent -public final class ActiveDirectory { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ActiveDirectory.class); - - /* - * Id of the Active Directory - */ - @JsonProperty(value = "activeDirectoryId") - private String activeDirectoryId; - - /* - * Username of Active Directory domain administrator - */ - @JsonProperty(value = "username") - private String username; - - /* - * Plain text password of Active Directory domain administrator, value is - * masked in the response - */ - @JsonProperty(value = "password") - private String password; - - /* - * Name of the Active Directory domain - */ - @JsonProperty(value = "domain") - private String domain; - - /* - * Comma separated list of DNS server IP addresses (IPv4 only) for the - * Active Directory domain - */ - @JsonProperty(value = "dns") - private String dns; - - /* - * Status of the Active Directory - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private ActiveDirectoryStatus status; - - /* - * Any details in regards to the Status of the Active Directory - */ - @JsonProperty(value = "statusDetails", access = JsonProperty.Access.WRITE_ONLY) - 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 - */ - @JsonProperty(value = "smbServerName") - private String smbServerName; - - /* - * The Organizational Unit (OU) within the Windows Active Directory - */ - @JsonProperty(value = "organizationalUnit") - private String organizationalUnit; - - /* - * The Active Directory site the service will limit Domain Controller - * discovery to - */ - @JsonProperty(value = "site") - private String site; - - /* - * 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 - */ - @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. - */ - @JsonProperty(value = "kdcIP") - private String kdcIp; - - /* - * Name of the active directory machine. This optional parameter is used - * only while creating kerberos volume - */ - @JsonProperty(value = "adName") - 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. - */ - @JsonProperty(value = "serverRootCACertificate") - private String serverRootCACertificate; - - /* - * If enabled, AES encryption will be enabled for SMB communication. - */ - @JsonProperty(value = "aesEncryption") - private Boolean aesEncryption; - - /* - * Specifies whether or not the LDAP traffic needs to be signed. - */ - @JsonProperty(value = "ldapSigning") - 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 - */ - @JsonProperty(value = "securityOperators") - private List securityOperators; - - /* - * Specifies whether or not the LDAP traffic needs to be secured via TLS. - */ - @JsonProperty(value = "ldapOverTLS") - private Boolean ldapOverTls; - - /* - * If enabled, NFS client local users can also (in addition to LDAP users) - * access the NFS volumes. - */ - @JsonProperty(value = "allowLocalNfsUsersWithLdap") - private Boolean allowLocalNfsUsersWithLdap; - - /* - * If enabled, Traffic between the SMB server to Domain Controller (DC) - * will be encrypted. - */ - @JsonProperty(value = "encryptDCConnections") - private Boolean encryptDCConnections; - - /** - * Get the activeDirectoryId property: Id of the Active Directory. - * - * @return the activeDirectoryId value. - */ - public String activeDirectoryId() { - return this.activeDirectoryId; - } - - /** - * Set the activeDirectoryId property: Id of the Active Directory. - * - * @param activeDirectoryId the activeDirectoryId value to set. - * @return the ActiveDirectory object itself. - */ - public ActiveDirectory withActiveDirectoryId(String activeDirectoryId) { - this.activeDirectoryId = activeDirectoryId; - return this; - } - - /** - * Get the username property: Username of Active Directory domain administrator. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: Username of Active Directory domain administrator. - * - * @param username the username value to set. - * @return the ActiveDirectory object itself. - */ - public ActiveDirectory withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the password property: Plain text password of Active Directory domain administrator, value is masked in the - * response. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: Plain text password of Active Directory domain administrator, value is masked in the - * response. - * - * @param password the password value to set. - * @return the ActiveDirectory object itself. - */ - public ActiveDirectory withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the domain property: Name of the Active Directory domain. - * - * @return the domain value. - */ - public String domain() { - return this.domain; - } - - /** - * Set the domain property: Name of the Active Directory domain. - * - * @param domain the domain value to set. - * @return the ActiveDirectory object itself. - */ - public ActiveDirectory withDomain(String domain) { - this.domain = domain; - return this; - } - - /** - * Get the dns property: Comma separated list of DNS server IP addresses (IPv4 only) for the Active Directory - * domain. - * - * @return the dns value. - */ - public String dns() { - return this.dns; - } - - /** - * Set the dns property: Comma separated list of DNS server IP addresses (IPv4 only) for the Active Directory - * domain. - * - * @param dns the dns value to set. - * @return the ActiveDirectory object itself. - */ - public ActiveDirectory withDns(String dns) { - this.dns = dns; - return this; - } - - /** - * Get the status property: Status of the Active Directory. - * - * @return the status value. - */ - public ActiveDirectoryStatus status() { - return this.status; - } - - /** - * Get the statusDetails property: Any details in regards to the Status of the Active Directory. - * - * @return the statusDetails value. - */ - public String statusDetails() { - return this.statusDetails; - } - - /** - * Get the smbServerName property: NetBIOS name of the SMB server. This name will be registered as a computer - * account in the AD and used to mount volumes. - * - * @return the smbServerName value. - */ - public String smbServerName() { - return this.smbServerName; - } - - /** - * Set the smbServerName property: NetBIOS name of the SMB server. This name will be registered as a computer - * account in the AD and used to mount volumes. - * - * @param smbServerName the smbServerName value to set. - * @return the ActiveDirectory object itself. - */ - public ActiveDirectory withSmbServerName(String smbServerName) { - this.smbServerName = smbServerName; - return this; - } - - /** - * Get the organizationalUnit property: The Organizational Unit (OU) within the Windows Active Directory. - * - * @return the organizationalUnit value. - */ - public String organizationalUnit() { - return this.organizationalUnit; - } - - /** - * Set the organizationalUnit property: The Organizational Unit (OU) within the Windows Active Directory. - * - * @param organizationalUnit the organizationalUnit value to set. - * @return the ActiveDirectory object itself. - */ - public ActiveDirectory withOrganizationalUnit(String organizationalUnit) { - this.organizationalUnit = organizationalUnit; - return this; - } - - /** - * Get the site property: The Active Directory site the service will limit Domain Controller discovery to. - * - * @return the site value. - */ - public String site() { - return this.site; - } - - /** - * Set the site property: The Active Directory site the service will limit Domain Controller discovery to. - * - * @param site the site value to set. - * @return the ActiveDirectory object itself. - */ - public ActiveDirectory withSite(String site) { - this.site = site; - return this; - } - - /** - * Get the backupOperators property: Users to be added to the Built-in Backup Operator active directory group. A - * list of unique usernames without domain specifier. - * - * @return the backupOperators value. - */ - public List backupOperators() { - return this.backupOperators; - } - - /** - * Set the backupOperators property: Users to be added to the Built-in Backup Operator active directory group. A - * list of unique usernames without domain specifier. - * - * @param backupOperators the backupOperators value to set. - * @return the ActiveDirectory object itself. - */ - public ActiveDirectory withBackupOperators(List backupOperators) { - this.backupOperators = backupOperators; - return this; - } - - /** - * Get the administrators property: Users to be added to the Built-in Administrators active directory group. A list - * of unique usernames without domain specifier. - * - * @return the administrators value. - */ - public List administrators() { - return this.administrators; - } - - /** - * Set the administrators property: Users to be added to the Built-in Administrators active directory group. A list - * of unique usernames without domain specifier. - * - * @param administrators the administrators value to set. - * @return the ActiveDirectory object itself. - */ - public ActiveDirectory withAdministrators(List administrators) { - this.administrators = administrators; - return this; - } - - /** - * 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. - */ - public String kdcIp() { - return this.kdcIp; - } - - /** - * 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. - */ - public ActiveDirectory withKdcIp(String kdcIp) { - this.kdcIp = kdcIp; - return this; - } - - /** - * Get the adName property: Name of the active directory machine. This optional parameter is used only while - * creating kerberos volume. - * - * @return the adName value. - */ - public String adName() { - return this.adName; - } - - /** - * Set the adName property: Name of the active directory machine. This optional parameter is used only while - * creating kerberos volume. - * - * @param adName the adName value to set. - * @return the ActiveDirectory object itself. - */ - public ActiveDirectory withAdName(String adName) { - this.adName = adName; - return this; - } - - /** - * 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. - * - * @return the serverRootCACertificate value. - */ - public String serverRootCACertificate() { - return this.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. - * - * @param serverRootCACertificate the serverRootCACertificate value to set. - * @return the ActiveDirectory object itself. - */ - public ActiveDirectory withServerRootCACertificate(String serverRootCACertificate) { - this.serverRootCACertificate = serverRootCACertificate; - return this; - } - - /** - * Get the aesEncryption property: If enabled, AES encryption will be enabled for SMB communication. - * - * @return the aesEncryption value. - */ - public Boolean aesEncryption() { - return this.aesEncryption; - } - - /** - * Set the aesEncryption property: If enabled, AES encryption will be enabled for SMB communication. - * - * @param aesEncryption the aesEncryption value to set. - * @return the ActiveDirectory object itself. - */ - public ActiveDirectory withAesEncryption(Boolean aesEncryption) { - this.aesEncryption = aesEncryption; - return this; - } - - /** - * Get the ldapSigning property: Specifies whether or not the LDAP traffic needs to be signed. - * - * @return the ldapSigning value. - */ - public Boolean ldapSigning() { - return this.ldapSigning; - } - - /** - * Set the ldapSigning property: Specifies whether or not the LDAP traffic needs to be signed. - * - * @param ldapSigning the ldapSigning value to set. - * @return the ActiveDirectory object itself. - */ - public ActiveDirectory withLdapSigning(Boolean ldapSigning) { - this.ldapSigning = ldapSigning; - return this; - } - - /** - * Get the securityOperators property: 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. - * - * @return the securityOperators value. - */ - public List securityOperators() { - return this.securityOperators; - } - - /** - * Set the securityOperators property: 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. - * - * @param securityOperators the securityOperators value to set. - * @return the ActiveDirectory object itself. - */ - public ActiveDirectory withSecurityOperators(List securityOperators) { - this.securityOperators = securityOperators; - return this; - } - - /** - * Get the ldapOverTls property: Specifies whether or not the LDAP traffic needs to be secured via TLS. - * - * @return the ldapOverTls value. - */ - public Boolean ldapOverTls() { - return this.ldapOverTls; - } - - /** - * Set the ldapOverTls property: Specifies whether or not the LDAP traffic needs to be secured via TLS. - * - * @param ldapOverTls the ldapOverTls value to set. - * @return the ActiveDirectory object itself. - */ - public ActiveDirectory withLdapOverTls(Boolean ldapOverTls) { - this.ldapOverTls = ldapOverTls; - return this; - } - - /** - * Get the allowLocalNfsUsersWithLdap property: If enabled, NFS client local users can also (in addition to LDAP - * users) access the NFS volumes. - * - * @return the allowLocalNfsUsersWithLdap value. - */ - public Boolean allowLocalNfsUsersWithLdap() { - return this.allowLocalNfsUsersWithLdap; - } - - /** - * Set the allowLocalNfsUsersWithLdap property: If enabled, NFS client local users can also (in addition to LDAP - * users) access the NFS volumes. - * - * @param allowLocalNfsUsersWithLdap the allowLocalNfsUsersWithLdap value to set. - * @return the ActiveDirectory object itself. - */ - public ActiveDirectory withAllowLocalNfsUsersWithLdap(Boolean allowLocalNfsUsersWithLdap) { - this.allowLocalNfsUsersWithLdap = allowLocalNfsUsersWithLdap; - return this; - } - - /** - * Get the encryptDCConnections property: If enabled, Traffic between the SMB server to Domain Controller (DC) will - * be encrypted. - * - * @return the encryptDCConnections value. - */ - public Boolean encryptDCConnections() { - return this.encryptDCConnections; - } - - /** - * Set the encryptDCConnections property: If enabled, Traffic between the SMB server to Domain Controller (DC) will - * be encrypted. - * - * @param encryptDCConnections the encryptDCConnections value to set. - * @return the ActiveDirectory object itself. - */ - public ActiveDirectory withEncryptDCConnections(Boolean encryptDCConnections) { - this.encryptDCConnections = encryptDCConnections; - 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/ActiveDirectoryStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryStatus.java deleted file mode 100644 index 50504731acbad..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryStatus.java +++ /dev/null @@ -1,43 +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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ActiveDirectoryStatus. */ -public final class ActiveDirectoryStatus extends ExpandableStringEnum { - /** Static value Created for ActiveDirectoryStatus. */ - public static final ActiveDirectoryStatus CREATED = fromString("Created"); - - /** Static value InUse for ActiveDirectoryStatus. */ - public static final ActiveDirectoryStatus IN_USE = fromString("InUse"); - - /** Static value Deleted for ActiveDirectoryStatus. */ - public static final ActiveDirectoryStatus DELETED = fromString("Deleted"); - - /** Static value Error for ActiveDirectoryStatus. */ - public static final ActiveDirectoryStatus ERROR = fromString("Error"); - - /** Static value Updating for ActiveDirectoryStatus. */ - public static final ActiveDirectoryStatus UPDATING = fromString("Updating"); - - /** - * Creates or finds a ActiveDirectoryStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActiveDirectoryStatus. - */ - @JsonCreator - public static ActiveDirectoryStatus fromString(String name) { - return fromString(name, ActiveDirectoryStatus.class); - } - - /** @return known ActiveDirectoryStatus values. */ - public static Collection values() { - return values(ActiveDirectoryStatus.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ApplicationType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ApplicationType.java deleted file mode 100644 index 822f9aee9ec30..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ApplicationType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ApplicationType. */ -public final class ApplicationType extends ExpandableStringEnum { - /** Static value SAP-HANA for ApplicationType. */ - public static final ApplicationType SAP_HANA = fromString("SAP-HANA"); - - /** - * Creates or finds a ApplicationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ApplicationType. - */ - @JsonCreator - public static ApplicationType fromString(String name) { - return fromString(name, ApplicationType.class); - } - - /** @return known ApplicationType values. */ - public static Collection values() { - return values(ApplicationType.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AuthorizeRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AuthorizeRequest.java deleted file mode 100644 index 29285c40434cb..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AuthorizeRequest.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Authorize request. */ -@Fluent -public final class AuthorizeRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AuthorizeRequest.class); - - /* - * Resource id of the remote volume - */ - @JsonProperty(value = "remoteVolumeResourceId") - private String remoteVolumeResourceId; - - /** - * Get the remoteVolumeResourceId property: Resource id of the remote volume. - * - * @return the remoteVolumeResourceId value. - */ - public String remoteVolumeResourceId() { - return this.remoteVolumeResourceId; - } - - /** - * Set the remoteVolumeResourceId property: Resource id of the remote volume. - * - * @param remoteVolumeResourceId the remoteVolumeResourceId value to set. - * @return the AuthorizeRequest object itself. - */ - public AuthorizeRequest withRemoteVolumeResourceId(String remoteVolumeResourceId) { - this.remoteVolumeResourceId = remoteVolumeResourceId; - 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/AvsDataStore.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AvsDataStore.java deleted file mode 100644 index dcbf18ca42c46..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AvsDataStore.java +++ /dev/null @@ -1,34 +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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for AvsDataStore. */ -public final class AvsDataStore extends ExpandableStringEnum { - /** Static value Enabled for AvsDataStore. */ - public static final AvsDataStore ENABLED = fromString("Enabled"); - - /** Static value Disabled for AvsDataStore. */ - public static final AvsDataStore DISABLED = fromString("Disabled"); - - /** - * Creates or finds a AvsDataStore from its string representation. - * - * @param name a name to look for. - * @return the corresponding AvsDataStore. - */ - @JsonCreator - public static AvsDataStore fromString(String name) { - return fromString(name, AvsDataStore.class); - } - - /** @return known AvsDataStore values. */ - public static Collection values() { - return values(AvsDataStore.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backup.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backup.java deleted file mode 100644 index e4d9f8413fa19..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backup.java +++ /dev/null @@ -1,288 +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.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.netapp.fluent.models.BackupInner; -import java.time.OffsetDateTime; -import java.util.Map; - -/** 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 location property: Resource location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the backupId property: backupId UUID v4 used to identify the Backup. - * - * @return the backupId value. - */ - String backupId(); - - /** - * Gets the creationDate property: name 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. - * - * @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 volumeName property: Volume name. - * - * @return the volumeName value. - */ - String volumeName(); - - /** - * 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 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 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.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithCreate { - } - /** The Backup definition stages. */ - interface DefinitionStages { - /** The first stage of the Backup definition. */ - interface Blank extends WithLocation { - } - /** The stage of the Backup definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location Resource location. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location Resource location. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); - } - /** The stage of the Backup definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, accountName, poolName, volumeName. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @return the next definition stage. - */ - WithCreate withExistingVolume( - String resourceGroupName, String accountName, String poolName, String volumeName); - } - /** - * The stage of the 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 { - /** - * 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); - } - } - /** - * Begins update for the Backup resource. - * - * @return the stage of resource update. - */ - Backup.Update update(); - - /** The template for Backup update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithLabel, UpdateStages.WithUseExistingSnapshot { - /** - * 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 tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - /** 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); - } - /** The stage of the Backup update 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. - */ - Update withUseExistingSnapshot(Boolean useExistingSnapshot); - } - } - /** - * 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 deleted file mode 100644 index aae1d00b4388b..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java +++ /dev/null @@ -1,184 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.models.BackupProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** Backup patch. */ -@Fluent -public final class BackupPatch { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupPatch.class); - - /* - * Resource tags - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /* - * Backup Properties - */ - @JsonProperty(value = "properties") - private BackupProperties innerProperties; - - /** - * 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 BackupPatch object itself. - */ - public BackupPatch withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the innerProperties property: Backup Properties. - * - * @return the innerProperties value. - */ - private BackupProperties innerProperties() { - return this.innerProperties; - } - - /** - * 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: name 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. - * - * @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 BackupPatch object itself. - */ - public BackupPatch 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 volumeName property: Volume name. - * - * @return the volumeName value. - */ - public String volumeName() { - return this.innerProperties() == null ? null : this.innerProperties().volumeName(); - } - - /** - * 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 BackupPatch object itself. - */ - public BackupPatch withUseExistingSnapshot(Boolean useExistingSnapshot) { - if (this.innerProperties() == null) { - this.innerProperties = new BackupProperties(); - } - this.innerProperties().withUseExistingSnapshot(useExistingSnapshot); - 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/BackupPolicies.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicies.java deleted file mode 100644 index 615f16b37b1d5..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicies.java +++ /dev/null @@ -1,142 +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.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 BackupPolicies. */ -public interface BackupPolicies { - /** - * List backup policies for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Policies. - */ - PagedIterable list(String resourceGroupName, String accountName); - - /** - * List backup policies for Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Policies. - */ - PagedIterable list(String resourceGroupName, String accountName, Context context); - - /** - * Get a particular backup Policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 a particular backup Policy. - */ - BackupPolicy get(String resourceGroupName, String accountName, String backupPolicyName); - - /** - * Get a particular backup Policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @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 a particular backup Policy. - */ - Response getWithResponse( - String resourceGroupName, String accountName, String backupPolicyName, Context context); - - /** - * Delete backup policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 backupPolicyName); - - /** - * Delete backup policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param backupPolicyName Backup policy Name which uniquely identify backup policy. - * @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 backupPolicyName, Context context); - - /** - * Get a particular backup Policy. - * - * @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 a particular backup Policy. - */ - BackupPolicy getById(String id); - - /** - * Get a particular backup Policy. - * - * @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 a particular backup Policy. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete backup policy. - * - * @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 policy. - * - * @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 BackupPolicy resource. - * - * @param name resource name. - * @return the first stage of the new BackupPolicy definition. - */ - BackupPolicy.DefinitionStages.Blank define(String name); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPoliciesList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPoliciesList.java deleted file mode 100644 index 08f6b65355469..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPoliciesList.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of Backup Policies. */ -@Fluent -public final class BackupPoliciesList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupPoliciesList.class); - - /* - * A list of backup policies - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value property: A list of backup policies. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A list of backup policies. - * - * @param value the value value to set. - * @return the BackupPoliciesList object itself. - */ - public BackupPoliciesList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicy.java deleted file mode 100644 index 519093da24dd4..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicy.java +++ /dev/null @@ -1,347 +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.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner; -import java.util.List; -import java.util.Map; - -/** An immutable client-side representation of BackupPolicy. */ -public interface BackupPolicy { - /** - * 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 etag property: A unique read-only string that changes whenever the resource is updated. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the backupPolicyId property: Backup Policy Resource ID. - * - * @return the backupPolicyId value. - */ - String backupPolicyId(); - - /** - * Gets the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - String provisioningState(); - - /** - * Gets the dailyBackupsToKeep property: Daily backups count to keep. - * - * @return the dailyBackupsToKeep value. - */ - Integer dailyBackupsToKeep(); - - /** - * Gets the weeklyBackupsToKeep property: Weekly backups count to keep. - * - * @return the weeklyBackupsToKeep value. - */ - Integer weeklyBackupsToKeep(); - - /** - * Gets the monthlyBackupsToKeep property: Monthly backups count to keep. - * - * @return the monthlyBackupsToKeep value. - */ - Integer monthlyBackupsToKeep(); - - /** - * Gets the volumesAssigned property: Volumes using current backup policy. - * - * @return the volumesAssigned value. - */ - Integer volumesAssigned(); - - /** - * Gets the enabled property: The property to decide policy is enabled or not. - * - * @return the enabled value. - */ - Boolean enabled(); - - /** - * Gets the volumeBackups property: A list of volumes assigned to this policy. - * - * @return the volumeBackups value. - */ - List volumeBackups(); - - /** - * 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 inner com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner object. - * - * @return the inner object. - */ - BackupPolicyInner innerModel(); - - /** The entirety of the BackupPolicy definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithCreate { - } - /** The BackupPolicy definition stages. */ - interface DefinitionStages { - /** The first stage of the BackupPolicy definition. */ - interface Blank extends WithLocation { - } - /** The stage of the BackupPolicy 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 BackupPolicy definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, accountName. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @return the next definition stage. - */ - WithCreate withExistingNetAppAccount(String resourceGroupName, String accountName); - } - /** - * The stage of the BackupPolicy 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.WithDailyBackupsToKeep, - DefinitionStages.WithWeeklyBackupsToKeep, - DefinitionStages.WithMonthlyBackupsToKeep, - DefinitionStages.WithEnabled { - /** - * Executes the create request. - * - * @return the created resource. - */ - BackupPolicy create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - BackupPolicy create(Context context); - } - /** The stage of the BackupPolicy definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the BackupPolicy definition allowing to specify dailyBackupsToKeep. */ - interface WithDailyBackupsToKeep { - /** - * Specifies the dailyBackupsToKeep property: Daily backups count to keep. - * - * @param dailyBackupsToKeep Daily backups count to keep. - * @return the next definition stage. - */ - WithCreate withDailyBackupsToKeep(Integer dailyBackupsToKeep); - } - /** The stage of the BackupPolicy definition allowing to specify weeklyBackupsToKeep. */ - interface WithWeeklyBackupsToKeep { - /** - * Specifies the weeklyBackupsToKeep property: Weekly backups count to keep. - * - * @param weeklyBackupsToKeep Weekly backups count to keep. - * @return the next definition stage. - */ - WithCreate withWeeklyBackupsToKeep(Integer weeklyBackupsToKeep); - } - /** The stage of the BackupPolicy definition allowing to specify monthlyBackupsToKeep. */ - interface WithMonthlyBackupsToKeep { - /** - * Specifies the monthlyBackupsToKeep property: Monthly backups count to keep. - * - * @param monthlyBackupsToKeep Monthly backups count to keep. - * @return the next definition stage. - */ - WithCreate withMonthlyBackupsToKeep(Integer monthlyBackupsToKeep); - } - /** The stage of the BackupPolicy definition allowing to specify enabled. */ - interface WithEnabled { - /** - * Specifies the enabled property: The property to decide policy is enabled or not. - * - * @param enabled The property to decide policy is enabled or not. - * @return the next definition stage. - */ - WithCreate withEnabled(Boolean enabled); - } - } - /** - * Begins update for the BackupPolicy resource. - * - * @return the stage of resource update. - */ - BackupPolicy.Update update(); - - /** The template for BackupPolicy update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithDailyBackupsToKeep, - UpdateStages.WithWeeklyBackupsToKeep, - UpdateStages.WithMonthlyBackupsToKeep, - UpdateStages.WithEnabled { - /** - * Executes the update request. - * - * @return the updated resource. - */ - BackupPolicy apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - BackupPolicy apply(Context context); - } - /** The BackupPolicy update stages. */ - interface UpdateStages { - /** The stage of the BackupPolicy 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); - } - /** The stage of the BackupPolicy update allowing to specify dailyBackupsToKeep. */ - interface WithDailyBackupsToKeep { - /** - * Specifies the dailyBackupsToKeep property: Daily backups count to keep. - * - * @param dailyBackupsToKeep Daily backups count to keep. - * @return the next definition stage. - */ - Update withDailyBackupsToKeep(Integer dailyBackupsToKeep); - } - /** The stage of the BackupPolicy update allowing to specify weeklyBackupsToKeep. */ - interface WithWeeklyBackupsToKeep { - /** - * Specifies the weeklyBackupsToKeep property: Weekly backups count to keep. - * - * @param weeklyBackupsToKeep Weekly backups count to keep. - * @return the next definition stage. - */ - Update withWeeklyBackupsToKeep(Integer weeklyBackupsToKeep); - } - /** The stage of the BackupPolicy update allowing to specify monthlyBackupsToKeep. */ - interface WithMonthlyBackupsToKeep { - /** - * Specifies the monthlyBackupsToKeep property: Monthly backups count to keep. - * - * @param monthlyBackupsToKeep Monthly backups count to keep. - * @return the next definition stage. - */ - Update withMonthlyBackupsToKeep(Integer monthlyBackupsToKeep); - } - /** The stage of the BackupPolicy update allowing to specify enabled. */ - interface WithEnabled { - /** - * Specifies the enabled property: The property to decide policy is enabled or not. - * - * @param enabled The property to decide policy is enabled or not. - * @return the next definition stage. - */ - Update withEnabled(Boolean enabled); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - BackupPolicy refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - BackupPolicy refresh(Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicyPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicyPatch.java deleted file mode 100644 index 7e668d30f8872..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicyPatch.java +++ /dev/null @@ -1,188 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.models.BackupPolicyProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** Backup policy Details for create and update. */ -@Fluent -public final class BackupPolicyPatch extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupPolicyPatch.class); - - /* - * Backup policy Properties - */ - @JsonProperty(value = "properties") - private BackupPolicyProperties innerProperties; - - /** - * Get the innerProperties property: Backup policy Properties. - * - * @return the innerProperties value. - */ - private BackupPolicyProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public BackupPolicyPatch withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public BackupPolicyPatch withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the backupPolicyId property: Backup Policy Resource ID. - * - * @return the backupPolicyId value. - */ - public String backupPolicyId() { - return this.innerProperties() == null ? null : this.innerProperties().backupPolicyId(); - } - - /** - * Get the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the dailyBackupsToKeep property: Daily backups count to keep. - * - * @return the dailyBackupsToKeep value. - */ - public Integer dailyBackupsToKeep() { - return this.innerProperties() == null ? null : this.innerProperties().dailyBackupsToKeep(); - } - - /** - * Set the dailyBackupsToKeep property: Daily backups count to keep. - * - * @param dailyBackupsToKeep the dailyBackupsToKeep value to set. - * @return the BackupPolicyPatch object itself. - */ - public BackupPolicyPatch withDailyBackupsToKeep(Integer dailyBackupsToKeep) { - if (this.innerProperties() == null) { - this.innerProperties = new BackupPolicyProperties(); - } - this.innerProperties().withDailyBackupsToKeep(dailyBackupsToKeep); - return this; - } - - /** - * Get the weeklyBackupsToKeep property: Weekly backups count to keep. - * - * @return the weeklyBackupsToKeep value. - */ - public Integer weeklyBackupsToKeep() { - return this.innerProperties() == null ? null : this.innerProperties().weeklyBackupsToKeep(); - } - - /** - * Set the weeklyBackupsToKeep property: Weekly backups count to keep. - * - * @param weeklyBackupsToKeep the weeklyBackupsToKeep value to set. - * @return the BackupPolicyPatch object itself. - */ - public BackupPolicyPatch withWeeklyBackupsToKeep(Integer weeklyBackupsToKeep) { - if (this.innerProperties() == null) { - this.innerProperties = new BackupPolicyProperties(); - } - this.innerProperties().withWeeklyBackupsToKeep(weeklyBackupsToKeep); - return this; - } - - /** - * Get the monthlyBackupsToKeep property: Monthly backups count to keep. - * - * @return the monthlyBackupsToKeep value. - */ - public Integer monthlyBackupsToKeep() { - return this.innerProperties() == null ? null : this.innerProperties().monthlyBackupsToKeep(); - } - - /** - * Set the monthlyBackupsToKeep property: Monthly backups count to keep. - * - * @param monthlyBackupsToKeep the monthlyBackupsToKeep value to set. - * @return the BackupPolicyPatch object itself. - */ - public BackupPolicyPatch withMonthlyBackupsToKeep(Integer monthlyBackupsToKeep) { - if (this.innerProperties() == null) { - this.innerProperties = new BackupPolicyProperties(); - } - this.innerProperties().withMonthlyBackupsToKeep(monthlyBackupsToKeep); - return this; - } - - /** - * Get the volumesAssigned property: Volumes using current backup policy. - * - * @return the volumesAssigned value. - */ - public Integer volumesAssigned() { - return this.innerProperties() == null ? null : this.innerProperties().volumesAssigned(); - } - - /** - * Get the enabled property: The property to decide policy is enabled or not. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.innerProperties() == null ? null : this.innerProperties().enabled(); - } - - /** - * Set the enabled property: The property to decide policy is enabled or not. - * - * @param enabled the enabled value to set. - * @return the BackupPolicyPatch object itself. - */ - public BackupPolicyPatch withEnabled(Boolean enabled) { - if (this.innerProperties() == null) { - this.innerProperties = new BackupPolicyProperties(); - } - this.innerProperties().withEnabled(enabled); - return this; - } - - /** - * Get the volumeBackups property: A list of volumes assigned to this policy. - * - * @return the volumeBackups value. - */ - public List volumeBackups() { - return this.innerProperties() == null ? null : this.innerProperties().volumeBackups(); - } - - /** - * 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/BackupStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupStatus.java deleted file mode 100644 index d292c06a32c62..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupStatus.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.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 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 deleted file mode 100644 index f8ebe45eb8765..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java +++ /dev/null @@ -1,34 +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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for BackupType. */ -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 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); - } - - /** @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/Backups.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backups.java deleted file mode 100644 index ae7ec29188116..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backups.java +++ /dev/null @@ -1,227 +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.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 Backups. */ -public interface Backups { - /** - * Get the status of the backup for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of the backup for a volume. - */ - BackupStatus getStatus(String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Get the status of the backup for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of the backup for a volume. - */ - Response getStatusWithResponse( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * Get the status of the restore for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of the restore for a volume. - */ - RestoreStatus getVolumeRestoreStatus( - String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Get the status of the restore for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of the restore for a volume. - */ - Response getVolumeRestoreStatusWithResponse( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * List all backups for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Backups. - */ - PagedIterable list(String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * List all backups for a volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Backups. - */ - PagedIterable list( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * Gets the specified backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of the volume. - */ - Backup get(String resourceGroupName, String accountName, String poolName, String volumeName, String backupName); - - /** - * Gets the specified backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 of the volume. - */ - Response getWithResponse( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String backupName, - Context context); - - /** - * Delete a backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 poolName, String volumeName, String backupName); - - /** - * Delete a backup of the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param 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 poolName, - String volumeName, - String backupName, - Context context); - - /** - * Gets the specified backup of the volume. - * - * @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 of the volume. - */ - Backup getById(String id); - - /** - * Gets the specified backup of the volume. - * - * @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 of the volume. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a backup of the volume. - * - * @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 a backup of the volume. - * - * @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 deleted file mode 100644 index 0b6696a5dd6b5..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsList.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.models.BackupInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of Backups. */ -@Fluent -public final class BackupsList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupsList.class); - - /* - * A list of Backups - */ - @JsonProperty(value = "value") - private List value; - - /** - * 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; - } - - /** - * 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/BreakReplicationRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakReplicationRequest.java deleted file mode 100644 index b334b31a8c54a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakReplicationRequest.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Break replication request. */ -@Fluent -public final class BreakReplicationRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BreakReplicationRequest.class); - - /* - * If replication is in status transferring and you want to force break the - * replication, set to true - */ - @JsonProperty(value = "forceBreakReplication") - private Boolean forceBreakReplication; - - /** - * Get the forceBreakReplication property: If replication is in status transferring and you want to force break the - * replication, set to true. - * - * @return the forceBreakReplication value. - */ - public Boolean forceBreakReplication() { - return this.forceBreakReplication; - } - - /** - * Set the forceBreakReplication property: If replication is in status transferring and you want to force break the - * replication, set to true. - * - * @param forceBreakReplication the forceBreakReplication value to set. - * @return the BreakReplicationRequest object itself. - */ - public BreakReplicationRequest withForceBreakReplication(Boolean forceBreakReplication) { - this.forceBreakReplication = forceBreakReplication; - 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/CapacityPool.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPool.java deleted file mode 100644 index c3f168cdc3ec5..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPool.java +++ /dev/null @@ -1,348 +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.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner; -import java.util.Map; - -/** An immutable client-side representation of CapacityPool. */ -public interface CapacityPool { - /** - * 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 etag property: A unique read-only string that changes whenever the resource is updated. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the poolId property: poolId UUID v4 used to identify the Pool. - * - * @return the poolId value. - */ - String poolId(); - - /** - * Gets the size property: size Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value - * must be multiply of 4398046511104). - * - * @return the size value. - */ - long size(); - - /** - * Gets the serviceLevel property: serviceLevel The service level of the file system. - * - * @return the serviceLevel value. - */ - ServiceLevel serviceLevel(); - - /** - * Gets the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - String provisioningState(); - - /** - * Gets the totalThroughputMibps property: Total throughput of pool in Mibps. - * - * @return the totalThroughputMibps value. - */ - Float totalThroughputMibps(); - - /** - * Gets the utilizedThroughputMibps property: Utilized throughput of pool in Mibps. - * - * @return the utilizedThroughputMibps value. - */ - Float utilizedThroughputMibps(); - - /** - * Gets the qosType property: The qos type of the pool. - * - * @return the qosType value. - */ - QosType qosType(); - - /** - * Gets the coolAccess property: If enabled (true) the pool can contain cool Access enabled volumes. - * - * @return the coolAccess value. - */ - Boolean coolAccess(); - - /** - * Gets the encryptionType property: 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. - * - * @return the encryptionType value. - */ - EncryptionType encryptionType(); - - /** - * 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 inner com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner object. - * - * @return the inner object. - */ - CapacityPoolInner innerModel(); - - /** The entirety of the CapacityPool definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithSize, - DefinitionStages.WithServiceLevel, - DefinitionStages.WithCreate { - } - /** The CapacityPool definition stages. */ - interface DefinitionStages { - /** The first stage of the CapacityPool definition. */ - interface Blank extends WithLocation { - } - /** The stage of the CapacityPool 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 CapacityPool definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, accountName. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @return the next definition stage. - */ - WithSize withExistingNetAppAccount(String resourceGroupName, String accountName); - } - /** The stage of the CapacityPool definition allowing to specify size. */ - interface WithSize { - /** - * Specifies the size property: size Provisioned size of the pool (in bytes). Allowed values are in 4TiB - * chunks (value must be multiply of 4398046511104).. - * - * @param size size Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must - * be multiply of 4398046511104). - * @return the next definition stage. - */ - WithServiceLevel withSize(long size); - } - /** The stage of the CapacityPool definition allowing to specify serviceLevel. */ - interface WithServiceLevel { - /** - * Specifies the serviceLevel property: serviceLevel The service level of the file system. - * - * @param serviceLevel serviceLevel The service level of the file system. - * @return the next definition stage. - */ - WithCreate withServiceLevel(ServiceLevel serviceLevel); - } - /** - * The stage of the CapacityPool 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.WithQosType, - DefinitionStages.WithCoolAccess, - DefinitionStages.WithEncryptionType { - /** - * Executes the create request. - * - * @return the created resource. - */ - CapacityPool create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - CapacityPool create(Context context); - } - /** The stage of the CapacityPool definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the CapacityPool definition allowing to specify qosType. */ - interface WithQosType { - /** - * Specifies the qosType property: The qos type of the pool. - * - * @param qosType The qos type of the pool. - * @return the next definition stage. - */ - WithCreate withQosType(QosType qosType); - } - /** The stage of the CapacityPool definition allowing to specify coolAccess. */ - interface WithCoolAccess { - /** - * Specifies the coolAccess property: If enabled (true) the pool can contain cool Access enabled volumes.. - * - * @param coolAccess If enabled (true) the pool can contain cool Access enabled volumes. - * @return the next definition stage. - */ - WithCreate withCoolAccess(Boolean coolAccess); - } - /** The stage of the CapacityPool definition allowing to specify encryptionType. */ - interface WithEncryptionType { - /** - * Specifies the encryptionType property: 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.. - * - * @param encryptionType 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. - * @return the next definition stage. - */ - WithCreate withEncryptionType(EncryptionType encryptionType); - } - } - /** - * Begins update for the CapacityPool resource. - * - * @return the stage of resource update. - */ - CapacityPool.Update update(); - - /** The template for CapacityPool update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithSize, UpdateStages.WithQosType { - /** - * Executes the update request. - * - * @return the updated resource. - */ - CapacityPool apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - CapacityPool apply(Context context); - } - /** The CapacityPool update stages. */ - interface UpdateStages { - /** The stage of the CapacityPool 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); - } - /** The stage of the CapacityPool update allowing to specify size. */ - interface WithSize { - /** - * Specifies the size property: size Provisioned size of the pool (in bytes). Allowed values are in 4TiB - * chunks (value must be multiply of 4398046511104).. - * - * @param size size Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must - * be multiply of 4398046511104). - * @return the next definition stage. - */ - Update withSize(Long size); - } - /** The stage of the CapacityPool update allowing to specify qosType. */ - interface WithQosType { - /** - * Specifies the qosType property: The qos type of the pool. - * - * @param qosType The qos type of the pool. - * @return the next definition stage. - */ - Update withQosType(QosType qosType); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - CapacityPool refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - CapacityPool refresh(Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolList.java deleted file mode 100644 index 57f1b9266ae17..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolList.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of capacity pool resources. */ -@Fluent -public final class CapacityPoolList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CapacityPoolList.class); - - /* - * List of Capacity pools - */ - @JsonProperty(value = "value") - private List value; - - /* - * URL to get the next set of results. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: List of Capacity pools. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of Capacity pools. - * - * @param value the value value to set. - * @return the CapacityPoolList object itself. - */ - public CapacityPoolList 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 CapacityPoolList object itself. - */ - public CapacityPoolList 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/CapacityPoolPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolPatch.java deleted file mode 100644 index be1642f10838c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolPatch.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.models.PoolPatchProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Capacity pool patch resource. */ -@Fluent -public final class CapacityPoolPatch extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CapacityPoolPatch.class); - - /* - * Capacity pool properties - */ - @JsonProperty(value = "properties") - private PoolPatchProperties innerProperties; - - /** - * Get the innerProperties property: Capacity pool properties. - * - * @return the innerProperties value. - */ - private PoolPatchProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public CapacityPoolPatch withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public CapacityPoolPatch withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the size property: size Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value - * must be multiply of 4398046511104). - * - * @return the size value. - */ - public Long size() { - return this.innerProperties() == null ? null : this.innerProperties().size(); - } - - /** - * Set the size property: size Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value - * must be multiply of 4398046511104). - * - * @param size the size value to set. - * @return the CapacityPoolPatch object itself. - */ - public CapacityPoolPatch withSize(Long size) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolPatchProperties(); - } - this.innerProperties().withSize(size); - return this; - } - - /** - * Get the qosType property: The qos type of the pool. - * - * @return the qosType value. - */ - public QosType qosType() { - return this.innerProperties() == null ? null : this.innerProperties().qosType(); - } - - /** - * Set the qosType property: The qos type of the pool. - * - * @param qosType the qosType value to set. - * @return the CapacityPoolPatch object itself. - */ - public CapacityPoolPatch withQosType(QosType qosType) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolPatchProperties(); - } - this.innerProperties().withQosType(qosType); - 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/CheckAvailabilityResponse.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckAvailabilityResponse.java deleted file mode 100644 index f623303609937..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckAvailabilityResponse.java +++ /dev/null @@ -1,43 +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.models; - -import com.azure.resourcemanager.netapp.fluent.models.CheckAvailabilityResponseInner; - -/** An immutable client-side representation of CheckAvailabilityResponse. */ -public interface CheckAvailabilityResponse { - /** - * Gets the isAvailable property: <code>true</code> indicates name is valid and available. - * <code>false</code> indicates the name is invalid, unavailable, or both. - * - * @return the isAvailable value. - */ - Boolean isAvailable(); - - /** - * Gets 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. - * - * @return the reason value. - */ - InAvailabilityReasonType reason(); - - /** - * Gets the message property: 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. - * - * @return the message value. - */ - String message(); - - /** - * Gets the inner com.azure.resourcemanager.netapp.fluent.models.CheckAvailabilityResponseInner object. - * - * @return the inner object. - */ - CheckAvailabilityResponseInner innerModel(); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckNameResourceTypes.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckNameResourceTypes.java deleted file mode 100644 index 72b16ab4fcf0f..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckNameResourceTypes.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for CheckNameResourceTypes. */ -public final class CheckNameResourceTypes extends ExpandableStringEnum { - /** Static value Microsoft.NetApp/netAppAccounts for CheckNameResourceTypes. */ - public static final CheckNameResourceTypes MICROSOFT_NET_APP_NET_APP_ACCOUNTS = - fromString("Microsoft.NetApp/netAppAccounts"); - - /** Static value Microsoft.NetApp/netAppAccounts/capacityPools for CheckNameResourceTypes. */ - public static final CheckNameResourceTypes MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS = - fromString("Microsoft.NetApp/netAppAccounts/capacityPools"); - - /** Static value Microsoft.NetApp/netAppAccounts/capacityPools/volumes for CheckNameResourceTypes. */ - public static final CheckNameResourceTypes MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES = - fromString("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"); - - /** Static value Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots for CheckNameResourceTypes. */ - public static final CheckNameResourceTypes MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS = - fromString("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots"); - - /** - * Creates or finds a CheckNameResourceTypes from its string representation. - * - * @param name a name to look for. - * @return the corresponding CheckNameResourceTypes. - */ - @JsonCreator - public static CheckNameResourceTypes fromString(String name) { - return fromString(name, CheckNameResourceTypes.class); - } - - /** @return known CheckNameResourceTypes values. */ - public static Collection values() { - return values(CheckNameResourceTypes.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckQuotaNameResourceTypes.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckQuotaNameResourceTypes.java deleted file mode 100644 index 111e960fc7f8d..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckQuotaNameResourceTypes.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for CheckQuotaNameResourceTypes. */ -public final class CheckQuotaNameResourceTypes extends ExpandableStringEnum { - /** Static value Microsoft.NetApp/netAppAccounts for CheckQuotaNameResourceTypes. */ - public static final CheckQuotaNameResourceTypes MICROSOFT_NET_APP_NET_APP_ACCOUNTS = - fromString("Microsoft.NetApp/netAppAccounts"); - - /** Static value Microsoft.NetApp/netAppAccounts/capacityPools for CheckQuotaNameResourceTypes. */ - public static final CheckQuotaNameResourceTypes MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS = - fromString("Microsoft.NetApp/netAppAccounts/capacityPools"); - - /** Static value Microsoft.NetApp/netAppAccounts/capacityPools/volumes for CheckQuotaNameResourceTypes. */ - public static final CheckQuotaNameResourceTypes MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES = - fromString("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"); - - /** Static value Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots for CheckQuotaNameResourceTypes. */ - public static final CheckQuotaNameResourceTypes - MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS = - fromString("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots"); - - /** - * Creates or finds a CheckQuotaNameResourceTypes from its string representation. - * - * @param name a name to look for. - * @return the corresponding CheckQuotaNameResourceTypes. - */ - @JsonCreator - public static CheckQuotaNameResourceTypes fromString(String name) { - return fromString(name, CheckQuotaNameResourceTypes.class); - } - - /** @return known CheckQuotaNameResourceTypes values. */ - public static Collection values() { - return values(CheckQuotaNameResourceTypes.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChownMode.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChownMode.java deleted file mode 100644 index e2c9bd6d649e4..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChownMode.java +++ /dev/null @@ -1,34 +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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ChownMode. */ -public final class ChownMode extends ExpandableStringEnum { - /** Static value Restricted for ChownMode. */ - public static final ChownMode RESTRICTED = fromString("Restricted"); - - /** Static value Unrestricted for ChownMode. */ - public static final ChownMode UNRESTRICTED = fromString("Unrestricted"); - - /** - * Creates or finds a ChownMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding ChownMode. - */ - @JsonCreator - public static ChownMode fromString(String name) { - return fromString(name, ChownMode.class); - } - - /** @return known ChownMode values. */ - public static Collection values() { - return values(ChownMode.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DailySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DailySchedule.java deleted file mode 100644 index bf9bf7a5364b7..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DailySchedule.java +++ /dev/null @@ -1,128 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Daily Schedule properties. */ -@Fluent -public final class DailySchedule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DailySchedule.class); - - /* - * Daily snapshot count to keep - */ - @JsonProperty(value = "snapshotsToKeep") - private Integer snapshotsToKeep; - - /* - * Indicates which hour in UTC timezone a snapshot should be taken - */ - @JsonProperty(value = "hour") - private Integer hour; - - /* - * Indicates which minute snapshot should be taken - */ - @JsonProperty(value = "minute") - private Integer minute; - - /* - * Resource size in bytes, current storage usage for the volume in bytes - */ - @JsonProperty(value = "usedBytes") - private Long usedBytes; - - /** - * Get the snapshotsToKeep property: Daily snapshot count to keep. - * - * @return the snapshotsToKeep value. - */ - public Integer snapshotsToKeep() { - return this.snapshotsToKeep; - } - - /** - * Set the snapshotsToKeep property: Daily snapshot count to keep. - * - * @param snapshotsToKeep the snapshotsToKeep value to set. - * @return the DailySchedule object itself. - */ - public DailySchedule withSnapshotsToKeep(Integer snapshotsToKeep) { - this.snapshotsToKeep = snapshotsToKeep; - return this; - } - - /** - * Get the hour property: Indicates which hour in UTC timezone a snapshot should be taken. - * - * @return the hour value. - */ - public Integer hour() { - return this.hour; - } - - /** - * Set the hour property: Indicates which hour in UTC timezone a snapshot should be taken. - * - * @param hour the hour value to set. - * @return the DailySchedule object itself. - */ - public DailySchedule withHour(Integer hour) { - this.hour = hour; - return this; - } - - /** - * Get the minute property: Indicates which minute snapshot should be taken. - * - * @return the minute value. - */ - public Integer minute() { - return this.minute; - } - - /** - * Set the minute property: Indicates which minute snapshot should be taken. - * - * @param minute the minute value to set. - * @return the DailySchedule object itself. - */ - public DailySchedule withMinute(Integer minute) { - this.minute = minute; - return this; - } - - /** - * Get the usedBytes property: Resource size in bytes, current storage usage for the volume in bytes. - * - * @return the usedBytes value. - */ - public Long usedBytes() { - return this.usedBytes; - } - - /** - * Set the usedBytes property: Resource size in bytes, current storage usage for the volume in bytes. - * - * @param usedBytes the usedBytes value to set. - * @return the DailySchedule object itself. - */ - public DailySchedule withUsedBytes(Long usedBytes) { - this.usedBytes = usedBytes; - 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/Dimension.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Dimension.java deleted file mode 100644 index 1a3e90bfc9509..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Dimension.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Dimension of blobs, possibly be blob type or access tier. */ -@Fluent -public final class Dimension { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Dimension.class); - - /* - * Display name of dimension. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Display name of dimension. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /** - * Get the name property: Display name of dimension. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Display name of dimension. - * - * @param name the name value to set. - * @return the Dimension object itself. - */ - public Dimension withName(String name) { - this.name = name; - return this; - } - - /** - * Get the displayName property: Display name of dimension. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Display name of dimension. - * - * @param displayName the displayName value to set. - * @return the Dimension object itself. - */ - public Dimension withDisplayName(String displayName) { - this.displayName = displayName; - 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/EncryptionType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionType.java deleted file mode 100644 index 03f82808a7297..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionType.java +++ /dev/null @@ -1,34 +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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for EncryptionType. */ -public final class EncryptionType extends ExpandableStringEnum { - /** Static value Single for EncryptionType. */ - public static final EncryptionType SINGLE = fromString("Single"); - - /** Static value Double for EncryptionType. */ - public static final EncryptionType DOUBLE = fromString("Double"); - - /** - * Creates or finds a EncryptionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EncryptionType. - */ - @JsonCreator - public static EncryptionType fromString(String name) { - return fromString(name, EncryptionType.class); - } - - /** @return known EncryptionType values. */ - public static Collection values() { - return values(EncryptionType.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EndpointType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EndpointType.java deleted file mode 100644 index 7b200d3714ecc..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EndpointType.java +++ /dev/null @@ -1,34 +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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for EndpointType. */ -public final class EndpointType extends ExpandableStringEnum { - /** Static value src for EndpointType. */ - public static final EndpointType SRC = fromString("src"); - - /** Static value dst for EndpointType. */ - public static final EndpointType DST = fromString("dst"); - - /** - * Creates or finds a EndpointType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EndpointType. - */ - @JsonCreator - public static EndpointType fromString(String name) { - return fromString(name, EndpointType.class); - } - - /** @return known EndpointType values. */ - public static Collection values() { - return values(EndpointType.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExportPolicyRule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExportPolicyRule.java deleted file mode 100644 index d8712b2fa56d1..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExportPolicyRule.java +++ /dev/null @@ -1,442 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Volume Export Policy Rule. */ -@Fluent -public final class ExportPolicyRule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ExportPolicyRule.class); - - /* - * Order index - */ - @JsonProperty(value = "ruleIndex") - private Integer ruleIndex; - - /* - * Read only access - */ - @JsonProperty(value = "unixReadOnly") - private Boolean unixReadOnly; - - /* - * Read and write access - */ - @JsonProperty(value = "unixReadWrite") - private Boolean unixReadWrite; - - /* - * Kerberos5 Read only access. To be use with swagger version 2020-05-01 or - * later - */ - @JsonProperty(value = "kerberos5ReadOnly") - private Boolean kerberos5ReadOnly; - - /* - * Kerberos5 Read and write access. To be use with swagger version - * 2020-05-01 or later - */ - @JsonProperty(value = "kerberos5ReadWrite") - private Boolean kerberos5ReadWrite; - - /* - * Kerberos5i Read only access. To be use with swagger version 2020-05-01 - * or later - */ - @JsonProperty(value = "kerberos5iReadOnly") - private Boolean kerberos5IReadOnly; - - /* - * Kerberos5i Read and write access. To be use with swagger version - * 2020-05-01 or later - */ - @JsonProperty(value = "kerberos5iReadWrite") - private Boolean kerberos5IReadWrite; - - /* - * Kerberos5p Read only access. To be use with swagger version 2020-05-01 - * or later - */ - @JsonProperty(value = "kerberos5pReadOnly") - private Boolean kerberos5PReadOnly; - - /* - * Kerberos5p Read and write access. To be use with swagger version - * 2020-05-01 or later - */ - @JsonProperty(value = "kerberos5pReadWrite") - private Boolean kerberos5PReadWrite; - - /* - * Allows CIFS protocol - */ - @JsonProperty(value = "cifs") - private Boolean cifs; - - /* - * Allows NFSv3 protocol. Enable only for NFSv3 type volumes - */ - @JsonProperty(value = "nfsv3") - private Boolean nfsv3; - - /* - * Allows NFSv4.1 protocol. Enable only for NFSv4.1 type volumes - */ - @JsonProperty(value = "nfsv41") - private Boolean nfsv41; - - /* - * Client ingress specification as comma separated string with IPv4 CIDRs, - * IPv4 host addresses and host names - */ - @JsonProperty(value = "allowedClients") - private String allowedClients; - - /* - * Has root access to volume - */ - @JsonProperty(value = "hasRootAccess") - 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. - */ - @JsonProperty(value = "chownMode") - private ChownMode chownMode; - - /** - * Get the ruleIndex property: Order index. - * - * @return the ruleIndex value. - */ - public Integer ruleIndex() { - return this.ruleIndex; - } - - /** - * Set the ruleIndex property: Order index. - * - * @param ruleIndex the ruleIndex value to set. - * @return the ExportPolicyRule object itself. - */ - public ExportPolicyRule withRuleIndex(Integer ruleIndex) { - this.ruleIndex = ruleIndex; - return this; - } - - /** - * Get the unixReadOnly property: Read only access. - * - * @return the unixReadOnly value. - */ - public Boolean unixReadOnly() { - return this.unixReadOnly; - } - - /** - * Set the unixReadOnly property: Read only access. - * - * @param unixReadOnly the unixReadOnly value to set. - * @return the ExportPolicyRule object itself. - */ - public ExportPolicyRule withUnixReadOnly(Boolean unixReadOnly) { - this.unixReadOnly = unixReadOnly; - return this; - } - - /** - * Get the unixReadWrite property: Read and write access. - * - * @return the unixReadWrite value. - */ - public Boolean unixReadWrite() { - return this.unixReadWrite; - } - - /** - * Set the unixReadWrite property: Read and write access. - * - * @param unixReadWrite the unixReadWrite value to set. - * @return the ExportPolicyRule object itself. - */ - public ExportPolicyRule withUnixReadWrite(Boolean unixReadWrite) { - this.unixReadWrite = unixReadWrite; - return this; - } - - /** - * Get the kerberos5ReadOnly property: Kerberos5 Read only access. To be use with swagger version 2020-05-01 or - * later. - * - * @return the kerberos5ReadOnly value. - */ - public Boolean kerberos5ReadOnly() { - return this.kerberos5ReadOnly; - } - - /** - * Set the kerberos5ReadOnly property: Kerberos5 Read only access. To be use with swagger version 2020-05-01 or - * later. - * - * @param kerberos5ReadOnly the kerberos5ReadOnly value to set. - * @return the ExportPolicyRule object itself. - */ - public ExportPolicyRule withKerberos5ReadOnly(Boolean kerberos5ReadOnly) { - this.kerberos5ReadOnly = kerberos5ReadOnly; - return this; - } - - /** - * Get the kerberos5ReadWrite property: Kerberos5 Read and write access. To be use with swagger version 2020-05-01 - * or later. - * - * @return the kerberos5ReadWrite value. - */ - public Boolean kerberos5ReadWrite() { - return this.kerberos5ReadWrite; - } - - /** - * Set the kerberos5ReadWrite property: Kerberos5 Read and write access. To be use with swagger version 2020-05-01 - * or later. - * - * @param kerberos5ReadWrite the kerberos5ReadWrite value to set. - * @return the ExportPolicyRule object itself. - */ - public ExportPolicyRule withKerberos5ReadWrite(Boolean kerberos5ReadWrite) { - this.kerberos5ReadWrite = kerberos5ReadWrite; - return this; - } - - /** - * Get the kerberos5IReadOnly property: Kerberos5i Read only access. To be use with swagger version 2020-05-01 or - * later. - * - * @return the kerberos5IReadOnly value. - */ - public Boolean kerberos5IReadOnly() { - return this.kerberos5IReadOnly; - } - - /** - * Set the kerberos5IReadOnly property: Kerberos5i Read only access. To be use with swagger version 2020-05-01 or - * later. - * - * @param kerberos5IReadOnly the kerberos5IReadOnly value to set. - * @return the ExportPolicyRule object itself. - */ - public ExportPolicyRule withKerberos5IReadOnly(Boolean kerberos5IReadOnly) { - this.kerberos5IReadOnly = kerberos5IReadOnly; - return this; - } - - /** - * Get the kerberos5IReadWrite property: Kerberos5i Read and write access. To be use with swagger version 2020-05-01 - * or later. - * - * @return the kerberos5IReadWrite value. - */ - public Boolean kerberos5IReadWrite() { - return this.kerberos5IReadWrite; - } - - /** - * 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. - */ - public ExportPolicyRule withKerberos5IReadWrite(Boolean kerberos5IReadWrite) { - this.kerberos5IReadWrite = kerberos5IReadWrite; - return this; - } - - /** - * Get the kerberos5PReadOnly property: Kerberos5p Read only access. To be use with swagger version 2020-05-01 or - * later. - * - * @return the kerberos5PReadOnly value. - */ - public Boolean kerberos5PReadOnly() { - return this.kerberos5PReadOnly; - } - - /** - * Set the kerberos5PReadOnly property: Kerberos5p Read only access. To be use with swagger version 2020-05-01 or - * later. - * - * @param kerberos5PReadOnly the kerberos5PReadOnly value to set. - * @return the ExportPolicyRule object itself. - */ - public ExportPolicyRule withKerberos5PReadOnly(Boolean kerberos5PReadOnly) { - this.kerberos5PReadOnly = kerberos5PReadOnly; - return this; - } - - /** - * Get the kerberos5PReadWrite property: Kerberos5p Read and write access. To be use with swagger version 2020-05-01 - * or later. - * - * @return the kerberos5PReadWrite value. - */ - public Boolean kerberos5PReadWrite() { - return this.kerberos5PReadWrite; - } - - /** - * 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. - */ - public ExportPolicyRule withKerberos5PReadWrite(Boolean kerberos5PReadWrite) { - this.kerberos5PReadWrite = kerberos5PReadWrite; - return this; - } - - /** - * Get the cifs property: Allows CIFS protocol. - * - * @return the cifs value. - */ - public Boolean cifs() { - return this.cifs; - } - - /** - * Set the cifs property: Allows CIFS protocol. - * - * @param cifs the cifs value to set. - * @return the ExportPolicyRule object itself. - */ - public ExportPolicyRule withCifs(Boolean cifs) { - this.cifs = cifs; - return this; - } - - /** - * Get the nfsv3 property: Allows NFSv3 protocol. Enable only for NFSv3 type volumes. - * - * @return the nfsv3 value. - */ - public Boolean nfsv3() { - return this.nfsv3; - } - - /** - * Set the nfsv3 property: Allows NFSv3 protocol. Enable only for NFSv3 type volumes. - * - * @param nfsv3 the nfsv3 value to set. - * @return the ExportPolicyRule object itself. - */ - public ExportPolicyRule withNfsv3(Boolean nfsv3) { - this.nfsv3 = nfsv3; - return this; - } - - /** - * Get the nfsv41 property: Allows NFSv4.1 protocol. Enable only for NFSv4.1 type volumes. - * - * @return the nfsv41 value. - */ - public Boolean nfsv41() { - return this.nfsv41; - } - - /** - * Set the nfsv41 property: Allows NFSv4.1 protocol. Enable only for NFSv4.1 type volumes. - * - * @param nfsv41 the nfsv41 value to set. - * @return the ExportPolicyRule object itself. - */ - public ExportPolicyRule withNfsv41(Boolean nfsv41) { - this.nfsv41 = nfsv41; - return this; - } - - /** - * Get the allowedClients property: Client ingress specification as comma separated string with IPv4 CIDRs, IPv4 - * host addresses and host names. - * - * @return the allowedClients value. - */ - public String allowedClients() { - return this.allowedClients; - } - - /** - * Set the allowedClients property: Client ingress specification as comma separated string with IPv4 CIDRs, IPv4 - * host addresses and host names. - * - * @param allowedClients the allowedClients value to set. - * @return the ExportPolicyRule object itself. - */ - public ExportPolicyRule withAllowedClients(String allowedClients) { - this.allowedClients = allowedClients; - return this; - } - - /** - * Get the hasRootAccess property: Has root access to volume. - * - * @return the hasRootAccess value. - */ - public Boolean hasRootAccess() { - return this.hasRootAccess; - } - - /** - * Set the hasRootAccess property: Has root access to volume. - * - * @param hasRootAccess the hasRootAccess value to set. - * @return the ExportPolicyRule object itself. - */ - public ExportPolicyRule withHasRootAccess(Boolean hasRootAccess) { - this.hasRootAccess = hasRootAccess; - return this; - } - - /** - * Get the chownMode property: 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. - * - * @return the chownMode value. - */ - public ChownMode chownMode() { - return this.chownMode; - } - - /** - * Set the chownMode property: 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. - * - * @param chownMode the chownMode value to set. - * @return the ExportPolicyRule object itself. - */ - public ExportPolicyRule withChownMode(ChownMode chownMode) { - this.chownMode = chownMode; - 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/FilePathAvailabilityRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/FilePathAvailabilityRequest.java deleted file mode 100644 index 6b532fa852cf9..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/FilePathAvailabilityRequest.java +++ /dev/null @@ -1,91 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** File path availability request content - availability is based on the name and the subnetId. */ -@Fluent -public final class FilePathAvailabilityRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FilePathAvailabilityRequest.class); - - /* - * File path to verify. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /* - * The Azure Resource URI for a delegated subnet. Must have the delegation - * Microsoft.NetApp/volumes - */ - @JsonProperty(value = "subnetId", required = true) - private String subnetId; - - /** - * Get the name property: File path to verify. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: File path to verify. - * - * @param name the name value to set. - * @return the FilePathAvailabilityRequest object itself. - */ - public FilePathAvailabilityRequest withName(String name) { - this.name = name; - return this; - } - - /** - * Get the subnetId property: The Azure Resource URI for a delegated subnet. Must have the delegation - * Microsoft.NetApp/volumes. - * - * @return the subnetId value. - */ - public String subnetId() { - return this.subnetId; - } - - /** - * Set the subnetId property: The Azure Resource URI for a delegated subnet. Must have the delegation - * Microsoft.NetApp/volumes. - * - * @param subnetId the subnetId value to set. - * @return the FilePathAvailabilityRequest object itself. - */ - public FilePathAvailabilityRequest withSubnetId(String subnetId) { - this.subnetId = subnetId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property name in model FilePathAvailabilityRequest")); - } - if (subnetId() == null) { - throw logger - .logExceptionAsError( - 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/HourlySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/HourlySchedule.java deleted file mode 100644 index 55c9fdafa75e3..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/HourlySchedule.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Hourly Schedule properties. */ -@Fluent -public final class HourlySchedule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(HourlySchedule.class); - - /* - * Hourly snapshot count to keep - */ - @JsonProperty(value = "snapshotsToKeep") - private Integer snapshotsToKeep; - - /* - * Indicates which minute snapshot should be taken - */ - @JsonProperty(value = "minute") - private Integer minute; - - /* - * Resource size in bytes, current storage usage for the volume in bytes - */ - @JsonProperty(value = "usedBytes") - private Long usedBytes; - - /** - * Get the snapshotsToKeep property: Hourly snapshot count to keep. - * - * @return the snapshotsToKeep value. - */ - public Integer snapshotsToKeep() { - return this.snapshotsToKeep; - } - - /** - * Set the snapshotsToKeep property: Hourly snapshot count to keep. - * - * @param snapshotsToKeep the snapshotsToKeep value to set. - * @return the HourlySchedule object itself. - */ - public HourlySchedule withSnapshotsToKeep(Integer snapshotsToKeep) { - this.snapshotsToKeep = snapshotsToKeep; - return this; - } - - /** - * Get the minute property: Indicates which minute snapshot should be taken. - * - * @return the minute value. - */ - public Integer minute() { - return this.minute; - } - - /** - * Set the minute property: Indicates which minute snapshot should be taken. - * - * @param minute the minute value to set. - * @return the HourlySchedule object itself. - */ - public HourlySchedule withMinute(Integer minute) { - this.minute = minute; - return this; - } - - /** - * Get the usedBytes property: Resource size in bytes, current storage usage for the volume in bytes. - * - * @return the usedBytes value. - */ - public Long usedBytes() { - return this.usedBytes; - } - - /** - * Set the usedBytes property: Resource size in bytes, current storage usage for the volume in bytes. - * - * @param usedBytes the usedBytes value to set. - * @return the HourlySchedule object itself. - */ - public HourlySchedule withUsedBytes(Long usedBytes) { - this.usedBytes = usedBytes; - 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/InAvailabilityReasonType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/InAvailabilityReasonType.java deleted file mode 100644 index 2dbf273087ce3..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/InAvailabilityReasonType.java +++ /dev/null @@ -1,34 +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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for InAvailabilityReasonType. */ -public final class InAvailabilityReasonType extends ExpandableStringEnum { - /** Static value Invalid for InAvailabilityReasonType. */ - public static final InAvailabilityReasonType INVALID = fromString("Invalid"); - - /** Static value AlreadyExists for InAvailabilityReasonType. */ - public static final InAvailabilityReasonType ALREADY_EXISTS = fromString("AlreadyExists"); - - /** - * Creates or finds a InAvailabilityReasonType from its string representation. - * - * @param name a name to look for. - * @return the corresponding InAvailabilityReasonType. - */ - @JsonCreator - public static InAvailabilityReasonType fromString(String name) { - return fromString(name, InAvailabilityReasonType.class); - } - - /** @return known InAvailabilityReasonType values. */ - public static Collection values() { - return values(InAvailabilityReasonType.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LogSpecification.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LogSpecification.java deleted file mode 100644 index 68ef6cc2b7d35..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LogSpecification.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Log Definition of a single resource metric. */ -@Fluent -public final class LogSpecification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LogSpecification.class); - - /* - * Name of log specification. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Display name of log specification. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /** - * Get the name property: Name of log specification. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of log specification. - * - * @param name the name value to set. - * @return the LogSpecification object itself. - */ - public LogSpecification withName(String name) { - this.name = name; - return this; - } - - /** - * Get the displayName property: Display name of log specification. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Display name of log specification. - * - * @param displayName the displayName value to set. - * @return the LogSpecification object itself. - */ - public LogSpecification withDisplayName(String displayName) { - this.displayName = displayName; - 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/MetricAggregationType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricAggregationType.java deleted file mode 100644 index 32ab9525ec6f4..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricAggregationType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for MetricAggregationType. */ -public final class MetricAggregationType extends ExpandableStringEnum { - /** Static value Average for MetricAggregationType. */ - public static final MetricAggregationType AVERAGE = fromString("Average"); - - /** - * Creates or finds a MetricAggregationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding MetricAggregationType. - */ - @JsonCreator - public static MetricAggregationType fromString(String name) { - return fromString(name, MetricAggregationType.class); - } - - /** @return known MetricAggregationType values. */ - public static Collection values() { - return values(MetricAggregationType.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricSpecification.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricSpecification.java deleted file mode 100644 index b5c8f85507749..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricSpecification.java +++ /dev/null @@ -1,444 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Metric specification of operation. */ -@Fluent -public final class MetricSpecification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetricSpecification.class); - - /* - * Name of metric specification. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Display name of metric specification. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * Display description of metric specification. - */ - @JsonProperty(value = "displayDescription") - private String displayDescription; - - /* - * Unit could be Bytes or Count. - */ - @JsonProperty(value = "unit") - private String unit; - - /* - * Support metric aggregation type. - */ - @JsonProperty(value = "supportedAggregationTypes") - private List supportedAggregationTypes; - - /* - * The supported time grain types for the metrics. - */ - @JsonProperty(value = "supportedTimeGrainTypes") - private List supportedTimeGrainTypes; - - /* - * The internal metric name. - */ - @JsonProperty(value = "internalMetricName") - private String internalMetricName; - - /* - * Whether or not the service is using regional MDM accounts. - */ - @JsonProperty(value = "enableRegionalMdmAccount") - private Boolean enableRegionalMdmAccount; - - /* - * The source MDM account. - */ - @JsonProperty(value = "sourceMdmAccount") - private String sourceMdmAccount; - - /* - * The source MDM namespace. - */ - @JsonProperty(value = "sourceMdmNamespace") - private String sourceMdmNamespace; - - /* - * Dimensions of blobs, including blob type and access tier. - */ - @JsonProperty(value = "dimensions") - private List dimensions; - - /* - * Aggregation type could be Average. - */ - @JsonProperty(value = "aggregationType") - private String aggregationType; - - /* - * The property to decide fill gap with zero or not. - */ - @JsonProperty(value = "fillGapWithZero") - private Boolean fillGapWithZero; - - /* - * The category this metric specification belong to, could be Capacity. - */ - @JsonProperty(value = "category") - private String category; - - /* - * Account Resource Id. - */ - @JsonProperty(value = "resourceIdDimensionNameOverride") - private String resourceIdDimensionNameOverride; - - /* - * Whether the metric is internal. - */ - @JsonProperty(value = "isInternal") - private Boolean isInternal; - - /** - * Get the name property: Name of metric specification. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of metric specification. - * - * @param name the name value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withName(String name) { - this.name = name; - return this; - } - - /** - * Get the displayName property: Display name of metric specification. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Display name of metric specification. - * - * @param displayName the displayName value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the displayDescription property: Display description of metric specification. - * - * @return the displayDescription value. - */ - public String displayDescription() { - return this.displayDescription; - } - - /** - * Set the displayDescription property: Display description of metric specification. - * - * @param displayDescription the displayDescription value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withDisplayDescription(String displayDescription) { - this.displayDescription = displayDescription; - return this; - } - - /** - * Get the unit property: Unit could be Bytes or Count. - * - * @return the unit value. - */ - public String unit() { - return this.unit; - } - - /** - * Set the unit property: Unit could be Bytes or Count. - * - * @param unit the unit value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withUnit(String unit) { - this.unit = unit; - return this; - } - - /** - * Get the supportedAggregationTypes property: Support metric aggregation type. - * - * @return the supportedAggregationTypes value. - */ - public List supportedAggregationTypes() { - return this.supportedAggregationTypes; - } - - /** - * Set the supportedAggregationTypes property: Support metric aggregation type. - * - * @param supportedAggregationTypes the supportedAggregationTypes value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withSupportedAggregationTypes(List supportedAggregationTypes) { - this.supportedAggregationTypes = supportedAggregationTypes; - return this; - } - - /** - * Get the supportedTimeGrainTypes property: The supported time grain types for the metrics. - * - * @return the supportedTimeGrainTypes value. - */ - public List supportedTimeGrainTypes() { - return this.supportedTimeGrainTypes; - } - - /** - * Set the supportedTimeGrainTypes property: The supported time grain types for the metrics. - * - * @param supportedTimeGrainTypes the supportedTimeGrainTypes value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withSupportedTimeGrainTypes(List supportedTimeGrainTypes) { - this.supportedTimeGrainTypes = supportedTimeGrainTypes; - return this; - } - - /** - * Get the internalMetricName property: The internal metric name. - * - * @return the internalMetricName value. - */ - public String internalMetricName() { - return this.internalMetricName; - } - - /** - * Set the internalMetricName property: The internal metric name. - * - * @param internalMetricName the internalMetricName value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withInternalMetricName(String internalMetricName) { - this.internalMetricName = internalMetricName; - return this; - } - - /** - * Get the enableRegionalMdmAccount property: Whether or not the service is using regional MDM accounts. - * - * @return the enableRegionalMdmAccount value. - */ - public Boolean enableRegionalMdmAccount() { - return this.enableRegionalMdmAccount; - } - - /** - * Set the enableRegionalMdmAccount property: Whether or not the service is using regional MDM accounts. - * - * @param enableRegionalMdmAccount the enableRegionalMdmAccount value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withEnableRegionalMdmAccount(Boolean enableRegionalMdmAccount) { - this.enableRegionalMdmAccount = enableRegionalMdmAccount; - return this; - } - - /** - * Get the sourceMdmAccount property: The source MDM account. - * - * @return the sourceMdmAccount value. - */ - public String sourceMdmAccount() { - return this.sourceMdmAccount; - } - - /** - * Set the sourceMdmAccount property: The source MDM account. - * - * @param sourceMdmAccount the sourceMdmAccount value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withSourceMdmAccount(String sourceMdmAccount) { - this.sourceMdmAccount = sourceMdmAccount; - return this; - } - - /** - * Get the sourceMdmNamespace property: The source MDM namespace. - * - * @return the sourceMdmNamespace value. - */ - public String sourceMdmNamespace() { - return this.sourceMdmNamespace; - } - - /** - * Set the sourceMdmNamespace property: The source MDM namespace. - * - * @param sourceMdmNamespace the sourceMdmNamespace value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withSourceMdmNamespace(String sourceMdmNamespace) { - this.sourceMdmNamespace = sourceMdmNamespace; - return this; - } - - /** - * Get the dimensions property: Dimensions of blobs, including blob type and access tier. - * - * @return the dimensions value. - */ - public List dimensions() { - return this.dimensions; - } - - /** - * Set the dimensions property: Dimensions of blobs, including blob type and access tier. - * - * @param dimensions the dimensions value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withDimensions(List dimensions) { - this.dimensions = dimensions; - return this; - } - - /** - * Get the aggregationType property: Aggregation type could be Average. - * - * @return the aggregationType value. - */ - public String aggregationType() { - return this.aggregationType; - } - - /** - * Set the aggregationType property: Aggregation type could be Average. - * - * @param aggregationType the aggregationType value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withAggregationType(String aggregationType) { - this.aggregationType = aggregationType; - return this; - } - - /** - * Get the fillGapWithZero property: The property to decide fill gap with zero or not. - * - * @return the fillGapWithZero value. - */ - public Boolean fillGapWithZero() { - return this.fillGapWithZero; - } - - /** - * Set the fillGapWithZero property: The property to decide fill gap with zero or not. - * - * @param fillGapWithZero the fillGapWithZero value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withFillGapWithZero(Boolean fillGapWithZero) { - this.fillGapWithZero = fillGapWithZero; - return this; - } - - /** - * Get the category property: The category this metric specification belong to, could be Capacity. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Set the category property: The category this metric specification belong to, could be Capacity. - * - * @param category the category value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withCategory(String category) { - this.category = category; - return this; - } - - /** - * Get the resourceIdDimensionNameOverride property: Account Resource Id. - * - * @return the resourceIdDimensionNameOverride value. - */ - public String resourceIdDimensionNameOverride() { - return this.resourceIdDimensionNameOverride; - } - - /** - * Set the resourceIdDimensionNameOverride property: Account Resource Id. - * - * @param resourceIdDimensionNameOverride the resourceIdDimensionNameOverride value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withResourceIdDimensionNameOverride(String resourceIdDimensionNameOverride) { - this.resourceIdDimensionNameOverride = resourceIdDimensionNameOverride; - return this; - } - - /** - * Get the isInternal property: Whether the metric is internal. - * - * @return the isInternal value. - */ - public Boolean isInternal() { - return this.isInternal; - } - - /** - * Set the isInternal property: Whether the metric is internal. - * - * @param isInternal the isInternal value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withIsInternal(Boolean isInternal) { - this.isInternal = isInternal; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dimensions() != null) { - dimensions().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MirrorState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MirrorState.java deleted file mode 100644 index 3023db197620a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MirrorState.java +++ /dev/null @@ -1,37 +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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for MirrorState. */ -public final class MirrorState extends ExpandableStringEnum { - /** Static value Uninitialized for MirrorState. */ - public static final MirrorState UNINITIALIZED = fromString("Uninitialized"); - - /** Static value Mirrored for MirrorState. */ - public static final MirrorState MIRRORED = fromString("Mirrored"); - - /** Static value Broken for MirrorState. */ - public static final MirrorState BROKEN = fromString("Broken"); - - /** - * Creates or finds a MirrorState from its string representation. - * - * @param name a name to look for. - * @return the corresponding MirrorState. - */ - @JsonCreator - public static MirrorState fromString(String name) { - return fromString(name, MirrorState.class); - } - - /** @return known MirrorState values. */ - public static Collection values() { - return values(MirrorState.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MonthlySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MonthlySchedule.java deleted file mode 100644 index e52042b5622d4..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MonthlySchedule.java +++ /dev/null @@ -1,157 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Monthly Schedule properties. */ -@Fluent -public final class MonthlySchedule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MonthlySchedule.class); - - /* - * Monthly snapshot count to keep - */ - @JsonProperty(value = "snapshotsToKeep") - private Integer snapshotsToKeep; - - /* - * Indicates which days of the month snapshot should be taken. A comma - * delimited string. - */ - @JsonProperty(value = "daysOfMonth") - private String daysOfMonth; - - /* - * Indicates which hour in UTC timezone a snapshot should be taken - */ - @JsonProperty(value = "hour") - private Integer hour; - - /* - * Indicates which minute snapshot should be taken - */ - @JsonProperty(value = "minute") - private Integer minute; - - /* - * Resource size in bytes, current storage usage for the volume in bytes - */ - @JsonProperty(value = "usedBytes") - private Long usedBytes; - - /** - * Get the snapshotsToKeep property: Monthly snapshot count to keep. - * - * @return the snapshotsToKeep value. - */ - public Integer snapshotsToKeep() { - return this.snapshotsToKeep; - } - - /** - * Set the snapshotsToKeep property: Monthly snapshot count to keep. - * - * @param snapshotsToKeep the snapshotsToKeep value to set. - * @return the MonthlySchedule object itself. - */ - public MonthlySchedule withSnapshotsToKeep(Integer snapshotsToKeep) { - this.snapshotsToKeep = snapshotsToKeep; - return this; - } - - /** - * Get the daysOfMonth property: Indicates which days of the month snapshot should be taken. A comma delimited - * string. - * - * @return the daysOfMonth value. - */ - public String daysOfMonth() { - return this.daysOfMonth; - } - - /** - * Set the daysOfMonth property: Indicates which days of the month snapshot should be taken. A comma delimited - * string. - * - * @param daysOfMonth the daysOfMonth value to set. - * @return the MonthlySchedule object itself. - */ - public MonthlySchedule withDaysOfMonth(String daysOfMonth) { - this.daysOfMonth = daysOfMonth; - return this; - } - - /** - * Get the hour property: Indicates which hour in UTC timezone a snapshot should be taken. - * - * @return the hour value. - */ - public Integer hour() { - return this.hour; - } - - /** - * Set the hour property: Indicates which hour in UTC timezone a snapshot should be taken. - * - * @param hour the hour value to set. - * @return the MonthlySchedule object itself. - */ - public MonthlySchedule withHour(Integer hour) { - this.hour = hour; - return this; - } - - /** - * Get the minute property: Indicates which minute snapshot should be taken. - * - * @return the minute value. - */ - public Integer minute() { - return this.minute; - } - - /** - * Set the minute property: Indicates which minute snapshot should be taken. - * - * @param minute the minute value to set. - * @return the MonthlySchedule object itself. - */ - public MonthlySchedule withMinute(Integer minute) { - this.minute = minute; - return this; - } - - /** - * Get the usedBytes property: Resource size in bytes, current storage usage for the volume in bytes. - * - * @return the usedBytes value. - */ - public Long usedBytes() { - return this.usedBytes; - } - - /** - * Set the usedBytes property: Resource size in bytes, current storage usage for the volume in bytes. - * - * @param usedBytes the usedBytes value to set. - * @return the MonthlySchedule object itself. - */ - public MonthlySchedule withUsedBytes(Long usedBytes) { - this.usedBytes = usedBytes; - 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/NetAppAccount.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java deleted file mode 100644 index 4d978529d532f..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java +++ /dev/null @@ -1,270 +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.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner; -import java.util.List; -import java.util.Map; - -/** An immutable client-side representation of NetAppAccount. */ -public interface NetAppAccount { - /** - * 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 etag property: A unique read-only string that changes whenever the resource is updated. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: The system meta data relating to this resource. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - String provisioningState(); - - /** - * Gets the activeDirectories property: Active Directories. - * - * @return the activeDirectories value. - */ - List activeDirectories(); - - /** - * Gets the encryption property: Encryption settings. - * - * @return the encryption value. - */ - AccountEncryption encryption(); - - /** - * 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 inner com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner object. - * - * @return the inner object. - */ - NetAppAccountInner innerModel(); - - /** The entirety of the NetAppAccount definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { - } - /** The NetAppAccount definition stages. */ - interface DefinitionStages { - /** The first stage of the NetAppAccount definition. */ - interface Blank extends WithLocation { - } - /** The stage of the NetAppAccount 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. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - /** The stage of the NetAppAccount definition allowing to specify parent resource. */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - /** - * 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.WithActiveDirectories, DefinitionStages.WithEncryption { - /** - * Executes the create request. - * - * @return the created resource. - */ - NetAppAccount create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - NetAppAccount create(Context context); - } - /** The stage of the NetAppAccount definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the NetAppAccount definition allowing to specify activeDirectories. */ - interface WithActiveDirectories { - /** - * Specifies the activeDirectories property: Active Directories. - * - * @param activeDirectories Active Directories. - * @return the next definition stage. - */ - WithCreate withActiveDirectories(List activeDirectories); - } - /** The stage of the NetAppAccount definition allowing to specify encryption. */ - interface WithEncryption { - /** - * Specifies the encryption property: Encryption settings. - * - * @param encryption Encryption settings. - * @return the next definition stage. - */ - WithCreate withEncryption(AccountEncryption encryption); - } - } - /** - * Begins update for the NetAppAccount resource. - * - * @return the stage of resource update. - */ - NetAppAccount.Update update(); - - /** The template for NetAppAccount update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithActiveDirectories, UpdateStages.WithEncryption { - /** - * Executes the update request. - * - * @return the updated resource. - */ - NetAppAccount apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - NetAppAccount apply(Context context); - } - /** The NetAppAccount update stages. */ - interface UpdateStages { - /** The stage of the NetAppAccount 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); - } - /** The stage of the NetAppAccount update allowing to specify activeDirectories. */ - interface WithActiveDirectories { - /** - * Specifies the activeDirectories property: Active Directories. - * - * @param activeDirectories Active Directories. - * @return the next definition stage. - */ - Update withActiveDirectories(List activeDirectories); - } - /** The stage of the NetAppAccount update allowing to specify encryption. */ - interface WithEncryption { - /** - * Specifies the encryption property: Encryption settings. - * - * @param encryption Encryption settings. - * @return the next definition stage. - */ - Update withEncryption(AccountEncryption encryption); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - NetAppAccount refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - NetAppAccount refresh(Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountList.java deleted file mode 100644 index 18d16c5d6a9de..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountList.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of NetApp account resources. */ -@Fluent -public final class NetAppAccountList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetAppAccountList.class); - - /* - * Multiple NetApp accounts - */ - @JsonProperty(value = "value") - private List value; - - /* - * URL to get the next set of results. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: Multiple NetApp accounts. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Multiple NetApp accounts. - * - * @param value the value value to set. - * @return the NetAppAccountList object itself. - */ - public NetAppAccountList 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 NetAppAccountList object itself. - */ - public NetAppAccountList 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/NetAppAccountPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java deleted file mode 100644 index ca02631d05a9c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java +++ /dev/null @@ -1,115 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.models.AccountProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** NetApp account patch resource. */ -@Fluent -public final class NetAppAccountPatch extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetAppAccountPatch.class); - - /* - * NetApp Account properties - */ - @JsonProperty(value = "properties") - private AccountProperties innerProperties; - - /** - * Get the innerProperties property: NetApp Account properties. - * - * @return the innerProperties value. - */ - private AccountProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public NetAppAccountPatch withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public NetAppAccountPatch 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(); - } - - /** - * Get the activeDirectories property: Active Directories. - * - * @return the activeDirectories value. - */ - public List activeDirectories() { - return this.innerProperties() == null ? null : this.innerProperties().activeDirectories(); - } - - /** - * Set the activeDirectories property: Active Directories. - * - * @param activeDirectories the activeDirectories value to set. - * @return the NetAppAccountPatch object itself. - */ - public NetAppAccountPatch withActiveDirectories(List activeDirectories) { - if (this.innerProperties() == null) { - this.innerProperties = new AccountProperties(); - } - this.innerProperties().withActiveDirectories(activeDirectories); - return this; - } - - /** - * Get the encryption property: Encryption settings. - * - * @return the encryption value. - */ - public AccountEncryption encryption() { - return this.innerProperties() == null ? null : this.innerProperties().encryption(); - } - - /** - * Set the encryption property: Encryption settings. - * - * @param encryption the encryption value to set. - * @return the NetAppAccountPatch object itself. - */ - public NetAppAccountPatch withEncryption(AccountEncryption encryption) { - if (this.innerProperties() == null) { - this.innerProperties = new AccountProperties(); - } - this.innerProperties().withEncryption(encryption); - 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/NetAppResourceQuotaLimits.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceQuotaLimits.java deleted file mode 100644 index 37fc6b6f1492d..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceQuotaLimits.java +++ /dev/null @@ -1,60 +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.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 NetAppResourceQuotaLimits. */ -public interface NetAppResourceQuotaLimits { - /** - * Get the default and current limits for quotas. - * - * @param location The location. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 default and current limits for quotas. - */ - PagedIterable list(String location); - - /** - * Get the default and current limits for quotas. - * - * @param location The location. - * @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 default and current limits for quotas. - */ - PagedIterable list(String location, Context context); - - /** - * Get the default and current subscription quota limit. - * - * @param location The location. - * @param quotaLimitName The name of the Quota Limit. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 default and current subscription quota limit. - */ - SubscriptionQuotaItem get(String location, String quotaLimitName); - - /** - * Get the default and current subscription quota limit. - * - * @param location The location. - * @param quotaLimitName The name of the Quota Limit. - * @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 default and current subscription quota limit. - */ - Response getWithResponse(String location, String quotaLimitName, Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppResources.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppResources.java deleted file mode 100644 index 226feea9294ea..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppResources.java +++ /dev/null @@ -1,89 +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.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of NetAppResources. */ -public interface NetAppResources { - /** - * Check if a resource name is available. - * - * @param location The location. - * @param body Name availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - CheckAvailabilityResponse checkNameAvailability(String location, ResourceNameAvailabilityRequest body); - - /** - * Check if a resource name is available. - * - * @param location The location. - * @param body Name availability request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - Response checkNameAvailabilityWithResponse( - String location, ResourceNameAvailabilityRequest body, Context context); - - /** - * Check if a file path is available. - * - * @param location The location. - * @param body File path availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - CheckAvailabilityResponse checkFilePathAvailability(String location, FilePathAvailabilityRequest body); - - /** - * Check if a file path is available. - * - * @param location The location. - * @param body File path availability request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - Response checkFilePathAvailabilityWithResponse( - String location, FilePathAvailabilityRequest body, Context context); - - /** - * Check if a quota is available. - * - * @param location The location. - * @param body Quota availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - CheckAvailabilityResponse checkQuotaAvailability(String location, QuotaAvailabilityRequest body); - - /** - * Check if a quota is available. - * - * @param location The location. - * @param body Quota availability request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information regarding availability of a resource. - */ - Response checkQuotaAvailabilityWithResponse( - String location, QuotaAvailabilityRequest body, Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetworkFeatures.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetworkFeatures.java deleted file mode 100644 index 51ee84538d373..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetworkFeatures.java +++ /dev/null @@ -1,34 +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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for NetworkFeatures. */ -public final class NetworkFeatures extends ExpandableStringEnum { - /** Static value Basic for NetworkFeatures. */ - public static final NetworkFeatures BASIC = fromString("Basic"); - - /** Static value Standard for NetworkFeatures. */ - public static final NetworkFeatures STANDARD = fromString("Standard"); - - /** - * Creates or finds a NetworkFeatures from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkFeatures. - */ - @JsonCreator - public static NetworkFeatures fromString(String name) { - return fromString(name, NetworkFeatures.class); - } - - /** @return known NetworkFeatures values. */ - public static Collection values() { - return values(NetworkFeatures.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Operation.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Operation.java deleted file mode 100644 index da8407caf63fa..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Operation.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.models; - -import com.azure.resourcemanager.netapp.fluent.models.OperationInner; - -/** An immutable client-side representation of Operation. */ -public interface Operation { - /** - * Gets the name property: Operation name: {provider}/{resource}/{operation}. - * - * @return the name value. - */ - String name(); - - /** - * Gets the display property: Display metadata associated with the operation. - * - * @return the display value. - */ - OperationDisplay display(); - - /** - * Gets the origin property: The origin of operations. - * - * @return the origin value. - */ - String origin(); - - /** - * Gets the serviceSpecification property: One property of operation, include metric specifications. - * - * @return the serviceSpecification value. - */ - ServiceSpecification serviceSpecification(); - - /** - * Gets the inner com.azure.resourcemanager.netapp.fluent.models.OperationInner object. - * - * @return the inner object. - */ - OperationInner innerModel(); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationDisplay.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationDisplay.java deleted file mode 100644 index c6a4eb56751cc..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationDisplay.java +++ /dev/null @@ -1,128 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Display metadata associated with the operation. */ -@Fluent -public final class OperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - - /* - * Service provider: Microsoft NetApp. - */ - @JsonProperty(value = "provider") - private String provider; - - /* - * Resource on which the operation is performed etc. - */ - @JsonProperty(value = "resource") - private String resource; - - /* - * Type of operation: get, read, delete, etc. - */ - @JsonProperty(value = "operation") - private String operation; - - /* - * Operation description. - */ - @JsonProperty(value = "description") - private String description; - - /** - * Get the provider property: Service provider: Microsoft NetApp. - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider property: Service provider: Microsoft NetApp. - * - * @param provider the provider value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the resource property: Resource on which the operation is performed etc. - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource property: Resource on which the operation is performed etc. - * - * @param resource the resource value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withResource(String resource) { - this.resource = resource; - return this; - } - - /** - * Get the operation property: Type of operation: get, read, delete, etc. - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Set the operation property: Type of operation: get, read, delete, etc. - * - * @param operation the operation value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withOperation(String operation) { - this.operation = operation; - return this; - } - - /** - * Get the description property: Operation description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Operation description. - * - * @param description the description value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withDescription(String description) { - this.description = description; - 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/OperationListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationListResult.java deleted file mode 100644 index 33ed0ad62cec6..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationListResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** - * Result of the request to list Cloud Volume operations. It contains a list of operations and a URL link to get the - * next set of results. - */ -@Fluent -public final class OperationListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResult.class); - - /* - * List of Storage operations supported by the Storage resource provider. - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value property: List of Storage operations supported by the Storage resource provider. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of Storage operations supported by the Storage resource provider. - * - * @param value the value value to set. - * @return the OperationListResult object itself. - */ - public OperationListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Operations.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Operations.java deleted file mode 100644 index 04a2f56920a53..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Operations.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.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of Operations. */ -public interface Operations { - /** - * Lists all of the available Microsoft.NetApp Rest API operations. - * - * @throws com.azure.core.management.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 result of the request to list Cloud Volume operations. - */ - PagedIterable list(); - - /** - * Lists all of the available Microsoft.NetApp Rest API operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Cloud Volume operations. - */ - PagedIterable list(Context context); -} 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 deleted file mode 100644 index 49267ff7b8f2c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PlacementKeyValuePairs.java +++ /dev/null @@ -1,90 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Application specific parameters for the placement of volumes in the volume group. */ -@Fluent -public final class PlacementKeyValuePairs { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PlacementKeyValuePairs.class); - - /* - * Key for an application specific parameter for the placement of volumes - * in the volume group - */ - @JsonProperty(value = "key", required = true) - private String key; - - /* - * Value for an application specific parameter for the placement of volumes - * in the volume group - */ - @JsonProperty(value = "value", required = true) - private String value; - - /** - * Get the key property: Key for an application specific parameter for the placement of volumes in the volume group. - * - * @return the key value. - */ - public String key() { - return this.key; - } - - /** - * 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. - */ - public PlacementKeyValuePairs withKey(String key) { - this.key = key; - return this; - } - - /** - * Get the value property: Value for an application specific parameter for the placement of volumes in the volume - * group. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Value for an application specific parameter for the placement of volumes in the volume - * group. - * - * @param value the value value to set. - * @return the PlacementKeyValuePairs object itself. - */ - public PlacementKeyValuePairs withValue(String value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (key() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property key in model PlacementKeyValuePairs")); - } - if (value() == null) { - throw logger - .logExceptionAsError( - 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 deleted file mode 100644 index 7f4ff5aab0a0e..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PoolChangeRequest.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Pool change request. */ -@Fluent -public final class PoolChangeRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PoolChangeRequest.class); - - /* - * Resource id of the pool to move volume to - */ - @JsonProperty(value = "newPoolResourceId", required = true) - private String newPoolResourceId; - - /** - * Get the newPoolResourceId property: Resource id of the pool to move volume to. - * - * @return the newPoolResourceId value. - */ - public String newPoolResourceId() { - return this.newPoolResourceId; - } - - /** - * Set the newPoolResourceId property: Resource id of the pool to move volume to. - * - * @param newPoolResourceId the newPoolResourceId value to set. - * @return the PoolChangeRequest object itself. - */ - public PoolChangeRequest withNewPoolResourceId(String newPoolResourceId) { - this.newPoolResourceId = newPoolResourceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (newPoolResourceId() == null) { - throw logger - .logExceptionAsError( - 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/Pools.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Pools.java deleted file mode 100644 index 98f3d01466475..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Pools.java +++ /dev/null @@ -1,142 +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.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 Pools. */ -public interface Pools { - /** - * List all capacity pools in the NetApp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 capacity pool resources. - */ - PagedIterable list(String resourceGroupName, String accountName); - - /** - * List all capacity pools in the NetApp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 capacity pool resources. - */ - PagedIterable list(String resourceGroupName, String accountName, Context context); - - /** - * Get details of the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified capacity pool. - */ - CapacityPool get(String resourceGroupName, String accountName, String poolName); - - /** - * Get details of the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified capacity pool. - */ - Response getWithResponse( - String resourceGroupName, String accountName, String poolName, Context context); - - /** - * Delete the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String accountName, String poolName); - - /** - * Delete the specified capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String accountName, String poolName, Context context); - - /** - * Get details of the specified capacity pool. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified capacity pool. - */ - CapacityPool getById(String id); - - /** - * Get details of the specified capacity pool. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified capacity pool. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete the specified capacity pool. - * - * @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 the specified capacity pool. - * - * @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 CapacityPool resource. - * - * @param name resource name. - * @return the first stage of the new CapacityPool definition. - */ - CapacityPool.DefinitionStages.Blank define(String name); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QosType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QosType.java deleted file mode 100644 index 8fb9d8d0ccaf0..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QosType.java +++ /dev/null @@ -1,34 +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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for QosType. */ -public final class QosType extends ExpandableStringEnum { - /** Static value Auto for QosType. */ - public static final QosType AUTO = fromString("Auto"); - - /** Static value Manual for QosType. */ - public static final QosType MANUAL = fromString("Manual"); - - /** - * Creates or finds a QosType from its string representation. - * - * @param name a name to look for. - * @return the corresponding QosType. - */ - @JsonCreator - public static QosType fromString(String name) { - return fromString(name, QosType.class); - } - - /** @return known QosType values. */ - public static Collection values() { - return values(QosType.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QuotaAvailabilityRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QuotaAvailabilityRequest.java deleted file mode 100644 index 331c0db047348..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QuotaAvailabilityRequest.java +++ /dev/null @@ -1,118 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Quota availability request content. */ -@Fluent -public final class QuotaAvailabilityRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(QuotaAvailabilityRequest.class); - - /* - * Name of the resource to verify. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /* - * Resource type used for verification. - */ - @JsonProperty(value = "type", required = true) - private CheckQuotaNameResourceTypes type; - - /* - * Resource group name. - */ - @JsonProperty(value = "resourceGroup", required = true) - private String resourceGroup; - - /** - * Get the name property: Name of the resource to verify. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the resource to verify. - * - * @param name the name value to set. - * @return the QuotaAvailabilityRequest object itself. - */ - public QuotaAvailabilityRequest withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: Resource type used for verification. - * - * @return the type value. - */ - public CheckQuotaNameResourceTypes type() { - return this.type; - } - - /** - * Set the type property: Resource type used for verification. - * - * @param type the type value to set. - * @return the QuotaAvailabilityRequest object itself. - */ - public QuotaAvailabilityRequest withType(CheckQuotaNameResourceTypes type) { - this.type = type; - return this; - } - - /** - * Get the resourceGroup property: Resource group name. - * - * @return the resourceGroup value. - */ - public String resourceGroup() { - return this.resourceGroup; - } - - /** - * Set the resourceGroup property: Resource group name. - * - * @param resourceGroup the resourceGroup value to set. - * @return the QuotaAvailabilityRequest object itself. - */ - public QuotaAvailabilityRequest withResourceGroup(String resourceGroup) { - this.resourceGroup = resourceGroup; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model QuotaAvailabilityRequest")); - } - if (type() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property type in model QuotaAvailabilityRequest")); - } - if (resourceGroup() == null) { - throw logger - .logExceptionAsError( - 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/RelationshipStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RelationshipStatus.java deleted file mode 100644 index ca782d0c427bb..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RelationshipStatus.java +++ /dev/null @@ -1,34 +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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for RelationshipStatus. */ -public final class RelationshipStatus extends ExpandableStringEnum { - /** Static value Idle for RelationshipStatus. */ - public static final RelationshipStatus IDLE = fromString("Idle"); - - /** Static value Transferring for RelationshipStatus. */ - public static final RelationshipStatus TRANSFERRING = fromString("Transferring"); - - /** - * Creates or finds a RelationshipStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding RelationshipStatus. - */ - @JsonCreator - public static RelationshipStatus fromString(String name) { - return fromString(name, RelationshipStatus.class); - } - - /** @return known RelationshipStatus values. */ - public static Collection values() { - return values(RelationshipStatus.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java deleted file mode 100644 index ae79fab80acf5..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java +++ /dev/null @@ -1,163 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Replication properties. */ -@Fluent -public final class ReplicationObject { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReplicationObject.class); - - /* - * Id - */ - @JsonProperty(value = "replicationId") - private String replicationId; - - /* - * Indicates whether the local volume is the source or destination for the - * Volume Replication - */ - @JsonProperty(value = "endpointType") - private EndpointType endpointType; - - /* - * Schedule - */ - @JsonProperty(value = "replicationSchedule") - private ReplicationSchedule replicationSchedule; - - /* - * The resource ID of the remote volume. - */ - @JsonProperty(value = "remoteVolumeResourceId", required = true) - private String remoteVolumeResourceId; - - /* - * The remote region for the other end of the Volume Replication. - */ - @JsonProperty(value = "remoteVolumeRegion") - private String remoteVolumeRegion; - - /** - * Get the replicationId property: Id. - * - * @return the replicationId value. - */ - public String replicationId() { - return this.replicationId; - } - - /** - * Set the replicationId property: Id. - * - * @param replicationId the replicationId value to set. - * @return the ReplicationObject object itself. - */ - public ReplicationObject withReplicationId(String replicationId) { - this.replicationId = replicationId; - return this; - } - - /** - * Get the endpointType property: Indicates whether the local volume is the source or destination for the Volume - * Replication. - * - * @return the endpointType value. - */ - public EndpointType endpointType() { - return this.endpointType; - } - - /** - * Set the endpointType property: Indicates whether the local volume is the source or destination for the Volume - * Replication. - * - * @param endpointType the endpointType value to set. - * @return the ReplicationObject object itself. - */ - public ReplicationObject withEndpointType(EndpointType endpointType) { - this.endpointType = endpointType; - return this; - } - - /** - * Get the replicationSchedule property: Schedule. - * - * @return the replicationSchedule value. - */ - public ReplicationSchedule replicationSchedule() { - return this.replicationSchedule; - } - - /** - * Set the replicationSchedule property: Schedule. - * - * @param replicationSchedule the replicationSchedule value to set. - * @return the ReplicationObject object itself. - */ - public ReplicationObject withReplicationSchedule(ReplicationSchedule replicationSchedule) { - this.replicationSchedule = replicationSchedule; - return this; - } - - /** - * Get the remoteVolumeResourceId property: The resource ID of the remote volume. - * - * @return the remoteVolumeResourceId value. - */ - public String remoteVolumeResourceId() { - return this.remoteVolumeResourceId; - } - - /** - * Set the remoteVolumeResourceId property: The resource ID of the remote volume. - * - * @param remoteVolumeResourceId the remoteVolumeResourceId value to set. - * @return the ReplicationObject object itself. - */ - public ReplicationObject withRemoteVolumeResourceId(String remoteVolumeResourceId) { - this.remoteVolumeResourceId = remoteVolumeResourceId; - return this; - } - - /** - * Get the remoteVolumeRegion property: The remote region for the other end of the Volume Replication. - * - * @return the remoteVolumeRegion value. - */ - public String remoteVolumeRegion() { - return this.remoteVolumeRegion; - } - - /** - * Set the remoteVolumeRegion property: The remote region for the other end of the Volume Replication. - * - * @param remoteVolumeRegion the remoteVolumeRegion value to set. - * @return the ReplicationObject object itself. - */ - public ReplicationObject withRemoteVolumeRegion(String remoteVolumeRegion) { - this.remoteVolumeRegion = remoteVolumeRegion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (remoteVolumeResourceId() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property remoteVolumeResourceId in model ReplicationObject")); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationSchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationSchedule.java deleted file mode 100644 index ae4b75185d4de..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationSchedule.java +++ /dev/null @@ -1,37 +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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ReplicationSchedule. */ -public final class ReplicationSchedule extends ExpandableStringEnum { - /** Static value _10minutely for ReplicationSchedule. */ - public static final ReplicationSchedule ONE_ZEROMINUTELY = fromString("_10minutely"); - - /** Static value hourly for ReplicationSchedule. */ - public static final ReplicationSchedule HOURLY = fromString("hourly"); - - /** Static value daily for ReplicationSchedule. */ - public static final ReplicationSchedule DAILY = fromString("daily"); - - /** - * Creates or finds a ReplicationSchedule from its string representation. - * - * @param name a name to look for. - * @return the corresponding ReplicationSchedule. - */ - @JsonCreator - public static ReplicationSchedule fromString(String name) { - return fromString(name, ReplicationSchedule.class); - } - - /** @return known ReplicationSchedule values. */ - public static Collection values() { - return values(ReplicationSchedule.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationStatus.java deleted file mode 100644 index 619473e0f56c3..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationStatus.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.models; - -import com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner; - -/** An immutable client-side representation of ReplicationStatus. */ -public interface ReplicationStatus { - /** - * Gets the healthy property: Replication health check. - * - * @return the healthy value. - */ - Boolean healthy(); - - /** - * Gets the relationshipStatus property: Status of the mirror relationship. - * - * @return the relationshipStatus value. - */ - RelationshipStatus relationshipStatus(); - - /** - * Gets the mirrorState property: The status of the replication. - * - * @return the mirrorState value. - */ - MirrorState mirrorState(); - - /** - * Gets the totalProgress property: The progress of the replication. - * - * @return the totalProgress value. - */ - String totalProgress(); - - /** - * Gets the errorMessage property: Displays error message if the replication is in an error state. - * - * @return the errorMessage value. - */ - String errorMessage(); - - /** - * Gets the inner com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner object. - * - * @return the inner object. - */ - ReplicationStatusInner innerModel(); -} 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 deleted file mode 100644 index 24ec34ac130f4..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ResourceNameAvailabilityRequest.java +++ /dev/null @@ -1,120 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Resource name availability request content. */ -@Fluent -public final class ResourceNameAvailabilityRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceNameAvailabilityRequest.class); - - /* - * Resource name to verify. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /* - * Resource type used for verification. - */ - @JsonProperty(value = "type", required = true) - private CheckNameResourceTypes type; - - /* - * Resource group name. - */ - @JsonProperty(value = "resourceGroup", required = true) - private String resourceGroup; - - /** - * Get the name property: Resource name to verify. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Resource name to verify. - * - * @param name the name value to set. - * @return the ResourceNameAvailabilityRequest object itself. - */ - public ResourceNameAvailabilityRequest withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: Resource type used for verification. - * - * @return the type value. - */ - public CheckNameResourceTypes type() { - return this.type; - } - - /** - * Set the type property: Resource type used for verification. - * - * @param type the type value to set. - * @return the ResourceNameAvailabilityRequest object itself. - */ - public ResourceNameAvailabilityRequest withType(CheckNameResourceTypes type) { - this.type = type; - return this; - } - - /** - * Get the resourceGroup property: Resource group name. - * - * @return the resourceGroup value. - */ - public String resourceGroup() { - return this.resourceGroup; - } - - /** - * Set the resourceGroup property: Resource group name. - * - * @param resourceGroup the resourceGroup value to set. - * @return the ResourceNameAvailabilityRequest object itself. - */ - public ResourceNameAvailabilityRequest withResourceGroup(String resourceGroup) { - this.resourceGroup = resourceGroup; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property name in model ResourceNameAvailabilityRequest")); - } - if (type() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property type in model ResourceNameAvailabilityRequest")); - } - if (resourceGroup() == null) { - throw logger - .logExceptionAsError( - 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/RestoreStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RestoreStatus.java deleted file mode 100644 index a916deac0e703..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RestoreStatus.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.models; - -import com.azure.resourcemanager.netapp.fluent.models.RestoreStatusInner; - -/** An immutable client-side representation of RestoreStatus. */ -public interface RestoreStatus { - /** - * Gets the healthy property: Restore health status. - * - * @return the healthy value. - */ - Boolean healthy(); - - /** - * Gets the relationshipStatus property: Status of the restore SnapMirror relationship. - * - * @return the relationshipStatus value. - */ - RelationshipStatus relationshipStatus(); - - /** - * Gets the mirrorState property: The status of the restore. - * - * @return the mirrorState value. - */ - MirrorState mirrorState(); - - /** - * Gets the unhealthyReason property: Reason for the unhealthy restore relationship. - * - * @return the unhealthyReason value. - */ - String unhealthyReason(); - - /** - * Gets the errorMessage property: Displays error message if the restore is in an error state. - * - * @return the errorMessage value. - */ - String errorMessage(); - - /** - * Gets the totalTransferBytes property: Displays the total bytes transferred. - * - * @return the totalTransferBytes value. - */ - Long totalTransferBytes(); - - /** - * Gets the inner com.azure.resourcemanager.netapp.fluent.models.RestoreStatusInner object. - * - * @return the inner object. - */ - RestoreStatusInner innerModel(); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecurityStyle.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecurityStyle.java deleted file mode 100644 index 3aa59c8153c50..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecurityStyle.java +++ /dev/null @@ -1,34 +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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SecurityStyle. */ -public final class SecurityStyle extends ExpandableStringEnum { - /** Static value ntfs for SecurityStyle. */ - public static final SecurityStyle NTFS = fromString("ntfs"); - - /** Static value unix for SecurityStyle. */ - public static final SecurityStyle UNIX = fromString("unix"); - - /** - * Creates or finds a SecurityStyle from its string representation. - * - * @param name a name to look for. - * @return the corresponding SecurityStyle. - */ - @JsonCreator - public static SecurityStyle fromString(String name) { - return fromString(name, SecurityStyle.class); - } - - /** @return known SecurityStyle values. */ - public static Collection values() { - return values(SecurityStyle.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceLevel.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceLevel.java deleted file mode 100644 index 5b85a1d0382aa..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceLevel.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ServiceLevel. */ -public final class ServiceLevel extends ExpandableStringEnum { - /** Static value Standard for ServiceLevel. */ - public static final ServiceLevel STANDARD = fromString("Standard"); - - /** Static value Premium for ServiceLevel. */ - public static final ServiceLevel PREMIUM = fromString("Premium"); - - /** Static value Ultra for ServiceLevel. */ - public static final ServiceLevel ULTRA = fromString("Ultra"); - - /** Static value StandardZRS for ServiceLevel. */ - public static final ServiceLevel STANDARD_ZRS = fromString("StandardZRS"); - - /** - * Creates or finds a ServiceLevel from its string representation. - * - * @param name a name to look for. - * @return the corresponding ServiceLevel. - */ - @JsonCreator - public static ServiceLevel fromString(String name) { - return fromString(name, ServiceLevel.class); - } - - /** @return known ServiceLevel values. */ - public static Collection values() { - return values(ServiceLevel.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceSpecification.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceSpecification.java deleted file mode 100644 index 2bebb9ff204cc..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceSpecification.java +++ /dev/null @@ -1,83 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** One property of operation, include metric specifications. */ -@Fluent -public final class ServiceSpecification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceSpecification.class); - - /* - * Metric specifications of operation. - */ - @JsonProperty(value = "metricSpecifications") - private List metricSpecifications; - - /* - * Log specification of operation. - */ - @JsonProperty(value = "logSpecifications") - private List logSpecifications; - - /** - * Get the metricSpecifications property: Metric specifications of operation. - * - * @return the metricSpecifications value. - */ - public List metricSpecifications() { - return this.metricSpecifications; - } - - /** - * Set the metricSpecifications property: Metric specifications of operation. - * - * @param metricSpecifications the metricSpecifications value to set. - * @return the ServiceSpecification object itself. - */ - public ServiceSpecification withMetricSpecifications(List metricSpecifications) { - this.metricSpecifications = metricSpecifications; - return this; - } - - /** - * Get the logSpecifications property: Log specification of operation. - * - * @return the logSpecifications value. - */ - public List logSpecifications() { - return this.logSpecifications; - } - - /** - * Set the logSpecifications property: Log specification of operation. - * - * @param logSpecifications the logSpecifications value to set. - * @return the ServiceSpecification object itself. - */ - public ServiceSpecification withLogSpecifications(List logSpecifications) { - this.logSpecifications = logSpecifications; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (metricSpecifications() != null) { - metricSpecifications().forEach(e -> e.validate()); - } - if (logSpecifications() != null) { - logSpecifications().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Snapshot.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Snapshot.java deleted file mode 100644 index 74f75dc61d4c2..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Snapshot.java +++ /dev/null @@ -1,163 +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.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotInner; -import java.time.OffsetDateTime; - -/** An immutable client-side representation of Snapshot. */ -public interface Snapshot { - /** - * 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: Resource location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the snapshotId property: snapshotId UUID v4 used to identify the Snapshot. - * - * @return the snapshotId value. - */ - String snapshotId(); - - /** - * Gets the created property: name The creation date of the snapshot. - * - * @return the created value. - */ - OffsetDateTime created(); - - /** - * 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 inner com.azure.resourcemanager.netapp.fluent.models.SnapshotInner object. - * - * @return the inner object. - */ - SnapshotInner innerModel(); - - /** The entirety of the Snapshot definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithCreate { - } - /** The Snapshot definition stages. */ - interface DefinitionStages { - /** The first stage of the Snapshot definition. */ - interface Blank extends WithLocation { - } - /** The stage of the Snapshot definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location Resource location. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location Resource location. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); - } - /** The stage of the Snapshot definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, accountName, poolName, volumeName. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @return the next definition stage. - */ - WithCreate withExistingVolume( - String resourceGroupName, String accountName, String poolName, String volumeName); - } - /** - * The stage of the Snapshot 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - Snapshot create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Snapshot create(Context context); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Snapshot refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Snapshot refresh(Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicies.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicies.java deleted file mode 100644 index 7bbaa4f00d7c8..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicies.java +++ /dev/null @@ -1,170 +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.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 SnapshotPolicies. */ -public interface SnapshotPolicies { - /** - * List snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @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 Snapshot Policies. - */ - PagedIterable list(String resourceGroupName, String accountName); - - /** - * List snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @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 Snapshot Policies. - */ - PagedIterable list(String resourceGroupName, String accountName, Context context); - - /** - * Get a snapshot Policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 a snapshot Policy. - */ - SnapshotPolicy get(String resourceGroupName, String accountName, String snapshotPolicyName); - - /** - * Get a snapshot Policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @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 a snapshot Policy. - */ - Response getWithResponse( - String resourceGroupName, String accountName, String snapshotPolicyName, Context context); - - /** - * Delete snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 snapshotPolicyName); - - /** - * Delete snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @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 snapshotPolicyName, Context context); - - /** - * Get volumes associated with snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 volumes associated with snapshot policy. - */ - SnapshotPolicyVolumeList listVolumes(String resourceGroupName, String accountName, String snapshotPolicyName); - - /** - * Get volumes associated with snapshot policy. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param snapshotPolicyName The name of the snapshot policy. - * @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 volumes associated with snapshot policy. - */ - Response listVolumesWithResponse( - String resourceGroupName, String accountName, String snapshotPolicyName, Context context); - - /** - * Get a snapshot Policy. - * - * @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 a snapshot Policy. - */ - SnapshotPolicy getById(String id); - - /** - * Get a snapshot Policy. - * - * @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 a snapshot Policy. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete snapshot policy. - * - * @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 snapshot policy. - * - * @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 SnapshotPolicy resource. - * - * @param name resource name. - * @return the first stage of the new SnapshotPolicy definition. - */ - SnapshotPolicy.DefinitionStages.Blank define(String name); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPoliciesList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPoliciesList.java deleted file mode 100644 index 9760eae3f76f4..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPoliciesList.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of Snapshot Policies. */ -@Fluent -public final class SnapshotPoliciesList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotPoliciesList.class); - - /* - * A list of snapshot policies - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value property: A list of snapshot policies. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A list of snapshot policies. - * - * @param value the value value to set. - * @return the SnapshotPoliciesList object itself. - */ - public SnapshotPoliciesList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicy.java deleted file mode 100644 index 3e9873c612891..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicy.java +++ /dev/null @@ -1,354 +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.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyInner; -import java.util.Map; - -/** An immutable client-side representation of SnapshotPolicy. */ -public interface SnapshotPolicy { - /** - * 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 etag property: A unique read-only string that changes whenever the resource is updated. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the hourlySchedule property: Schedule for hourly snapshots. - * - * @return the hourlySchedule value. - */ - HourlySchedule hourlySchedule(); - - /** - * Gets the dailySchedule property: Schedule for daily snapshots. - * - * @return the dailySchedule value. - */ - DailySchedule dailySchedule(); - - /** - * Gets the weeklySchedule property: Schedule for weekly snapshots. - * - * @return the weeklySchedule value. - */ - WeeklySchedule weeklySchedule(); - - /** - * Gets the monthlySchedule property: Schedule for monthly snapshots. - * - * @return the monthlySchedule value. - */ - MonthlySchedule monthlySchedule(); - - /** - * Gets the enabled property: The property to decide policy is enabled or not. - * - * @return the enabled value. - */ - Boolean enabled(); - - /** - * 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 inner com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyInner object. - * - * @return the inner object. - */ - SnapshotPolicyInner innerModel(); - - /** The entirety of the SnapshotPolicy definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithCreate { - } - /** The SnapshotPolicy definition stages. */ - interface DefinitionStages { - /** The first stage of the SnapshotPolicy definition. */ - interface Blank extends WithLocation { - } - /** The stage of the SnapshotPolicy 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 SnapshotPolicy definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, accountName. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @return the next definition stage. - */ - WithCreate withExistingNetAppAccount(String resourceGroupName, String accountName); - } - /** - * The stage of the SnapshotPolicy 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.WithHourlySchedule, - DefinitionStages.WithDailySchedule, - DefinitionStages.WithWeeklySchedule, - DefinitionStages.WithMonthlySchedule, - DefinitionStages.WithEnabled { - /** - * Executes the create request. - * - * @return the created resource. - */ - SnapshotPolicy create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - SnapshotPolicy create(Context context); - } - /** The stage of the SnapshotPolicy definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the SnapshotPolicy definition allowing to specify hourlySchedule. */ - interface WithHourlySchedule { - /** - * Specifies the hourlySchedule property: Schedule for hourly snapshots. - * - * @param hourlySchedule Schedule for hourly snapshots. - * @return the next definition stage. - */ - WithCreate withHourlySchedule(HourlySchedule hourlySchedule); - } - /** The stage of the SnapshotPolicy definition allowing to specify dailySchedule. */ - interface WithDailySchedule { - /** - * Specifies the dailySchedule property: Schedule for daily snapshots. - * - * @param dailySchedule Schedule for daily snapshots. - * @return the next definition stage. - */ - WithCreate withDailySchedule(DailySchedule dailySchedule); - } - /** The stage of the SnapshotPolicy definition allowing to specify weeklySchedule. */ - interface WithWeeklySchedule { - /** - * Specifies the weeklySchedule property: Schedule for weekly snapshots. - * - * @param weeklySchedule Schedule for weekly snapshots. - * @return the next definition stage. - */ - WithCreate withWeeklySchedule(WeeklySchedule weeklySchedule); - } - /** The stage of the SnapshotPolicy definition allowing to specify monthlySchedule. */ - interface WithMonthlySchedule { - /** - * Specifies the monthlySchedule property: Schedule for monthly snapshots. - * - * @param monthlySchedule Schedule for monthly snapshots. - * @return the next definition stage. - */ - WithCreate withMonthlySchedule(MonthlySchedule monthlySchedule); - } - /** The stage of the SnapshotPolicy definition allowing to specify enabled. */ - interface WithEnabled { - /** - * Specifies the enabled property: The property to decide policy is enabled or not. - * - * @param enabled The property to decide policy is enabled or not. - * @return the next definition stage. - */ - WithCreate withEnabled(Boolean enabled); - } - } - /** - * Begins update for the SnapshotPolicy resource. - * - * @return the stage of resource update. - */ - SnapshotPolicy.Update update(); - - /** The template for SnapshotPolicy update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithHourlySchedule, - UpdateStages.WithDailySchedule, - UpdateStages.WithWeeklySchedule, - UpdateStages.WithMonthlySchedule, - UpdateStages.WithEnabled { - /** - * Executes the update request. - * - * @return the updated resource. - */ - SnapshotPolicy apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - SnapshotPolicy apply(Context context); - } - /** The SnapshotPolicy update stages. */ - interface UpdateStages { - /** The stage of the SnapshotPolicy 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); - } - /** The stage of the SnapshotPolicy update allowing to specify hourlySchedule. */ - interface WithHourlySchedule { - /** - * Specifies the hourlySchedule property: Schedule for hourly snapshots. - * - * @param hourlySchedule Schedule for hourly snapshots. - * @return the next definition stage. - */ - Update withHourlySchedule(HourlySchedule hourlySchedule); - } - /** The stage of the SnapshotPolicy update allowing to specify dailySchedule. */ - interface WithDailySchedule { - /** - * Specifies the dailySchedule property: Schedule for daily snapshots. - * - * @param dailySchedule Schedule for daily snapshots. - * @return the next definition stage. - */ - Update withDailySchedule(DailySchedule dailySchedule); - } - /** The stage of the SnapshotPolicy update allowing to specify weeklySchedule. */ - interface WithWeeklySchedule { - /** - * Specifies the weeklySchedule property: Schedule for weekly snapshots. - * - * @param weeklySchedule Schedule for weekly snapshots. - * @return the next definition stage. - */ - Update withWeeklySchedule(WeeklySchedule weeklySchedule); - } - /** The stage of the SnapshotPolicy update allowing to specify monthlySchedule. */ - interface WithMonthlySchedule { - /** - * Specifies the monthlySchedule property: Schedule for monthly snapshots. - * - * @param monthlySchedule Schedule for monthly snapshots. - * @return the next definition stage. - */ - Update withMonthlySchedule(MonthlySchedule monthlySchedule); - } - /** The stage of the SnapshotPolicy update allowing to specify enabled. */ - interface WithEnabled { - /** - * Specifies the enabled property: The property to decide policy is enabled or not. - * - * @param enabled The property to decide policy is enabled or not. - * @return the next definition stage. - */ - Update withEnabled(Boolean enabled); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - SnapshotPolicy refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - SnapshotPolicy refresh(Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyPatch.java deleted file mode 100644 index e090fcf800386..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyPatch.java +++ /dev/null @@ -1,267 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Snapshot policy Details for create and update. */ -@Fluent -public final class SnapshotPolicyPatch { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotPolicyPatch.class); - - /* - * Resource location - */ - @JsonProperty(value = "location") - private String location; - - /* - * Resource Id - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * Resource name - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * Resource type - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /* - * Resource tags - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /* - * Snapshot Policy properties - */ - @JsonProperty(value = "properties") - private SnapshotPolicyProperties innerProperties; - - /** - * Get the location property: Resource location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource location. - * - * @param location the location value to set. - * @return the SnapshotPolicyPatch object itself. - */ - public SnapshotPolicyPatch withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the id property: Resource Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: Resource name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the type property: Resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the SnapshotPolicyPatch object itself. - */ - public SnapshotPolicyPatch withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the innerProperties property: Snapshot Policy properties. - * - * @return the innerProperties value. - */ - private SnapshotPolicyProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the hourlySchedule property: Schedule for hourly snapshots. - * - * @return the hourlySchedule value. - */ - public HourlySchedule hourlySchedule() { - return this.innerProperties() == null ? null : this.innerProperties().hourlySchedule(); - } - - /** - * Set the hourlySchedule property: Schedule for hourly snapshots. - * - * @param hourlySchedule the hourlySchedule value to set. - * @return the SnapshotPolicyPatch object itself. - */ - public SnapshotPolicyPatch withHourlySchedule(HourlySchedule hourlySchedule) { - if (this.innerProperties() == null) { - this.innerProperties = new SnapshotPolicyProperties(); - } - this.innerProperties().withHourlySchedule(hourlySchedule); - return this; - } - - /** - * Get the dailySchedule property: Schedule for daily snapshots. - * - * @return the dailySchedule value. - */ - public DailySchedule dailySchedule() { - return this.innerProperties() == null ? null : this.innerProperties().dailySchedule(); - } - - /** - * Set the dailySchedule property: Schedule for daily snapshots. - * - * @param dailySchedule the dailySchedule value to set. - * @return the SnapshotPolicyPatch object itself. - */ - public SnapshotPolicyPatch withDailySchedule(DailySchedule dailySchedule) { - if (this.innerProperties() == null) { - this.innerProperties = new SnapshotPolicyProperties(); - } - this.innerProperties().withDailySchedule(dailySchedule); - return this; - } - - /** - * Get the weeklySchedule property: Schedule for weekly snapshots. - * - * @return the weeklySchedule value. - */ - public WeeklySchedule weeklySchedule() { - return this.innerProperties() == null ? null : this.innerProperties().weeklySchedule(); - } - - /** - * Set the weeklySchedule property: Schedule for weekly snapshots. - * - * @param weeklySchedule the weeklySchedule value to set. - * @return the SnapshotPolicyPatch object itself. - */ - public SnapshotPolicyPatch withWeeklySchedule(WeeklySchedule weeklySchedule) { - if (this.innerProperties() == null) { - this.innerProperties = new SnapshotPolicyProperties(); - } - this.innerProperties().withWeeklySchedule(weeklySchedule); - return this; - } - - /** - * Get the monthlySchedule property: Schedule for monthly snapshots. - * - * @return the monthlySchedule value. - */ - public MonthlySchedule monthlySchedule() { - return this.innerProperties() == null ? null : this.innerProperties().monthlySchedule(); - } - - /** - * Set the monthlySchedule property: Schedule for monthly snapshots. - * - * @param monthlySchedule the monthlySchedule value to set. - * @return the SnapshotPolicyPatch object itself. - */ - public SnapshotPolicyPatch withMonthlySchedule(MonthlySchedule monthlySchedule) { - if (this.innerProperties() == null) { - this.innerProperties = new SnapshotPolicyProperties(); - } - this.innerProperties().withMonthlySchedule(monthlySchedule); - return this; - } - - /** - * Get the enabled property: The property to decide policy is enabled or not. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.innerProperties() == null ? null : this.innerProperties().enabled(); - } - - /** - * Set the enabled property: The property to decide policy is enabled or not. - * - * @param enabled the enabled value to set. - * @return the SnapshotPolicyPatch object itself. - */ - public SnapshotPolicyPatch withEnabled(Boolean enabled) { - if (this.innerProperties() == null) { - this.innerProperties = new SnapshotPolicyProperties(); - } - this.innerProperties().withEnabled(enabled); - 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/models/SnapshotPolicyVolumeList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyVolumeList.java deleted file mode 100644 index beb609f8fde36..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyVolumeList.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.models; - -import com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyVolumeListInner; -import java.util.List; - -/** An immutable client-side representation of SnapshotPolicyVolumeList. */ -public interface SnapshotPolicyVolumeList { - /** - * Gets the value property: List of volumes. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyVolumeListInner object. - * - * @return the inner object. - */ - SnapshotPolicyVolumeListInner innerModel(); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Snapshots.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Snapshots.java deleted file mode 100644 index 24c22eae240d6..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Snapshots.java +++ /dev/null @@ -1,212 +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.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 Snapshots. */ -public interface Snapshots { - /** - * List all snapshots associated with the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Snapshots. - */ - PagedIterable list(String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * List all snapshots associated with the volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Snapshots. - */ - PagedIterable list( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * Get details of the specified snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified snapshot. - */ - Snapshot get(String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName); - - /** - * Get details of the specified snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified snapshot. - */ - Response getWithResponse( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Context context); - - /** - * Patch a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - Snapshot update( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Object body); - - /** - * Patch a snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param body Snapshot 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 snapshot of a Volume. - */ - Snapshot update( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Object body, - Context context); - - /** - * Delete snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName); - - /** - * Delete snapshot. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param snapshotName The name of the snapshot. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - String snapshotName, - Context context); - - /** - * Get details of the specified snapshot. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified snapshot. - */ - Snapshot getById(String id); - - /** - * Get details of the specified snapshot. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified snapshot. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete snapshot. - * - * @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 snapshot. - * - * @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 Snapshot resource. - * - * @param name resource name. - * @return the first stage of the new Snapshot definition. - */ - Snapshot.DefinitionStages.Blank define(String name); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotsList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotsList.java deleted file mode 100644 index 054800ade20cf..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotsList.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of Snapshots. */ -@Fluent -public final class SnapshotsList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotsList.class); - - /* - * A list of Snapshots - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value property: A list of Snapshots. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A list of Snapshots. - * - * @param value the value value to set. - * @return the SnapshotsList object itself. - */ - public SnapshotsList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItem.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItem.java deleted file mode 100644 index 29796abf20371..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItem.java +++ /dev/null @@ -1,60 +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.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner; - -/** An immutable client-side representation of SubscriptionQuotaItem. */ -public interface SubscriptionQuotaItem { - /** - * 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: The system meta data relating to this resource. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the current property: The current quota value. - * - * @return the current value. - */ - Integer current(); - - /** - * Gets the defaultProperty property: The default quota value. - * - * @return the defaultProperty value. - */ - Integer defaultProperty(); - - /** - * Gets the inner com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner object. - * - * @return the inner object. - */ - SubscriptionQuotaItemInner innerModel(); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItemList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItemList.java deleted file mode 100644 index 97d1fb8b7ae6a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItemList.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of Subscription Quota Items. */ -@Fluent -public final class SubscriptionQuotaItemList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SubscriptionQuotaItemList.class); - - /* - * A list of SubscriptionQuotaItems - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value property: A list of SubscriptionQuotaItems. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A list of SubscriptionQuotaItems. - * - * @param value the value value to set. - * @return the SubscriptionQuotaItemList object itself. - */ - public SubscriptionQuotaItemList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Vault.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Vault.java deleted file mode 100644 index d27d1206b4a8a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Vault.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.models; - -import com.azure.resourcemanager.netapp.fluent.models.VaultInner; - -/** An immutable client-side representation of Vault. */ -public interface Vault { - /** - * 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: Resource location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the vaultName property: Vault Name. - * - * @return the vaultName value. - */ - String vaultName(); - - /** - * Gets the inner com.azure.resourcemanager.netapp.fluent.models.VaultInner object. - * - * @return the inner object. - */ - VaultInner innerModel(); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VaultList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VaultList.java deleted file mode 100644 index 5392f171c952a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VaultList.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.models.VaultInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of Vaults. */ -@Fluent -public final class VaultList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VaultList.class); - - /* - * A list of vaults - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value property: A list of vaults. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A list of vaults. - * - * @param value the value value to set. - * @return the VaultList object itself. - */ - public VaultList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Vaults.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Vaults.java deleted file mode 100644 index 8a30f1772ae4d..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Vaults.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.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of Vaults. */ -public interface Vaults { - /** - * List vaults for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Vaults. - */ - PagedIterable list(String resourceGroupName, String accountName); - - /** - * List vaults for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. - * @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 Vaults. - */ - PagedIterable list(String resourceGroupName, String accountName, Context context); -} 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 deleted file mode 100644 index 2c051578eb265..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volume.java +++ /dev/null @@ -1,1149 +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.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.netapp.fluent.models.MountTargetProperties; -import com.azure.resourcemanager.netapp.fluent.models.VolumeInner; -import java.util.List; -import java.util.Map; - -/** An immutable client-side representation of Volume. */ -public interface Volume { - /** - * 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 etag property: A unique read-only string that changes whenever the resource is updated. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the fileSystemId property: FileSystem ID Unique FileSystem Identifier. - * - * @return the fileSystemId value. - */ - String fileSystemId(); - - /** - * Gets the creationToken property: Creation Token or File Path A unique file path for the volume. Used when - * creating mount targets. - * - * @return the creationToken value. - */ - String creationToken(); - - /** - * Gets the serviceLevel property: serviceLevel The service level of the file system. - * - * @return the serviceLevel value. - */ - ServiceLevel serviceLevel(); - - /** - * Gets the usageThreshold property: 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. Specified in bytes. - * - * @return the usageThreshold value. - */ - long usageThreshold(); - - /** - * Gets the exportPolicy property: exportPolicy Set of export policy rules. - * - * @return the exportPolicy value. - */ - VolumePropertiesExportPolicy exportPolicy(); - - /** - * Gets the protocolTypes property: protocolTypes Set of protocol types, default NFSv3, CIFS for SMB protocol. - * - * @return the protocolTypes value. - */ - List protocolTypes(); - - /** - * Gets the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - String provisioningState(); - - /** - * Gets the snapshotId property: Snapshot ID UUID v4 or resource identifier used to identify the Snapshot. - * - * @return the snapshotId value. - */ - String snapshotId(); - - /** - * Gets the backupId property: Backup ID UUID v4 or resource identifier used to identify the Backup. - * - * @return the backupId value. - */ - String backupId(); - - /** - * Gets the baremetalTenantId property: Baremetal Tenant ID Unique Baremetal Tenant Identifier. - * - * @return the baremetalTenantId value. - */ - String baremetalTenantId(); - - /** - * Gets the subnetId property: The Azure Resource URI for a delegated subnet. Must have the delegation - * Microsoft.NetApp/volumes. - * - * @return the subnetId value. - */ - String subnetId(); - - /** - * Gets the networkFeatures property: Network features Basic network, or Standard features available to the volume. - * - * @return the networkFeatures value. - */ - NetworkFeatures networkFeatures(); - - /** - * Gets the networkSiblingSetId property: Network Sibling Set ID Network Sibling Set ID for the the group of volumes - * sharing networking resources. - * - * @return the networkSiblingSetId value. - */ - String networkSiblingSetId(); - - /** - * Gets the storageToNetworkProximity property: Storage to Network Proximity Provides storage to network proximity - * information for the volume. - * - * @return the storageToNetworkProximity value. - */ - VolumeStorageToNetworkProximity storageToNetworkProximity(); - - /** - * Gets the mountTargets property: mountTargets List of mount targets. - * - * @return the mountTargets value. - */ - List mountTargets(); - - /** - * Gets the volumeType property: What type of volume is this. For destination volumes in Cross Region Replication, - * set type to DataProtection. - * - * @return the volumeType value. - */ - String volumeType(); - - /** - * Gets the dataProtection property: DataProtection DataProtection type volumes include an object containing details - * of the replication. - * - * @return the dataProtection value. - */ - VolumePropertiesDataProtection dataProtection(); - - /** - * Gets the isRestoring property: Restoring. - * - * @return the isRestoring value. - */ - Boolean isRestoring(); - - /** - * Gets the snapshotDirectoryVisible property: If enabled (true) the volume will contain a read-only snapshot - * directory which provides access to each of the volume's snapshots (default to true). - * - * @return the snapshotDirectoryVisible value. - */ - Boolean snapshotDirectoryVisible(); - - /** - * Gets the kerberosEnabled property: Describe if a volume is KerberosEnabled. To be use with swagger version - * 2020-05-01 or later. - * - * @return the kerberosEnabled value. - */ - Boolean kerberosEnabled(); - - /** - * Gets the securityStyle property: The security style of volume, default unix, defaults to ntfs for dual protocol - * or CIFS protocol. - * - * @return the securityStyle value. - */ - SecurityStyle securityStyle(); - - /** - * Gets the smbEncryption property: Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol - * volume. To be used with swagger version 2020-08-01 or later. - * - * @return the smbEncryption value. - */ - Boolean smbEncryption(); - - /** - * Gets the smbContinuouslyAvailable property: Enables continuously available share property for smb volume. Only - * applicable for SMB volume. - * - * @return the smbContinuouslyAvailable value. - */ - Boolean smbContinuouslyAvailable(); - - /** - * Gets the throughputMibps property: Maximum throughput in Mibps that can be achieved by this volume and this will - * be accepted as input only for manual qosType volume. - * - * @return the throughputMibps value. - */ - Float throughputMibps(); - - /** - * Gets the encryptionKeySource property: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. - * - * @return the encryptionKeySource value. - */ - String encryptionKeySource(); - - /** - * Gets the ldapEnabled property: Specifies whether LDAP is enabled or not for a given NFS volume. - * - * @return the ldapEnabled value. - */ - Boolean ldapEnabled(); - - /** - * Gets the coolAccess property: Specifies whether Cool Access(tiering) is enabled for the volume. - * - * @return the coolAccess value. - */ - Boolean coolAccess(); - - /** - * Gets the coolnessPeriod property: Specifies the number of days after which data that is not accessed by clients - * will be tiered. - * - * @return the coolnessPeriod value. - */ - Integer coolnessPeriod(); - - /** - * Gets the unixPermissions property: 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. - * - * @return the unixPermissions value. - */ - String unixPermissions(); - - /** - * Gets the cloneProgress property: 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. - * - * @return the cloneProgress value. - */ - Integer cloneProgress(); - - /** - * Gets the avsDataStore property: avsDataStore Specifies whether the volume is enabled for Azure VMware Solution - * (AVS) datastore purpose. - * - * @return the avsDataStore value. - */ - AvsDataStore avsDataStore(); - - /** - * Gets the isDefaultQuotaEnabled property: Specifies if default quota is enabled for the volume. - * - * @return the isDefaultQuotaEnabled value. - */ - Boolean isDefaultQuotaEnabled(); - - /** - * Gets the defaultUserQuotaInKiBs property: Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, - * the minimum value of 4 KiBs applies . - * - * @return the defaultUserQuotaInKiBs value. - */ - Long defaultUserQuotaInKiBs(); - - /** - * Gets the defaultGroupQuotaInKiBs property: Default group quota for volume in KiBs. If isDefaultQuotaEnabled is - * set, the minimum value of 4 KiBs applies. - * - * @return the defaultGroupQuotaInKiBs value. - */ - Long defaultGroupQuotaInKiBs(); - - /** - * Gets the volumeGroupName property: Volume Group Name. - * - * @return the volumeGroupName value. - */ - String volumeGroupName(); - - /** - * Gets the capacityPoolResourceId property: Pool Resource Id used in case of creating a volume through volume - * group. - * - * @return the capacityPoolResourceId value. - */ - String capacityPoolResourceId(); - - /** - * Gets the proximityPlacementGroup property: Proximity placement group associated with the volume. - * - * @return the proximityPlacementGroup value. - */ - String proximityPlacementGroup(); - - /** - * Gets the t2Network property: T2 network information. - * - * @return the t2Network value. - */ - String t2Network(); - - /** - * Gets the volumeSpecName property: Volume spec name is the application specific designation or identifier for the - * particular volume in a volume group for e.g. data, log. - * - * @return the volumeSpecName value. - */ - String volumeSpecName(); - - /** - * Gets the placementRules property: Volume placement rules Application specific placement rules for the particular - * volume. - * - * @return the placementRules value. - */ - List placementRules(); - - /** - * 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 inner com.azure.resourcemanager.netapp.fluent.models.VolumeInner object. - * - * @return the inner object. - */ - VolumeInner innerModel(); - - /** The entirety of the Volume definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithCreationToken, - DefinitionStages.WithUsageThreshold, - DefinitionStages.WithSubnetId, - DefinitionStages.WithCreate { - } - /** The Volume definition stages. */ - interface DefinitionStages { - /** The first stage of the Volume definition. */ - interface Blank extends WithLocation { - } - /** The stage of the Volume 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 Volume definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, accountName, poolName. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @return the next definition stage. - */ - WithCreationToken withExistingCapacityPool(String resourceGroupName, String accountName, String poolName); - } - /** The stage of the Volume definition allowing to specify creationToken. */ - interface WithCreationToken { - /** - * Specifies the creationToken property: Creation Token or File Path A unique file path for the volume. Used - * when creating mount targets. - * - * @param creationToken Creation Token or File Path A unique file path for the volume. Used when creating - * mount targets. - * @return the next definition stage. - */ - WithUsageThreshold withCreationToken(String creationToken); - } - /** The stage of the Volume definition allowing to specify usageThreshold. */ - interface WithUsageThreshold { - /** - * Specifies the usageThreshold property: 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. - * Specified in bytes.. - * - * @param usageThreshold 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. Specified in - * bytes. - * @return the next definition stage. - */ - WithSubnetId withUsageThreshold(long usageThreshold); - } - /** The stage of the Volume definition allowing to specify subnetId. */ - interface WithSubnetId { - /** - * Specifies the subnetId property: The Azure Resource URI for a delegated subnet. Must have the delegation - * Microsoft.NetApp/volumes. - * - * @param subnetId The Azure Resource URI for a delegated subnet. Must have the delegation - * Microsoft.NetApp/volumes. - * @return the next definition stage. - */ - WithCreate withSubnetId(String subnetId); - } - /** - * The stage of the Volume 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.WithServiceLevel, - DefinitionStages.WithExportPolicy, - DefinitionStages.WithProtocolTypes, - DefinitionStages.WithSnapshotId, - DefinitionStages.WithBackupId, - DefinitionStages.WithNetworkFeatures, - DefinitionStages.WithVolumeType, - DefinitionStages.WithDataProtection, - DefinitionStages.WithIsRestoring, - DefinitionStages.WithSnapshotDirectoryVisible, - DefinitionStages.WithKerberosEnabled, - DefinitionStages.WithSecurityStyle, - DefinitionStages.WithSmbEncryption, - DefinitionStages.WithSmbContinuouslyAvailable, - DefinitionStages.WithThroughputMibps, - DefinitionStages.WithEncryptionKeySource, - DefinitionStages.WithLdapEnabled, - DefinitionStages.WithCoolAccess, - DefinitionStages.WithCoolnessPeriod, - DefinitionStages.WithUnixPermissions, - DefinitionStages.WithAvsDataStore, - DefinitionStages.WithIsDefaultQuotaEnabled, - DefinitionStages.WithDefaultUserQuotaInKiBs, - DefinitionStages.WithDefaultGroupQuotaInKiBs, - DefinitionStages.WithCapacityPoolResourceId, - DefinitionStages.WithProximityPlacementGroup, - DefinitionStages.WithVolumeSpecName, - DefinitionStages.WithPlacementRules { - /** - * Executes the create request. - * - * @return the created resource. - */ - Volume create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Volume create(Context context); - } - /** The stage of the Volume definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the Volume definition allowing to specify serviceLevel. */ - interface WithServiceLevel { - /** - * Specifies the serviceLevel property: serviceLevel The service level of the file system. - * - * @param serviceLevel serviceLevel The service level of the file system. - * @return the next definition stage. - */ - WithCreate withServiceLevel(ServiceLevel serviceLevel); - } - /** The stage of the Volume definition allowing to specify exportPolicy. */ - interface WithExportPolicy { - /** - * Specifies the exportPolicy property: exportPolicy Set of export policy rules. - * - * @param exportPolicy exportPolicy Set of export policy rules. - * @return the next definition stage. - */ - WithCreate withExportPolicy(VolumePropertiesExportPolicy exportPolicy); - } - /** The stage of the Volume definition allowing to specify protocolTypes. */ - interface WithProtocolTypes { - /** - * Specifies the protocolTypes property: protocolTypes Set of protocol types, default NFSv3, CIFS for SMB - * protocol. - * - * @param protocolTypes protocolTypes Set of protocol types, default NFSv3, CIFS for SMB protocol. - * @return the next definition stage. - */ - WithCreate withProtocolTypes(List protocolTypes); - } - /** The stage of the Volume definition allowing to specify snapshotId. */ - interface WithSnapshotId { - /** - * Specifies the snapshotId property: Snapshot ID UUID v4 or resource identifier used to identify the - * Snapshot.. - * - * @param snapshotId Snapshot ID UUID v4 or resource identifier used to identify the Snapshot. - * @return the next definition stage. - */ - WithCreate withSnapshotId(String snapshotId); - } - /** The stage of the Volume definition allowing to specify backupId. */ - interface WithBackupId { - /** - * Specifies the backupId property: Backup ID UUID v4 or resource identifier used to identify the Backup.. - * - * @param backupId Backup ID UUID v4 or resource identifier used to identify the Backup. - * @return the next definition stage. - */ - WithCreate withBackupId(String backupId); - } - /** The stage of the Volume definition allowing to specify networkFeatures. */ - interface WithNetworkFeatures { - /** - * Specifies the networkFeatures property: Network features Basic network, or Standard features available to - * the volume.. - * - * @param networkFeatures Network features Basic network, or Standard features available to the volume. - * @return the next definition stage. - */ - WithCreate withNetworkFeatures(NetworkFeatures networkFeatures); - } - /** The stage of the Volume definition allowing to specify volumeType. */ - interface WithVolumeType { - /** - * Specifies the volumeType property: What type of volume is this. For destination volumes in Cross Region - * Replication, set type to DataProtection. - * - * @param volumeType What type of volume is this. For destination volumes in Cross Region Replication, set - * type to DataProtection. - * @return the next definition stage. - */ - WithCreate withVolumeType(String volumeType); - } - /** The stage of the Volume definition allowing to specify dataProtection. */ - interface WithDataProtection { - /** - * Specifies the dataProtection property: DataProtection DataProtection type volumes include an object - * containing details of the replication. - * - * @param dataProtection DataProtection DataProtection type volumes include an object containing details of - * the replication. - * @return the next definition stage. - */ - WithCreate withDataProtection(VolumePropertiesDataProtection dataProtection); - } - /** The stage of the Volume definition allowing to specify isRestoring. */ - interface WithIsRestoring { - /** - * Specifies the isRestoring property: Restoring. - * - * @param isRestoring Restoring. - * @return the next definition stage. - */ - WithCreate withIsRestoring(Boolean isRestoring); - } - /** The stage of the Volume definition allowing to specify snapshotDirectoryVisible. */ - interface WithSnapshotDirectoryVisible { - /** - * Specifies the snapshotDirectoryVisible property: If enabled (true) the volume will contain a read-only - * snapshot directory which provides access to each of the volume's snapshots (default to true).. - * - * @param snapshotDirectoryVisible If enabled (true) the volume will contain a read-only snapshot directory - * which provides access to each of the volume's snapshots (default to true). - * @return the next definition stage. - */ - WithCreate withSnapshotDirectoryVisible(Boolean snapshotDirectoryVisible); - } - /** The stage of the Volume definition allowing to specify kerberosEnabled. */ - interface WithKerberosEnabled { - /** - * Specifies the kerberosEnabled property: Describe if a volume is KerberosEnabled. To be use with swagger - * version 2020-05-01 or later. - * - * @param kerberosEnabled Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 - * or later. - * @return the next definition stage. - */ - WithCreate withKerberosEnabled(Boolean kerberosEnabled); - } - /** The stage of the Volume definition allowing to specify securityStyle. */ - interface WithSecurityStyle { - /** - * Specifies the securityStyle property: The security style of volume, default unix, defaults to ntfs for - * dual protocol or CIFS protocol. - * - * @param securityStyle The security style of volume, default unix, defaults to ntfs for dual protocol or - * CIFS protocol. - * @return the next definition stage. - */ - WithCreate withSecurityStyle(SecurityStyle securityStyle); - } - /** The stage of the Volume definition allowing to specify smbEncryption. */ - interface WithSmbEncryption { - /** - * Specifies the smbEncryption property: Enables encryption for in-flight smb3 data. Only applicable for - * SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later. - * - * @param smbEncryption Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol - * volume. To be used with swagger version 2020-08-01 or later. - * @return the next definition stage. - */ - WithCreate withSmbEncryption(Boolean smbEncryption); - } - /** The stage of the Volume definition allowing to specify smbContinuouslyAvailable. */ - interface WithSmbContinuouslyAvailable { - /** - * Specifies the smbContinuouslyAvailable property: Enables continuously available share property for smb - * volume. Only applicable for SMB volume. - * - * @param smbContinuouslyAvailable Enables continuously available share property for smb volume. Only - * applicable for SMB volume. - * @return the next definition stage. - */ - WithCreate withSmbContinuouslyAvailable(Boolean smbContinuouslyAvailable); - } - /** The stage of the Volume definition allowing to specify throughputMibps. */ - interface WithThroughputMibps { - /** - * Specifies the throughputMibps property: Maximum throughput in Mibps that can be achieved by this volume - * and this will be accepted as input only for manual qosType volume. - * - * @param throughputMibps Maximum throughput in Mibps that can be achieved by this volume and this will be - * accepted as input only for manual qosType volume. - * @return the next definition stage. - */ - WithCreate withThroughputMibps(Float throughputMibps); - } - /** The stage of the Volume definition allowing to specify encryptionKeySource. */ - interface WithEncryptionKeySource { - /** - * Specifies the encryptionKeySource property: Encryption Key Source. Possible values are: - * 'Microsoft.NetApp'. - * - * @param encryptionKeySource Encryption Key Source. Possible values are: 'Microsoft.NetApp'. - * @return the next definition stage. - */ - WithCreate withEncryptionKeySource(String encryptionKeySource); - } - /** The stage of the Volume definition allowing to specify ldapEnabled. */ - interface WithLdapEnabled { - /** - * Specifies the ldapEnabled property: Specifies whether LDAP is enabled or not for a given NFS volume.. - * - * @param ldapEnabled Specifies whether LDAP is enabled or not for a given NFS volume. - * @return the next definition stage. - */ - WithCreate withLdapEnabled(Boolean ldapEnabled); - } - /** The stage of the Volume definition allowing to specify coolAccess. */ - interface WithCoolAccess { - /** - * Specifies the coolAccess property: Specifies whether Cool Access(tiering) is enabled for the volume.. - * - * @param coolAccess Specifies whether Cool Access(tiering) is enabled for the volume. - * @return the next definition stage. - */ - WithCreate withCoolAccess(Boolean coolAccess); - } - /** The stage of the Volume definition allowing to specify coolnessPeriod. */ - interface WithCoolnessPeriod { - /** - * Specifies the coolnessPeriod property: Specifies the number of days after which data that is not accessed - * by clients will be tiered.. - * - * @param coolnessPeriod Specifies the number of days after which data that is not accessed by clients will - * be tiered. - * @return the next definition stage. - */ - WithCreate withCoolnessPeriod(Integer coolnessPeriod); - } - /** The stage of the Volume definition allowing to specify unixPermissions. */ - interface WithUnixPermissions { - /** - * Specifies the unixPermissions property: 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.. - * - * @param unixPermissions 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. - * @return the next definition stage. - */ - WithCreate withUnixPermissions(String unixPermissions); - } - /** The stage of the Volume definition allowing to specify avsDataStore. */ - interface WithAvsDataStore { - /** - * Specifies the avsDataStore property: avsDataStore Specifies whether the volume is enabled for Azure - * VMware Solution (AVS) datastore purpose. - * - * @param avsDataStore avsDataStore Specifies whether the volume is enabled for Azure VMware Solution (AVS) - * datastore purpose. - * @return the next definition stage. - */ - WithCreate withAvsDataStore(AvsDataStore avsDataStore); - } - /** The stage of the Volume definition allowing to specify isDefaultQuotaEnabled. */ - interface WithIsDefaultQuotaEnabled { - /** - * Specifies the isDefaultQuotaEnabled property: Specifies if default quota is enabled for the volume.. - * - * @param isDefaultQuotaEnabled Specifies if default quota is enabled for the volume. - * @return the next definition stage. - */ - WithCreate withIsDefaultQuotaEnabled(Boolean isDefaultQuotaEnabled); - } - /** The stage of the Volume definition allowing to specify defaultUserQuotaInKiBs. */ - interface WithDefaultUserQuotaInKiBs { - /** - * Specifies the defaultUserQuotaInKiBs property: Default user quota for volume in KiBs. If - * isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies .. - * - * @param defaultUserQuotaInKiBs Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the - * minimum value of 4 KiBs applies . - * @return the next definition stage. - */ - WithCreate withDefaultUserQuotaInKiBs(Long defaultUserQuotaInKiBs); - } - /** The stage of the Volume definition allowing to specify defaultGroupQuotaInKiBs. */ - interface WithDefaultGroupQuotaInKiBs { - /** - * Specifies the defaultGroupQuotaInKiBs property: Default group quota for volume in KiBs. If - * isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies.. - * - * @param defaultGroupQuotaInKiBs Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, - * the minimum value of 4 KiBs applies. - * @return the next definition stage. - */ - WithCreate withDefaultGroupQuotaInKiBs(Long defaultGroupQuotaInKiBs); - } - /** The stage of the Volume definition allowing to specify capacityPoolResourceId. */ - interface WithCapacityPoolResourceId { - /** - * Specifies the capacityPoolResourceId property: Pool Resource Id used in case of creating a volume through - * volume group. - * - * @param capacityPoolResourceId Pool Resource Id used in case of creating a volume through volume group. - * @return the next definition stage. - */ - WithCreate withCapacityPoolResourceId(String capacityPoolResourceId); - } - /** The stage of the Volume definition allowing to specify proximityPlacementGroup. */ - interface WithProximityPlacementGroup { - /** - * Specifies the proximityPlacementGroup property: Proximity placement group associated with the volume. - * - * @param proximityPlacementGroup Proximity placement group associated with the volume. - * @return the next definition stage. - */ - WithCreate withProximityPlacementGroup(String proximityPlacementGroup); - } - /** The stage of the Volume definition allowing to specify volumeSpecName. */ - interface WithVolumeSpecName { - /** - * Specifies the volumeSpecName property: Volume spec name is the application specific designation or - * identifier for the particular volume in a volume group for e.g. data, log. - * - * @param volumeSpecName Volume spec name is the application specific designation or identifier for the - * particular volume in a volume group for e.g. data, log. - * @return the next definition stage. - */ - WithCreate withVolumeSpecName(String volumeSpecName); - } - /** The stage of the Volume definition allowing to specify placementRules. */ - interface WithPlacementRules { - /** - * Specifies the placementRules property: Volume placement rules Application specific placement rules for - * the particular volume. - * - * @param placementRules Volume placement rules Application specific placement rules for the particular - * volume. - * @return the next definition stage. - */ - WithCreate withPlacementRules(List placementRules); - } - } - /** - * Begins update for the Volume resource. - * - * @return the stage of resource update. - */ - Volume.Update update(); - - /** The template for Volume update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithServiceLevel, - UpdateStages.WithUsageThreshold, - UpdateStages.WithExportPolicy, - UpdateStages.WithThroughputMibps, - UpdateStages.WithDataProtection, - UpdateStages.WithIsDefaultQuotaEnabled, - UpdateStages.WithDefaultUserQuotaInKiBs, - UpdateStages.WithDefaultGroupQuotaInKiBs { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Volume apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Volume apply(Context context); - } - /** The Volume update stages. */ - interface UpdateStages { - /** The stage of the Volume 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); - } - /** The stage of the Volume update allowing to specify serviceLevel. */ - interface WithServiceLevel { - /** - * Specifies the serviceLevel property: serviceLevel The service level of the file system. - * - * @param serviceLevel serviceLevel The service level of the file system. - * @return the next definition stage. - */ - Update withServiceLevel(ServiceLevel serviceLevel); - } - /** The stage of the Volume update allowing to specify usageThreshold. */ - interface WithUsageThreshold { - /** - * Specifies the usageThreshold property: 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. - * Specified in bytes.. - * - * @param usageThreshold 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. Specified in - * bytes. - * @return the next definition stage. - */ - Update withUsageThreshold(Long usageThreshold); - } - /** The stage of the Volume update allowing to specify exportPolicy. */ - interface WithExportPolicy { - /** - * Specifies the exportPolicy property: exportPolicy Set of export policy rules. - * - * @param exportPolicy exportPolicy Set of export policy rules. - * @return the next definition stage. - */ - Update withExportPolicy(VolumePatchPropertiesExportPolicy exportPolicy); - } - /** The stage of the Volume update allowing to specify throughputMibps. */ - interface WithThroughputMibps { - /** - * Specifies the throughputMibps property: Maximum throughput in Mibps that can be achieved by this volume - * and this will be accepted as input only for manual qosType volume. - * - * @param throughputMibps Maximum throughput in Mibps that can be achieved by this volume and this will be - * accepted as input only for manual qosType volume. - * @return the next definition stage. - */ - Update withThroughputMibps(Float throughputMibps); - } - /** The stage of the Volume update allowing to specify dataProtection. */ - interface WithDataProtection { - /** - * Specifies the dataProtection property: DataProtection DataProtection type volumes include an object - * containing details of the replication. - * - * @param dataProtection DataProtection DataProtection type volumes include an object containing details of - * the replication. - * @return the next definition stage. - */ - Update withDataProtection(VolumePatchPropertiesDataProtection dataProtection); - } - /** The stage of the Volume update allowing to specify isDefaultQuotaEnabled. */ - interface WithIsDefaultQuotaEnabled { - /** - * Specifies the isDefaultQuotaEnabled property: Specifies if default quota is enabled for the volume.. - * - * @param isDefaultQuotaEnabled Specifies if default quota is enabled for the volume. - * @return the next definition stage. - */ - Update withIsDefaultQuotaEnabled(Boolean isDefaultQuotaEnabled); - } - /** The stage of the Volume update allowing to specify defaultUserQuotaInKiBs. */ - interface WithDefaultUserQuotaInKiBs { - /** - * Specifies the defaultUserQuotaInKiBs property: Default user quota for volume in KiBs. If - * isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies .. - * - * @param defaultUserQuotaInKiBs Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the - * minimum value of 4 KiBs applies . - * @return the next definition stage. - */ - Update withDefaultUserQuotaInKiBs(Long defaultUserQuotaInKiBs); - } - /** The stage of the Volume update allowing to specify defaultGroupQuotaInKiBs. */ - interface WithDefaultGroupQuotaInKiBs { - /** - * Specifies the defaultGroupQuotaInKiBs property: Default group quota for volume in KiBs. If - * isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies.. - * - * @param defaultGroupQuotaInKiBs Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, - * the minimum value of 4 KiBs applies. - * @return the next definition stage. - */ - Update withDefaultGroupQuotaInKiBs(Long defaultGroupQuotaInKiBs); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Volume refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Volume refresh(Context context); - - /** - * Revert a volume to the snapshot specified in the body. - * - * @param body Object for snapshot to revert 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 revert(VolumeRevert body); - - /** - * Revert a volume to the snapshot specified in the body. - * - * @param body Object for snapshot to revert 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 revert(VolumeRevert body, Context context); - - /** - * Break the replication connection on the destination volume. - * - * @param body Optional body to force break the replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 breakReplication(BreakReplicationRequest body); - - /** - * Break the replication connection on the destination 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 breakReplication(); - - /** - * Break the replication connection on the destination 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 com.azure.core.management.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 breakReplication(BreakReplicationRequest body, Context context); - - /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. - * - * @throws com.azure.core.management.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 resyncReplication(); - - /** - * 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 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 resyncReplication(Context context); - - /** - * Delete the replication connection on the destination volume, and send release to the source replication. - * - * @throws com.azure.core.management.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 deleteReplication(); - - /** - * Delete the replication connection on the destination volume, and send release to the source replication. - * - * @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 deleteReplication(Context context); - - /** - * Authorize the replication connection on the source volume. - * - * @param body Authorize 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. - */ - void authorizeReplication(AuthorizeRequest body); - - /** - * Authorize the replication connection on the source 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 com.azure.core.management.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 authorizeReplication(AuthorizeRequest body, Context context); - - /** - * Re-Initializes the replication connection on the destination 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 reInitializeReplication(); - - /** - * Re-Initializes the replication connection on the destination 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 reInitializeReplication(Context context); - - /** - * Moves volume to another pool. - * - * @param body Move volume to the pool 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 poolChange(PoolChangeRequest body); - - /** - * Moves volume to another pool. - * - * @param body Move volume to the pool supplied in the body of the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 poolChange(PoolChangeRequest body, Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupProperties.java deleted file mode 100644 index ed59afbc95c63..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupProperties.java +++ /dev/null @@ -1,128 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Volume Backup Properties. */ -@Fluent -public final class VolumeBackupProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeBackupProperties.class); - - /* - * Backup Policy Resource ID - */ - @JsonProperty(value = "backupPolicyId") - private String backupPolicyId; - - /* - * Policy Enforced - */ - @JsonProperty(value = "policyEnforced") - private Boolean policyEnforced; - - /* - * Vault Resource ID - */ - @JsonProperty(value = "vaultId") - private String vaultId; - - /* - * Backup Enabled - */ - @JsonProperty(value = "backupEnabled") - private Boolean backupEnabled; - - /** - * 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 vaultId property: Vault Resource ID. - * - * @return the vaultId value. - */ - public String vaultId() { - return this.vaultId; - } - - /** - * Set the vaultId property: Vault Resource ID. - * - * @param vaultId the vaultId value to set. - * @return the VolumeBackupProperties object itself. - */ - public VolumeBackupProperties withVaultId(String vaultId) { - this.vaultId = vaultId; - return this; - } - - /** - * Get the backupEnabled property: Backup Enabled. - * - * @return the backupEnabled value. - */ - public Boolean backupEnabled() { - return this.backupEnabled; - } - - /** - * Set the backupEnabled property: Backup Enabled. - * - * @param backupEnabled the backupEnabled value to set. - * @return the VolumeBackupProperties object itself. - */ - public VolumeBackupProperties withBackupEnabled(Boolean backupEnabled) { - this.backupEnabled = backupEnabled; - 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 deleted file mode 100644 index 83d6d152f7e0a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackups.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Volume details using the backup policy. */ -@Fluent -public final class VolumeBackups { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeBackups.class); - - /* - * Volume name - */ - @JsonProperty(value = "volumeName") - private String volumeName; - - /* - * Total count of backups for volume - */ - @JsonProperty(value = "backupsCount") - private Integer backupsCount; - - /* - * Policy enabled - */ - @JsonProperty(value = "policyEnabled") - private Boolean policyEnabled; - - /** - * Get the volumeName property: Volume name. - * - * @return the volumeName value. - */ - public String volumeName() { - return this.volumeName; - } - - /** - * Set the volumeName property: Volume name. - * - * @param volumeName the volumeName value to set. - * @return the VolumeBackups object itself. - */ - public VolumeBackups withVolumeName(String volumeName) { - this.volumeName = volumeName; - return this; - } - - /** - * Get the backupsCount property: Total count of backups for volume. - * - * @return the backupsCount value. - */ - public Integer backupsCount() { - return this.backupsCount; - } - - /** - * Set the backupsCount property: Total count of backups for volume. - * - * @param backupsCount the backupsCount value to set. - * @return the VolumeBackups object itself. - */ - public VolumeBackups withBackupsCount(Integer backupsCount) { - this.backupsCount = backupsCount; - return this; - } - - /** - * Get the policyEnabled property: Policy enabled. - * - * @return the policyEnabled value. - */ - public Boolean policyEnabled() { - return this.policyEnabled; - } - - /** - * Set the policyEnabled property: Policy enabled. - * - * @param policyEnabled the policyEnabled value to set. - * @return the VolumeBackups object itself. - */ - public VolumeBackups withPolicyEnabled(Boolean policyEnabled) { - this.policyEnabled = policyEnabled; - 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/VolumeGroup.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroup.java deleted file mode 100644 index c43cfc348589c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroup.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.models; - -import com.azure.resourcemanager.netapp.fluent.models.VolumeGroupInner; -import java.util.Map; - -/** An immutable client-side representation of VolumeGroup. */ -public interface VolumeGroup { - /** - * Gets the location property: Resource location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the id property: Resource Id. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: Resource name. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: Resource type. - * - * @return the type value. - */ - String type(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - String provisioningState(); - - /** - * Gets the groupMetadata property: Volume group details. - * - * @return the groupMetadata value. - */ - VolumeGroupMetadata groupMetadata(); - - /** - * Gets the inner com.azure.resourcemanager.netapp.fluent.models.VolumeGroupInner object. - * - * @return the inner object. - */ - VolumeGroupInner innerModel(); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupDetails.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupDetails.java deleted file mode 100644 index a92734a821115..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupDetails.java +++ /dev/null @@ -1,199 +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.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.netapp.fluent.models.VolumeGroupDetailsInner; -import java.util.List; -import java.util.Map; - -/** An immutable client-side representation of VolumeGroupDetails. */ -public interface VolumeGroupDetails { - /** - * Gets the location property: Resource location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the id property: Resource Id. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: Resource name. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: Resource type. - * - * @return the type value. - */ - String type(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - String provisioningState(); - - /** - * Gets the groupMetadata property: Volume group details. - * - * @return the groupMetadata value. - */ - VolumeGroupMetadata groupMetadata(); - - /** - * Gets the volumes property: List of volumes from group. - * - * @return the volumes value. - */ - List volumes(); - - /** - * 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 inner com.azure.resourcemanager.netapp.fluent.models.VolumeGroupDetailsInner object. - * - * @return the inner object. - */ - VolumeGroupDetailsInner innerModel(); - - /** The entirety of the VolumeGroupDetails definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The VolumeGroupDetails definition stages. */ - interface DefinitionStages { - /** The first stage of the VolumeGroupDetails definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the VolumeGroupDetails definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, accountName. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @return the next definition stage. - */ - WithCreate withExistingNetAppAccount(String resourceGroupName, String accountName); - } - /** - * The stage of the VolumeGroupDetails 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.WithLocation, - DefinitionStages.WithTags, - DefinitionStages.WithGroupMetadata, - DefinitionStages.WithVolumes { - /** - * Executes the create request. - * - * @return the created resource. - */ - VolumeGroupDetails create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - VolumeGroupDetails create(Context context); - } - /** The stage of the VolumeGroupDetails definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location Resource location. - * @return the next definition stage. - */ - WithCreate withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location Resource location. - * @return the next definition stage. - */ - WithCreate withRegion(String location); - } - /** The stage of the VolumeGroupDetails definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the VolumeGroupDetails definition allowing to specify groupMetadata. */ - interface WithGroupMetadata { - /** - * Specifies the groupMetadata property: Volume group details. - * - * @param groupMetadata Volume group details. - * @return the next definition stage. - */ - WithCreate withGroupMetadata(VolumeGroupMetadata groupMetadata); - } - /** The stage of the VolumeGroupDetails definition allowing to specify volumes. */ - interface WithVolumes { - /** - * Specifies the volumes property: List of volumes from group. - * - * @param volumes List of volumes from group. - * @return the next definition stage. - */ - WithCreate withVolumes(List volumes); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - VolumeGroupDetails refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - VolumeGroupDetails refresh(Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupList.java deleted file mode 100644 index 5fdd44cc5183d..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupList.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.models.VolumeGroupInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of volume group resources. */ -@Fluent -public final class VolumeGroupList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeGroupList.class); - - /* - * List of volume Groups - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value property: List of volume Groups. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of volume Groups. - * - * @param value the value value to set. - * @return the VolumeGroupList object itself. - */ - public VolumeGroupList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupMetadata.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupMetadata.java deleted file mode 100644 index 404a22053d0fc..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupMetadata.java +++ /dev/null @@ -1,176 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Volume group properties. */ -@Fluent -public final class VolumeGroupMetadata { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeGroupMetadata.class); - - /* - * Group Description - */ - @JsonProperty(value = "groupDescription") - private String groupDescription; - - /* - * Application Type - */ - @JsonProperty(value = "applicationType") - private ApplicationType applicationType; - - /* - * Application specific identifier - */ - @JsonProperty(value = "applicationIdentifier") - private String applicationIdentifier; - - /* - * Global volume placement rules Application specific placement rules for - * the volume group - */ - @JsonProperty(value = "globalPlacementRules") - private List globalPlacementRules; - - /* - * Application specific identifier of deployment rules for the volume group - */ - @JsonProperty(value = "deploymentSpecId") - private String deploymentSpecId; - - /* - * Number of volumes in volume group - */ - @JsonProperty(value = "volumesCount", access = JsonProperty.Access.WRITE_ONLY) - private Long volumesCount; - - /** - * Get the groupDescription property: Group Description. - * - * @return the groupDescription value. - */ - public String groupDescription() { - return this.groupDescription; - } - - /** - * Set the groupDescription property: Group Description. - * - * @param groupDescription the groupDescription value to set. - * @return the VolumeGroupMetadata object itself. - */ - public VolumeGroupMetadata withGroupDescription(String groupDescription) { - this.groupDescription = groupDescription; - return this; - } - - /** - * Get the applicationType property: Application Type. - * - * @return the applicationType value. - */ - public ApplicationType applicationType() { - return this.applicationType; - } - - /** - * Set the applicationType property: Application Type. - * - * @param applicationType the applicationType value to set. - * @return the VolumeGroupMetadata object itself. - */ - public VolumeGroupMetadata withApplicationType(ApplicationType applicationType) { - this.applicationType = applicationType; - return this; - } - - /** - * Get the applicationIdentifier property: Application specific identifier. - * - * @return the applicationIdentifier value. - */ - public String applicationIdentifier() { - return this.applicationIdentifier; - } - - /** - * Set the applicationIdentifier property: Application specific identifier. - * - * @param applicationIdentifier the applicationIdentifier value to set. - * @return the VolumeGroupMetadata object itself. - */ - public VolumeGroupMetadata withApplicationIdentifier(String applicationIdentifier) { - this.applicationIdentifier = applicationIdentifier; - return this; - } - - /** - * Get the globalPlacementRules property: Global volume placement rules Application specific placement rules for the - * volume group. - * - * @return the globalPlacementRules value. - */ - public List globalPlacementRules() { - return this.globalPlacementRules; - } - - /** - * Set the globalPlacementRules property: Global volume placement rules Application specific placement rules for the - * volume group. - * - * @param globalPlacementRules the globalPlacementRules value to set. - * @return the VolumeGroupMetadata object itself. - */ - public VolumeGroupMetadata withGlobalPlacementRules(List globalPlacementRules) { - this.globalPlacementRules = globalPlacementRules; - return this; - } - - /** - * Get the deploymentSpecId property: Application specific identifier of deployment rules for the volume group. - * - * @return the deploymentSpecId value. - */ - public String deploymentSpecId() { - return this.deploymentSpecId; - } - - /** - * Set the deploymentSpecId property: Application specific identifier of deployment rules for the volume group. - * - * @param deploymentSpecId the deploymentSpecId value to set. - * @return the VolumeGroupMetadata object itself. - */ - public VolumeGroupMetadata withDeploymentSpecId(String deploymentSpecId) { - this.deploymentSpecId = deploymentSpecId; - return this; - } - - /** - * Get the volumesCount property: Number of volumes in volume group. - * - * @return the volumesCount value. - */ - public Long volumesCount() { - return this.volumesCount; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (globalPlacementRules() != null) { - globalPlacementRules().forEach(e -> e.validate()); - } - } -} 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 deleted file mode 100644 index cc5476fbbce98..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java +++ /dev/null @@ -1,946 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.models.MountTargetProperties; -import com.azure.resourcemanager.netapp.fluent.models.VolumeProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** Volume resource. */ -@Fluent -public final class VolumeGroupVolumeProperties extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeGroupVolumeProperties.class); - - /* - * Resource name - */ - @JsonProperty(value = "name") - private String name; - - /* - * Resource tags - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /* - * Volume properties - */ - @JsonProperty(value = "properties", required = true) - private VolumeProperties innerProperties = new VolumeProperties(); - - /** - * Get the name property: Resource name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Resource name. - * - * @param name the name value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withName(String name) { - this.name = name; - return this; - } - - /** - * 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 VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the innerProperties property: Volume properties. - * - * @return the innerProperties value. - */ - private VolumeProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the fileSystemId property: FileSystem ID Unique FileSystem Identifier. - * - * @return the fileSystemId value. - */ - public String fileSystemId() { - return this.innerProperties() == null ? null : this.innerProperties().fileSystemId(); - } - - /** - * Get the creationToken property: Creation Token or File Path A unique file path for the volume. Used when creating - * mount targets. - * - * @return the creationToken value. - */ - public String creationToken() { - return this.innerProperties() == null ? null : this.innerProperties().creationToken(); - } - - /** - * Set the creationToken property: Creation Token or File Path A unique file path for the volume. Used when creating - * mount targets. - * - * @param creationToken the creationToken value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withCreationToken(String creationToken) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withCreationToken(creationToken); - return this; - } - - /** - * Get the serviceLevel property: serviceLevel The service level of the file system. - * - * @return the serviceLevel value. - */ - public ServiceLevel serviceLevel() { - return this.innerProperties() == null ? null : this.innerProperties().serviceLevel(); - } - - /** - * Set the serviceLevel property: serviceLevel The service level of the file system. - * - * @param serviceLevel the serviceLevel value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withServiceLevel(ServiceLevel serviceLevel) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withServiceLevel(serviceLevel); - return this; - } - - /** - * Get the usageThreshold property: 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. Specified in bytes. - * - * @return the usageThreshold value. - */ - public long usageThreshold() { - return this.innerProperties() == null ? 0L : this.innerProperties().usageThreshold(); - } - - /** - * Set the usageThreshold property: 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. Specified in bytes. - * - * @param usageThreshold the usageThreshold value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withUsageThreshold(long usageThreshold) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withUsageThreshold(usageThreshold); - return this; - } - - /** - * Get the exportPolicy property: exportPolicy Set of export policy rules. - * - * @return the exportPolicy value. - */ - public VolumePropertiesExportPolicy exportPolicy() { - return this.innerProperties() == null ? null : this.innerProperties().exportPolicy(); - } - - /** - * Set the exportPolicy property: exportPolicy Set of export policy rules. - * - * @param exportPolicy the exportPolicy value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withExportPolicy(VolumePropertiesExportPolicy exportPolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withExportPolicy(exportPolicy); - return this; - } - - /** - * Get the protocolTypes property: protocolTypes Set of protocol types, default NFSv3, CIFS for SMB protocol. - * - * @return the protocolTypes value. - */ - public List protocolTypes() { - return this.innerProperties() == null ? null : this.innerProperties().protocolTypes(); - } - - /** - * Set the protocolTypes property: protocolTypes Set of protocol types, default NFSv3, CIFS for SMB protocol. - * - * @param protocolTypes the protocolTypes value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withProtocolTypes(List protocolTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withProtocolTypes(protocolTypes); - return this; - } - - /** - * Get the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the snapshotId property: Snapshot ID UUID v4 or resource identifier used to identify the Snapshot. - * - * @return the snapshotId value. - */ - public String snapshotId() { - return this.innerProperties() == null ? null : this.innerProperties().snapshotId(); - } - - /** - * Set the snapshotId property: Snapshot ID UUID v4 or resource identifier used to identify the Snapshot. - * - * @param snapshotId the snapshotId value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withSnapshotId(String snapshotId) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withSnapshotId(snapshotId); - return this; - } - - /** - * Get the backupId property: Backup ID UUID v4 or resource identifier used to identify the Backup. - * - * @return the backupId value. - */ - public String backupId() { - return this.innerProperties() == null ? null : this.innerProperties().backupId(); - } - - /** - * Set the backupId property: Backup ID UUID v4 or resource identifier used to identify the Backup. - * - * @param backupId the backupId value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withBackupId(String backupId) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withBackupId(backupId); - return this; - } - - /** - * Get the baremetalTenantId property: Baremetal Tenant ID Unique Baremetal Tenant Identifier. - * - * @return the baremetalTenantId value. - */ - public String baremetalTenantId() { - return this.innerProperties() == null ? null : this.innerProperties().baremetalTenantId(); - } - - /** - * Get the subnetId property: The Azure Resource URI for a delegated subnet. Must have the delegation - * Microsoft.NetApp/volumes. - * - * @return the subnetId value. - */ - public String subnetId() { - return this.innerProperties() == null ? null : this.innerProperties().subnetId(); - } - - /** - * Set the subnetId property: The Azure Resource URI for a delegated subnet. Must have the delegation - * Microsoft.NetApp/volumes. - * - * @param subnetId the subnetId value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withSubnetId(String subnetId) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withSubnetId(subnetId); - return this; - } - - /** - * Get the networkFeatures property: Network features Basic network, or Standard features available to the volume. - * - * @return the networkFeatures value. - */ - public NetworkFeatures networkFeatures() { - return this.innerProperties() == null ? null : this.innerProperties().networkFeatures(); - } - - /** - * Set the networkFeatures property: Network features Basic network, or Standard features available to the volume. - * - * @param networkFeatures the networkFeatures value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withNetworkFeatures(NetworkFeatures networkFeatures) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withNetworkFeatures(networkFeatures); - return this; - } - - /** - * Get the networkSiblingSetId property: Network Sibling Set ID Network Sibling Set ID for the the group of volumes - * sharing networking resources. - * - * @return the networkSiblingSetId value. - */ - public String networkSiblingSetId() { - return this.innerProperties() == null ? null : this.innerProperties().networkSiblingSetId(); - } - - /** - * Get the storageToNetworkProximity property: Storage to Network Proximity Provides storage to network proximity - * information for the volume. - * - * @return the storageToNetworkProximity value. - */ - public VolumeStorageToNetworkProximity storageToNetworkProximity() { - return this.innerProperties() == null ? null : this.innerProperties().storageToNetworkProximity(); - } - - /** - * Get the mountTargets property: mountTargets List of mount targets. - * - * @return the mountTargets value. - */ - public List mountTargets() { - return this.innerProperties() == null ? null : this.innerProperties().mountTargets(); - } - - /** - * Get the volumeType property: What type of volume is this. For destination volumes in Cross Region Replication, - * set type to DataProtection. - * - * @return the volumeType value. - */ - public String volumeType() { - return this.innerProperties() == null ? null : this.innerProperties().volumeType(); - } - - /** - * Set the volumeType property: What type of volume is this. For destination volumes in Cross Region Replication, - * set type to DataProtection. - * - * @param volumeType the volumeType value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withVolumeType(String volumeType) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withVolumeType(volumeType); - return this; - } - - /** - * Get the dataProtection property: DataProtection DataProtection type volumes include an object containing details - * of the replication. - * - * @return the dataProtection value. - */ - public VolumePropertiesDataProtection dataProtection() { - return this.innerProperties() == null ? null : this.innerProperties().dataProtection(); - } - - /** - * Set the dataProtection property: DataProtection DataProtection type volumes include an object containing details - * of the replication. - * - * @param dataProtection the dataProtection value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withDataProtection(VolumePropertiesDataProtection dataProtection) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withDataProtection(dataProtection); - return this; - } - - /** - * Get the isRestoring property: Restoring. - * - * @return the isRestoring value. - */ - public Boolean isRestoring() { - return this.innerProperties() == null ? null : this.innerProperties().isRestoring(); - } - - /** - * Set the isRestoring property: Restoring. - * - * @param isRestoring the isRestoring value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withIsRestoring(Boolean isRestoring) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withIsRestoring(isRestoring); - return this; - } - - /** - * Get the snapshotDirectoryVisible property: If enabled (true) the volume will contain a read-only snapshot - * directory which provides access to each of the volume's snapshots (default to true). - * - * @return the snapshotDirectoryVisible value. - */ - public Boolean snapshotDirectoryVisible() { - return this.innerProperties() == null ? null : this.innerProperties().snapshotDirectoryVisible(); - } - - /** - * Set the snapshotDirectoryVisible property: If enabled (true) the volume will contain a read-only snapshot - * directory which provides access to each of the volume's snapshots (default to true). - * - * @param snapshotDirectoryVisible the snapshotDirectoryVisible value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withSnapshotDirectoryVisible(Boolean snapshotDirectoryVisible) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withSnapshotDirectoryVisible(snapshotDirectoryVisible); - return this; - } - - /** - * Get the kerberosEnabled property: Describe if a volume is KerberosEnabled. To be use with swagger version - * 2020-05-01 or later. - * - * @return the kerberosEnabled value. - */ - public Boolean kerberosEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().kerberosEnabled(); - } - - /** - * Set the kerberosEnabled property: Describe if a volume is KerberosEnabled. To be use with swagger version - * 2020-05-01 or later. - * - * @param kerberosEnabled the kerberosEnabled value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withKerberosEnabled(Boolean kerberosEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withKerberosEnabled(kerberosEnabled); - return this; - } - - /** - * Get the securityStyle property: The security style of volume, default unix, defaults to ntfs for dual protocol or - * CIFS protocol. - * - * @return the securityStyle value. - */ - public SecurityStyle securityStyle() { - return this.innerProperties() == null ? null : this.innerProperties().securityStyle(); - } - - /** - * 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. - */ - public VolumeGroupVolumeProperties withSecurityStyle(SecurityStyle securityStyle) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withSecurityStyle(securityStyle); - return this; - } - - /** - * Get the smbEncryption property: Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol - * volume. To be used with swagger version 2020-08-01 or later. - * - * @return the smbEncryption value. - */ - public Boolean smbEncryption() { - return this.innerProperties() == null ? null : this.innerProperties().smbEncryption(); - } - - /** - * Set the smbEncryption property: Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol - * volume. To be used with swagger version 2020-08-01 or later. - * - * @param smbEncryption the smbEncryption value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withSmbEncryption(Boolean smbEncryption) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withSmbEncryption(smbEncryption); - return this; - } - - /** - * Get the smbContinuouslyAvailable property: Enables continuously available share property for smb volume. Only - * applicable for SMB volume. - * - * @return the smbContinuouslyAvailable value. - */ - public Boolean smbContinuouslyAvailable() { - return this.innerProperties() == null ? null : this.innerProperties().smbContinuouslyAvailable(); - } - - /** - * Set the smbContinuouslyAvailable property: Enables continuously available share property for smb volume. Only - * applicable for SMB volume. - * - * @param smbContinuouslyAvailable the smbContinuouslyAvailable value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withSmbContinuouslyAvailable(Boolean smbContinuouslyAvailable) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withSmbContinuouslyAvailable(smbContinuouslyAvailable); - return this; - } - - /** - * Get the throughputMibps property: Maximum throughput in Mibps that can be achieved by this volume and this will - * be accepted as input only for manual qosType volume. - * - * @return the throughputMibps value. - */ - public Float throughputMibps() { - return this.innerProperties() == null ? null : this.innerProperties().throughputMibps(); - } - - /** - * Set the throughputMibps property: Maximum throughput in Mibps that can be achieved by this volume and this will - * be accepted as input only for manual qosType volume. - * - * @param throughputMibps the throughputMibps value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withThroughputMibps(Float throughputMibps) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withThroughputMibps(throughputMibps); - return this; - } - - /** - * Get the encryptionKeySource property: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. - * - * @return the encryptionKeySource value. - */ - public String encryptionKeySource() { - return this.innerProperties() == null ? null : this.innerProperties().encryptionKeySource(); - } - - /** - * Set the encryptionKeySource property: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. - * - * @param encryptionKeySource the encryptionKeySource value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withEncryptionKeySource(String encryptionKeySource) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withEncryptionKeySource(encryptionKeySource); - return this; - } - - /** - * Get the ldapEnabled property: Specifies whether LDAP is enabled or not for a given NFS volume. - * - * @return the ldapEnabled value. - */ - public Boolean ldapEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().ldapEnabled(); - } - - /** - * Set the ldapEnabled property: Specifies whether LDAP is enabled or not for a given NFS volume. - * - * @param ldapEnabled the ldapEnabled value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withLdapEnabled(Boolean ldapEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withLdapEnabled(ldapEnabled); - return this; - } - - /** - * Get the coolAccess property: Specifies whether Cool Access(tiering) is enabled for the volume. - * - * @return the coolAccess value. - */ - public Boolean coolAccess() { - return this.innerProperties() == null ? null : this.innerProperties().coolAccess(); - } - - /** - * Set the coolAccess property: Specifies whether Cool Access(tiering) is enabled for the volume. - * - * @param coolAccess the coolAccess value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withCoolAccess(Boolean coolAccess) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withCoolAccess(coolAccess); - return this; - } - - /** - * Get the coolnessPeriod property: Specifies the number of days after which data that is not accessed by clients - * will be tiered. - * - * @return the coolnessPeriod value. - */ - public Integer coolnessPeriod() { - return this.innerProperties() == null ? null : this.innerProperties().coolnessPeriod(); - } - - /** - * Set the coolnessPeriod property: Specifies the number of days after which data that is not accessed by clients - * will be tiered. - * - * @param coolnessPeriod the coolnessPeriod value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withCoolnessPeriod(Integer coolnessPeriod) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withCoolnessPeriod(coolnessPeriod); - return this; - } - - /** - * Get the unixPermissions property: 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. - * - * @return the unixPermissions value. - */ - public String unixPermissions() { - return this.innerProperties() == null ? null : this.innerProperties().unixPermissions(); - } - - /** - * Set the unixPermissions property: 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. - * - * @param unixPermissions the unixPermissions value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withUnixPermissions(String unixPermissions) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withUnixPermissions(unixPermissions); - return this; - } - - /** - * Get the cloneProgress property: 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. - * - * @return the cloneProgress value. - */ - public Integer cloneProgress() { - return this.innerProperties() == null ? null : this.innerProperties().cloneProgress(); - } - - /** - * Get the avsDataStore property: avsDataStore Specifies whether the volume is enabled for Azure VMware Solution - * (AVS) datastore purpose. - * - * @return the avsDataStore value. - */ - public AvsDataStore avsDataStore() { - return this.innerProperties() == null ? null : this.innerProperties().avsDataStore(); - } - - /** - * Set the avsDataStore property: avsDataStore Specifies whether the volume is enabled for Azure VMware Solution - * (AVS) datastore purpose. - * - * @param avsDataStore the avsDataStore value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withAvsDataStore(AvsDataStore avsDataStore) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withAvsDataStore(avsDataStore); - return this; - } - - /** - * Get the isDefaultQuotaEnabled property: Specifies if default quota is enabled for the volume. - * - * @return the isDefaultQuotaEnabled value. - */ - public Boolean isDefaultQuotaEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().isDefaultQuotaEnabled(); - } - - /** - * Set the isDefaultQuotaEnabled property: Specifies if default quota is enabled for the volume. - * - * @param isDefaultQuotaEnabled the isDefaultQuotaEnabled value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withIsDefaultQuotaEnabled(Boolean isDefaultQuotaEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withIsDefaultQuotaEnabled(isDefaultQuotaEnabled); - return this; - } - - /** - * Get the defaultUserQuotaInKiBs property: Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, - * the minimum value of 4 KiBs applies . - * - * @return the defaultUserQuotaInKiBs value. - */ - public Long defaultUserQuotaInKiBs() { - return this.innerProperties() == null ? null : this.innerProperties().defaultUserQuotaInKiBs(); - } - - /** - * Set the defaultUserQuotaInKiBs property: Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, - * the minimum value of 4 KiBs applies . - * - * @param defaultUserQuotaInKiBs the defaultUserQuotaInKiBs value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withDefaultUserQuotaInKiBs(Long defaultUserQuotaInKiBs) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withDefaultUserQuotaInKiBs(defaultUserQuotaInKiBs); - return this; - } - - /** - * Get the defaultGroupQuotaInKiBs property: Default group quota for volume in KiBs. If isDefaultQuotaEnabled is - * set, the minimum value of 4 KiBs applies. - * - * @return the defaultGroupQuotaInKiBs value. - */ - public Long defaultGroupQuotaInKiBs() { - return this.innerProperties() == null ? null : this.innerProperties().defaultGroupQuotaInKiBs(); - } - - /** - * Set the defaultGroupQuotaInKiBs property: Default group quota for volume in KiBs. If isDefaultQuotaEnabled is - * set, the minimum value of 4 KiBs applies. - * - * @param defaultGroupQuotaInKiBs the defaultGroupQuotaInKiBs value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withDefaultGroupQuotaInKiBs(Long defaultGroupQuotaInKiBs) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withDefaultGroupQuotaInKiBs(defaultGroupQuotaInKiBs); - return this; - } - - /** - * Get the volumeGroupName property: Volume Group Name. - * - * @return the volumeGroupName value. - */ - public String volumeGroupName() { - return this.innerProperties() == null ? null : this.innerProperties().volumeGroupName(); - } - - /** - * Get the capacityPoolResourceId property: Pool Resource Id used in case of creating a volume through volume group. - * - * @return the capacityPoolResourceId value. - */ - public String capacityPoolResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().capacityPoolResourceId(); - } - - /** - * 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. - */ - public VolumeGroupVolumeProperties withCapacityPoolResourceId(String capacityPoolResourceId) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withCapacityPoolResourceId(capacityPoolResourceId); - return this; - } - - /** - * Get the proximityPlacementGroup property: Proximity placement group associated with the volume. - * - * @return the proximityPlacementGroup value. - */ - public String proximityPlacementGroup() { - return this.innerProperties() == null ? null : this.innerProperties().proximityPlacementGroup(); - } - - /** - * Set the proximityPlacementGroup property: Proximity placement group associated with the volume. - * - * @param proximityPlacementGroup the proximityPlacementGroup value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withProximityPlacementGroup(String proximityPlacementGroup) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withProximityPlacementGroup(proximityPlacementGroup); - return this; - } - - /** - * Get the t2Network property: T2 network information. - * - * @return the t2Network value. - */ - public String t2Network() { - return this.innerProperties() == null ? null : this.innerProperties().t2Network(); - } - - /** - * Get the volumeSpecName property: Volume spec name is the application specific designation or identifier for the - * particular volume in a volume group for e.g. data, log. - * - * @return the volumeSpecName value. - */ - public String volumeSpecName() { - return this.innerProperties() == null ? null : this.innerProperties().volumeSpecName(); - } - - /** - * Set the volumeSpecName property: Volume spec name is the application specific designation or identifier for the - * particular volume in a volume group for e.g. data, log. - * - * @param volumeSpecName the volumeSpecName value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withVolumeSpecName(String volumeSpecName) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withVolumeSpecName(volumeSpecName); - return this; - } - - /** - * Get the placementRules property: Volume placement rules Application specific placement rules for the particular - * volume. - * - * @return the placementRules value. - */ - public List placementRules() { - return this.innerProperties() == null ? null : this.innerProperties().placementRules(); - } - - /** - * Set the placementRules property: Volume placement rules Application specific placement rules for the particular - * volume. - * - * @param placementRules the placementRules value to set. - * @return the VolumeGroupVolumeProperties object itself. - */ - public VolumeGroupVolumeProperties withPlacementRules(List placementRules) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumeProperties(); - } - this.innerProperties().withPlacementRules(placementRules); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw logger - .logExceptionAsError( - 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/VolumeGroups.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroups.java deleted file mode 100644 index 45ed382bc61dc..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroups.java +++ /dev/null @@ -1,142 +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.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 VolumeGroups. */ -public interface VolumeGroups { - /** - * List all volume groups for given account. - * - * @param resourceGroupName The name of the resource group. - * @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 volume group resources. - */ - PagedIterable listByNetAppAccount(String resourceGroupName, String accountName); - - /** - * List all volume groups for given account. - * - * @param resourceGroupName The name of the resource group. - * @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 volume group resources. - */ - PagedIterable listByNetAppAccount(String resourceGroupName, String accountName, Context context); - - /** - * Get details of the specified volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified volume group. - */ - VolumeGroupDetails get(String resourceGroupName, String accountName, String volumeGroupName); - - /** - * Get details of the specified volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified volume group. - */ - Response getWithResponse( - String resourceGroupName, String accountName, String volumeGroupName, Context context); - - /** - * Delete the specified volume group only if there are no volumes under volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 volumeGroupName); - - /** - * Delete the specified volume group only if there are no volumes under volume group. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param volumeGroupName The name of the volumeGroup. - * @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 volumeGroupName, Context context); - - /** - * Get details of the specified volume group. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified volume group. - */ - VolumeGroupDetails getById(String id); - - /** - * Get details of the specified volume group. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specified volume group. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete the specified volume group only if there are no volumes under volume group. - * - * @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 the specified volume group only if there are no volumes under volume group. - * - * @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 VolumeGroupDetails resource. - * - * @param name resource name. - * @return the first stage of the new VolumeGroupDetails definition. - */ - VolumeGroupDetails.DefinitionStages.Blank define(String name); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeList.java deleted file mode 100644 index 46a96f5821ebd..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeList.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.models.VolumeInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of volume resources. */ -@Fluent -public final class VolumeList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeList.class); - - /* - * List of volumes - */ - @JsonProperty(value = "value") - private List value; - - /* - * URL to get the next set of results. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: List of volumes. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of volumes. - * - * @param value the value value to set. - * @return the VolumeList object itself. - */ - public VolumeList 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 VolumeList object itself. - */ - public VolumeList 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/VolumePatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java deleted file mode 100644 index 7890f939392a8..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java +++ /dev/null @@ -1,253 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.models.VolumePatchProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Volume patch resource. */ -@Fluent -public final class VolumePatch extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumePatch.class); - - /* - * Patchable volume properties - */ - @JsonProperty(value = "properties") - private VolumePatchProperties innerProperties; - - /** - * Get the innerProperties property: Patchable volume properties. - * - * @return the innerProperties value. - */ - private VolumePatchProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public VolumePatch withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public VolumePatch withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the serviceLevel property: serviceLevel The service level of the file system. - * - * @return the serviceLevel value. - */ - public ServiceLevel serviceLevel() { - return this.innerProperties() == null ? null : this.innerProperties().serviceLevel(); - } - - /** - * Set the serviceLevel property: serviceLevel The service level of the file system. - * - * @param serviceLevel the serviceLevel value to set. - * @return the VolumePatch object itself. - */ - public VolumePatch withServiceLevel(ServiceLevel serviceLevel) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumePatchProperties(); - } - this.innerProperties().withServiceLevel(serviceLevel); - return this; - } - - /** - * Get the usageThreshold property: 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. Specified in bytes. - * - * @return the usageThreshold value. - */ - public Long usageThreshold() { - return this.innerProperties() == null ? null : this.innerProperties().usageThreshold(); - } - - /** - * Set the usageThreshold property: 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. Specified in bytes. - * - * @param usageThreshold the usageThreshold value to set. - * @return the VolumePatch object itself. - */ - public VolumePatch withUsageThreshold(Long usageThreshold) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumePatchProperties(); - } - this.innerProperties().withUsageThreshold(usageThreshold); - return this; - } - - /** - * Get the exportPolicy property: exportPolicy Set of export policy rules. - * - * @return the exportPolicy value. - */ - public VolumePatchPropertiesExportPolicy exportPolicy() { - return this.innerProperties() == null ? null : this.innerProperties().exportPolicy(); - } - - /** - * Set the exportPolicy property: exportPolicy Set of export policy rules. - * - * @param exportPolicy the exportPolicy value to set. - * @return the VolumePatch object itself. - */ - public VolumePatch withExportPolicy(VolumePatchPropertiesExportPolicy exportPolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumePatchProperties(); - } - this.innerProperties().withExportPolicy(exportPolicy); - return this; - } - - /** - * Get the throughputMibps property: Maximum throughput in Mibps that can be achieved by this volume and this will - * be accepted as input only for manual qosType volume. - * - * @return the throughputMibps value. - */ - public Float throughputMibps() { - return this.innerProperties() == null ? null : this.innerProperties().throughputMibps(); - } - - /** - * Set the throughputMibps property: Maximum throughput in Mibps that can be achieved by this volume and this will - * be accepted as input only for manual qosType volume. - * - * @param throughputMibps the throughputMibps value to set. - * @return the VolumePatch object itself. - */ - public VolumePatch withThroughputMibps(Float throughputMibps) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumePatchProperties(); - } - this.innerProperties().withThroughputMibps(throughputMibps); - return this; - } - - /** - * Get the dataProtection property: DataProtection DataProtection type volumes include an object containing details - * of the replication. - * - * @return the dataProtection value. - */ - public VolumePatchPropertiesDataProtection dataProtection() { - return this.innerProperties() == null ? null : this.innerProperties().dataProtection(); - } - - /** - * Set the dataProtection property: DataProtection DataProtection type volumes include an object containing details - * of the replication. - * - * @param dataProtection the dataProtection value to set. - * @return the VolumePatch object itself. - */ - public VolumePatch withDataProtection(VolumePatchPropertiesDataProtection dataProtection) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumePatchProperties(); - } - this.innerProperties().withDataProtection(dataProtection); - return this; - } - - /** - * Get the isDefaultQuotaEnabled property: Specifies if default quota is enabled for the volume. - * - * @return the isDefaultQuotaEnabled value. - */ - public Boolean isDefaultQuotaEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().isDefaultQuotaEnabled(); - } - - /** - * Set the isDefaultQuotaEnabled property: Specifies if default quota is enabled for the volume. - * - * @param isDefaultQuotaEnabled the isDefaultQuotaEnabled value to set. - * @return the VolumePatch object itself. - */ - public VolumePatch withIsDefaultQuotaEnabled(Boolean isDefaultQuotaEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumePatchProperties(); - } - this.innerProperties().withIsDefaultQuotaEnabled(isDefaultQuotaEnabled); - return this; - } - - /** - * Get the defaultUserQuotaInKiBs property: Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, - * the minimum value of 4 KiBs applies . - * - * @return the defaultUserQuotaInKiBs value. - */ - public Long defaultUserQuotaInKiBs() { - return this.innerProperties() == null ? null : this.innerProperties().defaultUserQuotaInKiBs(); - } - - /** - * Set the defaultUserQuotaInKiBs property: Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, - * the minimum value of 4 KiBs applies . - * - * @param defaultUserQuotaInKiBs the defaultUserQuotaInKiBs value to set. - * @return the VolumePatch object itself. - */ - public VolumePatch withDefaultUserQuotaInKiBs(Long defaultUserQuotaInKiBs) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumePatchProperties(); - } - this.innerProperties().withDefaultUserQuotaInKiBs(defaultUserQuotaInKiBs); - return this; - } - - /** - * Get the defaultGroupQuotaInKiBs property: Default group quota for volume in KiBs. If isDefaultQuotaEnabled is - * set, the minimum value of 4 KiBs applies. - * - * @return the defaultGroupQuotaInKiBs value. - */ - public Long defaultGroupQuotaInKiBs() { - return this.innerProperties() == null ? null : this.innerProperties().defaultGroupQuotaInKiBs(); - } - - /** - * Set the defaultGroupQuotaInKiBs property: Default group quota for volume in KiBs. If isDefaultQuotaEnabled is - * set, the minimum value of 4 KiBs applies. - * - * @param defaultGroupQuotaInKiBs the defaultGroupQuotaInKiBs value to set. - * @return the VolumePatch object itself. - */ - public VolumePatch withDefaultGroupQuotaInKiBs(Long defaultGroupQuotaInKiBs) { - if (this.innerProperties() == null) { - this.innerProperties = new VolumePatchProperties(); - } - this.innerProperties().withDefaultGroupQuotaInKiBs(defaultGroupQuotaInKiBs); - 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/VolumePatchPropertiesDataProtection.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java deleted file mode 100644 index f56a6dbdd01cd..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java +++ /dev/null @@ -1,82 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** DataProtection DataProtection type volumes include an object containing details of the replication. */ -@Fluent -public final class VolumePatchPropertiesDataProtection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumePatchPropertiesDataProtection.class); - - /* - * Backup Properties - */ - @JsonProperty(value = "backup") - private VolumeBackupProperties backup; - - /* - * Snapshot properties. - */ - @JsonProperty(value = "snapshot") - private VolumeSnapshotProperties snapshot; - - /** - * 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. - * - * @return the snapshot value. - */ - public VolumeSnapshotProperties snapshot() { - return this.snapshot; - } - - /** - * Set the snapshot property: Snapshot properties. - * - * @param snapshot the snapshot value to set. - * @return the VolumePatchPropertiesDataProtection object itself. - */ - public VolumePatchPropertiesDataProtection withSnapshot(VolumeSnapshotProperties snapshot) { - this.snapshot = snapshot; - return this; - } - - /** - * Validates the instance. - * - * @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/VolumePatchPropertiesExportPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesExportPolicy.java deleted file mode 100644 index 92c1a0378f0f1..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesExportPolicy.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** exportPolicy Set of export policy rules. */ -@Fluent -public final class VolumePatchPropertiesExportPolicy { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumePatchPropertiesExportPolicy.class); - - /* - * Export policy rule - */ - @JsonProperty(value = "rules") - private List rules; - - /** - * Get the rules property: Export policy rule. - * - * @return the rules value. - */ - public List rules() { - return this.rules; - } - - /** - * Set the rules property: Export policy rule. - * - * @param rules the rules value to set. - * @return the VolumePatchPropertiesExportPolicy object itself. - */ - public VolumePatchPropertiesExportPolicy withRules(List rules) { - this.rules = rules; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (rules() != null) { - rules().forEach(e -> e.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 deleted file mode 100644 index 48eae8c7d1134..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java +++ /dev/null @@ -1,111 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** DataProtection DataProtection type volumes include an object containing details of the replication. */ -@Fluent -public final class VolumePropertiesDataProtection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumePropertiesDataProtection.class); - - /* - * Backup Properties - */ - @JsonProperty(value = "backup") - private VolumeBackupProperties backup; - - /* - * Replication properties - */ - @JsonProperty(value = "replication") - private ReplicationObject replication; - - /* - * Snapshot properties. - */ - @JsonProperty(value = "snapshot") - private VolumeSnapshotProperties snapshot; - - /** - * 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. - * - * @return the replication value. - */ - public ReplicationObject replication() { - return this.replication; - } - - /** - * Set the replication property: Replication properties. - * - * @param replication the replication value to set. - * @return the VolumePropertiesDataProtection object itself. - */ - public VolumePropertiesDataProtection withReplication(ReplicationObject replication) { - this.replication = replication; - return this; - } - - /** - * Get the snapshot property: Snapshot properties. - * - * @return the snapshot value. - */ - public VolumeSnapshotProperties snapshot() { - return this.snapshot; - } - - /** - * Set the snapshot property: Snapshot properties. - * - * @param snapshot the snapshot value to set. - * @return the VolumePropertiesDataProtection object itself. - */ - public VolumePropertiesDataProtection withSnapshot(VolumeSnapshotProperties snapshot) { - this.snapshot = snapshot; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (backup() != null) { - backup().validate(); - } - if (replication() != null) { - replication().validate(); - } - if (snapshot() != null) { - snapshot().validate(); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesExportPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesExportPolicy.java deleted file mode 100644 index d01226c7b59fe..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesExportPolicy.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** exportPolicy Set of export policy rules. */ -@Fluent -public final class VolumePropertiesExportPolicy { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumePropertiesExportPolicy.class); - - /* - * Export policy rule - */ - @JsonProperty(value = "rules") - private List rules; - - /** - * Get the rules property: Export policy rule. - * - * @return the rules value. - */ - public List rules() { - return this.rules; - } - - /** - * Set the rules property: Export policy rule. - * - * @param rules the rules value to set. - * @return the VolumePropertiesExportPolicy object itself. - */ - public VolumePropertiesExportPolicy withRules(List rules) { - this.rules = rules; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (rules() != null) { - rules().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeRevert.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeRevert.java deleted file mode 100644 index ae33a731af3f6..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeRevert.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** revert a volume to the snapshot. */ -@Fluent -public final class VolumeRevert { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeRevert.class); - - /* - * Resource id of the snapshot - */ - @JsonProperty(value = "snapshotId") - private String snapshotId; - - /** - * Get the snapshotId property: Resource id of the snapshot. - * - * @return the snapshotId value. - */ - public String snapshotId() { - return this.snapshotId; - } - - /** - * Set the snapshotId property: Resource id of the snapshot. - * - * @param snapshotId the snapshotId value to set. - * @return the VolumeRevert object itself. - */ - public VolumeRevert withSnapshotId(String snapshotId) { - this.snapshotId = snapshotId; - 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/VolumeSnapshotProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeSnapshotProperties.java deleted file mode 100644 index 65cb1f1a8fec0..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeSnapshotProperties.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Volume Snapshot Properties. */ -@Fluent -public final class VolumeSnapshotProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VolumeSnapshotProperties.class); - - /* - * Snapshot Policy ResourceId - */ - @JsonProperty(value = "snapshotPolicyId") - private String snapshotPolicyId; - - /** - * Get the snapshotPolicyId property: Snapshot Policy ResourceId. - * - * @return the snapshotPolicyId value. - */ - public String snapshotPolicyId() { - return this.snapshotPolicyId; - } - - /** - * Set the snapshotPolicyId property: Snapshot Policy ResourceId. - * - * @param snapshotPolicyId the snapshotPolicyId value to set. - * @return the VolumeSnapshotProperties object itself. - */ - public VolumeSnapshotProperties withSnapshotPolicyId(String snapshotPolicyId) { - this.snapshotPolicyId = snapshotPolicyId; - 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/VolumeStorageToNetworkProximity.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeStorageToNetworkProximity.java deleted file mode 100644 index 8972f77103aec..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeStorageToNetworkProximity.java +++ /dev/null @@ -1,37 +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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for VolumeStorageToNetworkProximity. */ -public final class VolumeStorageToNetworkProximity extends ExpandableStringEnum { - /** Static value Default for VolumeStorageToNetworkProximity. */ - public static final VolumeStorageToNetworkProximity DEFAULT = fromString("Default"); - - /** Static value T1 for VolumeStorageToNetworkProximity. */ - public static final VolumeStorageToNetworkProximity T1 = fromString("T1"); - - /** Static value T2 for VolumeStorageToNetworkProximity. */ - public static final VolumeStorageToNetworkProximity T2 = fromString("T2"); - - /** - * Creates or finds a VolumeStorageToNetworkProximity from its string representation. - * - * @param name a name to look for. - * @return the corresponding VolumeStorageToNetworkProximity. - */ - @JsonCreator - public static VolumeStorageToNetworkProximity fromString(String name) { - return fromString(name, VolumeStorageToNetworkProximity.class); - } - - /** @return known VolumeStorageToNetworkProximity values. */ - public static Collection values() { - return values(VolumeStorageToNetworkProximity.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java deleted file mode 100644 index 3840f878a51db..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java +++ /dev/null @@ -1,421 +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.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 Volumes. */ -public interface Volumes { - /** - * List all volumes within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of volume resources. - */ - PagedIterable list(String resourceGroupName, String accountName, String poolName); - - /** - * List all volumes within the capacity pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of volume resources. - */ - PagedIterable list(String resourceGroupName, String accountName, String poolName, Context context); - - /** - * Get the details of the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified volume. - */ - Volume get(String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Get the details of the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified volume. - */ - Response getWithResponse( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * Delete the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Delete the specified volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * Revert a volume to the snapshot specified in the body. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Object for snapshot to revert 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 revert(String resourceGroupName, String accountName, String poolName, String volumeName, VolumeRevert body); - - /** - * Revert a volume to the snapshot specified in the body. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Object for snapshot to revert 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 revert( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - VolumeRevert body, - Context context); - - /** - * Break the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 breakReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, BreakReplicationRequest body); - - /** - * Break the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 breakReplication(String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Break the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Optional body to force break the replication. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 breakReplication( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - BreakReplicationRequest body, - Context context); - - /** - * Get the status of the replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 replication. - */ - ReplicationStatus replicationStatus( - String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Get the status of the replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 replication. - */ - Response replicationStatusWithResponse( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void resyncReplication(String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Resync the connection on the destination volume. If the operation is ran on the source volume it will - * reverse-resync the connection and sync from destination to source. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 resyncReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * Delete the replication connection on the destination volume, and send release to the source replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 deleteReplication(String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Delete the replication connection on the destination volume, and send release to the source replication. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 deleteReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * Authorize the replication connection on the source volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 authorizeReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, AuthorizeRequest body); - - /** - * Authorize the replication connection on the source volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Authorize request object supplied in the body of the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 authorizeReplication( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - AuthorizeRequest body, - Context context); - - /** - * Re-Initializes the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 reInitializeReplication(String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Re-Initializes the replication connection on the destination volume. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @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 reInitializeReplication( - String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - - /** - * Moves volume to another pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 poolChange( - String resourceGroupName, String accountName, String poolName, String volumeName, PoolChangeRequest body); - - /** - * Moves volume to another pool. - * - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Move volume to the pool supplied in the body of the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 poolChange( - String resourceGroupName, - String accountName, - String poolName, - String volumeName, - PoolChangeRequest body, - Context context); - - /** - * Get the details of the specified volume. - * - * @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 details of the specified volume. - */ - Volume getById(String id); - - /** - * Get the details of the specified volume. - * - * @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 details of the specified volume. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete the specified volume. - * - * @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 the specified volume. - * - * @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 Volume resource. - * - * @param name resource name. - * @return the first stage of the new Volume definition. - */ - Volume.DefinitionStages.Blank define(String name); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/WeeklySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/WeeklySchedule.java deleted file mode 100644 index 95a94f47299e0..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/WeeklySchedule.java +++ /dev/null @@ -1,157 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Weekly Schedule properties, make a snapshot every week at a specific day or days. */ -@Fluent -public final class WeeklySchedule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WeeklySchedule.class); - - /* - * Weekly snapshot count to keep - */ - @JsonProperty(value = "snapshotsToKeep") - private Integer snapshotsToKeep; - - /* - * Indicates which weekdays snapshot should be taken, accepts a comma - * separated list of week day names in english - */ - @JsonProperty(value = "day") - private String day; - - /* - * Indicates which hour in UTC timezone a snapshot should be taken - */ - @JsonProperty(value = "hour") - private Integer hour; - - /* - * Indicates which minute snapshot should be taken - */ - @JsonProperty(value = "minute") - private Integer minute; - - /* - * Resource size in bytes, current storage usage for the volume in bytes - */ - @JsonProperty(value = "usedBytes") - private Long usedBytes; - - /** - * Get the snapshotsToKeep property: Weekly snapshot count to keep. - * - * @return the snapshotsToKeep value. - */ - public Integer snapshotsToKeep() { - return this.snapshotsToKeep; - } - - /** - * Set the snapshotsToKeep property: Weekly snapshot count to keep. - * - * @param snapshotsToKeep the snapshotsToKeep value to set. - * @return the WeeklySchedule object itself. - */ - public WeeklySchedule withSnapshotsToKeep(Integer snapshotsToKeep) { - this.snapshotsToKeep = snapshotsToKeep; - return this; - } - - /** - * Get the day property: Indicates which weekdays snapshot should be taken, accepts a comma separated list of week - * day names in english. - * - * @return the day value. - */ - public String day() { - return this.day; - } - - /** - * Set the day property: Indicates which weekdays snapshot should be taken, accepts a comma separated list of week - * day names in english. - * - * @param day the day value to set. - * @return the WeeklySchedule object itself. - */ - public WeeklySchedule withDay(String day) { - this.day = day; - return this; - } - - /** - * Get the hour property: Indicates which hour in UTC timezone a snapshot should be taken. - * - * @return the hour value. - */ - public Integer hour() { - return this.hour; - } - - /** - * Set the hour property: Indicates which hour in UTC timezone a snapshot should be taken. - * - * @param hour the hour value to set. - * @return the WeeklySchedule object itself. - */ - public WeeklySchedule withHour(Integer hour) { - this.hour = hour; - return this; - } - - /** - * Get the minute property: Indicates which minute snapshot should be taken. - * - * @return the minute value. - */ - public Integer minute() { - return this.minute; - } - - /** - * Set the minute property: Indicates which minute snapshot should be taken. - * - * @param minute the minute value to set. - * @return the WeeklySchedule object itself. - */ - public WeeklySchedule withMinute(Integer minute) { - this.minute = minute; - return this; - } - - /** - * Get the usedBytes property: Resource size in bytes, current storage usage for the volume in bytes. - * - * @return the usedBytes value. - */ - public Long usedBytes() { - return this.usedBytes; - } - - /** - * Set the usedBytes property: Resource size in bytes, current storage usage for the volume in bytes. - * - * @param usedBytes the usedBytes value to set. - * @return the WeeklySchedule object itself. - */ - public WeeklySchedule withUsedBytes(Long usedBytes) { - this.usedBytes = usedBytes; - 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/package-info.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/package-info.java deleted file mode 100644 index ce446560e928c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the data models for NetAppManagementClient. Microsoft NetApp Files Azure Resource Provider - * specification. - */ -package com.azure.resourcemanager.netapp.models; diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/package-info.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/package-info.java deleted file mode 100644 index a2a30daf37eec..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the classes for NetAppManagementClient. Microsoft NetApp Files Azure Resource Provider - * specification. - */ -package com.azure.resourcemanager.netapp; 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 deleted file mode 100644 index ea44febf1e8c3..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/module-info.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -module com.azure.resourcemanager.netapp { - requires transitive com.azure.core.management; - - exports com.azure.resourcemanager.netapp; - exports com.azure.resourcemanager.netapp.fluent; - exports com.azure.resourcemanager.netapp.fluent.models; - 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; -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsDeleteSamples.java deleted file mode 100644 index 944ff2105fda0..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsDeleteSamples.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.Context; - -/** Samples for AccountBackups Delete. */ -public final class AccountBackupsDeleteSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Backups_Account_Delete.json - */ - /** - * Sample code: AccountBackups_Delete. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void accountBackupsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.accountBackups().delete("resourceGroup", "accountName", "backupName", Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsGetSamples.java deleted file mode 100644 index 7e3090611d8cd..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsGetSamples.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.Context; - -/** Samples for AccountBackups Get. */ -public final class AccountBackupsGetSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Backups_Account_Get.json - */ - /** - * Sample code: AccountBackups_Get. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void accountBackupsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.accountBackups().getWithResponse("myRG", "account1", "backup1", Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsListSamples.java deleted file mode 100644 index 6bc11929f8a8d..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsListSamples.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.Context; - -/** Samples for AccountBackups List. */ -public final class AccountBackupsListSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Backups_Account_List.json - */ - /** - * Sample code: AccountBackups_List. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void accountBackupsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.accountBackups().list("myRG", "account1", 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 deleted file mode 100644 index 09b19b6894183..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsCreateOrUpdateSamples.java +++ /dev/null @@ -1,42 +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.resourcemanager.netapp.models.ActiveDirectory; -import java.util.Arrays; - -/** Samples for Accounts CreateOrUpdate. */ -public final class AccountsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Accounts_CreateOrUpdate.json - */ - /** - * Sample code: Accounts_CreateOrUpdate. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void accountsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager - .accounts() - .define("account1") - .withRegion("eastus") - .withExistingResourceGroup("myRG") - .withActiveDirectories( - Arrays - .asList( - new ActiveDirectory() - .withUsername("ad_user_name") - .withPassword("ad_password") - .withDomain("10.10.10.3") - .withDns("10.10.10.3, 10.10.10.4") - .withSmbServerName("SMBServer") - .withOrganizationalUnit("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 deleted file mode 100644 index 47cefae589129..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsDeleteSamples.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.Context; - -/** Samples for Accounts Delete. */ -public final class AccountsDeleteSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Accounts_Delete.json - */ - /** - * Sample code: Accounts_Delete. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void accountsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.accounts().delete("myRG", "account1", Context.NONE); - } -} 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 deleted file mode 100644 index 6035cf3405535..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetByResourceGroupSamples.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.Context; - -/** Samples for Accounts GetByResourceGroup. */ -public final class AccountsGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Accounts_Get.json - */ - /** - * Sample code: Accounts_Get. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void accountsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.accounts().getByResourceGroupWithResponse("myRG", "account1", 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 deleted file mode 100644 index 9fe85227dc203..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListByResourceGroupSamples.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.Context; - -/** Samples for Accounts ListByResourceGroup. */ -public final class AccountsListByResourceGroupSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Accounts_List.json - */ - /** - * Sample code: Accounts_List. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void accountsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.accounts().listByResourceGroup("myRG", Context.NONE); - } -} 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 deleted file mode 100644 index e302d8dea139d..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListSamples.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.Context; - -/** Samples for Accounts List. */ -public final class AccountsListSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Accounts_List.json - */ - /** - * Sample code: Accounts_List. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void accountsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.accounts().list(Context.NONE); - } -} 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 deleted file mode 100644 index 4cc5a3c860bb3..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsUpdateSamples.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.Context; -import com.azure.resourcemanager.netapp.models.NetAppAccount; -import java.util.HashMap; -import java.util.Map; - -/** Samples for Accounts Update. */ -public final class AccountsUpdateSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Accounts_Update.json - */ - /** - * Sample code: Accounts_Update. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void accountsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - NetAppAccount resource = - manager.accounts().getByResourceGroupWithResponse("myRG", "account1", Context.NONE).getValue(); - resource.update().withTags(mapOf("Tag1", "Value1")).apply(); - } - - @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/BackupPoliciesCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateSamples.java deleted file mode 100644 index 618c31bc0673b..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateSamples.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; - -/** Samples for BackupPolicies Create. */ -public final class BackupPoliciesCreateSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/BackupPolicies_Create.json - */ - /** - * Sample code: BackupPolicies_Create. - * - * @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(); - } -} 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 deleted file mode 100644 index b31f18109178c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteSamples.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.Context; - -/** Samples for BackupPolicies Delete. */ -public final class BackupPoliciesDeleteSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/BackupPolicies_Delete.json - */ - /** - * Sample code: Backups_Delete. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupPolicies().delete("resourceGroup", "accountName", "backupPolicyName", 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 deleted file mode 100644 index 47c5c80452c8a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetSamples.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.Context; - -/** Samples for BackupPolicies Get. */ -public final class BackupPoliciesGetSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/BackupPolicies_Get.json - */ - /** - * Sample code: Backups_Get. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupPolicies().getWithResponse("myRG", "account1", "backupPolicyName", 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 deleted file mode 100644 index e2bb1dfaa5607..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListSamples.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.Context; - -/** Samples for BackupPolicies List. */ -public final class BackupPoliciesListSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/BackupPolicies_List.json - */ - /** - * Sample code: Backups_List. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupPolicies().list("myRG", "account1", 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 deleted file mode 100644 index 754635aefd351..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesUpdateSamples.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.Context; -import com.azure.resourcemanager.netapp.models.BackupPolicy; - -/** Samples for BackupPolicies Update. */ -public final class BackupPoliciesUpdateSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/BackupPolicies_Update.json - */ - /** - * Sample code: BackupPolicies_Update. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupPoliciesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - BackupPolicy resource = - manager.backupPolicies().getWithResponse("myRG", "account1", "backupPolicyName", 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/BackupsCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsCreateSamples.java deleted file mode 100644 index 634614601c823..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsCreateSamples.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; - -/** Samples for Backups Create. */ -public final class BackupsCreateSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Backups_Create.json - */ - /** - * Sample code: Backups_Create. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager - .backups() - .define("backup1") - .withRegion("eastus") - .withExistingVolume("myRG", "account1", "pool1", "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 deleted file mode 100644 index 3fad16de56f0c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsDeleteSamples.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.Context; - -/** Samples for Backups Delete. */ -public final class BackupsDeleteSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Backups_Delete.json - */ - /** - * Sample code: Backups_Delete. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups().delete("resourceGroup", "accountName", "poolName", "volumeName", "backupName", 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 deleted file mode 100644 index 8ce84116857b8..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetSamples.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.Context; - -/** Samples for Backups Get. */ -public final class BackupsGetSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Backups_Get.json - */ - /** - * Sample code: Backups_Get. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups().getWithResponse("myRG", "account1", "pool1", "volume1", "backup1", Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetStatusSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetStatusSamples.java deleted file mode 100644 index a18ed0248b30c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetStatusSamples.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.Context; - -/** Samples for Backups GetStatus. */ -public final class BackupsGetStatusSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Volumes_BackupStatus.json - */ - /** - * Sample code: Volumes_BackupStatus. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void volumesBackupStatus(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups().getStatusWithResponse("myRG", "account1", "pool1", "volume1", 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/BackupsGetVolumeRestoreStatusSamples.java deleted file mode 100644 index d0ae52fc1b0c2..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeRestoreStatusSamples.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.Context; - -/** Samples for Backups GetVolumeRestoreStatus. */ -public final class BackupsGetVolumeRestoreStatusSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Volumes_RestoreStatus.json - */ - /** - * Sample code: Volumes_RestoreStatus. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void volumesRestoreStatus(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups().getVolumeRestoreStatusWithResponse("myRG", "account1", "pool1", "volume1", Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListSamples.java deleted file mode 100644 index a41620d83ae49..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListSamples.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.Context; - -/** Samples for Backups List. */ -public final class BackupsListSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Backups_List.json - */ - /** - * Sample code: Backups_List. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups().list("myRG", "account1", "pool1", "volume1", 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 deleted file mode 100644 index 23dfd409516a2..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUpdateSamples.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.Context; -import com.azure.resourcemanager.netapp.models.Backup; - -/** Samples for Backups Update. */ -public final class BackupsUpdateSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Backups_Update.json - */ - /** - * Sample code: Backups_Update. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - Backup resource = - manager - .backups() - .getWithResponse("myRG", "account1", "pool1", "volume1", "backup1", 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 deleted file mode 100644 index ce5d257391381..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckFilePathAvailabilitySamples.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.Context; -import com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest; - -/** Samples for NetAppResource CheckFilePathAvailability. */ -public final class NetAppResourceCheckFilePathAvailabilitySamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/CheckFilePathAvailability.json - */ - /** - * Sample code: CheckFilePathAvailability. - * - * @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"), - 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 deleted file mode 100644 index 575c5e2b3ffb5..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckNameAvailabilitySamples.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.Context; -import com.azure.resourcemanager.netapp.models.CheckNameResourceTypes; -import com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest; - -/** Samples for NetAppResource CheckNameAvailability. */ -public final class NetAppResourceCheckNameAvailabilitySamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/CheckNameAvailability.json - */ - /** - * Sample code: CheckNameAvailability. - * - * @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.fromString("netAppAccount")) - .withResourceGroup("myRG"), - 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 deleted file mode 100644 index c623f6d2d23f6..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckQuotaAvailabilitySamples.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.Context; -import com.azure.resourcemanager.netapp.models.CheckQuotaNameResourceTypes; -import com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest; - -/** Samples for NetAppResource CheckQuotaAvailability. */ -public final class NetAppResourceCheckQuotaAvailabilitySamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/CheckQuotaAvailability.json - */ - /** - * Sample code: CheckQuotaAvailability. - * - * @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"), - Context.NONE); - } -} 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 deleted file mode 100644 index d9dc6b1b90ed7..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetSamples.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.Context; - -/** Samples for NetAppResourceQuotaLimits Get. */ -public final class NetAppResourceQuotaLimitsGetSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/QuotaLimits_Get.json - */ - /** - * Sample code: QuotaLimits. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void quotaLimits(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager - .netAppResourceQuotaLimits() - .getWithResponse("eastus", "totalCoolAccessVolumesPerSubscription", 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 deleted file mode 100644 index 3d308f0b29598..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListSamples.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.Context; - -/** Samples for NetAppResourceQuotaLimits List. */ -public final class NetAppResourceQuotaLimitsListSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/QuotaLimits_List.json - */ - /** - * Sample code: QuotaLimits. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void quotaLimits(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResourceQuotaLimits().list("eastus", Context.NONE); - } -} 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 deleted file mode 100644 index 204c2ef20b2ab..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateSamples.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.resourcemanager.netapp.models.QosType; -import com.azure.resourcemanager.netapp.models.ServiceLevel; - -/** Samples for Pools CreateOrUpdate. */ -public final class PoolsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Pools_CreateOrUpdate.json - */ - /** - * Sample code: Pools_CreateOrUpdate. - * - * @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(); - } -} 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 deleted file mode 100644 index f3706dfd811d1..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsDeleteSamples.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.Context; - -/** Samples for Pools Delete. */ -public final class PoolsDeleteSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Pools_Delete.json - */ - /** - * Sample code: Pools_Delete. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void poolsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.pools().delete("myRG", "account1", "pool1", Context.NONE); - } -} 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 deleted file mode 100644 index 72a646ffdb8c5..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsGetSamples.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.Context; - -/** Samples for Pools Get. */ -public final class PoolsGetSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Pools_Get.json - */ - /** - * Sample code: Pools_Get. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void poolsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.pools().getWithResponse("myRG", "account1", "pool1", Context.NONE); - } -} 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 deleted file mode 100644 index c162871c5cfb0..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsListSamples.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.Context; - -/** Samples for Pools List. */ -public final class PoolsListSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Pools_List.json - */ - /** - * Sample code: Pools_List. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void poolsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.pools().list("myRG", "account1", Context.NONE); - } -} 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 deleted file mode 100644 index 9d456aa0c8d74..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsUpdateSamples.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.Context; -import com.azure.resourcemanager.netapp.models.CapacityPool; - -/** Samples for Pools Update. */ -public final class PoolsUpdateSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Pools_Update.json - */ - /** - * Sample code: Pools_Update. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void poolsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - CapacityPool resource = manager.pools().getWithResponse("myRG", "account1", "pool1", Context.NONE).getValue(); - resource.update().apply(); - } -} 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 deleted file mode 100644 index c5410d3536082..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateSamples.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.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; - -/** Samples for SnapshotPolicies Create. */ -public final class SnapshotPoliciesCreateSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/SnapshotPolicies_Create.json - */ - /** - * Sample code: SnapshotPolicies_Create. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void snapshotPoliciesCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - 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)) - .withWeeklySchedule( - new WeeklySchedule().withSnapshotsToKeep(3).withDay("Wednesday").withHour(14).withMinute(45)) - .withMonthlySchedule( - new MonthlySchedule().withSnapshotsToKeep(5).withDaysOfMonth("10,11,12").withHour(14).withMinute(15)) - .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 deleted file mode 100644 index 1b22f01a0a8ae..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteSamples.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.Context; - -/** Samples for SnapshotPolicies Delete. */ -public final class SnapshotPoliciesDeleteSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/SnapshotPolicies_Delete.json - */ - /** - * Sample code: SnapshotPolicies_Delete. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void snapshotPoliciesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshotPolicies().delete("resourceGroup", "accountName", "snapshotPolicyName", 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 deleted file mode 100644 index aa2433bdcb56f..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetSamples.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.Context; - -/** Samples for SnapshotPolicies Get. */ -public final class SnapshotPoliciesGetSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/SnapshotPolicies_Get.json - */ - /** - * Sample code: SnapshotPolicies_Get. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void snapshotPoliciesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshotPolicies().getWithResponse("myRG", "account1", "snapshotPolicyName", 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 deleted file mode 100644 index eb2c680033ecf..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListSamples.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.Context; - -/** Samples for SnapshotPolicies List. */ -public final class SnapshotPoliciesListSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/SnapshotPolicies_List.json - */ - /** - * Sample code: SnapshotPolicies_List. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void snapshotPoliciesList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshotPolicies().list("myRG", "account1", Context.NONE); - } -} 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 deleted file mode 100644 index 47f13995393db..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListVolumesSamples.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.Context; - -/** Samples for SnapshotPolicies ListVolumes. */ -public final class SnapshotPoliciesListVolumesSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/SnapshotPolicies_ListVolumes.json - */ - /** - * Sample code: SnapshotPolicies_ListVolumes. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void snapshotPoliciesListVolumes(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshotPolicies().listVolumesWithResponse("myRG", "account1", "snapshotPolicyName", 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 deleted file mode 100644 index 422ad5855408f..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesUpdateSamples.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.Context; -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; - -/** Samples for SnapshotPolicies Update. */ -public final class SnapshotPoliciesUpdateSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/SnapshotPolicies_Update.json - */ - /** - * Sample code: SnapshotPolicies_Update. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void snapshotPoliciesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - SnapshotPolicy resource = - manager - .snapshotPolicies() - .getWithResponse("myRG", "account1", "snapshotPolicyName", 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(); - } -} 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 deleted file mode 100644 index b890e011fef63..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsCreateSamples.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; - -/** Samples for Snapshots Create. */ -public final class SnapshotsCreateSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Snapshots_Create.json - */ - /** - * Sample code: Snapshots_Create. - * - * @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(); - } -} 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 deleted file mode 100644 index 3b9ca6e0fe31c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteSamples.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.Context; - -/** Samples for Snapshots Delete. */ -public final class SnapshotsDeleteSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Snapshots_Delete.json - */ - /** - * Sample code: Snapshots_Delete. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void snapshotsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshots().delete("myRG", "account1", "pool1", "volume1", "snapshot1", 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 deleted file mode 100644 index b35c6477bda3f..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetSamples.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.Context; - -/** Samples for Snapshots Get. */ -public final class SnapshotsGetSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Snapshots_Get.json - */ - /** - * Sample code: Snapshots_Get. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void snapshotsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshots().getWithResponse("myRG", "account1", "pool1", "volume1", "snapshot1", 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 deleted file mode 100644 index 43ab047dd8731..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsListSamples.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.Context; - -/** Samples for Snapshots List. */ -public final class SnapshotsListSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Snapshots_List.json - */ - /** - * Sample code: Snapshots_List. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void snapshotsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshots().list("myRG", "account1", "pool1", "volume1", 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 deleted file mode 100644 index 96ebf1ebefa61..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateSamples.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.management.serializer.SerializerFactory; -import com.azure.core.util.Context; -import com.azure.core.util.serializer.SerializerEncoding; -import java.io.IOException; - -/** Samples for Snapshots Update. */ -public final class SnapshotsUpdateSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Snapshots_Update.json - */ - /** - * Sample code: Snapshots_Update. - * - * @param manager Entry point to NetAppFilesManager. - */ - 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), - Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VaultsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VaultsListSamples.java deleted file mode 100644 index 75dbef25bdcc2..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VaultsListSamples.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.Context; - -/** Samples for Vaults List. */ -public final class VaultsListSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Vaults_List.json - */ - /** - * Sample code: Vaults_List. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void vaultsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.vaults().list("myRG", "account1", Context.NONE); - } -} 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 deleted file mode 100644 index 996f7b0c445db..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsCreateSamples.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.resourcemanager.netapp.models.ApplicationType; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import com.azure.resourcemanager.netapp.models.VolumeGroupMetadata; -import com.azure.resourcemanager.netapp.models.VolumeGroupVolumeProperties; -import java.util.Arrays; - -/** Samples for VolumeGroups Create. */ -public final class VolumeGroupsCreateSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/VolumeGroups_Create.json - */ - /** - * Sample code: VolumeGroups_Create. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void volumeGroupsCreate(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("DEV") - .withDeploymentSpecId("fb04dbeb-005d-2703-197e-6208dfadb5d9")) - .withVolumes( - Arrays - .asList( - new VolumeGroupVolumeProperties() - .withName("testVol1") - .withCreationToken("testVol1") - .withServiceLevel(ServiceLevel.PREMIUM) - .withUsageThreshold(107374182400L) - .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("testVol2") - .withCreationToken("testVol2") - .withServiceLevel(ServiceLevel.PREMIUM) - .withUsageThreshold(107374182400L) - .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("log"), - new VolumeGroupVolumeProperties() - .withName("testVol3") - .withCreationToken("testVol3") - .withServiceLevel(ServiceLevel.PREMIUM) - .withUsageThreshold(107374182400L) - .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("shared"))) - .create(); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteSamples.java deleted file mode 100644 index a6f31e620cfbc..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteSamples.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.Context; - -/** Samples for VolumeGroups Delete. */ -public final class VolumeGroupsDeleteSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/VolumeGroups_Delete.json - */ - /** - * Sample code: VolumeGroups_Delete. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void volumeGroupsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumeGroups().delete("myRG", "account1", "group1", Context.NONE); - } -} 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 deleted file mode 100644 index 2ceab0fcdd3aa..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsGetSamples.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.Context; - -/** Samples for VolumeGroups Get. */ -public final class VolumeGroupsGetSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/VolumeGroups_Get.json - */ - /** - * Sample code: VolumeGroups_Get. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void volumeGroupsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumeGroups().getWithResponse("myRG", "account1", "group1", Context.NONE); - } -} 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 deleted file mode 100644 index 202592b47e1b1..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsListByNetAppAccountSamples.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.Context; - -/** Samples for VolumeGroups ListByNetAppAccount. */ -public final class VolumeGroupsListByNetAppAccountSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/VolumeGroups_List.json - */ - /** - * Sample code: VolumeGroups_List. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void volumeGroupsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumeGroups().listByNetAppAccount("myRG", "account1", Context.NONE); - } -} 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 deleted file mode 100644 index 39a4597c3ea04..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationSamples.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.Context; -import com.azure.resourcemanager.netapp.models.AuthorizeRequest; - -/** Samples for Volumes AuthorizeReplication. */ -public final class VolumesAuthorizeReplicationSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Volumes_AuthorizeReplication.json - */ - /** - * Sample code: Volumes_AuthorizeReplication. - * - * @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"), - 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 deleted file mode 100644 index da966e3fd7d29..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationSamples.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.Context; -import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; - -/** Samples for Volumes BreakReplication. */ -public final class VolumesBreakReplicationSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Volumes_BreakReplication.json - */ - /** - * Sample code: Volumes_BreakReplication. - * - * @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), - 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 deleted file mode 100644 index 339a3bc433de0..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOrUpdateSamples.java +++ /dev/null @@ -1,34 +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.resourcemanager.netapp.models.ServiceLevel; - -/** Samples for Volumes CreateOrUpdate. */ -public final class VolumesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Volumes_CreateOrUpdate.json - */ - /** - * Sample code: Volumes_CreateOrUpdate. - * - * @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) - .withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") - .withServiceLevel(ServiceLevel.PREMIUM) - .withThroughputMibps(128.0f) - .withEncryptionKeySource("Microsoft.KeyVault") - .create(); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationSamples.java deleted file mode 100644 index 1fbb2a2f5a412..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationSamples.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.Context; - -/** Samples for Volumes DeleteReplication. */ -public final class VolumesDeleteReplicationSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Volumes_DeleteReplication.json - */ - /** - * Sample code: Volumes_DeleteReplication. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void volumesDeleteReplication(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().deleteReplication("myRG", "account1", "pool1", "volume1", Context.NONE); - } -} 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 deleted file mode 100644 index de0cf4a8a287e..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteSamples.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.Context; - -/** Samples for Volumes Delete. */ -public final class VolumesDeleteSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Volumes_Delete.json - */ - /** - * Sample code: Volumes_Delete. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void volumesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().delete("myRG", "account1", "pool1", "volume1", Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesGetSamples.java deleted file mode 100644 index ae636a8a3fd2b..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesGetSamples.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.Context; - -/** Samples for Volumes Get. */ -public final class VolumesGetSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Volumes_Get.json - */ - /** - * Sample code: Volumes_Get. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void volumesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().getWithResponse("myRG", "account1", "pool1", "volume1", Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListSamples.java deleted file mode 100644 index 02c50346250e7..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListSamples.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.Context; - -/** Samples for Volumes List. */ -public final class VolumesListSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Volumes_List.json - */ - /** - * Sample code: Volumes_List. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void volumesList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().list("myRG", "account1", "pool1", 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 deleted file mode 100644 index 0b32f746ebffc..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeSamples.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.Context; -import com.azure.resourcemanager.netapp.models.PoolChangeRequest; - -/** Samples for Volumes PoolChange. */ -public final class VolumesPoolChangeSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Volumes_PoolChange.json - */ - /** - * Sample code: Volumes_AuthorizeReplication. - * - * @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( - "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), - 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 deleted file mode 100644 index 865457c84866b..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationSamples.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.Context; - -/** Samples for Volumes ReInitializeReplication. */ -public final class VolumesReInitializeReplicationSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Volumes_ReInitializeReplication.json - */ - /** - * Sample code: Volumes_ReInitializeReplication. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void volumesReInitializeReplication(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().reInitializeReplication("myRG", "account1", "pool1", "volume1", Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusSamples.java deleted file mode 100644 index a9afd62321630..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusSamples.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.Context; - -/** Samples for Volumes ReplicationStatus. */ -public final class VolumesReplicationStatusSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Volumes_ReplicationStatus.json - */ - /** - * Sample code: Volumes_ReplicationStatus. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void volumesReplicationStatus(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().replicationStatusWithResponse("myRG", "account1", "pool1", "volume1", Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationSamples.java deleted file mode 100644 index 8a2e3df58ae96..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationSamples.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.Context; - -/** Samples for Volumes ResyncReplication. */ -public final class VolumesResyncReplicationSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Volumes_ResyncReplication.json - */ - /** - * Sample code: Volumes_ResyncReplication. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void volumesResyncReplication(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().resyncReplication("myRG", "account1", "pool1", "volume1", Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertSamples.java deleted file mode 100644 index 3adcbda342813..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertSamples.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.Context; -import com.azure.resourcemanager.netapp.models.VolumeRevert; - -/** Samples for Volumes Revert. */ -public final class VolumesRevertSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Volumes_Revert.json - */ - /** - * Sample code: Volumes_Revert. - * - * @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"), - 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 deleted file mode 100644 index 68a9f29cbb1e8..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesUpdateSamples.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.Context; -import com.azure.resourcemanager.netapp.models.Volume; - -/** Samples for Volumes Update. */ -public final class VolumesUpdateSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-08-01/examples/Volumes_Update.json - */ - /** - * Sample code: Volumes_Update. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void volumesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - Volume resource = - manager.volumes().getWithResponse("myRG", "account1", "pool1", "volume1", Context.NONE).getValue(); - resource.update().apply(); - } -}