From 9ba6bc92ba3454ddc8370d8b7231ccdbe18d6932 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 26 Apr 2022 06:25:14 +0000 Subject: [PATCH] CodeGen from PR 18624 in Azure/azure-rest-api-specs Dev dataprotection microsoft.data protection 2022 03 31 preview (#18624) * Adds base for updating Microsoft.DataProtection from version preview/2022-02-01-preview to version 2022-03-31-preview * Updates readme * Updates API version in new specs and examples * Changes from 2022-03-01 * Adding extension routing API * Prettier fix * Undo unintentional changes * Revert "Prettier fix" This reverts commit 3ac4c11592e7bba2297d14d0183ced1c444c2103. * Adding autoheal settings * Adding x-ms-parameter-location * Fixing example resourceId and extension resource path Co-authored-by: chandrasekarendran <59728024+chandrasekarendran@users.noreply.github.com> --- .../CHANGELOG.md | 4 +- .../README.md | 4 +- .../SAMPLE.md | 454 ++- .../pom.xml | 2 +- .../dataprotection/DataProtectionManager.java | 84 +- .../fluent/BackupInstancesClient.java | 488 +++- ...ackupInstancesExtensionRoutingsClient.java | 43 + .../fluent/BackupPoliciesClient.java | 42 +- .../BackupVaultOperationResultsClient.java | 8 +- .../fluent/BackupVaultsClient.java | 54 +- .../fluent/DataProtectionClient.java | 21 + .../DataProtectionOperationsClient.java | 4 +- .../fluent/DataProtectionsClient.java | 2 +- .../fluent/ExportJobsClient.java | 4 +- .../ExportJobsOperationResultsClient.java | 2 +- .../dataprotection/fluent/JobsClient.java | 6 +- ...rationStatusBackupVaultContextsClient.java | 46 + .../fluent/OperationStatusClient.java | 2 +- ...tionStatusResourceGroupContextsClient.java | 45 + .../fluent/RecoveryPointsClient.java | 22 +- .../fluent/ResourceGuardsClient.java | 52 +- .../fluent/RestorableTimeRangesClient.java | 10 +- ...orableTimeRangesResponseResourceInner.java | 6 - .../models/AzureBackupJobResourceInner.java | 4 - ...AzureBackupRecoveryPointResourceInner.java | 4 - .../models/BackupInstanceResourceInner.java | 4 - .../models/BackupVaultResourceInner.java | 7 +- .../models/BaseBackupPolicyResourceInner.java | 4 - .../CheckNameAvailabilityResultInner.java | 4 - ...ClientDiscoveryValueForSingleApiInner.java | 4 - .../fluent/models/DppBaseResourceInner.java | 4 - .../fluent/models/ExportJobsResultInner.java | 4 - .../FeatureValidationResponseBaseInner.java | 4 - .../models/OperationJobExtendedInfoInner.java | 4 - .../fluent/models/OperationResourceInner.java | 4 - .../models/ResourceGuardResourceInner.java | 4 - .../BackupInstanceResourceImpl.java | 79 +- .../BackupInstancesClientImpl.java | 2554 ++++++++++++++--- ...pInstancesExtensionRoutingsClientImpl.java | 293 ++ .../BackupInstancesExtensionRoutingsImpl.java | 46 + .../implementation/BackupInstancesImpl.java | 218 +- .../BackupPoliciesClientImpl.java | 315 +- .../implementation/BackupPoliciesImpl.java | 107 +- ...BackupVaultOperationResultsClientImpl.java | 75 +- .../BackupVaultOperationResultsImpl.java | 11 +- .../BackupVaultResourceImpl.java | 20 +- .../BackupVaultsClientImpl.java | 347 ++- .../implementation/BackupVaultsImpl.java | 19 +- .../BaseBackupPolicyResourceImpl.java | 22 +- .../DataProtectionClientBuilder.java | 34 +- .../DataProtectionClientImpl.java | 50 +- .../DataProtectionOperationsClientImpl.java | 19 +- .../DataProtectionOperationsImpl.java | 3 +- .../DataProtectionsClientImpl.java | 13 +- .../implementation/DataProtectionsImpl.java | 3 +- .../implementation/ExportJobsClientImpl.java | 22 +- .../implementation/ExportJobsImpl.java | 3 +- .../ExportJobsOperationResultsClientImpl.java | 13 +- .../ExportJobsOperationResultsImpl.java | 3 +- .../implementation/JobsClientImpl.java | 31 +- .../implementation/JobsImpl.java | 3 +- .../OperationResultsClientImpl.java | 9 +- .../implementation/OperationResultsImpl.java | 3 +- ...onStatusBackupVaultContextsClientImpl.java | 241 ++ ...perationStatusBackupVaultContextsImpl.java | 61 + .../OperationStatusClientImpl.java | 11 +- .../implementation/OperationStatusImpl.java | 3 +- ...StatusResourceGroupContextsClientImpl.java | 229 ++ ...rationStatusResourceGroupContextsImpl.java | 61 + .../RecoveryPointsClientImpl.java | 179 +- .../implementation/RecoveryPointsImpl.java | 19 +- .../ResourceGuardResourceImpl.java | 6 + .../ResourceGuardsClientImpl.java | 255 +- .../implementation/ResourceGuardsImpl.java | 19 +- .../RestorableTimeRangesClientImpl.java | 77 +- .../RestorableTimeRangesImpl.java | 11 +- .../models/AbsoluteDeleteOption.java | 4 - .../models/AdHocBackupRuleOptions.java | 9 +- .../models/AdhocBackupTriggerOption.java | 4 - .../models/AdhocBasedTaggingCriteria.java | 4 - .../models/AdhocBasedTriggerContext.java | 7 +- .../dataprotection/models/AlertsState.java | 34 + .../models/AuthCredentials.java | 4 - .../AzureBackupDiscreteRecoveryPoint.java | 7 +- ...BackupFindRestorableTimeRangesRequest.java | 7 +- ...ndRestorableTimeRangesRequestResource.java | 5 - ...ackupFindRestorableTimeRangesResponse.java | 4 - .../dataprotection/models/AzureBackupJob.java | 35 +- .../models/AzureBackupJobResourceList.java | 4 - .../models/AzureBackupParams.java | 7 +- .../models/AzureBackupRecoveryPoint.java | 4 - ...ackupRecoveryPointBasedRestoreRequest.java | 14 +- .../AzureBackupRecoveryPointResourceList.java | 4 - ...BackupRecoveryTimeBasedRestoreRequest.java | 14 +- .../models/AzureBackupRehydrationRequest.java | 9 +- .../models/AzureBackupRestoreRequest.java | 38 +- ...reBackupRestoreWithRehydrationRequest.java | 16 +- .../models/AzureBackupRule.java | 9 +- .../models/AzureMonitorAlertSettings.java | 46 + .../AzureOperationalStoreParameters.java | 4 - .../models/AzureRetentionRule.java | 7 +- .../dataprotection/models/BackupCriteria.java | 4 - .../dataprotection/models/BackupInstance.java | 40 +- .../models/BackupInstanceResource.java | 101 +- .../models/BackupInstanceResourceList.java | 4 - .../models/BackupInstances.java | 232 +- .../BackupInstancesAdhocBackupHeaders.java | 102 - .../BackupInstancesAdhocBackupResponse.java | 38 - .../models/BackupInstancesDeleteHeaders.java | 102 - .../models/BackupInstancesDeleteResponse.java | 26 - .../BackupInstancesExtensionRoutings.java | 36 + ...ackupInstancesTriggerRehydrateHeaders.java | 102 - ...ckupInstancesTriggerRehydrateResponse.java | 31 - .../BackupInstancesTriggerRestoreHeaders.java | 102 - ...BackupInstancesTriggerRestoreResponse.java | 38 - ...ckupInstancesValidateForBackupHeaders.java | 102 - ...kupInstancesValidateForBackupResponse.java | 38 - ...kupInstancesValidateForRestoreHeaders.java | 102 - ...upInstancesValidateForRestoreResponse.java | 38 - .../models/BackupParameters.java | 4 - .../dataprotection/models/BackupPolicies.java | 38 +- .../dataprotection/models/BackupPolicy.java | 7 +- .../dataprotection/models/BackupSchedule.java | 7 +- .../dataprotection/models/BackupVault.java | 36 +- .../models/BackupVaultOperationResults.java | 8 +- ...BackupVaultOperationResultsGetHeaders.java | 4 - .../models/BackupVaultResource.java | 12 +- .../models/BackupVaultResourceList.java | 4 - .../dataprotection/models/BackupVaults.java | 20 +- .../models/BaseBackupPolicy.java | 7 +- .../models/BaseBackupPolicyResource.java | 6 +- .../models/BaseBackupPolicyResourceList.java | 4 - .../dataprotection/models/BasePolicyRule.java | 7 +- .../models/CheckNameAvailabilityRequest.java | 4 - .../models/ClientDiscoveryDisplay.java | 4 - .../ClientDiscoveryForLogSpecification.java | 4 - .../models/ClientDiscoveryForProperties.java | 4 - ...lientDiscoveryForServiceSpecification.java | 4 - .../models/ClientDiscoveryResponse.java | 4 - .../models/CopyOnExpiryOption.java | 4 - .../dataprotection/models/CopyOption.java | 4 - .../models/CustomCopyOption.java | 4 - .../models/DataProtectionOperations.java | 4 +- .../models/DataProtections.java | 2 +- .../models/DataStoreInfoBase.java | 9 +- .../models/DataStoreParameters.java | 7 +- .../dataprotection/models/Datasource.java | 7 +- .../dataprotection/models/DatasourceSet.java | 7 +- .../dataprotection/models/Day.java | 4 - .../dataprotection/models/DeleteOption.java | 7 +- .../models/DppBaseResourceList.java | 4 - .../models/DppIdentityDetails.java | 4 - .../dataprotection/models/DppResource.java | 4 - .../models/DppResourceList.java | 4 - .../models/DppTrackedResource.java | 4 - .../models/DppTrackedResourceList.java | 4 - .../models/DppWorkerRequest.java | 4 - .../models/ExportJobsOperationResults.java | 2 +- .../models/ExportJobsTriggerHeaders.java | 76 - .../models/ExportJobsTriggerResponse.java | 26 - .../models/FeatureValidationRequest.java | 4 - .../models/FeatureValidationRequestBase.java | 4 - .../models/FeatureValidationResponse.java | 4 - .../models/ImmediateCopyOption.java | 4 - .../dataprotection/models/InnerError.java | 4 - .../models/ItemLevelRestoreCriteria.java | 10 +- .../models/ItemLevelRestoreTargetInfo.java | 9 +- .../models/JobExtendedInfo.java | 4 - .../dataprotection/models/JobSubTask.java | 9 +- .../dataprotection/models/Jobs.java | 6 +- .../models/KubernetesPVRestoreCriteria.java | 78 + ...KubernetesStorageClassRestoreCriteria.java | 78 + .../models/MonitoringSettings.java | 49 + .../models/OperationExtendedInfo.java | 4 - .../models/OperationResultsGetHeaders.java | 4 - .../models/OperationStatus.java | 2 +- .../OperationStatusBackupVaultContexts.java | 39 + .../OperationStatusResourceGroupContexts.java | 37 + .../models/PatchBackupVaultInput.java | 49 + .../models/PatchResourceRequestInput.java | 33 +- .../dataprotection/models/PolicyInfo.java | 7 +- .../models/PolicyParameters.java | 4 - .../models/ProtectionStatusDetails.java | 4 - .../RangeBasedItemLevelRestoreCriteria.java | 4 - .../models/RecoveryPointDataStoreDetails.java | 4 - .../dataprotection/models/RecoveryPoints.java | 22 +- .../dataprotection/models/ResourceGuard.java | 4 - .../models/ResourceGuardOperation.java | 4 - .../models/ResourceGuardResource.java | 12 +- .../models/ResourceGuardResourceList.java | 4 - .../dataprotection/models/ResourceGuards.java | 54 +- .../models/ResourceMoveDetails.java | 4 - .../models/RestorableTimeRange.java | 9 +- .../models/RestorableTimeRanges.java | 10 +- .../models/RestoreFilesTargetInfo.java | 7 +- .../RestoreJobRecoveryPointDetails.java | 4 - .../models/RestoreTargetInfo.java | 7 +- .../models/RestoreTargetInfoBase.java | 7 +- .../dataprotection/models/RetentionTag.java | 7 +- .../models/ScheduleBasedBackupCriteria.java | 4 - .../models/ScheduleBasedTriggerContext.java | 9 +- .../SecretStoreBasedAuthCredentials.java | 4 - .../models/SecretStoreResource.java | 33 +- .../models/SourceLifeCycle.java | 9 +- .../dataprotection/models/StorageSetting.java | 4 - .../models/SupportedFeature.java | 4 - .../models/SyncBackupInstanceRequest.java | 47 + .../dataprotection/models/SyncType.java | 34 + .../models/TaggingCriteria.java | 7 +- .../models/TargetCopySetting.java | 9 +- .../dataprotection/models/TargetDetails.java | 11 +- .../models/TriggerBackupRequest.java | 7 +- .../dataprotection/models/TriggerContext.java | 4 - .../models/UserFacingError.java | 4 - .../models/ValidateForBackupRequest.java | 7 +- .../models/ValidateRestoreRequestObject.java | 7 +- .../dataprotection/models/ValidationType.java | 34 + .../BackupInstancesAdhocBackupSamples.java | 4 +- .../BackupInstancesCreateOrUpdateSamples.java | 10 +- .../BackupInstancesDeleteSamples.java | 4 +- ...pInstancesExtensionRoutingListSamples.java | 27 + ...tBackupInstanceOperationResultSamples.java | 30 + .../generated/BackupInstancesGetSamples.java | 4 +- .../generated/BackupInstancesListSamples.java | 4 +- .../BackupInstancesResumeBackupsSamples.java | 22 + ...ackupInstancesResumeProtectionSamples.java | 22 + .../BackupInstancesStopProtectionSamples.java | 22 + .../BackupInstancesSuspendBackupsSamples.java | 22 + ...kupInstancesSyncBackupInstanceSamples.java | 31 + ...ackupInstancesTriggerRehydrateSamples.java | 2 +- .../BackupInstancesTriggerRestoreSamples.java | 36 +- ...ckupInstancesValidateForBackupSamples.java | 4 +- ...kupInstancesValidateForRestoreSamples.java | 14 +- .../BackupPoliciesCreateOrUpdateSamples.java | 4 +- .../BackupPoliciesDeleteSamples.java | 4 +- .../generated/BackupPoliciesGetSamples.java | 4 +- .../generated/BackupPoliciesListSamples.java | 4 +- ...BackupVaultOperationResultsGetSamples.java | 4 +- ...kupVaultsCheckNameAvailabilitySamples.java | 2 +- .../BackupVaultsCreateOrUpdateSamples.java | 19 +- .../generated/BackupVaultsDeleteSamples.java | 2 +- ...BackupVaultsGetByResourceGroupSamples.java | 4 +- ...ackupVaultsListByResourceGroupSamples.java | 2 +- .../generated/BackupVaultsListSamples.java | 2 +- .../generated/BackupVaultsUpdateSamples.java | 17 +- ...aProtectionCheckFeatureSupportSamples.java | 2 +- .../DataProtectionOperationsListSamples.java | 2 +- .../ExportJobsOperationResultGetSamples.java | 2 +- .../generated/ExportJobsTriggerSamples.java | 2 +- .../generated/JobsGetSamples.java | 2 +- .../generated/JobsListSamples.java | 2 +- .../generated/OperationResultGetSamples.java | 2 +- ...ionStatusBackupVaultContextGetSamples.java | 28 + .../generated/OperationStatusGetSamples.java | 2 +- ...GroupContextGetByResourceGroupSamples.java | 27 + .../generated/RecoveryPointsGetSamples.java | 4 +- .../generated/RecoveryPointsListSamples.java | 4 +- .../ResourceGuardsDeleteSamples.java | 2 +- ...ckupSecurityPinRequestsObjectsSamples.java | 2 +- ...sourceGuardsGetByResourceGroupSamples.java | 2 +- ...ackupSecurityPinRequestsObjectSamples.java | 2 +- ...eteProtectedItemRequestsObjectSamples.java | 2 +- ...sourceGuardProxyRequestsObjectSamples.java | 2 +- ...isableSoftDeleteRequestsObjectSamples.java | 2 +- ...ateProtectedItemRequestsObjectSamples.java | 2 +- ...ProtectionPolicyRequestsObjectSamples.java | 2 +- ...teProtectedItemRequestsObjectsSamples.java | 2 +- ...ourceGuardProxyRequestsObjectsSamples.java | 2 +- ...sableSoftDeleteRequestsObjectsSamples.java | 2 +- ...teProtectedItemRequestsObjectsSamples.java | 2 +- ...rotectionPolicyRequestsObjectsSamples.java | 2 +- ...ourceGuardsListByResourceGroupSamples.java | 2 +- .../generated/ResourceGuardsListSamples.java | 2 +- .../generated/ResourceGuardsPatchSamples.java | 2 +- .../generated/ResourceGuardsPutSamples.java | 2 +- .../RestorableTimeRangesFindSamples.java | 4 +- 276 files changed, 6884 insertions(+), 3272 deletions(-) create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstancesExtensionRoutingsClient.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/OperationStatusBackupVaultContextsClient.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/OperationStatusResourceGroupContextsClient.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesExtensionRoutingsClientImpl.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesExtensionRoutingsImpl.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusBackupVaultContextsClientImpl.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusBackupVaultContextsImpl.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusResourceGroupContextsClientImpl.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusResourceGroupContextsImpl.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AlertsState.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureMonitorAlertSettings.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesAdhocBackupHeaders.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesAdhocBackupResponse.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesDeleteHeaders.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesDeleteResponse.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesExtensionRoutings.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesTriggerRehydrateHeaders.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesTriggerRehydrateResponse.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesTriggerRestoreHeaders.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesTriggerRestoreResponse.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesValidateForBackupHeaders.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesValidateForBackupResponse.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesValidateForRestoreHeaders.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesValidateForRestoreResponse.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExportJobsTriggerHeaders.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExportJobsTriggerResponse.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesPVRestoreCriteria.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesStorageClassRestoreCriteria.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/MonitoringSettings.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationStatusBackupVaultContexts.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationStatusResourceGroupContexts.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PatchBackupVaultInput.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SyncBackupInstanceRequest.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SyncType.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ValidationType.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesExtensionRoutingListSamples.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetBackupInstanceOperationResultSamples.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeBackupsSamples.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeProtectionSamples.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesStopProtectionSamples.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSuspendBackupsSamples.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSyncBackupInstanceSamples.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusBackupVaultContextGetSamples.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusResourceGroupContextGetByResourceGroupSamples.java diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md b/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md index c2ce0fdad7584..4a90347641398 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2022-04-26) + +- Azure Resource Manager DataProtection client library for Java. This package contains Microsoft Azure SDK for DataProtection Management SDK. Open API 2.0 Specs for Azure Data Protection service. Package tag package-preview-2022-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/README.md b/sdk/dataprotection/azure-resourcemanager-dataprotection/README.md index ed24adb92a26a..5edc6f17552e8 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/README.md +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/README.md @@ -2,7 +2,7 @@ Azure Resource Manager DataProtection client library for Java. -This package contains Microsoft Azure SDK for DataProtection Management SDK. Open API 2.0 Specs for Azure Data Protection service. Package tag package-2021-07. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for DataProtection Management SDK. Open API 2.0 Specs for Azure Data Protection service. Package tag package-preview-2022-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-dataprotection - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md b/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md index 76e07d07c747c..cda82704db3c5 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md @@ -7,12 +7,22 @@ - [CreateOrUpdate](#backupinstances_createorupdate) - [Delete](#backupinstances_delete) - [Get](#backupinstances_get) +- [GetBackupInstanceOperationResult](#backupinstances_getbackupinstanceoperationresult) - [List](#backupinstances_list) +- [ResumeBackups](#backupinstances_resumebackups) +- [ResumeProtection](#backupinstances_resumeprotection) +- [StopProtection](#backupinstances_stopprotection) +- [SuspendBackups](#backupinstances_suspendbackups) +- [SyncBackupInstance](#backupinstances_syncbackupinstance) - [TriggerRehydrate](#backupinstances_triggerrehydrate) - [TriggerRestore](#backupinstances_triggerrestore) - [ValidateForBackup](#backupinstances_validateforbackup) - [ValidateForRestore](#backupinstances_validateforrestore) +## BackupInstancesExtensionRouting + +- [List](#backupinstancesextensionrouting_list) + ## BackupPolicies - [CreateOrUpdate](#backuppolicies_createorupdate) @@ -63,6 +73,14 @@ - [Get](#operationstatus_get) +## OperationStatusBackupVaultContext + +- [Get](#operationstatusbackupvaultcontext_get) + +## OperationStatusResourceGroupContext + +- [GetByResourceGroup](#operationstatusresourcegroupcontext_getbyresourcegroup) + ## RecoveryPoints - [Get](#recoverypoints_get) @@ -103,7 +121,7 @@ import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest; /** Samples for BackupInstances AdhocBackup. */ public final class BackupInstancesAdhocBackupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/TriggerBackup.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/TriggerBackup.json */ /** * Sample code: Trigger Adhoc Backup. @@ -114,8 +132,8 @@ public final class BackupInstancesAdhocBackupSamples { manager .backupInstances() .adhocBackup( - "PratikPrivatePreviewVault1", "000pikumar", + "PratikPrivatePreviewVault1", "testInstance1", new TriggerBackupRequest() .withBackupRuleOptions( @@ -140,12 +158,13 @@ import com.azure.resourcemanager.dataprotection.models.PolicyParameters; import com.azure.resourcemanager.dataprotection.models.SecretStoreBasedAuthCredentials; import com.azure.resourcemanager.dataprotection.models.SecretStoreResource; import com.azure.resourcemanager.dataprotection.models.SecretStoreType; +import com.azure.resourcemanager.dataprotection.models.ValidationType; import java.util.Arrays; /** Samples for BackupInstances CreateOrUpdate. */ public final class BackupInstancesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/PutBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/PutBackupInstance.json */ /** * Sample code: Create BackupInstance. @@ -156,13 +175,13 @@ public final class BackupInstancesCreateOrUpdateSamples { manager .backupInstances() .define("testInstance1") - .withExistingBackupVault("PratikPrivatePreviewVault1", "000pikumar") + .withExistingBackupVault("000pikumar", "PratikPrivatePreviewVault1") .withProperties( new BackupInstance() .withFriendlyName("harshitbi2") .withDataSourceInfo( new Datasource() - .withDatasourceType("OssDB") + .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") .withObjectType("Datasource") .withResourceId( "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") @@ -172,7 +191,7 @@ public final class BackupInstancesCreateOrUpdateSamples { .withResourceUri("")) .withDataSourceSetInfo( new DatasourceSet() - .withDatasourceType("OssDB") + .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") .withObjectType("DatasourceSet") .withResourceId( "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") @@ -199,6 +218,7 @@ public final class BackupInstancesCreateOrUpdateSamples { new SecretStoreResource() .withUri("https://samplevault.vault.azure.net/secrets/credentials") .withSecretStoreType(SecretStoreType.AZURE_KEY_VAULT))) + .withValidationType(ValidationType.SHALLOW_VALIDATION) .withObjectType("BackupInstance")) .create(); } @@ -213,7 +233,7 @@ import com.azure.core.util.Context; /** Samples for BackupInstances Delete. */ public final class BackupInstancesDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/DeleteBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/DeleteBackupInstance.json */ /** * Sample code: Delete BackupInstance. @@ -221,7 +241,7 @@ public final class BackupInstancesDeleteSamples { * @param manager Entry point to DataProtectionManager. */ public static void deleteBackupInstance(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager.backupInstances().delete("PratikPrivatePreviewVault1", "000pikumar", "testInstance1", Context.NONE); + manager.backupInstances().delete("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", Context.NONE); } } ``` @@ -234,7 +254,7 @@ import com.azure.core.util.Context; /** Samples for BackupInstances Get. */ public final class BackupInstancesGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/GetBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/GetBackupInstance.json */ /** * Sample code: Get BackupInstance. @@ -244,7 +264,36 @@ public final class BackupInstancesGetSamples { public static void getBackupInstance(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { manager .backupInstances() - .getWithResponse("PratikPrivatePreviewVault1", "000pikumar", "testInstance1", Context.NONE); + .getWithResponse("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", Context.NONE); + } +} +``` + +### BackupInstances_GetBackupInstanceOperationResult + +```java +import com.azure.core.util.Context; + +/** Samples for BackupInstances GetBackupInstanceOperationResult. */ +public final class BackupInstancesGetBackupInstanceOperationResultSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/GetBackupInstanceOperationResult.json + */ + /** + * Sample code: Get BackupInstanceOperationResult. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void getBackupInstanceOperationResult( + com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager + .backupInstances() + .getBackupInstanceOperationResultWithResponse( + "SampleResourceGroup", + "swaggerExample", + "testInstance1", + "YWUzNDFkMzQtZmM5OS00MmUyLWEzNDMtZGJkMDIxZjlmZjgzOzdmYzBiMzhmLTc2NmItNDM5NS05OWQ1LTVmOGEzNzg4MWQzNA==", + Context.NONE); } } ``` @@ -257,7 +306,7 @@ import com.azure.core.util.Context; /** Samples for BackupInstances List. */ public final class BackupInstancesListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/ListBackupInstances.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/ListBackupInstances.json */ /** * Sample code: List BackupInstances in a Vault. @@ -266,7 +315,121 @@ public final class BackupInstancesListSamples { */ public static void listBackupInstancesInAVault( com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager.backupInstances().list("PratikPrivatePreviewVault1", "000pikumar", Context.NONE); + manager.backupInstances().list("000pikumar", "PratikPrivatePreviewVault1", Context.NONE); + } +} +``` + +### BackupInstances_ResumeBackups + +```java +import com.azure.core.util.Context; + +/** Samples for BackupInstances ResumeBackups. */ +public final class BackupInstancesResumeBackupsSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/ResumeBackups.json + */ + /** + * Sample code: ResumeBackups. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void resumeBackups(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.backupInstances().resumeBackups("testrg", "testvault", "testbi", Context.NONE); + } +} +``` + +### BackupInstances_ResumeProtection + +```java +import com.azure.core.util.Context; + +/** Samples for BackupInstances ResumeProtection. */ +public final class BackupInstancesResumeProtectionSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/ResumeProtection.json + */ + /** + * Sample code: ResumeProtection. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void resumeProtection(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.backupInstances().resumeProtection("testrg", "testvault", "testbi", Context.NONE); + } +} +``` + +### BackupInstances_StopProtection + +```java +import com.azure.core.util.Context; + +/** Samples for BackupInstances StopProtection. */ +public final class BackupInstancesStopProtectionSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/StopProtection.json + */ + /** + * Sample code: StopProtection. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void stopProtection(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.backupInstances().stopProtection("testrg", "testvault", "testbi", Context.NONE); + } +} +``` + +### BackupInstances_SuspendBackups + +```java +import com.azure.core.util.Context; + +/** Samples for BackupInstances SuspendBackups. */ +public final class BackupInstancesSuspendBackupsSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/SuspendBackups.json + */ + /** + * Sample code: SuspendBackups. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void suspendBackups(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.backupInstances().suspendBackups("testrg", "testvault", "testbi", Context.NONE); + } +} +``` + +### BackupInstances_SyncBackupInstance + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.dataprotection.models.SyncBackupInstanceRequest; +import com.azure.resourcemanager.dataprotection.models.SyncType; + +/** Samples for BackupInstances SyncBackupInstance. */ +public final class BackupInstancesSyncBackupInstanceSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/SyncBackupInstance.json + */ + /** + * Sample code: Sync BackupInstance. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void syncBackupInstance(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager + .backupInstances() + .syncBackupInstance( + "testrg", + "testvault", + "testbi", + new SyncBackupInstanceRequest().withSyncType(SyncType.DEFAULT), + Context.NONE); } } ``` @@ -281,7 +444,7 @@ import com.azure.resourcemanager.dataprotection.models.RehydrationPriority; /** Samples for BackupInstances TriggerRehydrate. */ public final class BackupInstancesTriggerRehydrateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/TriggerRehydrate.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/TriggerRehydrate.json */ /** * Sample code: Trigger Rehydrate. @@ -309,10 +472,11 @@ public final class BackupInstancesTriggerRehydrateSamples { ```java import com.azure.core.util.Context; import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointBasedRestoreRequest; -import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreRequest; +import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreWithRehydrationRequest; import com.azure.resourcemanager.dataprotection.models.Datasource; import com.azure.resourcemanager.dataprotection.models.DatasourceSet; import com.azure.resourcemanager.dataprotection.models.RecoveryOption; +import com.azure.resourcemanager.dataprotection.models.RehydrationPriority; import com.azure.resourcemanager.dataprotection.models.RestoreFilesTargetInfo; import com.azure.resourcemanager.dataprotection.models.RestoreTargetInfo; import com.azure.resourcemanager.dataprotection.models.RestoreTargetLocationType; @@ -325,7 +489,7 @@ import com.azure.resourcemanager.dataprotection.models.TargetDetails; /** Samples for BackupInstances TriggerRestore. */ public final class BackupInstancesTriggerRestoreSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/TriggerRestoreAsFiles.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/TriggerRestoreAsFiles.json */ /** * Sample code: Trigger Restore As Files. @@ -336,8 +500,8 @@ public final class BackupInstancesTriggerRestoreSamples { manager .backupInstances() .triggerRestore( - "PrivatePreviewVault1", "000pikumar", + "PrivatePreviewVault1", "testInstance1", new AzureBackupRecoveryPointBasedRestoreRequest() .withRestoreTargetInfo( @@ -350,12 +514,14 @@ public final class BackupInstancesTriggerRestoreSamples { .withRestoreTargetLocationType(RestoreTargetLocationType.AZURE_BLOBS) .withUrl("https://teststorage.blob.core.windows.net/restoretest"))) .withSourceDataStoreType(SourceDataStoreType.VAULT_STORE) + .withSourceResourceId( + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") .withRecoveryPointId("hardcodedRP"), Context.NONE); } /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/TriggerRestoreWithRehydration.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/TriggerRestoreWithRehydration.json */ /** * Sample code: Trigger Restore With Rehydration. @@ -367,10 +533,10 @@ public final class BackupInstancesTriggerRestoreSamples { manager .backupInstances() .triggerRestore( - "PratikPrivatePreviewVault1", "000pikumar", + "PratikPrivatePreviewVault1", "testInstance1", - new AzureBackupRestoreRequest() + new AzureBackupRestoreWithRehydrationRequest() .withRestoreTargetInfo( new RestoreTargetInfo() .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS) @@ -395,12 +561,17 @@ public final class BackupInstancesTriggerRestoreSamples { .withResourceName("viveksipgtest") .withResourceType("Microsoft.DBforPostgreSQL/servers") .withResourceUri(""))) - .withSourceDataStoreType(SourceDataStoreType.VAULT_STORE), + .withSourceDataStoreType(SourceDataStoreType.VAULT_STORE) + .withSourceResourceId( + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") + .withRecoveryPointId("hardcodedRP") + .withRehydrationPriority(RehydrationPriority.HIGH) + .withRehydrationRetentionDuration("7D"), Context.NONE); } /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/TriggerRestore.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/TriggerRestore.json */ /** * Sample code: Trigger Restore. @@ -411,8 +582,8 @@ public final class BackupInstancesTriggerRestoreSamples { manager .backupInstances() .triggerRestore( - "PratikPrivatePreviewVault1", "000pikumar", + "PratikPrivatePreviewVault1", "testInstance1", new AzureBackupRecoveryPointBasedRestoreRequest() .withRestoreTargetInfo( @@ -421,17 +592,17 @@ public final class BackupInstancesTriggerRestoreSamples { .withRestoreLocation("southeastasia") .withDatasourceInfo( new Datasource() - .withDatasourceType("OssDB") + .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") .withObjectType("Datasource") .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb") .withResourceLocation("") - .withResourceName("testdb") + .withResourceName("targetdb") .withResourceType("Microsoft.DBforPostgreSQL/servers/databases") .withResourceUri("")) .withDatasourceSetInfo( new DatasourceSet() - .withDatasourceType("OssDB") + .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") .withObjectType("DatasourceSet") .withResourceId( "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") @@ -446,6 +617,8 @@ public final class BackupInstancesTriggerRestoreSamples { .withUri("https://samplevault.vault.azure.net/secrets/credentials") .withSecretStoreType(SecretStoreType.AZURE_KEY_VAULT)))) .withSourceDataStoreType(SourceDataStoreType.VAULT_STORE) + .withSourceResourceId( + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") .withRecoveryPointId("hardcodedRP"), Context.NONE); } @@ -468,7 +641,7 @@ import com.azure.resourcemanager.dataprotection.models.ValidateForBackupRequest; /** Samples for BackupInstances ValidateForBackup. */ public final class BackupInstancesValidateForBackupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/ValidateForBackup.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/ValidateForBackup.json */ /** * Sample code: Validate For Backup. @@ -479,8 +652,8 @@ public final class BackupInstancesValidateForBackupSamples { manager .backupInstances() .validateForBackup( - "PratikPrivatePreviewVault1", "000pikumar", + "PratikPrivatePreviewVault1", new ValidateForBackupRequest() .withBackupInstance( new BackupInstance() @@ -539,7 +712,7 @@ import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObj /** Samples for BackupInstances ValidateForRestore. */ public final class BackupInstancesValidateForRestoreSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/ValidateRestore.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/ValidateRestore.json */ /** * Sample code: Validate Restore. @@ -550,8 +723,8 @@ public final class BackupInstancesValidateForRestoreSamples { manager .backupInstances() .validateForRestore( - "PratikPrivatePreviewVault1", "000pikumar", + "PratikPrivatePreviewVault1", "testInstance1", new ValidateRestoreRequestObject() .withRestoreRequestObject( @@ -562,17 +735,17 @@ public final class BackupInstancesValidateForRestoreSamples { .withRestoreLocation("southeastasia") .withDatasourceInfo( new Datasource() - .withDatasourceType("OssDB") + .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") .withObjectType("Datasource") .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb") .withResourceLocation("") - .withResourceName("testdb") + .withResourceName("targetdb") .withResourceType("Microsoft.DBforPostgreSQL/servers/databases") .withResourceUri("")) .withDatasourceSetInfo( new DatasourceSet() - .withDatasourceType("OssDB") + .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") .withObjectType("DatasourceSet") .withResourceId( "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") @@ -587,12 +760,40 @@ public final class BackupInstancesValidateForRestoreSamples { .withUri("https://samplevault.vault.azure.net/secrets/credentials") .withSecretStoreType(SecretStoreType.AZURE_KEY_VAULT)))) .withSourceDataStoreType(SourceDataStoreType.VAULT_STORE) + .withSourceResourceId( + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") .withRecoveryPointId("hardcodedRP")), Context.NONE); } } ``` +### BackupInstancesExtensionRouting_List + +```java +import com.azure.core.util.Context; + +/** Samples for BackupInstancesExtensionRouting List. */ +public final class BackupInstancesExtensionRoutingListSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/ListBackupInstancesExtensionRouting.json + */ + /** + * Sample code: List BackupInstances associated with an azure resource. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void listBackupInstancesAssociatedWithAnAzureResource( + com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager + .backupInstancesExtensionRoutings() + .list( + "subscriptions/36d32b25-3dc7-41b0-bde1-397500644591/resourceGroups/testRG/providers/Microsoft.Compute/disks/testDisk", + Context.NONE); + } +} +``` + ### BackupPolicies_CreateOrUpdate ```java @@ -616,7 +817,7 @@ import java.util.Arrays; /** Samples for BackupPolicies CreateOrUpdate. */ public final class BackupPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/PolicyCRUD/CreateOrUpdateBackupPolicy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/PolicyCRUD/CreateOrUpdateBackupPolicy.json */ /** * Sample code: CreateOrUpdate BackupPolicy. @@ -628,7 +829,7 @@ public final class BackupPoliciesCreateOrUpdateSamples { manager .backupPolicies() .define("OSSDBPolicy") - .withExistingBackupVault("PrivatePreviewVault", "000pikumar") + .withExistingBackupVault("000pikumar", "PrivatePreviewVault") .withProperties( new BackupPolicy() .withDatasourceTypes(Arrays.asList("OssDB")) @@ -708,7 +909,7 @@ import com.azure.core.util.Context; /** Samples for BackupPolicies Delete. */ public final class BackupPoliciesDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/PolicyCRUD/DeleteBackupPolicy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/PolicyCRUD/DeleteBackupPolicy.json */ /** * Sample code: Delete BackupPolicy. @@ -716,7 +917,7 @@ public final class BackupPoliciesDeleteSamples { * @param manager Entry point to DataProtectionManager. */ public static void deleteBackupPolicy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager.backupPolicies().deleteWithResponse("PrivatePreviewVault", "000pikumar", "OSSDBPolicy", Context.NONE); + manager.backupPolicies().deleteWithResponse("000pikumar", "PrivatePreviewVault", "OSSDBPolicy", Context.NONE); } } ``` @@ -729,7 +930,7 @@ import com.azure.core.util.Context; /** Samples for BackupPolicies Get. */ public final class BackupPoliciesGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/PolicyCRUD/GetBackupPolicy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/PolicyCRUD/GetBackupPolicy.json */ /** * Sample code: Get BackupPolicy. @@ -737,7 +938,7 @@ public final class BackupPoliciesGetSamples { * @param manager Entry point to DataProtectionManager. */ public static void getBackupPolicy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager.backupPolicies().getWithResponse("PrivatePreviewVault", "000pikumar", "OSSDBPolicy", Context.NONE); + manager.backupPolicies().getWithResponse("000pikumar", "PrivatePreviewVault", "OSSDBPolicy", Context.NONE); } } ``` @@ -750,7 +951,7 @@ import com.azure.core.util.Context; /** Samples for BackupPolicies List. */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/PolicyCRUD/ListBackupPolicy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/PolicyCRUD/ListBackupPolicy.json */ /** * Sample code: List BackupPolicy. @@ -758,7 +959,7 @@ public final class BackupPoliciesListSamples { * @param manager Entry point to DataProtectionManager. */ public static void listBackupPolicy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager.backupPolicies().list("PrivatePreviewVault", "000pikumar", Context.NONE); + manager.backupPolicies().list("000pikumar", "PrivatePreviewVault", Context.NONE); } } ``` @@ -771,7 +972,7 @@ import com.azure.core.util.Context; /** Samples for BackupVaultOperationResults Get. */ public final class BackupVaultOperationResultsGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/VaultCRUD/GetOperationResultPatch.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/VaultCRUD/GetOperationResultPatch.json */ /** * Sample code: GetOperationResult Patch. @@ -782,8 +983,8 @@ public final class BackupVaultOperationResultsGetSamples { manager .backupVaultOperationResults() .getWithResponse( - "swaggerExample", "SampleResourceGroup", + "swaggerExample", "YWUzNDFkMzQtZmM5OS00MmUyLWEzNDMtZGJkMDIxZjlmZjgzOzdmYzBiMzhmLTc2NmItNDM5NS05OWQ1LTVmOGEzNzg4MWQzNA==", Context.NONE); } @@ -799,7 +1000,7 @@ import com.azure.resourcemanager.dataprotection.models.CheckNameAvailabilityRequ /** Samples for BackupVaults CheckNameAvailability. */ public final class BackupVaultsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/VaultCRUD/CheckBackupVaultsNameAvailability.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/VaultCRUD/CheckBackupVaultsNameAvailability.json */ /** * Sample code: Check BackupVaults name availability. @@ -824,8 +1025,11 @@ public final class BackupVaultsCheckNameAvailabilitySamples { ### BackupVaults_CreateOrUpdate ```java +import com.azure.resourcemanager.dataprotection.models.AlertsState; +import com.azure.resourcemanager.dataprotection.models.AzureMonitorAlertSettings; import com.azure.resourcemanager.dataprotection.models.BackupVault; import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails; +import com.azure.resourcemanager.dataprotection.models.MonitoringSettings; import com.azure.resourcemanager.dataprotection.models.StorageSetting; import com.azure.resourcemanager.dataprotection.models.StorageSettingStoreTypes; import com.azure.resourcemanager.dataprotection.models.StorageSettingTypes; @@ -836,7 +1040,7 @@ import java.util.Map; /** Samples for BackupVaults CreateOrUpdate. */ public final class BackupVaultsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/VaultCRUD/PutBackupVault.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/VaultCRUD/PutBackupVault.json */ /** * Sample code: Create BackupVault. @@ -856,14 +1060,18 @@ public final class BackupVaultsCreateOrUpdateSamples { .asList( new StorageSetting() .withDatastoreType(StorageSettingStoreTypes.VAULT_STORE) - .withType(StorageSettingTypes.LOCALLY_REDUNDANT)))) + .withType(StorageSettingTypes.LOCALLY_REDUNDANT))) + .withMonitoringSettings( + new MonitoringSettings() + .withAzureMonitorAlertSettings( + new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED)))) .withTags(mapOf("key1", "val1")) .withIdentity(new DppIdentityDetails().withType("None")) .create(); } /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/VaultCRUD/PutBackupVaultWithMSI.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/VaultCRUD/PutBackupVaultWithMSI.json */ /** * Sample code: Create BackupVault With MSI. @@ -884,7 +1092,11 @@ public final class BackupVaultsCreateOrUpdateSamples { .asList( new StorageSetting() .withDatastoreType(StorageSettingStoreTypes.VAULT_STORE) - .withType(StorageSettingTypes.LOCALLY_REDUNDANT)))) + .withType(StorageSettingTypes.LOCALLY_REDUNDANT))) + .withMonitoringSettings( + new MonitoringSettings() + .withAzureMonitorAlertSettings( + new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED)))) .withTags(mapOf("key1", "val1")) .withIdentity(new DppIdentityDetails().withType("systemAssigned")) .create(); @@ -911,7 +1123,7 @@ import com.azure.core.util.Context; /** Samples for BackupVaults Delete. */ public final class BackupVaultsDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/VaultCRUD/DeleteBackupVault.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/VaultCRUD/DeleteBackupVault.json */ /** * Sample code: Delete BackupVault. @@ -932,7 +1144,7 @@ import com.azure.core.util.Context; /** Samples for BackupVaults GetByResourceGroup. */ public final class BackupVaultsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/VaultCRUD/GetBackupVault.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/VaultCRUD/GetBackupVault.json */ /** * Sample code: Get BackupVault. @@ -944,7 +1156,7 @@ public final class BackupVaultsGetByResourceGroupSamples { } /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/VaultCRUD/GetBackupVaultWithMSI.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/VaultCRUD/GetBackupVaultWithMSI.json */ /** * Sample code: Get BackupVault With MSI. @@ -965,7 +1177,7 @@ import com.azure.core.util.Context; /** Samples for BackupVaults List. */ public final class BackupVaultsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/VaultCRUD/GetBackupVaultsInSubscription.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/VaultCRUD/GetBackupVaultsInSubscription.json */ /** * Sample code: Get BackupVaults in Subscription. @@ -987,7 +1199,7 @@ import com.azure.core.util.Context; /** Samples for BackupVaults ListByResourceGroup. */ public final class BackupVaultsListByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/VaultCRUD/GetBackupVaultsInResourceGroup.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/VaultCRUD/GetBackupVaultsInResourceGroup.json */ /** * Sample code: Get BackupVaults in ResourceGroup. @@ -1005,14 +1217,18 @@ public final class BackupVaultsListByResourceGroupSamples { ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.dataprotection.models.AlertsState; +import com.azure.resourcemanager.dataprotection.models.AzureMonitorAlertSettings; import com.azure.resourcemanager.dataprotection.models.BackupVaultResource; +import com.azure.resourcemanager.dataprotection.models.MonitoringSettings; +import com.azure.resourcemanager.dataprotection.models.PatchBackupVaultInput; import java.util.HashMap; import java.util.Map; /** Samples for BackupVaults Update. */ public final class BackupVaultsUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/VaultCRUD/PatchBackupVault.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/VaultCRUD/PatchBackupVault.json */ /** * Sample code: Patch BackupVault. @@ -1025,7 +1241,16 @@ public final class BackupVaultsUpdateSamples { .backupVaults() .getByResourceGroupWithResponse("SampleResourceGroup", "swaggerExample", Context.NONE) .getValue(); - resource.update().withTags(mapOf("newKey", "newVal")).apply(); + resource + .update() + .withTags(mapOf("newKey", "newVal")) + .withProperties( + new PatchBackupVaultInput() + .withMonitoringSettings( + new MonitoringSettings() + .withAzureMonitorAlertSettings( + new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED)))) + .apply(); } @SuppressWarnings("unchecked") @@ -1051,7 +1276,7 @@ import com.azure.resourcemanager.dataprotection.models.FeatureValidationRequest; /** Samples for DataProtection CheckFeatureSupport. */ public final class DataProtectionCheckFeatureSupportSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/CheckfeatureSupport.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/CheckfeatureSupport.json */ /** * Sample code: Check Azure Vm Backup Feature Support. @@ -1076,7 +1301,7 @@ import com.azure.core.util.Context; /** Samples for DataProtectionOperations List. */ public final class DataProtectionOperationsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/Operations/List.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/Operations/List.json */ /** * Sample code: Returns the list of supported REST operations. @@ -1098,7 +1323,7 @@ import com.azure.core.util.Context; /** Samples for ExportJobs Trigger. */ public final class ExportJobsTriggerSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/JobCRUD/TriggerExportJobs.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/JobCRUD/TriggerExportJobs.json */ /** * Sample code: Trigger Export Jobs. @@ -1119,7 +1344,7 @@ import com.azure.core.util.Context; /** Samples for ExportJobsOperationResult Get. */ public final class ExportJobsOperationResultGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/JobCRUD/GetExportJobsOperationResult.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/JobCRUD/GetExportJobsOperationResult.json */ /** * Sample code: Get Export Jobs Operation Result. @@ -1144,7 +1369,7 @@ import com.azure.core.util.Context; /** Samples for Jobs Get. */ public final class JobsGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/JobCRUD/GetJob.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/JobCRUD/GetJob.json */ /** * Sample code: Get Job. @@ -1167,7 +1392,7 @@ import com.azure.core.util.Context; /** Samples for Jobs List. */ public final class JobsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/JobCRUD/ListJobs.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/JobCRUD/ListJobs.json */ /** * Sample code: Get Jobs. @@ -1188,7 +1413,7 @@ import com.azure.core.util.Context; /** Samples for OperationResult Get. */ public final class OperationResultGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/GetOperationResult.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/GetOperationResult.json */ /** * Sample code: Get OperationResult. @@ -1214,7 +1439,7 @@ import com.azure.core.util.Context; /** Samples for OperationStatus Get. */ public final class OperationStatusGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/GetOperationStatus.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/GetOperationStatus.json */ /** * Sample code: Get OperationStatus. @@ -1232,6 +1457,59 @@ public final class OperationStatusGetSamples { } ``` +### OperationStatusBackupVaultContext_Get + +```java +import com.azure.core.util.Context; + +/** Samples for OperationStatusBackupVaultContext Get. */ +public final class OperationStatusBackupVaultContextGetSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/GetOperationStatusVaultContext.json + */ + /** + * Sample code: Get OperationStatus. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void getOperationStatus(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager + .operationStatusBackupVaultContexts() + .getWithResponse( + "SampleResourceGroup", + "swaggerExample", + "MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==", + Context.NONE); + } +} +``` + +### OperationStatusResourceGroupContext_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for OperationStatusResourceGroupContext GetByResourceGroup. */ +public final class OperationStatusResourceGroupContextGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/GetOperationStatusRGContext.json + */ + /** + * Sample code: Get OperationStatus. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void getOperationStatus(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager + .operationStatusResourceGroupContexts() + .getByResourceGroupWithResponse( + "SampleResourceGroup", + "MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==", + Context.NONE); + } +} +``` + ### RecoveryPoints_Get ```java @@ -1240,7 +1518,7 @@ import com.azure.core.util.Context; /** Samples for RecoveryPoints Get. */ public final class RecoveryPointsGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/GetRecoveryPoint.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/GetRecoveryPoint.json */ /** * Sample code: Get Recovery Point. @@ -1251,8 +1529,8 @@ public final class RecoveryPointsGetSamples { manager .recoveryPoints() .getWithResponse( - "PratikPrivatePreviewVault1", "000pikumar", + "PratikPrivatePreviewVault1", "testInstance1", "7fb2cddd-c5b3-44f6-a0d9-db3c4f9d5f25", Context.NONE); @@ -1268,7 +1546,7 @@ import com.azure.core.util.Context; /** Samples for RecoveryPoints List. */ public final class RecoveryPointsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/ListRecoveryPoints.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/ListRecoveryPoints.json */ /** * Sample code: List Recovery Points in a Vault. @@ -1279,7 +1557,7 @@ public final class RecoveryPointsListSamples { com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { manager .recoveryPoints() - .list("PratikPrivatePreviewVault1", "000pikumar", "testInstance1", null, null, Context.NONE); + .list("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", null, null, Context.NONE); } } ``` @@ -1292,7 +1570,7 @@ import com.azure.core.util.Context; /** Samples for ResourceGuards Delete. */ public final class ResourceGuardsDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/DeleteResourceGuard.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/DeleteResourceGuard.json */ /** * Sample code: Delete ResourceGuard. @@ -1313,7 +1591,7 @@ import com.azure.core.util.Context; /** Samples for ResourceGuards GetBackupSecurityPinRequestsObjects. */ public final class ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/ListBackupSecurityPINRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/ListBackupSecurityPINRequests.json */ /** * Sample code: List OperationsRequestObject. @@ -1337,7 +1615,7 @@ import com.azure.core.util.Context; /** Samples for ResourceGuards GetByResourceGroup. */ public final class ResourceGuardsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/GetResourceGuard.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/GetResourceGuard.json */ /** * Sample code: Get ResourceGuard. @@ -1358,7 +1636,7 @@ import com.azure.core.util.Context; /** Samples for ResourceGuards GetDefaultBackupSecurityPinRequestsObject. */ public final class ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/GetDefaultBackupSecurityPINRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/GetDefaultBackupSecurityPINRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. @@ -1383,7 +1661,7 @@ import com.azure.core.util.Context; /** Samples for ResourceGuards GetDefaultDeleteProtectedItemRequestsObject. */ public final class ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/GetDefaultDeleteProtectedItemRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/GetDefaultDeleteProtectedItemRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. @@ -1408,7 +1686,7 @@ import com.azure.core.util.Context; /** Samples for ResourceGuards GetDefaultDeleteResourceGuardProxyRequestsObject. */ public final class ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/GetDefaultDeleteResourceGuardProxyRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/GetDefaultDeleteResourceGuardProxyRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. @@ -1433,7 +1711,7 @@ import com.azure.core.util.Context; /** Samples for ResourceGuards GetDefaultDisableSoftDeleteRequestsObject. */ public final class ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/GetDefaultDisableSoftDeleteRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/GetDefaultDisableSoftDeleteRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. @@ -1458,7 +1736,7 @@ import com.azure.core.util.Context; /** Samples for ResourceGuards GetDefaultUpdateProtectedItemRequestsObject. */ public final class ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectedItemRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/GetDefaultUpdateProtectedItemRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. @@ -1483,7 +1761,7 @@ import com.azure.core.util.Context; /** Samples for ResourceGuards GetDefaultUpdateProtectionPolicyRequestsObject. */ public final class ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectionPolicyRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/GetDefaultUpdateProtectionPolicyRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. @@ -1508,7 +1786,7 @@ import com.azure.core.util.Context; /** Samples for ResourceGuards GetDeleteProtectedItemRequestsObjects. */ public final class ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/ListDeleteProtectedItemRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/ListDeleteProtectedItemRequests.json */ /** * Sample code: List OperationsRequestObject. @@ -1532,7 +1810,7 @@ import com.azure.core.util.Context; /** Samples for ResourceGuards GetDeleteResourceGuardProxyRequestsObjects. */ public final class ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/ListDeleteResourceGuardProxyRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/ListDeleteResourceGuardProxyRequests.json */ /** * Sample code: List OperationsRequestObject. @@ -1556,7 +1834,7 @@ import com.azure.core.util.Context; /** Samples for ResourceGuards GetDisableSoftDeleteRequestsObjects. */ public final class ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/ListDisableSoftDeleteRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/ListDisableSoftDeleteRequests.json */ /** * Sample code: List OperationsRequestObject. @@ -1580,7 +1858,7 @@ import com.azure.core.util.Context; /** Samples for ResourceGuards GetUpdateProtectedItemRequestsObjects. */ public final class ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/ListUpdateProtectedItemRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/ListUpdateProtectedItemRequests.json */ /** * Sample code: List OperationsRequestObject. @@ -1604,7 +1882,7 @@ import com.azure.core.util.Context; /** Samples for ResourceGuards GetUpdateProtectionPolicyRequestsObjects. */ public final class ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/ListUpdateProtectionPolicyRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/ListUpdateProtectionPolicyRequests.json */ /** * Sample code: List OperationsRequestObject. @@ -1628,7 +1906,7 @@ import com.azure.core.util.Context; /** Samples for ResourceGuards List. */ public final class ResourceGuardsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/GetResourceGuardsInSubscription.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/GetResourceGuardsInSubscription.json */ /** * Sample code: Get ResourceGuards in Subscription. @@ -1650,7 +1928,7 @@ import com.azure.core.util.Context; /** Samples for ResourceGuards ListByResourceGroup. */ public final class ResourceGuardsListByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/GetResourceGuardsInResourceGroup.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/GetResourceGuardsInResourceGroup.json */ /** * Sample code: Get ResourceGuards in ResourceGroup. @@ -1675,7 +1953,7 @@ import java.util.Map; /** Samples for ResourceGuards Patch. */ public final class ResourceGuardsPatchSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/PatchResourceGuard.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/PatchResourceGuard.json */ /** * Sample code: Patch ResourceGuard. @@ -1713,7 +1991,7 @@ import java.util.Map; /** Samples for ResourceGuards Put. */ public final class ResourceGuardsPutSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/PutResourceGuard.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/PutResourceGuard.json */ /** * Sample code: Create ResourceGuard. @@ -1753,7 +2031,7 @@ import com.azure.resourcemanager.dataprotection.models.RestoreSourceDataStoreTyp /** Samples for RestorableTimeRanges Find. */ public final class RestorableTimeRangesFindSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/FindRestorableTimeRanges.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/FindRestorableTimeRanges.json */ /** * Sample code: Find Restorable Time Ranges. @@ -1765,8 +2043,8 @@ public final class RestorableTimeRangesFindSamples { manager .restorableTimeRanges() .findWithResponse( - "ZBlobBackupVaultBVTD3", "Blob-Backup", + "ZBlobBackupVaultBVTD3", "zblobbackuptestsa58", new AzureBackupFindRestorableTimeRangesRequest() .withSourceDataStoreType(RestoreSourceDataStoreType.OPERATIONAL_STORE) diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml b/sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml index 89213e8214303..165bb9efad3c1 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for DataProtection Management - This package contains Microsoft Azure SDK for DataProtection Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Open API 2.0 Specs for Azure Data Protection service. Package tag package-2021-07. + This package contains Microsoft Azure SDK for DataProtection Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Open API 2.0 Specs for Azure Data Protection service. Package tag package-preview-2022-03. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/DataProtectionManager.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/DataProtectionManager.java index c25cb41e94d25..322568fe0519b 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/DataProtectionManager.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/DataProtectionManager.java @@ -10,11 +10,13 @@ import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; @@ -22,6 +24,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.fluent.DataProtectionClient; +import com.azure.resourcemanager.dataprotection.implementation.BackupInstancesExtensionRoutingsImpl; import com.azure.resourcemanager.dataprotection.implementation.BackupInstancesImpl; import com.azure.resourcemanager.dataprotection.implementation.BackupPoliciesImpl; import com.azure.resourcemanager.dataprotection.implementation.BackupVaultOperationResultsImpl; @@ -33,11 +36,14 @@ import com.azure.resourcemanager.dataprotection.implementation.ExportJobsOperationResultsImpl; import com.azure.resourcemanager.dataprotection.implementation.JobsImpl; import com.azure.resourcemanager.dataprotection.implementation.OperationResultsImpl; +import com.azure.resourcemanager.dataprotection.implementation.OperationStatusBackupVaultContextsImpl; import com.azure.resourcemanager.dataprotection.implementation.OperationStatusImpl; +import com.azure.resourcemanager.dataprotection.implementation.OperationStatusResourceGroupContextsImpl; import com.azure.resourcemanager.dataprotection.implementation.RecoveryPointsImpl; import com.azure.resourcemanager.dataprotection.implementation.ResourceGuardsImpl; import com.azure.resourcemanager.dataprotection.implementation.RestorableTimeRangesImpl; import com.azure.resourcemanager.dataprotection.models.BackupInstances; +import com.azure.resourcemanager.dataprotection.models.BackupInstancesExtensionRoutings; import com.azure.resourcemanager.dataprotection.models.BackupPolicies; import com.azure.resourcemanager.dataprotection.models.BackupVaultOperationResults; import com.azure.resourcemanager.dataprotection.models.BackupVaults; @@ -48,6 +54,8 @@ import com.azure.resourcemanager.dataprotection.models.Jobs; import com.azure.resourcemanager.dataprotection.models.OperationResults; import com.azure.resourcemanager.dataprotection.models.OperationStatus; +import com.azure.resourcemanager.dataprotection.models.OperationStatusBackupVaultContexts; +import com.azure.resourcemanager.dataprotection.models.OperationStatusResourceGroupContexts; import com.azure.resourcemanager.dataprotection.models.RecoveryPoints; import com.azure.resourcemanager.dataprotection.models.ResourceGuards; import com.azure.resourcemanager.dataprotection.models.RestorableTimeRanges; @@ -66,6 +74,10 @@ public final class DataProtectionManager { private OperationStatus operationStatus; + private OperationStatusBackupVaultContexts operationStatusBackupVaultContexts; + + private OperationStatusResourceGroupContexts operationStatusResourceGroupContexts; + private BackupVaultOperationResults backupVaultOperationResults; private DataProtections dataProtections; @@ -76,6 +88,8 @@ public final class DataProtectionManager { private BackupInstances backupInstances; + private BackupInstancesExtensionRoutings backupInstancesExtensionRoutings; + private RecoveryPoints recoveryPoints; private Jobs jobs; @@ -115,6 +129,19 @@ public static DataProtectionManager authenticate(TokenCredential credential, Azu return configure().authenticate(credential, profile); } + /** + * Creates an instance of DataProtection service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the DataProtection service API instance. + */ + public static DataProtectionManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new DataProtectionManager(httpPipeline, profile, null); + } + /** * Gets a Configurable instance that can be used to create DataProtectionManager with optional configuration. * @@ -126,13 +153,14 @@ public static Configurable configure() { /** The Configurable allowing configurations to be set. */ public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; + private RetryOptions retryOptions; private Duration defaultPollInterval; private Configurable() { @@ -193,6 +221,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { return this; } + /** + * Sets the retry options for the HTTP pipeline retry policy. + * + *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + * + * @param retryOptions the retry options for the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + /** * Sets the default poll interval, used when service does not provide "Retry-After" header. * @@ -200,9 +241,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); } return this; } @@ -242,10 +285,15 @@ public DataProtectionManager authenticate(TokenCredential credential, AzureProfi scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); } if (retryPolicy == null) { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } } List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); policies .addAll( @@ -300,6 +348,25 @@ public OperationStatus operationStatus() { return operationStatus; } + /** @return Resource collection API of OperationStatusBackupVaultContexts. */ + public OperationStatusBackupVaultContexts operationStatusBackupVaultContexts() { + if (this.operationStatusBackupVaultContexts == null) { + this.operationStatusBackupVaultContexts = + new OperationStatusBackupVaultContextsImpl(clientObject.getOperationStatusBackupVaultContexts(), this); + } + return operationStatusBackupVaultContexts; + } + + /** @return Resource collection API of OperationStatusResourceGroupContexts. */ + public OperationStatusResourceGroupContexts operationStatusResourceGroupContexts() { + if (this.operationStatusResourceGroupContexts == null) { + this.operationStatusResourceGroupContexts = + new OperationStatusResourceGroupContextsImpl( + clientObject.getOperationStatusResourceGroupContexts(), this); + } + return operationStatusResourceGroupContexts; + } + /** @return Resource collection API of BackupVaultOperationResults. */ public BackupVaultOperationResults backupVaultOperationResults() { if (this.backupVaultOperationResults == null) { @@ -342,6 +409,15 @@ public BackupInstances backupInstances() { return backupInstances; } + /** @return Resource collection API of BackupInstancesExtensionRoutings. */ + public BackupInstancesExtensionRoutings backupInstancesExtensionRoutings() { + if (this.backupInstancesExtensionRoutings == null) { + this.backupInstancesExtensionRoutings = + new BackupInstancesExtensionRoutingsImpl(clientObject.getBackupInstancesExtensionRoutings(), this); + } + return backupInstancesExtensionRoutings; + } + /** @return Resource collection API of RecoveryPoints. */ public RecoveryPoints recoveryPoints() { if (this.recoveryPoints == null) { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstancesClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstancesClient.java index 91803652e9f67..ec32405a58595 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstancesClient.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstancesClient.java @@ -15,6 +15,7 @@ import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner; import com.azure.resourcemanager.dataprotection.models.AzureBackupRehydrationRequest; import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreRequest; +import com.azure.resourcemanager.dataprotection.models.SyncBackupInstanceRequest; import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest; import com.azure.resourcemanager.dataprotection.models.ValidateForBackupRequest; import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject; @@ -24,35 +25,35 @@ public interface BackupInstancesClient { /** * Gets a backup instances belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a backup instances belonging to a backup vault. + * @return a backup instances belonging to a backup vault as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String vaultName, String resourceGroupName); + PagedIterable list(String resourceGroupName, String vaultName); /** * Gets a backup instances belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a backup instances belonging to a backup vault. + * @return a backup instances belonging to a backup vault as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String vaultName, String resourceGroupName, Context context); + PagedIterable list(String resourceGroupName, String vaultName, Context context); /** * Gets a backup instance with name in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -60,57 +61,57 @@ public interface BackupInstancesClient { * @return a backup instance with name in a backup vault. */ @ServiceMethod(returns = ReturnType.SINGLE) - BackupInstanceResourceInner get(String vaultName, String resourceGroupName, String backupInstanceName); + BackupInstanceResourceInner get(String resourceGroupName, String vaultName, String backupInstanceName); /** * Gets a backup instance with name in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 backup instance with name in a backup vault. + * @return a backup instance with name in a backup vault along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( - String vaultName, String resourceGroupName, String backupInstanceName, Context context); + String resourceGroupName, String vaultName, String backupInstanceName, Context context); /** * Create or update a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupInstanceResource. + * @return the {@link SyncPoller} for polling of backupInstanceResource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BackupInstanceResourceInner> beginCreateOrUpdate( - String vaultName, String resourceGroupName, String backupInstanceName, BackupInstanceResourceInner parameters); + String resourceGroupName, String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters); /** * Create or update a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 backupInstanceResource. + * @return the {@link SyncPoller} for polling of backupInstanceResource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BackupInstanceResourceInner> beginCreateOrUpdate( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters, Context context); @@ -118,8 +119,8 @@ SyncPoller, BackupInstanceResourceInner> /** * Create or update a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -129,13 +130,13 @@ SyncPoller, BackupInstanceResourceInner> */ @ServiceMethod(returns = ReturnType.SINGLE) BackupInstanceResourceInner createOrUpdate( - String vaultName, String resourceGroupName, String backupInstanceName, BackupInstanceResourceInner parameters); + String resourceGroupName, String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters); /** * Create or update a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @param context The context to associate with this operation. @@ -146,8 +147,8 @@ BackupInstanceResourceInner createOrUpdate( */ @ServiceMethod(returns = ReturnType.SINGLE) BackupInstanceResourceInner createOrUpdate( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters, Context context); @@ -155,52 +156,52 @@ BackupInstanceResourceInner createOrUpdate( /** * Delete a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( - String vaultName, String resourceGroupName, String backupInstanceName); + String resourceGroupName, String vaultName, String backupInstanceName); /** * Delete a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( - String vaultName, String resourceGroupName, String backupInstanceName, Context context); + String resourceGroupName, String vaultName, String backupInstanceName, Context context); /** * Delete a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 vaultName, String resourceGroupName, String backupInstanceName); + void delete(String resourceGroupName, String vaultName, String backupInstanceName); /** * Delete a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -208,41 +209,41 @@ SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String vaultName, String resourceGroupName, String backupInstanceName, Context context); + void delete(String resourceGroupName, String vaultName, String backupInstanceName, Context context); /** * Trigger adhoc backup. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operationJobExtendedInfo. + * @return the {@link SyncPoller} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationJobExtendedInfoInner> beginAdhocBackup( - String vaultName, String resourceGroupName, String backupInstanceName, TriggerBackupRequest parameters); + String resourceGroupName, String vaultName, String backupInstanceName, TriggerBackupRequest parameters); /** * Trigger adhoc backup. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 operationJobExtendedInfo. + * @return the {@link SyncPoller} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationJobExtendedInfoInner> beginAdhocBackup( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, TriggerBackupRequest parameters, Context context); @@ -250,8 +251,8 @@ SyncPoller, OperationJobExtendedInfoIn /** * Trigger adhoc backup. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -261,13 +262,13 @@ SyncPoller, OperationJobExtendedInfoIn */ @ServiceMethod(returns = ReturnType.SINGLE) OperationJobExtendedInfoInner adhocBackup( - String vaultName, String resourceGroupName, String backupInstanceName, TriggerBackupRequest parameters); + String resourceGroupName, String vaultName, String backupInstanceName, TriggerBackupRequest parameters); /** * Trigger adhoc backup. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @param context The context to associate with this operation. @@ -278,8 +279,8 @@ OperationJobExtendedInfoInner adhocBackup( */ @ServiceMethod(returns = ReturnType.SINGLE) OperationJobExtendedInfoInner adhocBackup( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, TriggerBackupRequest parameters, Context context); @@ -287,39 +288,39 @@ OperationJobExtendedInfoInner adhocBackup( /** * Validate whether adhoc backup will be successful or not. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operationJobExtendedInfo. + * @return the {@link SyncPoller} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationJobExtendedInfoInner> beginValidateForBackup( - String vaultName, String resourceGroupName, ValidateForBackupRequest parameters); + String resourceGroupName, String vaultName, ValidateForBackupRequest parameters); /** * Validate whether adhoc backup will be successful or not. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for 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 operationJobExtendedInfo. + * @return the {@link SyncPoller} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationJobExtendedInfoInner> beginValidateForBackup( - String vaultName, String resourceGroupName, ValidateForBackupRequest parameters, Context context); + String resourceGroupName, String vaultName, ValidateForBackupRequest parameters, Context context); /** * Validate whether adhoc backup will be successful or not. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -328,13 +329,13 @@ SyncPoller, OperationJobExtendedInfoIn */ @ServiceMethod(returns = ReturnType.SINGLE) OperationJobExtendedInfoInner validateForBackup( - String vaultName, String resourceGroupName, ValidateForBackupRequest parameters); + String resourceGroupName, String vaultName, ValidateForBackupRequest parameters); /** * Validate whether adhoc backup will be successful or not. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -344,7 +345,40 @@ OperationJobExtendedInfoInner validateForBackup( */ @ServiceMethod(returns = ReturnType.SINGLE) OperationJobExtendedInfoInner validateForBackup( - String vaultName, String resourceGroupName, ValidateForBackupRequest parameters, Context context); + String resourceGroupName, String vaultName, ValidateForBackupRequest parameters, Context context); + + /** + * Get result of backup instance creation operation. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param operationId The operationId parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 backup instance creation operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupInstanceResourceInner getBackupInstanceOperationResult( + String resourceGroupName, String vaultName, String backupInstanceName, String operationId); + + /** + * Get result of backup instance creation operation. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param operationId The operationId parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 backup instance creation operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getBackupInstanceOperationResultWithResponse( + String resourceGroupName, String vaultName, String backupInstanceName, String operationId, Context context); /** * rehydrate recovery point for restore for a BackupInstance. @@ -356,7 +390,7 @@ OperationJobExtendedInfoInner validateForBackup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginTriggerRehydrate( @@ -376,7 +410,7 @@ SyncPoller, Void> beginTriggerRehydrate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginTriggerRehydrate( @@ -427,36 +461,36 @@ void triggerRehydrate( /** * Triggers restore for a BackupInstance. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operationJobExtendedInfo. + * @return the {@link SyncPoller} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationJobExtendedInfoInner> beginTriggerRestore( - String vaultName, String resourceGroupName, String backupInstanceName, AzureBackupRestoreRequest parameters); + String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters); /** * Triggers restore for a BackupInstance. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 operationJobExtendedInfo. + * @return the {@link SyncPoller} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationJobExtendedInfoInner> beginTriggerRestore( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters, Context context); @@ -464,8 +498,8 @@ SyncPoller, OperationJobExtendedInfoIn /** * Triggers restore for a BackupInstance. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -475,13 +509,13 @@ SyncPoller, OperationJobExtendedInfoIn */ @ServiceMethod(returns = ReturnType.SINGLE) OperationJobExtendedInfoInner triggerRestore( - String vaultName, String resourceGroupName, String backupInstanceName, AzureBackupRestoreRequest parameters); + String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters); /** * Triggers restore for a BackupInstance. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @param context The context to associate with this operation. @@ -492,45 +526,353 @@ OperationJobExtendedInfoInner triggerRestore( */ @ServiceMethod(returns = ReturnType.SINGLE) OperationJobExtendedInfoInner triggerRestore( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters, Context context); /** - * Validates if Restore can be triggered for a DataSource. + * This operation will resume backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginResumeBackups( + String resourceGroupName, String vaultName, String backupInstanceName); + + /** + * This operation will resume backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginResumeBackups( + String resourceGroupName, String vaultName, String backupInstanceName, Context context); + + /** + * This operation will resume backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 resumeBackups(String resourceGroupName, String vaultName, String backupInstanceName); + + /** + * This operation will resume backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 resumeBackups(String resourceGroupName, String vaultName, String backupInstanceName, Context context); + + /** + * This operation will resume protection for a stopped backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginResumeProtection( + String resourceGroupName, String vaultName, String backupInstanceName); + + /** + * This operation will resume protection for a stopped backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginResumeProtection( + String resourceGroupName, String vaultName, String backupInstanceName, Context context); + + /** + * This operation will resume protection for a stopped backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 resumeProtection(String resourceGroupName, String vaultName, String backupInstanceName); + + /** + * This operation will resume protection for a stopped backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 resumeProtection(String resourceGroupName, String vaultName, String backupInstanceName, Context context); + + /** + * This operation will stop protection of a backup instance and data will be held forever. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginStopProtection( + String resourceGroupName, String vaultName, String backupInstanceName); + + /** + * This operation will stop protection of a backup instance and data will be held forever. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginStopProtection( + String resourceGroupName, String vaultName, String backupInstanceName, Context context); + + /** + * This operation will stop protection of a backup instance and data will be held forever. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 stopProtection(String resourceGroupName, String vaultName, String backupInstanceName); + + /** + * This operation will stop protection of a backup instance and data will be held forever. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 stopProtection(String resourceGroupName, String vaultName, String backupInstanceName, Context context); + + /** + * This operation will stop backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginSuspendBackups( + String resourceGroupName, String vaultName, String backupInstanceName); + + /** + * This operation will stop backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginSuspendBackups( + String resourceGroupName, String vaultName, String backupInstanceName, Context context); + + /** + * This operation will stop backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 suspendBackups(String resourceGroupName, String vaultName, String backupInstanceName); + + /** + * This operation will stop backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 suspendBackups(String resourceGroupName, String vaultName, String backupInstanceName, Context context); + + /** + * Sync backup instance again in case of failure This action will retry last failed operation and will bring backup + * instance to valid state. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginSyncBackupInstance( + String resourceGroupName, String vaultName, String backupInstanceName, SyncBackupInstanceRequest parameters); + + /** + * Sync backup instance again in case of failure This action will retry last failed operation and will bring backup + * instance to valid state. * + * @param resourceGroupName The name of the resource group where the backup vault is present. * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginSyncBackupInstance( + String resourceGroupName, + String vaultName, + String backupInstanceName, + SyncBackupInstanceRequest parameters, + Context context); + + /** + * Sync backup instance again in case of failure This action will retry last failed operation and will bring backup + * instance to valid state. + * * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 syncBackupInstance( + String resourceGroupName, String vaultName, String backupInstanceName, SyncBackupInstanceRequest parameters); + + /** + * Sync backup instance again in case of failure This action will retry last failed operation and will bring backup + * instance to valid state. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param parameters Request body for 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 syncBackupInstance( + String resourceGroupName, + String vaultName, + String backupInstanceName, + SyncBackupInstanceRequest parameters, + Context context); + + /** + * Validates if Restore can be triggered for a DataSource. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operationJobExtendedInfo. + * @return the {@link SyncPoller} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationJobExtendedInfoInner> beginValidateForRestore( - String vaultName, String resourceGroupName, String backupInstanceName, ValidateRestoreRequestObject parameters); + String resourceGroupName, String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters); /** * Validates if Restore can be triggered for a DataSource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 operationJobExtendedInfo. + * @return the {@link SyncPoller} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationJobExtendedInfoInner> beginValidateForRestore( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters, Context context); @@ -538,8 +880,8 @@ SyncPoller, OperationJobExtendedInfoIn /** * Validates if Restore can be triggered for a DataSource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -549,13 +891,13 @@ SyncPoller, OperationJobExtendedInfoIn */ @ServiceMethod(returns = ReturnType.SINGLE) OperationJobExtendedInfoInner validateForRestore( - String vaultName, String resourceGroupName, String backupInstanceName, ValidateRestoreRequestObject parameters); + String resourceGroupName, String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters); /** * Validates if Restore can be triggered for a DataSource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @param context The context to associate with this operation. @@ -566,8 +908,8 @@ OperationJobExtendedInfoInner validateForRestore( */ @ServiceMethod(returns = ReturnType.SINGLE) OperationJobExtendedInfoInner validateForRestore( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters, Context context); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstancesExtensionRoutingsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstancesExtensionRoutingsClient.java new file mode 100644 index 0000000000000..af8701a3964a8 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstancesExtensionRoutingsClient.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.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.dataprotection.fluent.models.BackupInstanceResourceInner; + +/** + * An instance of this class provides access to all the operations defined in BackupInstancesExtensionRoutingsClient. + */ +public interface BackupInstancesExtensionRoutingsClient { + /** + * Gets a list backup instances associated with a tracked resource. + * + * @param resourceId ARM path of the resource to be protected using Microsoft.DataProtection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list backup instances associated with a tracked resource as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceId); + + /** + * Gets a list backup instances associated with a tracked resource. + * + * @param resourceId ARM path of the resource to be protected using Microsoft.DataProtection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list backup instances associated with a tracked resource as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceId, Context context); +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupPoliciesClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupPoliciesClient.java index 7fa97536f7483..47f95d517a268 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupPoliciesClient.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupPoliciesClient.java @@ -16,35 +16,35 @@ public interface BackupPoliciesClient { /** * Returns list of backup policies belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return baseBackupPolicyResourceList. + * @return baseBackupPolicyResourceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String vaultName, String resourceGroupName); + PagedIterable list(String resourceGroupName, String vaultName); /** * Returns list of backup policies belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return baseBackupPolicyResourceList. + * @return baseBackupPolicyResourceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String vaultName, String resourceGroupName, Context context); + PagedIterable list(String resourceGroupName, String vaultName, Context context); /** * Gets a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -52,29 +52,29 @@ public interface BackupPoliciesClient { * @return a backup policy belonging to a backup vault. */ @ServiceMethod(returns = ReturnType.SINGLE) - BaseBackupPolicyResourceInner get(String vaultName, String resourceGroupName, String backupPolicyName); + BaseBackupPolicyResourceInner get(String resourceGroupName, String vaultName, String backupPolicyName); /** * Gets a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 backup policy belonging to a backup vault. + * @return a backup policy belonging to a backup vault along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( - String vaultName, String resourceGroupName, String backupPolicyName, Context context); + String resourceGroupName, String vaultName, String backupPolicyName, Context context); /** * Creates or Updates a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName Name of the policy. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -84,25 +84,25 @@ Response getWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) BaseBackupPolicyResourceInner createOrUpdate( - String vaultName, String resourceGroupName, String backupPolicyName, BaseBackupPolicyResourceInner parameters); + String resourceGroupName, String vaultName, String backupPolicyName, BaseBackupPolicyResourceInner parameters); /** * Creates or Updates a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName Name of the policy. * @param parameters Request body for 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 baseBackupPolicyResource. + * @return baseBackupPolicyResource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( - String vaultName, String resourceGroupName, + String vaultName, String backupPolicyName, BaseBackupPolicyResourceInner parameters, Context context); @@ -110,29 +110,29 @@ Response createOrUpdateWithResponse( /** * Deletes a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 vaultName, String resourceGroupName, String backupPolicyName); + void delete(String resourceGroupName, String vaultName, String backupPolicyName); /** * Deletes a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( - String vaultName, String resourceGroupName, String backupPolicyName, Context context); + String resourceGroupName, String vaultName, String backupPolicyName, Context context); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupVaultOperationResultsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupVaultOperationResultsClient.java index 91336b28091d7..7d23daaa186e1 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupVaultOperationResultsClient.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupVaultOperationResultsClient.java @@ -13,8 +13,8 @@ /** An instance of this class provides access to all the operations defined in BackupVaultOperationResultsClient. */ public interface BackupVaultOperationResultsClient { /** - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -22,11 +22,11 @@ public interface BackupVaultOperationResultsClient { * @return backupVault Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - BackupVaultResourceInner get(String vaultName, String resourceGroupName, String operationId); + BackupVaultResourceInner get(String resourceGroupName, String vaultName, String operationId); /** - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -36,5 +36,5 @@ public interface BackupVaultOperationResultsClient { */ @ServiceMethod(returns = ReturnType.SINGLE) BackupVaultOperationResultsGetResponse getWithResponse( - String vaultName, String resourceGroupName, String operationId, Context context); + String resourceGroupName, String vaultName, String operationId, Context context); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupVaultsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupVaultsClient.java index ecee753d3ec5b..84cea890b8511 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupVaultsClient.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupVaultsClient.java @@ -23,7 +23,7 @@ public interface BackupVaultsClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -35,7 +35,7 @@ public interface BackupVaultsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); @@ -47,7 +47,7 @@ public interface BackupVaultsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -60,7 +60,7 @@ public interface BackupVaultsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -87,7 +87,7 @@ public interface BackupVaultsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVault Resource. + * @return backupVault Resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -96,39 +96,39 @@ Response getByResourceGroupWithResponse( /** * Creates or updates a BackupVault resource belonging to a resource group. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVault Resource. + * @return the {@link SyncPoller} for polling of backupVault Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BackupVaultResourceInner> beginCreateOrUpdate( - String vaultName, String resourceGroupName, BackupVaultResourceInner parameters); + String resourceGroupName, String vaultName, BackupVaultResourceInner parameters); /** * Creates or updates a BackupVault resource belonging to a resource group. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for 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 backupVault Resource. + * @return the {@link SyncPoller} for polling of backupVault Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BackupVaultResourceInner> beginCreateOrUpdate( - String vaultName, String resourceGroupName, BackupVaultResourceInner parameters, Context context); + String resourceGroupName, String vaultName, BackupVaultResourceInner parameters, Context context); /** * Creates or updates a BackupVault resource belonging to a resource group. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -137,13 +137,13 @@ SyncPoller, BackupVaultResourceInner> begin */ @ServiceMethod(returns = ReturnType.SINGLE) BackupVaultResourceInner createOrUpdate( - String vaultName, String resourceGroupName, BackupVaultResourceInner parameters); + String resourceGroupName, String vaultName, BackupVaultResourceInner parameters); /** * Creates or updates a BackupVault resource belonging to a resource group. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -153,7 +153,7 @@ BackupVaultResourceInner createOrUpdate( */ @ServiceMethod(returns = ReturnType.SINGLE) BackupVaultResourceInner createOrUpdate( - String vaultName, String resourceGroupName, BackupVaultResourceInner parameters, Context context); + String resourceGroupName, String vaultName, BackupVaultResourceInner parameters, Context context); /** * Deletes a BackupVault resource from the resource group. @@ -176,7 +176,7 @@ BackupVaultResourceInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String vaultName, Context context); @@ -184,39 +184,39 @@ BackupVaultResourceInner createOrUpdate( /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVault Resource. + * @return the {@link SyncPoller} for polling of backupVault Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BackupVaultResourceInner> beginUpdate( - String vaultName, String resourceGroupName, PatchResourceRequestInput parameters); + String resourceGroupName, String vaultName, PatchResourceRequestInput parameters); /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for 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 backupVault Resource. + * @return the {@link SyncPoller} for polling of backupVault Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BackupVaultResourceInner> beginUpdate( - String vaultName, String resourceGroupName, PatchResourceRequestInput parameters, Context context); + String resourceGroupName, String vaultName, PatchResourceRequestInput parameters, Context context); /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -224,13 +224,13 @@ SyncPoller, BackupVaultResourceInner> begin * @return backupVault Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - BackupVaultResourceInner update(String vaultName, String resourceGroupName, PatchResourceRequestInput parameters); + BackupVaultResourceInner update(String resourceGroupName, String vaultName, PatchResourceRequestInput parameters); /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -240,7 +240,7 @@ SyncPoller, BackupVaultResourceInner> begin */ @ServiceMethod(returns = ReturnType.SINGLE) BackupVaultResourceInner update( - String vaultName, String resourceGroupName, PatchResourceRequestInput parameters, Context context); + String resourceGroupName, String vaultName, PatchResourceRequestInput parameters, Context context); /** * API to check for resource name availability. @@ -267,7 +267,7 @@ CheckNameAvailabilityResultInner checkNameAvailability( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return checkNameAvailabilityResult. + * @return checkNameAvailabilityResult along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response checkNameAvailabilityWithResponse( diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionClient.java index c6d7d43aad929..bf9fb01bc35b2 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionClient.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionClient.java @@ -65,6 +65,20 @@ public interface DataProtectionClient { */ OperationStatusClient getOperationStatus(); + /** + * Gets the OperationStatusBackupVaultContextsClient object to access its operations. + * + * @return the OperationStatusBackupVaultContextsClient object. + */ + OperationStatusBackupVaultContextsClient getOperationStatusBackupVaultContexts(); + + /** + * Gets the OperationStatusResourceGroupContextsClient object to access its operations. + * + * @return the OperationStatusResourceGroupContextsClient object. + */ + OperationStatusResourceGroupContextsClient getOperationStatusResourceGroupContexts(); + /** * Gets the BackupVaultOperationResultsClient object to access its operations. * @@ -100,6 +114,13 @@ public interface DataProtectionClient { */ BackupInstancesClient getBackupInstances(); + /** + * Gets the BackupInstancesExtensionRoutingsClient object to access its operations. + * + * @return the BackupInstancesExtensionRoutingsClient object. + */ + BackupInstancesExtensionRoutingsClient getBackupInstancesExtensionRoutings(); + /** * Gets the RecoveryPointsClient object to access its operations. * diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionOperationsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionOperationsClient.java index 63f06497a8bd9..06f1443bbc4f1 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionOperationsClient.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionOperationsClient.java @@ -17,7 +17,7 @@ public interface DataProtectionOperationsClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clientDiscoveryResponse. + * @return clientDiscoveryResponse as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -29,7 +29,7 @@ public interface DataProtectionOperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clientDiscoveryResponse. + * @return clientDiscoveryResponse as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionsClient.java index e9c2cca27835e..c0f2e024774e2 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionsClient.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionsClient.java @@ -35,7 +35,7 @@ public interface DataProtectionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for Backup Feature support. + * @return base class for Backup Feature support along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response checkFeatureSupportWithResponse( diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ExportJobsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ExportJobsClient.java index 23717b87a1c03..18bb1be7a1028 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ExportJobsClient.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ExportJobsClient.java @@ -20,7 +20,7 @@ public interface ExportJobsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginTrigger(String resourceGroupName, String vaultName); @@ -34,7 +34,7 @@ public interface ExportJobsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginTrigger(String resourceGroupName, String vaultName, Context context); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ExportJobsOperationResultsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ExportJobsOperationResultsClient.java index 71636c714b0ee..0d3391e7c74bc 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ExportJobsOperationResultsClient.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ExportJobsOperationResultsClient.java @@ -40,7 +40,7 @@ public interface ExportJobsOperationResultsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation result of operation triggered by Export Jobs API. + * @return the operation result of operation triggered by Export Jobs API along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/JobsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/JobsClient.java index d417b058c2220..2f8d2b6d65489 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/JobsClient.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/JobsClient.java @@ -21,7 +21,7 @@ public interface JobsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 AzureBackup Job resources. + * @return list of AzureBackup Job resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String vaultName); @@ -35,7 +35,7 @@ public interface JobsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 AzureBackup Job resources. + * @return list of AzureBackup Job resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String vaultName, Context context); @@ -64,7 +64,7 @@ public interface JobsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 job with id in a backup vault. + * @return a job with id in a backup vault along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/OperationStatusBackupVaultContextsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/OperationStatusBackupVaultContextsClient.java new file mode 100644 index 0000000000000..ee122d2fb0cbc --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/OperationStatusBackupVaultContextsClient.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.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.dataprotection.fluent.models.OperationResourceInner; + +/** + * An instance of this class provides access to all the operations defined in OperationStatusBackupVaultContextsClient. + */ +public interface OperationStatusBackupVaultContextsClient { + /** + * Gets the operation status for an operation over a BackupVault's context. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param operationId The operationId parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status for an operation over a BackupVault's context. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationResourceInner get(String resourceGroupName, String vaultName, String operationId); + + /** + * Gets the operation status for an operation over a BackupVault's context. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param operationId The operationId parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status for an operation over a BackupVault's context along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String vaultName, String operationId, Context context); +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/OperationStatusClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/OperationStatusClient.java index d5259472bc836..a8303f78baf4d 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/OperationStatusClient.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/OperationStatusClient.java @@ -34,7 +34,7 @@ public interface OperationStatusClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation status for a resource. + * @return the operation status for a resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String location, String operationId, Context context); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/OperationStatusResourceGroupContextsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/OperationStatusResourceGroupContextsClient.java new file mode 100644 index 0000000000000..10e1d535ab6f9 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/OperationStatusResourceGroupContextsClient.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.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.dataprotection.fluent.models.OperationResourceInner; + +/** + * An instance of this class provides access to all the operations defined in + * OperationStatusResourceGroupContextsClient. + */ +public interface OperationStatusResourceGroupContextsClient { + /** + * Gets the operation status for an operation over a ResourceGroup's context. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param operationId The operationId parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status for an operation over a ResourceGroup's context. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationResourceInner getByResourceGroup(String resourceGroupName, String operationId); + + /** + * Gets the operation status for an operation over a ResourceGroup's context. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param operationId The operationId parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status for an operation over a ResourceGroup's context along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String operationId, Context context); +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RecoveryPointsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RecoveryPointsClient.java index f710f45135a65..724633e2fd8df 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RecoveryPointsClient.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RecoveryPointsClient.java @@ -16,23 +16,23 @@ public interface RecoveryPointsClient { /** * Returns a list of Recovery Points for a DataSource in a vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azureBackupRecoveryPointResourceList. + * @return azureBackupRecoveryPointResourceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( - String vaultName, String resourceGroupName, String backupInstanceName); + String resourceGroupName, String vaultName, String backupInstanceName); /** * Returns a list of Recovery Points for a DataSource in a vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param filter OData filter options. * @param skipToken skipToken Filter. @@ -40,12 +40,12 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azureBackupRecoveryPointResourceList. + * @return azureBackupRecoveryPointResourceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, String filter, String skipToken, @@ -54,8 +54,8 @@ PagedIterable list( /** * Gets a Recovery Point using recoveryPointId for a Datasource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param recoveryPointId The recoveryPointId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -65,22 +65,22 @@ PagedIterable list( */ @ServiceMethod(returns = ReturnType.SINGLE) AzureBackupRecoveryPointResourceInner get( - String vaultName, String resourceGroupName, String backupInstanceName, String recoveryPointId); + String resourceGroupName, String vaultName, String backupInstanceName, String recoveryPointId); /** * Gets a Recovery Point using recoveryPointId for a Datasource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param recoveryPointId The recoveryPointId parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 Recovery Point using recoveryPointId for a Datasource. + * @return a Recovery Point using recoveryPointId for a Datasource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( - String vaultName, String resourceGroupName, String backupInstanceName, String recoveryPointId, Context context); + String resourceGroupName, String vaultName, String backupInstanceName, String recoveryPointId, Context context); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ResourceGuardsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ResourceGuardsClient.java index cdb7b453d286b..88dd3c466e6f6 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ResourceGuardsClient.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ResourceGuardsClient.java @@ -20,7 +20,7 @@ public interface ResourceGuardsClient { * * @throws com.azure.core.management.exception.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 ResourceGuard resources. + * @return list of ResourceGuard resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -32,7 +32,7 @@ public interface ResourceGuardsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 ResourceGuard resources. + * @return list of ResourceGuard resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); @@ -44,7 +44,7 @@ public interface ResourceGuardsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 ResourceGuard resources. + * @return list of ResourceGuard resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -57,7 +57,7 @@ public interface ResourceGuardsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 ResourceGuard resources. + * @return list of ResourceGuard resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -87,7 +87,7 @@ ResourceGuardResourceInner put( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response putWithResponse( @@ -115,7 +115,7 @@ Response putWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -142,7 +142,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String resourceGuardsName, Context context); @@ -172,7 +172,7 @@ ResourceGuardResourceInner patch( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response patchWithResponse( @@ -187,7 +187,7 @@ Response patchWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable getDisableSoftDeleteRequestsObjects( @@ -203,7 +203,7 @@ PagedIterable getDisableSoftDeleteRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable getDisableSoftDeleteRequestsObjects( @@ -218,7 +218,7 @@ PagedIterable getDisableSoftDeleteRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable getDeleteResourceGuardProxyRequestsObjects( @@ -234,7 +234,7 @@ PagedIterable getDeleteResourceGuardProxyRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable getDeleteResourceGuardProxyRequestsObjects( @@ -249,7 +249,7 @@ PagedIterable getDeleteResourceGuardProxyRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable getBackupSecurityPinRequestsObjects( @@ -265,7 +265,7 @@ PagedIterable getBackupSecurityPinRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable getBackupSecurityPinRequestsObjects( @@ -280,7 +280,7 @@ PagedIterable getBackupSecurityPinRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable getDeleteProtectedItemRequestsObjects( @@ -296,7 +296,7 @@ PagedIterable getDeleteProtectedItemRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable getDeleteProtectedItemRequestsObjects( @@ -311,7 +311,7 @@ PagedIterable getDeleteProtectedItemRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable getUpdateProtectionPolicyRequestsObjects( @@ -327,7 +327,7 @@ PagedIterable getUpdateProtectionPolicyRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable getUpdateProtectionPolicyRequestsObjects( @@ -342,7 +342,7 @@ PagedIterable getUpdateProtectionPolicyRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable getUpdateProtectedItemRequestsObjects( @@ -358,7 +358,7 @@ PagedIterable getUpdateProtectedItemRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable getUpdateProtectedItemRequestsObjects( @@ -391,7 +391,7 @@ DppBaseResourceInner getDefaultDisableSoftDeleteRequestsObject( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getDefaultDisableSoftDeleteRequestsObjectWithResponse( @@ -424,7 +424,7 @@ DppBaseResourceInner getDefaultDeleteResourceGuardProxyRequestsObject( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getDefaultDeleteResourceGuardProxyRequestsObjectWithResponse( @@ -457,7 +457,7 @@ DppBaseResourceInner getDefaultBackupSecurityPinRequestsObject( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getDefaultBackupSecurityPinRequestsObjectWithResponse( @@ -490,7 +490,7 @@ DppBaseResourceInner getDefaultDeleteProtectedItemRequestsObject( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getDefaultDeleteProtectedItemRequestsObjectWithResponse( @@ -523,7 +523,7 @@ DppBaseResourceInner getDefaultUpdateProtectionPolicyRequestsObject( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getDefaultUpdateProtectionPolicyRequestsObjectWithResponse( @@ -556,7 +556,7 @@ DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getDefaultUpdateProtectedItemRequestsObjectWithResponse( diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RestorableTimeRangesClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RestorableTimeRangesClient.java index 740f4e4798608..70c61bca60078 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RestorableTimeRangesClient.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RestorableTimeRangesClient.java @@ -14,8 +14,8 @@ /** An instance of this class provides access to all the operations defined in RestorableTimeRangesClient. */ public interface RestorableTimeRangesClient { /** - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -25,26 +25,26 @@ public interface RestorableTimeRangesClient { */ @ServiceMethod(returns = ReturnType.SINGLE) AzureBackupFindRestorableTimeRangesResponseResourceInner find( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters); /** - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 list Restore Ranges Response. + * @return list Restore Ranges Response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response findWithResponse( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters, Context context); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupFindRestorableTimeRangesResponseResourceInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupFindRestorableTimeRangesResponseResourceInner.java index 4b674770ec448..e25fa87f8177c 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupFindRestorableTimeRangesResponseResourceInner.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupFindRestorableTimeRangesResponseResourceInner.java @@ -5,19 +5,13 @@ package com.azure.resourcemanager.dataprotection.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesResponse; import com.azure.resourcemanager.dataprotection.models.DppResource; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** List Restore Ranges Response. */ @Fluent public final class AzureBackupFindRestorableTimeRangesResponseResourceInner extends DppResource { - @JsonIgnore - private final ClientLogger logger = - new ClientLogger(AzureBackupFindRestorableTimeRangesResponseResourceInner.class); - /* * AzureBackupFindRestorableTimeRangesResponseResource properties */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupJobResourceInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupJobResourceInner.java index f3fc551c95117..602ea0bfe67fc 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupJobResourceInner.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupJobResourceInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.dataprotection.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.models.AzureBackupJob; import com.azure.resourcemanager.dataprotection.models.DppResource; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** AzureBackup Job Resource Class. */ @Fluent public final class AzureBackupJobResourceInner extends DppResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBackupJobResourceInner.class); - /* * AzureBackupJobResource properties */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupRecoveryPointResourceInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupRecoveryPointResourceInner.java index 199b96c518489..986f0d47cb9ca 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupRecoveryPointResourceInner.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupRecoveryPointResourceInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.dataprotection.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPoint; import com.azure.resourcemanager.dataprotection.models.DppResource; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** AzureBackupRecoveryPointResource Azure backup recoveryPoint resource. */ @Fluent public final class AzureBackupRecoveryPointResourceInner extends DppResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBackupRecoveryPointResourceInner.class); - /* * AzureBackupRecoveryPoint AzureBackupRecoveryPointResource properties */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BackupInstanceResourceInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BackupInstanceResourceInner.java index 7e01834d05bee..299c4ad29e79b 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BackupInstanceResourceInner.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BackupInstanceResourceInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.dataprotection.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.models.BackupInstance; import com.azure.resourcemanager.dataprotection.models.DppResource; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** BackupInstanceResource BackupInstance Resource. */ @Fluent public final class BackupInstanceResourceInner extends DppResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupInstanceResourceInner.class); - /* * BackupInstanceResource properties */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BackupVaultResourceInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BackupVaultResourceInner.java index 05b9ee22e8575..1a026d60560f6 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BackupVaultResourceInner.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BackupVaultResourceInner.java @@ -9,15 +9,12 @@ import com.azure.resourcemanager.dataprotection.models.BackupVault; import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails; import com.azure.resourcemanager.dataprotection.models.DppTrackedResource; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** BackupVault Resource Backup Vault Resource. */ @Fluent public final class BackupVaultResourceInner extends DppTrackedResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupVaultResourceInner.class); - /* * BackupVault BackupVaultResource properties */ @@ -81,7 +78,7 @@ public BackupVaultResourceInner withTags(Map tags) { public void validate() { super.validate(); if (properties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property properties in model BackupVaultResourceInner")); @@ -89,4 +86,6 @@ public void validate() { properties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(BackupVaultResourceInner.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BaseBackupPolicyResourceInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BaseBackupPolicyResourceInner.java index f714b63e63632..9e521ba52e193 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BaseBackupPolicyResourceInner.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BaseBackupPolicyResourceInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.dataprotection.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicy; import com.azure.resourcemanager.dataprotection.models.DppResource; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** BaseBackupPolicyResource BaseBackupPolicy resource. */ @Fluent public final class BaseBackupPolicyResourceInner extends DppResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BaseBackupPolicyResourceInner.class); - /* * BaseBackupPolicy BaseBackupPolicyResource properties */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/CheckNameAvailabilityResultInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/CheckNameAvailabilityResultInner.java index 4f702656ff023..30bc69c1af6d5 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/CheckNameAvailabilityResultInner.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/CheckNameAvailabilityResultInner.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.dataprotection.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; /** CheckNameAvailabilityResult CheckNameAvailability Result. */ @Fluent public final class CheckNameAvailabilityResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckNameAvailabilityResultInner.class); - /* * Gets or sets the message. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ClientDiscoveryValueForSingleApiInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ClientDiscoveryValueForSingleApiInner.java index 4a7f24e3601b0..256cb17968d2c 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ClientDiscoveryValueForSingleApiInner.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ClientDiscoveryValueForSingleApiInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.dataprotection.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryDisplay; import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** ClientDiscoveryValueForSingleApi Available operation details. */ @Fluent public final class ClientDiscoveryValueForSingleApiInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClientDiscoveryValueForSingleApiInner.class); - /* * ClientDiscoveryDisplay Contains the localized display information for * this particular operation diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/DppBaseResourceInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/DppBaseResourceInner.java index 60bfac685e8bc..a8379c74bf760 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/DppBaseResourceInner.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/DppBaseResourceInner.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.dataprotection.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; /** Base resource under Microsoft.DataProtection provider namespace. */ @Immutable public final class DppBaseResourceInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DppBaseResourceInner.class); - /* * Resource Id represents the complete path to the resource. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ExportJobsResultInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ExportJobsResultInner.java index fcd4ef9d68a7d..a7ac35baa1022 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ExportJobsResultInner.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ExportJobsResultInner.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.dataprotection.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; /** ExportJobsResult The result for export jobs containing blob details. */ @Immutable public final class ExportJobsResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ExportJobsResultInner.class); - /* * URL of the blob into which the serialized string of list of jobs is * exported. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/FeatureValidationResponseBaseInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/FeatureValidationResponseBaseInner.java index 0e9a3db10739d..bd52aa08e4e2c 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/FeatureValidationResponseBaseInner.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/FeatureValidationResponseBaseInner.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.dataprotection.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.models.FeatureValidationResponse; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -22,8 +20,6 @@ @JsonSubTypes({@JsonSubTypes.Type(name = "FeatureValidationResponse", value = FeatureValidationResponse.class)}) @Immutable public class FeatureValidationResponseBaseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FeatureValidationResponseBaseInner.class); - /** * Validates the instance. * diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/OperationJobExtendedInfoInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/OperationJobExtendedInfoInner.java index df6a5423476cb..bd82098025bf7 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/OperationJobExtendedInfoInner.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/OperationJobExtendedInfoInner.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.dataprotection.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.models.OperationExtendedInfo; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +15,6 @@ @JsonTypeName("OperationJobExtendedInfo") @Fluent public final class OperationJobExtendedInfoInner extends OperationExtendedInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationJobExtendedInfoInner.class); - /* * Arm Id of the job created for this operation. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/OperationResourceInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/OperationResourceInner.java index b7b4a59eae795..5bdc968611a35 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/OperationResourceInner.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/OperationResourceInner.java @@ -6,17 +6,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.models.OperationExtendedInfo; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** OperationResource Operation Resource. */ @Fluent public final class OperationResourceInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationResourceInner.class); - /* * End time of the operation */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ResourceGuardResourceInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ResourceGuardResourceInner.java index a5c68fc13b2e4..0760bcbc69805 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ResourceGuardResourceInner.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ResourceGuardResourceInner.java @@ -5,19 +5,15 @@ package com.azure.resourcemanager.dataprotection.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails; import com.azure.resourcemanager.dataprotection.models.DppTrackedResource; import com.azure.resourcemanager.dataprotection.models.ResourceGuard; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** The ResourceGuardResource model. */ @Fluent public final class ResourceGuardResourceInner extends DppTrackedResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceGuardResourceInner.class); - /* * ResourceGuardResource properties */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceResourceImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceResourceImpl.java index 949cf0caed1bf..9b1f8b60f77fb 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceResourceImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceResourceImpl.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.dataprotection.models.BackupInstance; import com.azure.resourcemanager.dataprotection.models.BackupInstanceResource; import com.azure.resourcemanager.dataprotection.models.OperationJobExtendedInfo; +import com.azure.resourcemanager.dataprotection.models.SyncBackupInstanceRequest; import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest; import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject; @@ -49,15 +50,15 @@ private com.azure.resourcemanager.dataprotection.DataProtectionManager manager() return this.serviceManager; } - private String vaultName; - private String resourceGroupName; + private String vaultName; + private String backupInstanceName; - public BackupInstanceResourceImpl withExistingBackupVault(String vaultName, String resourceGroupName) { - this.vaultName = vaultName; + public BackupInstanceResourceImpl withExistingBackupVault(String resourceGroupName, String vaultName) { this.resourceGroupName = resourceGroupName; + this.vaultName = vaultName; return this; } @@ -66,7 +67,7 @@ public BackupInstanceResource create() { serviceManager .serviceClient() .getBackupInstances() - .createOrUpdate(vaultName, resourceGroupName, backupInstanceName, this.innerModel(), Context.NONE); + .createOrUpdate(resourceGroupName, vaultName, backupInstanceName, this.innerModel(), Context.NONE); return this; } @@ -75,7 +76,7 @@ public BackupInstanceResource create(Context context) { serviceManager .serviceClient() .getBackupInstances() - .createOrUpdate(vaultName, resourceGroupName, backupInstanceName, this.innerModel(), context); + .createOrUpdate(resourceGroupName, vaultName, backupInstanceName, this.innerModel(), context); return this; } @@ -95,7 +96,7 @@ public BackupInstanceResource apply() { serviceManager .serviceClient() .getBackupInstances() - .createOrUpdate(vaultName, resourceGroupName, backupInstanceName, this.innerModel(), Context.NONE); + .createOrUpdate(resourceGroupName, vaultName, backupInstanceName, this.innerModel(), Context.NONE); return this; } @@ -104,7 +105,7 @@ public BackupInstanceResource apply(Context context) { serviceManager .serviceClient() .getBackupInstances() - .createOrUpdate(vaultName, resourceGroupName, backupInstanceName, this.innerModel(), context); + .createOrUpdate(resourceGroupName, vaultName, backupInstanceName, this.innerModel(), context); return this; } @@ -113,8 +114,8 @@ public BackupInstanceResource apply(Context context) { com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.vaultName = Utils.getValueFromIdByName(innerObject.id(), "backupVaults"); this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.vaultName = Utils.getValueFromIdByName(innerObject.id(), "backupVaults"); this.backupInstanceName = Utils.getValueFromIdByName(innerObject.id(), "backupInstances"); } @@ -123,7 +124,7 @@ public BackupInstanceResource refresh() { serviceManager .serviceClient() .getBackupInstances() - .getWithResponse(vaultName, resourceGroupName, backupInstanceName, Context.NONE) + .getWithResponse(resourceGroupName, vaultName, backupInstanceName, Context.NONE) .getValue(); return this; } @@ -133,7 +134,7 @@ public BackupInstanceResource refresh(Context context) { serviceManager .serviceClient() .getBackupInstances() - .getWithResponse(vaultName, resourceGroupName, backupInstanceName, context) + .getWithResponse(resourceGroupName, vaultName, backupInstanceName, context) .getValue(); return this; } @@ -141,13 +142,13 @@ public BackupInstanceResource refresh(Context context) { public OperationJobExtendedInfo adhocBackup(TriggerBackupRequest parameters) { return serviceManager .backupInstances() - .adhocBackup(vaultName, resourceGroupName, backupInstanceName, parameters); + .adhocBackup(resourceGroupName, vaultName, backupInstanceName, parameters); } public OperationJobExtendedInfo adhocBackup(TriggerBackupRequest parameters, Context context) { return serviceManager .backupInstances() - .adhocBackup(vaultName, resourceGroupName, backupInstanceName, parameters, context); + .adhocBackup(resourceGroupName, vaultName, backupInstanceName, parameters, context); } public void triggerRehydrate(AzureBackupRehydrationRequest parameters) { @@ -163,25 +164,69 @@ public void triggerRehydrate(AzureBackupRehydrationRequest parameters, Context c public OperationJobExtendedInfo triggerRestore(AzureBackupRestoreRequest parameters) { return serviceManager .backupInstances() - .triggerRestore(vaultName, resourceGroupName, backupInstanceName, parameters); + .triggerRestore(resourceGroupName, vaultName, backupInstanceName, parameters); } public OperationJobExtendedInfo triggerRestore(AzureBackupRestoreRequest parameters, Context context) { return serviceManager .backupInstances() - .triggerRestore(vaultName, resourceGroupName, backupInstanceName, parameters, context); + .triggerRestore(resourceGroupName, vaultName, backupInstanceName, parameters, context); + } + + public void resumeBackups() { + serviceManager.backupInstances().resumeBackups(resourceGroupName, vaultName, backupInstanceName); + } + + public void resumeBackups(Context context) { + serviceManager.backupInstances().resumeBackups(resourceGroupName, vaultName, backupInstanceName, context); + } + + public void resumeProtection() { + serviceManager.backupInstances().resumeProtection(resourceGroupName, vaultName, backupInstanceName); + } + + public void resumeProtection(Context context) { + serviceManager.backupInstances().resumeProtection(resourceGroupName, vaultName, backupInstanceName, context); + } + + public void stopProtection() { + serviceManager.backupInstances().stopProtection(resourceGroupName, vaultName, backupInstanceName); + } + + public void stopProtection(Context context) { + serviceManager.backupInstances().stopProtection(resourceGroupName, vaultName, backupInstanceName, context); + } + + public void suspendBackups() { + serviceManager.backupInstances().suspendBackups(resourceGroupName, vaultName, backupInstanceName); + } + + public void suspendBackups(Context context) { + serviceManager.backupInstances().suspendBackups(resourceGroupName, vaultName, backupInstanceName, context); + } + + public void syncBackupInstance(SyncBackupInstanceRequest parameters) { + serviceManager + .backupInstances() + .syncBackupInstance(resourceGroupName, vaultName, backupInstanceName, parameters); + } + + public void syncBackupInstance(SyncBackupInstanceRequest parameters, Context context) { + serviceManager + .backupInstances() + .syncBackupInstance(resourceGroupName, vaultName, backupInstanceName, parameters, context); } public OperationJobExtendedInfo validateForRestore(ValidateRestoreRequestObject parameters) { return serviceManager .backupInstances() - .validateForRestore(vaultName, resourceGroupName, backupInstanceName, parameters); + .validateForRestore(resourceGroupName, vaultName, backupInstanceName, parameters); } public OperationJobExtendedInfo validateForRestore(ValidateRestoreRequestObject parameters, Context context) { return serviceManager .backupInstances() - .validateForRestore(vaultName, resourceGroupName, backupInstanceName, parameters, context); + .validateForRestore(resourceGroupName, vaultName, backupInstanceName, parameters, context); } public BackupInstanceResourceImpl withProperties(BackupInstance properties) { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesClientImpl.java index 0c9bfe046d6b3..2811f3be02bcc 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesClientImpl.java @@ -30,7 +30,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.dataprotection.fluent.BackupInstancesClient; @@ -39,6 +38,7 @@ import com.azure.resourcemanager.dataprotection.models.AzureBackupRehydrationRequest; import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreRequest; import com.azure.resourcemanager.dataprotection.models.BackupInstanceResourceList; +import com.azure.resourcemanager.dataprotection.models.SyncBackupInstanceRequest; import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest; import com.azure.resourcemanager.dataprotection.models.ValidateForBackupRequest; import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject; @@ -48,8 +48,6 @@ /** An instance of this class provides access to all the operations defined in BackupInstancesClient. */ public final class BackupInstancesClientImpl implements BackupInstancesClient { - private final ClientLogger logger = new ClientLogger(BackupInstancesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final BackupInstancesService service; @@ -83,9 +81,9 @@ private interface BackupInstancesService { Mono> list( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, @HeaderParam("Accept") String accept, Context context); @@ -98,9 +96,9 @@ Mono> list( Mono> get( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @HeaderParam("Accept") String accept, Context context); @@ -109,14 +107,14 @@ Mono> get( @Put( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}") - @ExpectedResponses({200, 201}) + @ExpectedResponses({200, 201, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @BodyParam("application/json") BackupInstanceResourceInner parameters, @HeaderParam("Accept") String accept, @@ -131,9 +129,9 @@ Mono>> createOrUpdate( Mono>> delete( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @HeaderParam("Accept") String accept, Context context); @@ -147,9 +145,9 @@ Mono>> delete( Mono>> adhocBackup( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @BodyParam("application/json") TriggerBackupRequest parameters, @HeaderParam("Accept") String accept, @@ -164,13 +162,30 @@ Mono>> adhocBackup( Mono>> validateForBackup( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, @BodyParam("application/json") ValidateForBackupRequest parameters, @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" + + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/operationResults/{operationId}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getBackupInstanceOperationResult( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, + @PathParam("backupInstanceName") String backupInstanceName, + @PathParam("operationId") String operationId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" @@ -197,11 +212,92 @@ Mono>> triggerRehydrate( Mono>> triggerRestore( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, + @PathParam("backupInstanceName") String backupInstanceName, + @BodyParam("application/json") AzureBackupRestoreRequest parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" + + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/resumeBackups") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resumeBackups( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, + @PathParam("backupInstanceName") String backupInstanceName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" + + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/resumeProtection") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resumeProtection( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, + @PathParam("backupInstanceName") String backupInstanceName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" + + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/stopProtection") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> stopProtection( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("backupInstanceName") String backupInstanceName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" + + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/suspendBackups") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> suspendBackups( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, + @PathParam("backupInstanceName") String backupInstanceName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" + + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/sync") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> syncBackupInstance( + @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, - @BodyParam("application/json") AzureBackupRestoreRequest parameters, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SyncBackupInstanceRequest parameters, @HeaderParam("Accept") String accept, Context context); @@ -214,9 +310,9 @@ Mono>> triggerRestore( Mono>> validateForRestore( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @BodyParam("application/json") ValidateRestoreRequestObject parameters, @HeaderParam("Accept") String accept, @@ -236,35 +332,36 @@ Mono> listNext( /** * Gets a backup instances belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a backup instances belonging to a backup vault. + * @return a backup instances belonging to a backup vault along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String vaultName, String resourceGroupName) { + String resourceGroupName, String vaultName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext( @@ -273,9 +370,9 @@ private Mono> listSinglePageAsync( .list( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, accept, context)) .>map( @@ -293,45 +390,46 @@ private Mono> listSinglePageAsync( /** * Gets a backup instances belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a backup instances belonging to a backup vault. + * @return a backup instances belonging to a backup vault along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String vaultName, String resourceGroupName, Context context) { + String resourceGroupName, String vaultName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName 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(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, accept, context) .map( @@ -348,103 +446,104 @@ private Mono> listSinglePageAsync( /** * Gets a backup instances belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a backup instances belonging to a backup vault. + * @return a backup instances belonging to a backup vault as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName) { + private PagedFlux listAsync(String resourceGroupName, String vaultName) { return new PagedFlux<>( - () -> listSinglePageAsync(vaultName, resourceGroupName), nextLink -> listNextSinglePageAsync(nextLink)); + () -> listSinglePageAsync(resourceGroupName, vaultName), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Gets a backup instances belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a backup instances belonging to a backup vault. + * @return a backup instances belonging to a backup vault as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String vaultName, String resourceGroupName, Context context) { + String resourceGroupName, String vaultName, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(vaultName, resourceGroupName, context), + () -> listSinglePageAsync(resourceGroupName, vaultName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Gets a backup instances belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a backup instances belonging to a backup vault. + * @return a backup instances belonging to a backup vault as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String vaultName, String resourceGroupName) { - return new PagedIterable<>(listAsync(vaultName, resourceGroupName)); + public PagedIterable list(String resourceGroupName, String vaultName) { + return new PagedIterable<>(listAsync(resourceGroupName, vaultName)); } /** * Gets a backup instances belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a backup instances belonging to a backup vault. + * @return a backup instances belonging to a backup vault as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( - String vaultName, String resourceGroupName, Context context) { - return new PagedIterable<>(listAsync(vaultName, resourceGroupName, context)); + String resourceGroupName, String vaultName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, vaultName, context)); } /** * Gets a backup instance with name in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 backup instance with name in a backup vault. + * @return a backup instance with name in a backup vault along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( - String vaultName, String resourceGroupName, String backupInstanceName) { + String resourceGroupName, String vaultName, String backupInstanceName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupInstanceName == null) { return Mono .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); @@ -457,9 +556,9 @@ private Mono> getWithResponseAsync( .get( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupInstanceName, accept, context)) @@ -469,37 +568,38 @@ private Mono> getWithResponseAsync( /** * Gets a backup instance with name in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 backup instance with name in a backup vault. + * @return a backup instance with name in a backup vault along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( - String vaultName, String resourceGroupName, String backupInstanceName, Context context) { + String resourceGroupName, String vaultName, String backupInstanceName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupInstanceName == null) { return Mono .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); @@ -510,9 +610,9 @@ private Mono> getWithResponseAsync( .get( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupInstanceName, accept, context); @@ -521,18 +621,18 @@ private Mono> getWithResponseAsync( /** * Gets a backup instance with name in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 backup instance with name in a backup vault. + * @return a backup instance with name in a backup vault on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( - String vaultName, String resourceGroupName, String backupInstanceName) { - return getWithResponseAsync(vaultName, resourceGroupName, backupInstanceName) + String resourceGroupName, String vaultName, String backupInstanceName) { + return getWithResponseAsync(resourceGroupName, vaultName, backupInstanceName) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -546,8 +646,8 @@ private Mono getAsync( /** * Gets a backup instance with name in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -555,62 +655,62 @@ private Mono getAsync( * @return a backup instance with name in a backup vault. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BackupInstanceResourceInner get(String vaultName, String resourceGroupName, String backupInstanceName) { - return getAsync(vaultName, resourceGroupName, backupInstanceName).block(); + public BackupInstanceResourceInner get(String resourceGroupName, String vaultName, String backupInstanceName) { + return getAsync(resourceGroupName, vaultName, backupInstanceName).block(); } /** * Gets a backup instance with name in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 backup instance with name in a backup vault. + * @return a backup instance with name in a backup vault along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( - String vaultName, String resourceGroupName, String backupInstanceName, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, context).block(); + String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + return getWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, context).block(); } /** * Create or update a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupInstanceResource. + * @return backupInstanceResource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( - String vaultName, String resourceGroupName, String backupInstanceName, BackupInstanceResourceInner parameters) { + String resourceGroupName, String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupInstanceName == null) { return Mono .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); @@ -628,9 +728,9 @@ private Mono>> createOrUpdateWithResponseAsync( .createOrUpdate( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupInstanceName, parameters, accept, @@ -641,20 +741,20 @@ private Mono>> createOrUpdateWithResponseAsync( /** * Create or update a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 backupInstanceResource. + * @return backupInstanceResource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters, Context context) { @@ -664,19 +764,19 @@ private Mono>> createOrUpdateWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupInstanceName == null) { return Mono .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); @@ -692,10 +792,10 @@ private Mono>> createOrUpdateWithResponseAsync( .createOrUpdate( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), - backupInstanceName, + resourceGroupName, + vaultName, + backupInstanceName, parameters, accept, context); @@ -704,20 +804,20 @@ private Mono>> createOrUpdateWithResponseAsync( /** * Create or update a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupInstanceResource. + * @return the {@link PollerFlux} for polling of backupInstanceResource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BackupInstanceResourceInner> beginCreateOrUpdateAsync( - String vaultName, String resourceGroupName, String backupInstanceName, BackupInstanceResourceInner parameters) { + String resourceGroupName, String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters) { Mono>> mono = - createOrUpdateWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, parameters); + createOrUpdateWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters); return this .client .getLroResult( @@ -725,32 +825,32 @@ private PollerFlux, BackupInstanceResour this.client.getHttpPipeline(), BackupInstanceResourceInner.class, BackupInstanceResourceInner.class, - Context.NONE); + this.client.getContext()); } /** * Create or update a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 backupInstanceResource. + * @return the {@link PollerFlux} for polling of backupInstanceResource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BackupInstanceResourceInner> beginCreateOrUpdateAsync( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono = - createOrUpdateWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context); + createOrUpdateWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context); return this .client .getLroResult( @@ -764,61 +864,61 @@ private PollerFlux, BackupInstanceResour /** * Create or update a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupInstanceResource. + * @return the {@link SyncPoller} for polling of backupInstanceResource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BackupInstanceResourceInner> beginCreateOrUpdate( - String vaultName, String resourceGroupName, String backupInstanceName, BackupInstanceResourceInner parameters) { - return beginCreateOrUpdateAsync(vaultName, resourceGroupName, backupInstanceName, parameters).getSyncPoller(); + String resourceGroupName, String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, vaultName, backupInstanceName, parameters).getSyncPoller(); } /** * Create or update a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 backupInstanceResource. + * @return the {@link SyncPoller} for polling of backupInstanceResource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BackupInstanceResourceInner> beginCreateOrUpdate( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters, Context context) { - return beginCreateOrUpdateAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context) + return beginCreateOrUpdateAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) .getSyncPoller(); } /** * Create or update a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupInstanceResource. + * @return backupInstanceResource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( - String vaultName, String resourceGroupName, String backupInstanceName, BackupInstanceResourceInner parameters) { - return beginCreateOrUpdateAsync(vaultName, resourceGroupName, backupInstanceName, parameters) + String resourceGroupName, String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, vaultName, backupInstanceName, parameters) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -826,24 +926,24 @@ private Mono createOrUpdateAsync( /** * Create or update a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 backupInstanceResource. + * @return backupInstanceResource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters, Context context) { - return beginCreateOrUpdateAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context) + return beginCreateOrUpdateAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -851,8 +951,8 @@ private Mono createOrUpdateAsync( /** * Create or update a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -862,15 +962,15 @@ private Mono createOrUpdateAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public BackupInstanceResourceInner createOrUpdate( - String vaultName, String resourceGroupName, String backupInstanceName, BackupInstanceResourceInner parameters) { - return createOrUpdateAsync(vaultName, resourceGroupName, backupInstanceName, parameters).block(); + String resourceGroupName, String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters) { + return createOrUpdateAsync(resourceGroupName, vaultName, backupInstanceName, parameters).block(); } /** * Create or update a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @param context The context to associate with this operation. @@ -881,47 +981,47 @@ public BackupInstanceResourceInner createOrUpdate( */ @ServiceMethod(returns = ReturnType.SINGLE) public BackupInstanceResourceInner createOrUpdate( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters, Context context) { - return createOrUpdateAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context).block(); + return createOrUpdateAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context).block(); } /** * Delete a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( - String vaultName, String resourceGroupName, String backupInstanceName) { + String resourceGroupName, String vaultName, String backupInstanceName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupInstanceName == null) { return Mono .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); @@ -934,9 +1034,9 @@ private Mono>> deleteWithResponseAsync( .delete( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupInstanceName, accept, context)) @@ -946,37 +1046,37 @@ private Mono>> deleteWithResponseAsync( /** * Delete a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( - String vaultName, String resourceGroupName, String backupInstanceName, Context context) { + String resourceGroupName, String vaultName, String backupInstanceName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupInstanceName == null) { return Mono .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); @@ -987,9 +1087,9 @@ private Mono>> deleteWithResponseAsync( .delete( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupInstanceName, accept, context); @@ -998,42 +1098,43 @@ private Mono>> deleteWithResponseAsync( /** * Delete a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( - String vaultName, String resourceGroupName, String backupInstanceName) { + String resourceGroupName, String vaultName, String backupInstanceName) { Mono>> mono = - deleteWithResponseAsync(vaultName, resourceGroupName, backupInstanceName); + deleteWithResponseAsync(resourceGroupName, vaultName, backupInstanceName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** * Delete a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( - String vaultName, String resourceGroupName, String backupInstanceName, Context context) { + String resourceGroupName, String vaultName, String backupInstanceName, Context context) { context = this.client.mergeContext(context); Mono>> mono = - deleteWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, context); + deleteWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, context); return this .client .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); @@ -1042,52 +1143,52 @@ private PollerFlux, Void> beginDeleteAsync( /** * Delete a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( - String vaultName, String resourceGroupName, String backupInstanceName) { - return beginDeleteAsync(vaultName, resourceGroupName, backupInstanceName).getSyncPoller(); + String resourceGroupName, String vaultName, String backupInstanceName) { + return beginDeleteAsync(resourceGroupName, vaultName, backupInstanceName).getSyncPoller(); } /** * Delete a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( - String vaultName, String resourceGroupName, String backupInstanceName, Context context) { - return beginDeleteAsync(vaultName, resourceGroupName, backupInstanceName, context).getSyncPoller(); + String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + return beginDeleteAsync(resourceGroupName, vaultName, backupInstanceName, context).getSyncPoller(); } /** * Delete a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String vaultName, String resourceGroupName, String backupInstanceName) { - return beginDeleteAsync(vaultName, resourceGroupName, backupInstanceName) + private Mono deleteAsync(String resourceGroupName, String vaultName, String backupInstanceName) { + return beginDeleteAsync(resourceGroupName, vaultName, backupInstanceName) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1095,19 +1196,19 @@ private Mono deleteAsync(String vaultName, String resourceGroupName, Strin /** * Delete a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( - String vaultName, String resourceGroupName, String backupInstanceName, Context context) { - return beginDeleteAsync(vaultName, resourceGroupName, backupInstanceName, context) + String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + return beginDeleteAsync(resourceGroupName, vaultName, backupInstanceName, context) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1115,23 +1216,23 @@ private Mono deleteAsync( /** * Delete a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 vaultName, String resourceGroupName, String backupInstanceName) { - deleteAsync(vaultName, resourceGroupName, backupInstanceName).block(); + public void delete(String resourceGroupName, String vaultName, String backupInstanceName) { + deleteAsync(resourceGroupName, vaultName, backupInstanceName).block(); } /** * Delete a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1139,44 +1240,44 @@ public void delete(String vaultName, String resourceGroupName, String backupInst * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String vaultName, String resourceGroupName, String backupInstanceName, Context context) { - deleteAsync(vaultName, resourceGroupName, backupInstanceName, context).block(); + public void delete(String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + deleteAsync(resourceGroupName, vaultName, backupInstanceName, context).block(); } /** * Trigger adhoc backup. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operationJobExtendedInfo. + * @return operationJobExtendedInfo along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> adhocBackupWithResponseAsync( - String vaultName, String resourceGroupName, String backupInstanceName, TriggerBackupRequest parameters) { + String resourceGroupName, String vaultName, String backupInstanceName, TriggerBackupRequest parameters) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupInstanceName == null) { return Mono .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); @@ -1194,9 +1295,9 @@ private Mono>> adhocBackupWithResponseAsync( .adhocBackup( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupInstanceName, parameters, accept, @@ -1207,20 +1308,20 @@ private Mono>> adhocBackupWithResponseAsync( /** * Trigger adhoc backup. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 operationJobExtendedInfo. + * @return operationJobExtendedInfo along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> adhocBackupWithResponseAsync( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, TriggerBackupRequest parameters, Context context) { @@ -1230,19 +1331,19 @@ private Mono>> adhocBackupWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupInstanceName == null) { return Mono .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); @@ -1258,9 +1359,9 @@ private Mono>> adhocBackupWithResponseAsync( .adhocBackup( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupInstanceName, parameters, accept, @@ -1270,20 +1371,20 @@ private Mono>> adhocBackupWithResponseAsync( /** * Trigger adhoc backup. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operationJobExtendedInfo. + * @return the {@link PollerFlux} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationJobExtendedInfoInner> beginAdhocBackupAsync( - String vaultName, String resourceGroupName, String backupInstanceName, TriggerBackupRequest parameters) { + String resourceGroupName, String vaultName, String backupInstanceName, TriggerBackupRequest parameters) { Mono>> mono = - adhocBackupWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, parameters); + adhocBackupWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters); return this .client .getLroResult( @@ -1291,32 +1392,32 @@ private PollerFlux, OperationJobExtend this.client.getHttpPipeline(), OperationJobExtendedInfoInner.class, OperationJobExtendedInfoInner.class, - Context.NONE); + this.client.getContext()); } /** * Trigger adhoc backup. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 operationJobExtendedInfo. + * @return the {@link PollerFlux} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationJobExtendedInfoInner> beginAdhocBackupAsync( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, TriggerBackupRequest parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono = - adhocBackupWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context); + adhocBackupWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context); return this .client .getLroResult( @@ -1330,61 +1431,61 @@ private PollerFlux, OperationJobExtend /** * Trigger adhoc backup. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operationJobExtendedInfo. + * @return the {@link SyncPoller} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationJobExtendedInfoInner> beginAdhocBackup( - String vaultName, String resourceGroupName, String backupInstanceName, TriggerBackupRequest parameters) { - return beginAdhocBackupAsync(vaultName, resourceGroupName, backupInstanceName, parameters).getSyncPoller(); + String resourceGroupName, String vaultName, String backupInstanceName, TriggerBackupRequest parameters) { + return beginAdhocBackupAsync(resourceGroupName, vaultName, backupInstanceName, parameters).getSyncPoller(); } /** * Trigger adhoc backup. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 operationJobExtendedInfo. + * @return the {@link SyncPoller} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationJobExtendedInfoInner> beginAdhocBackup( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, TriggerBackupRequest parameters, Context context) { - return beginAdhocBackupAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context) + return beginAdhocBackupAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) .getSyncPoller(); } /** * Trigger adhoc backup. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operationJobExtendedInfo. + * @return operationJobExtendedInfo on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono adhocBackupAsync( - String vaultName, String resourceGroupName, String backupInstanceName, TriggerBackupRequest parameters) { - return beginAdhocBackupAsync(vaultName, resourceGroupName, backupInstanceName, parameters) + String resourceGroupName, String vaultName, String backupInstanceName, TriggerBackupRequest parameters) { + return beginAdhocBackupAsync(resourceGroupName, vaultName, backupInstanceName, parameters) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1392,24 +1493,24 @@ private Mono adhocBackupAsync( /** * Trigger adhoc backup. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 operationJobExtendedInfo. + * @return operationJobExtendedInfo on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono adhocBackupAsync( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, TriggerBackupRequest parameters, Context context) { - return beginAdhocBackupAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context) + return beginAdhocBackupAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1417,8 +1518,8 @@ private Mono adhocBackupAsync( /** * Trigger adhoc backup. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1428,15 +1529,15 @@ private Mono adhocBackupAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public OperationJobExtendedInfoInner adhocBackup( - String vaultName, String resourceGroupName, String backupInstanceName, TriggerBackupRequest parameters) { - return adhocBackupAsync(vaultName, resourceGroupName, backupInstanceName, parameters).block(); + String resourceGroupName, String vaultName, String backupInstanceName, TriggerBackupRequest parameters) { + return adhocBackupAsync(resourceGroupName, vaultName, backupInstanceName, parameters).block(); } /** * Trigger adhoc backup. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @param context The context to associate with this operation. @@ -1447,47 +1548,47 @@ public OperationJobExtendedInfoInner adhocBackup( */ @ServiceMethod(returns = ReturnType.SINGLE) public OperationJobExtendedInfoInner adhocBackup( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, TriggerBackupRequest parameters, Context context) { - return adhocBackupAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context).block(); + return adhocBackupAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context).block(); } /** * Validate whether adhoc backup will be successful or not. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operationJobExtendedInfo. + * @return operationJobExtendedInfo along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> validateForBackupWithResponseAsync( - String vaultName, String resourceGroupName, ValidateForBackupRequest parameters) { + String resourceGroupName, String vaultName, ValidateForBackupRequest parameters) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { @@ -1501,9 +1602,9 @@ private Mono>> validateForBackupWithResponseAsync( .validateForBackup( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, parameters, accept, context)) @@ -1513,37 +1614,37 @@ private Mono>> validateForBackupWithResponseAsync( /** * Validate whether adhoc backup will be successful or not. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for 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 operationJobExtendedInfo. + * @return operationJobExtendedInfo along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> validateForBackupWithResponseAsync( - String vaultName, String resourceGroupName, ValidateForBackupRequest parameters, Context context) { + String resourceGroupName, String vaultName, ValidateForBackupRequest parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { @@ -1555,9 +1656,9 @@ private Mono>> validateForBackupWithResponseAsync( .validateForBackup( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, parameters, accept, context); @@ -1566,19 +1667,19 @@ private Mono>> validateForBackupWithResponseAsync( /** * Validate whether adhoc backup will be successful or not. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operationJobExtendedInfo. + * @return the {@link PollerFlux} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationJobExtendedInfoInner> - beginValidateForBackupAsync(String vaultName, String resourceGroupName, ValidateForBackupRequest parameters) { + beginValidateForBackupAsync(String resourceGroupName, String vaultName, ValidateForBackupRequest parameters) { Mono>> mono = - validateForBackupWithResponseAsync(vaultName, resourceGroupName, parameters); + validateForBackupWithResponseAsync(resourceGroupName, vaultName, parameters); return this .client .getLroResult( @@ -1586,28 +1687,28 @@ private Mono>> validateForBackupWithResponseAsync( this.client.getHttpPipeline(), OperationJobExtendedInfoInner.class, OperationJobExtendedInfoInner.class, - Context.NONE); + this.client.getContext()); } /** * Validate whether adhoc backup will be successful or not. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for 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 operationJobExtendedInfo. + * @return the {@link PollerFlux} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationJobExtendedInfoInner> beginValidateForBackupAsync( - String vaultName, String resourceGroupName, ValidateForBackupRequest parameters, Context context) { + String resourceGroupName, String vaultName, ValidateForBackupRequest parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono = - validateForBackupWithResponseAsync(vaultName, resourceGroupName, parameters, context); + validateForBackupWithResponseAsync(resourceGroupName, vaultName, parameters, context); return this .client .getLroResult( @@ -1621,53 +1722,53 @@ private Mono>> validateForBackupWithResponseAsync( /** * Validate whether adhoc backup will be successful or not. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operationJobExtendedInfo. + * @return the {@link SyncPoller} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationJobExtendedInfoInner> beginValidateForBackup( - String vaultName, String resourceGroupName, ValidateForBackupRequest parameters) { - return beginValidateForBackupAsync(vaultName, resourceGroupName, parameters).getSyncPoller(); + String resourceGroupName, String vaultName, ValidateForBackupRequest parameters) { + return beginValidateForBackupAsync(resourceGroupName, vaultName, parameters).getSyncPoller(); } /** * Validate whether adhoc backup will be successful or not. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for 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 operationJobExtendedInfo. + * @return the {@link SyncPoller} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationJobExtendedInfoInner> beginValidateForBackup( - String vaultName, String resourceGroupName, ValidateForBackupRequest parameters, Context context) { - return beginValidateForBackupAsync(vaultName, resourceGroupName, parameters, context).getSyncPoller(); + String resourceGroupName, String vaultName, ValidateForBackupRequest parameters, Context context) { + return beginValidateForBackupAsync(resourceGroupName, vaultName, parameters, context).getSyncPoller(); } /** * Validate whether adhoc backup will be successful or not. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operationJobExtendedInfo. + * @return operationJobExtendedInfo on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono validateForBackupAsync( - String vaultName, String resourceGroupName, ValidateForBackupRequest parameters) { - return beginValidateForBackupAsync(vaultName, resourceGroupName, parameters) + String resourceGroupName, String vaultName, ValidateForBackupRequest parameters) { + return beginValidateForBackupAsync(resourceGroupName, vaultName, parameters) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1675,19 +1776,19 @@ private Mono validateForBackupAsync( /** * Validate whether adhoc backup will be successful or not. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for 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 operationJobExtendedInfo. + * @return operationJobExtendedInfo on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono validateForBackupAsync( - String vaultName, String resourceGroupName, ValidateForBackupRequest parameters, Context context) { - return beginValidateForBackupAsync(vaultName, resourceGroupName, parameters, context) + String resourceGroupName, String vaultName, ValidateForBackupRequest parameters, Context context) { + return beginValidateForBackupAsync(resourceGroupName, vaultName, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1695,8 +1796,8 @@ private Mono validateForBackupAsync( /** * Validate whether adhoc backup will be successful or not. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1705,15 +1806,15 @@ private Mono validateForBackupAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public OperationJobExtendedInfoInner validateForBackup( - String vaultName, String resourceGroupName, ValidateForBackupRequest parameters) { - return validateForBackupAsync(vaultName, resourceGroupName, parameters).block(); + String resourceGroupName, String vaultName, ValidateForBackupRequest parameters) { + return validateForBackupAsync(resourceGroupName, vaultName, parameters).block(); } /** * Validate whether adhoc backup will be successful or not. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1723,44 +1824,42 @@ public OperationJobExtendedInfoInner validateForBackup( */ @ServiceMethod(returns = ReturnType.SINGLE) public OperationJobExtendedInfoInner validateForBackup( - String vaultName, String resourceGroupName, ValidateForBackupRequest parameters, Context context) { - return validateForBackupAsync(vaultName, resourceGroupName, parameters, context).block(); + String resourceGroupName, String vaultName, ValidateForBackupRequest parameters, Context context) { + return validateForBackupAsync(resourceGroupName, vaultName, parameters, context).block(); } /** - * rehydrate recovery point for restore for a BackupInstance. + * Get result of backup instance creation operation. * * @param resourceGroupName The name of the resource group where the backup vault is present. * @param vaultName The name of the backup vault. * @param backupInstanceName The backupInstanceName parameter. - * @param parameters Request body for operation. + * @param operationId The operationId 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 the completion. + * @return result of backup instance creation operation along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> triggerRehydrateWithResponseAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupRehydrationRequest parameters) { + private Mono> getBackupInstanceOperationResultWithResponseAsync( + String resourceGroupName, String vaultName, String backupInstanceName, String operationId) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); } @@ -1768,45 +1867,232 @@ private Mono>> triggerRehydrateWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service - .triggerRehydrate( + .getBackupInstanceOperationResult( this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, vaultName, backupInstanceName, - parameters, + operationId, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * rehydrate recovery point for restore for a BackupInstance. + * Get result of backup instance creation operation. * * @param resourceGroupName The name of the resource group where the backup vault is present. * @param vaultName The name of the backup vault. * @param backupInstanceName The backupInstanceName parameter. - * @param parameters Request body for operation. + * @param operationId The operationId 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 the completion. + * @return result of backup instance creation operation along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> triggerRehydrateWithResponseAsync( - String resourceGroupName, + private Mono> getBackupInstanceOperationResultWithResponseAsync( + String resourceGroupName, String vaultName, String backupInstanceName, String operationId, 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (backupInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getBackupInstanceOperationResult( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + vaultName, + backupInstanceName, + operationId, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get result of backup instance creation operation. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param operationId The operationId 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 result of backup instance creation operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getBackupInstanceOperationResultAsync( + String resourceGroupName, String vaultName, String backupInstanceName, String operationId) { + return getBackupInstanceOperationResultWithResponseAsync( + resourceGroupName, vaultName, backupInstanceName, operationId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get result of backup instance creation operation. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param operationId The operationId 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 result of backup instance creation operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupInstanceResourceInner getBackupInstanceOperationResult( + String resourceGroupName, String vaultName, String backupInstanceName, String operationId) { + return getBackupInstanceOperationResultAsync(resourceGroupName, vaultName, backupInstanceName, operationId) + .block(); + } + + /** + * Get result of backup instance creation operation. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param operationId The operationId 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 result of backup instance creation operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getBackupInstanceOperationResultWithResponse( + String resourceGroupName, String vaultName, String backupInstanceName, String operationId, Context context) { + return getBackupInstanceOperationResultWithResponseAsync( + resourceGroupName, vaultName, backupInstanceName, operationId, context) + .block(); + } + + /** + * rehydrate recovery point for restore for a BackupInstance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> triggerRehydrateWithResponseAsync( + String resourceGroupName, + String vaultName, + String backupInstanceName, + AzureBackupRehydrationRequest parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (backupInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .triggerRehydrate( + this.client.getEndpoint(), + this.client.getApiVersion(), + resourceGroupName, + this.client.getSubscriptionId(), + vaultName, + backupInstanceName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * rehydrate recovery point for restore for a BackupInstance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> triggerRehydrateWithResponseAsync( + String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRehydrationRequest parameters, @@ -1864,7 +2150,7 @@ private Mono>> triggerRehydrateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginTriggerRehydrateAsync( @@ -1876,7 +2162,8 @@ private PollerFlux, Void> beginTriggerRehydrateAsync( triggerRehydrateWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1890,7 +2177,7 @@ private PollerFlux, Void> beginTriggerRehydrateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginTriggerRehydrateAsync( @@ -1917,7 +2204,7 @@ private PollerFlux, Void> beginTriggerRehydrateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginTriggerRehydrate( @@ -1939,7 +2226,7 @@ public SyncPoller, Void> beginTriggerRehydrate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginTriggerRehydrate( @@ -1962,7 +2249,7 @@ public SyncPoller, Void> beginTriggerRehydrate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono triggerRehydrateAsync( @@ -1986,7 +2273,7 @@ private Mono triggerRehydrateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono triggerRehydrateAsync( @@ -2045,37 +2332,37 @@ public void triggerRehydrate( /** * Triggers restore for a BackupInstance. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operationJobExtendedInfo. + * @return operationJobExtendedInfo along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> triggerRestoreWithResponseAsync( - String vaultName, String resourceGroupName, String backupInstanceName, AzureBackupRestoreRequest parameters) { + String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupInstanceName == null) { return Mono .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); @@ -2093,9 +2380,9 @@ private Mono>> triggerRestoreWithResponseAsync( .triggerRestore( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupInstanceName, parameters, accept, @@ -2106,20 +2393,20 @@ private Mono>> triggerRestoreWithResponseAsync( /** * Triggers restore for a BackupInstance. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 operationJobExtendedInfo. + * @return operationJobExtendedInfo along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> triggerRestoreWithResponseAsync( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters, Context context) { @@ -2129,19 +2416,19 @@ private Mono>> triggerRestoreWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupInstanceName == null) { return Mono .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); @@ -2157,9 +2444,9 @@ private Mono>> triggerRestoreWithResponseAsync( .triggerRestore( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupInstanceName, parameters, accept, @@ -2169,24 +2456,24 @@ private Mono>> triggerRestoreWithResponseAsync( /** * Triggers restore for a BackupInstance. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operationJobExtendedInfo. + * @return the {@link PollerFlux} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationJobExtendedInfoInner> beginTriggerRestoreAsync( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters) { Mono>> mono = - triggerRestoreWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, parameters); + triggerRestoreWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters); return this .client .getLroResult( @@ -2194,33 +2481,33 @@ private Mono>> triggerRestoreWithResponseAsync( this.client.getHttpPipeline(), OperationJobExtendedInfoInner.class, OperationJobExtendedInfoInner.class, - Context.NONE); + this.client.getContext()); } /** * Triggers restore for a BackupInstance. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 operationJobExtendedInfo. + * @return the {@link PollerFlux} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationJobExtendedInfoInner> beginTriggerRestoreAsync( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono = - triggerRestoreWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context); + triggerRestoreWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context); return this .client .getLroResult( @@ -2234,61 +2521,61 @@ private Mono>> triggerRestoreWithResponseAsync( /** * Triggers restore for a BackupInstance. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operationJobExtendedInfo. + * @return the {@link SyncPoller} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationJobExtendedInfoInner> beginTriggerRestore( - String vaultName, String resourceGroupName, String backupInstanceName, AzureBackupRestoreRequest parameters) { - return beginTriggerRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters).getSyncPoller(); + String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters) { + return beginTriggerRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters).getSyncPoller(); } /** * Triggers restore for a BackupInstance. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 operationJobExtendedInfo. + * @return the {@link SyncPoller} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationJobExtendedInfoInner> beginTriggerRestore( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters, Context context) { - return beginTriggerRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context) + return beginTriggerRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) .getSyncPoller(); } /** * Triggers restore for a BackupInstance. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operationJobExtendedInfo. + * @return operationJobExtendedInfo on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono triggerRestoreAsync( - String vaultName, String resourceGroupName, String backupInstanceName, AzureBackupRestoreRequest parameters) { - return beginTriggerRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters) + String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters) { + return beginTriggerRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -2296,24 +2583,24 @@ private Mono triggerRestoreAsync( /** * Triggers restore for a BackupInstance. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 operationJobExtendedInfo. + * @return operationJobExtendedInfo on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono triggerRestoreAsync( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters, Context context) { - return beginTriggerRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context) + return beginTriggerRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -2321,8 +2608,8 @@ private Mono triggerRestoreAsync( /** * Triggers restore for a BackupInstance. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2332,15 +2619,15 @@ private Mono triggerRestoreAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public OperationJobExtendedInfoInner triggerRestore( - String vaultName, String resourceGroupName, String backupInstanceName, AzureBackupRestoreRequest parameters) { - return triggerRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters).block(); + String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters) { + return triggerRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters).block(); } /** * Triggers restore for a BackupInstance. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @param context The context to associate with this operation. @@ -2351,52 +2638,1385 @@ public OperationJobExtendedInfoInner triggerRestore( */ @ServiceMethod(returns = ReturnType.SINGLE) public OperationJobExtendedInfoInner triggerRestore( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters, Context context) { - return triggerRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context).block(); + return triggerRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context).block(); } /** - * Validates if Restore can be triggered for a DataSource. + * This operation will resume backups for backup instance. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. - * @param backupInstanceName The name of the backup instance. - * @param parameters Request body for operation. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 operationJobExtendedInfo. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateForRestoreWithResponseAsync( - String vaultName, - String resourceGroupName, - String backupInstanceName, - ValidateRestoreRequestObject parameters) { + private Mono>> resumeBackupsWithResponseAsync( + String resourceGroupName, String vaultName, String backupInstanceName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (backupInstanceName == null) { + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (backupInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .resumeBackups( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + vaultName, + backupInstanceName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * This operation will resume backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resumeBackupsWithResponseAsync( + String resourceGroupName, String vaultName, String backupInstanceName, 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (backupInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .resumeBackups( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + vaultName, + backupInstanceName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * This operation will resume backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginResumeBackupsAsync( + String resourceGroupName, String vaultName, String backupInstanceName) { + Mono>> mono = + resumeBackupsWithResponseAsync(resourceGroupName, vaultName, backupInstanceName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * This operation will resume backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginResumeBackupsAsync( + String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + resumeBackupsWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * This operation will resume backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResumeBackups( + String resourceGroupName, String vaultName, String backupInstanceName) { + return beginResumeBackupsAsync(resourceGroupName, vaultName, backupInstanceName).getSyncPoller(); + } + + /** + * This operation will resume backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResumeBackups( + String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + return beginResumeBackupsAsync(resourceGroupName, vaultName, backupInstanceName, context).getSyncPoller(); + } + + /** + * This operation will resume backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resumeBackupsAsync(String resourceGroupName, String vaultName, String backupInstanceName) { + return beginResumeBackupsAsync(resourceGroupName, vaultName, backupInstanceName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * This operation will resume backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resumeBackupsAsync( + String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + return beginResumeBackupsAsync(resourceGroupName, vaultName, backupInstanceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * This operation will resume backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resumeBackups(String resourceGroupName, String vaultName, String backupInstanceName) { + resumeBackupsAsync(resourceGroupName, vaultName, backupInstanceName).block(); + } + + /** + * This operation will resume backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resumeBackups(String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + resumeBackupsAsync(resourceGroupName, vaultName, backupInstanceName, context).block(); + } + + /** + * This operation will resume protection for a stopped backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resumeProtectionWithResponseAsync( + String resourceGroupName, String vaultName, String backupInstanceName) { + 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (backupInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .resumeProtection( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + vaultName, + backupInstanceName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * This operation will resume protection for a stopped backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resumeProtectionWithResponseAsync( + String resourceGroupName, String vaultName, String backupInstanceName, 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (backupInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .resumeProtection( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + vaultName, + backupInstanceName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * This operation will resume protection for a stopped backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginResumeProtectionAsync( + String resourceGroupName, String vaultName, String backupInstanceName) { + Mono>> mono = + resumeProtectionWithResponseAsync(resourceGroupName, vaultName, backupInstanceName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * This operation will resume protection for a stopped backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginResumeProtectionAsync( + String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + resumeProtectionWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * This operation will resume protection for a stopped backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResumeProtection( + String resourceGroupName, String vaultName, String backupInstanceName) { + return beginResumeProtectionAsync(resourceGroupName, vaultName, backupInstanceName).getSyncPoller(); + } + + /** + * This operation will resume protection for a stopped backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResumeProtection( + String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + return beginResumeProtectionAsync(resourceGroupName, vaultName, backupInstanceName, context).getSyncPoller(); + } + + /** + * This operation will resume protection for a stopped backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resumeProtectionAsync(String resourceGroupName, String vaultName, String backupInstanceName) { + return beginResumeProtectionAsync(resourceGroupName, vaultName, backupInstanceName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * This operation will resume protection for a stopped backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resumeProtectionAsync( + String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + return beginResumeProtectionAsync(resourceGroupName, vaultName, backupInstanceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * This operation will resume protection for a stopped backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resumeProtection(String resourceGroupName, String vaultName, String backupInstanceName) { + resumeProtectionAsync(resourceGroupName, vaultName, backupInstanceName).block(); + } + + /** + * This operation will resume protection for a stopped backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resumeProtection( + String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + resumeProtectionAsync(resourceGroupName, vaultName, backupInstanceName, context).block(); + } + + /** + * This operation will stop protection of a backup instance and data will be held forever. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> stopProtectionWithResponseAsync( + String resourceGroupName, String vaultName, String backupInstanceName) { + 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (backupInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .stopProtection( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + vaultName, + backupInstanceName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * This operation will stop protection of a backup instance and data will be held forever. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> stopProtectionWithResponseAsync( + String resourceGroupName, String vaultName, String backupInstanceName, 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (backupInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .stopProtection( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + vaultName, + backupInstanceName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * This operation will stop protection of a backup instance and data will be held forever. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginStopProtectionAsync( + String resourceGroupName, String vaultName, String backupInstanceName) { + Mono>> mono = + stopProtectionWithResponseAsync(resourceGroupName, vaultName, backupInstanceName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * This operation will stop protection of a backup instance and data will be held forever. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginStopProtectionAsync( + String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + stopProtectionWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * This operation will stop protection of a backup instance and data will be held forever. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStopProtection( + String resourceGroupName, String vaultName, String backupInstanceName) { + return beginStopProtectionAsync(resourceGroupName, vaultName, backupInstanceName).getSyncPoller(); + } + + /** + * This operation will stop protection of a backup instance and data will be held forever. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStopProtection( + String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + return beginStopProtectionAsync(resourceGroupName, vaultName, backupInstanceName, context).getSyncPoller(); + } + + /** + * This operation will stop protection of a backup instance and data will be held forever. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopProtectionAsync(String resourceGroupName, String vaultName, String backupInstanceName) { + return beginStopProtectionAsync(resourceGroupName, vaultName, backupInstanceName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * This operation will stop protection of a backup instance and data will be held forever. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopProtectionAsync( + String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + return beginStopProtectionAsync(resourceGroupName, vaultName, backupInstanceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * This operation will stop protection of a backup instance and data will be held forever. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stopProtection(String resourceGroupName, String vaultName, String backupInstanceName) { + stopProtectionAsync(resourceGroupName, vaultName, backupInstanceName).block(); + } + + /** + * This operation will stop protection of a backup instance and data will be held forever. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stopProtection(String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + stopProtectionAsync(resourceGroupName, vaultName, backupInstanceName, context).block(); + } + + /** + * This operation will stop backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> suspendBackupsWithResponseAsync( + String resourceGroupName, String vaultName, String backupInstanceName) { + 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (backupInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .suspendBackups( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + vaultName, + backupInstanceName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * This operation will stop backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> suspendBackupsWithResponseAsync( + String resourceGroupName, String vaultName, String backupInstanceName, 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (backupInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .suspendBackups( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + vaultName, + backupInstanceName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * This operation will stop backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginSuspendBackupsAsync( + String resourceGroupName, String vaultName, String backupInstanceName) { + Mono>> mono = + suspendBackupsWithResponseAsync(resourceGroupName, vaultName, backupInstanceName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * This operation will stop backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginSuspendBackupsAsync( + String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + suspendBackupsWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * This operation will stop backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginSuspendBackups( + String resourceGroupName, String vaultName, String backupInstanceName) { + return beginSuspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName).getSyncPoller(); + } + + /** + * This operation will stop backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginSuspendBackups( + String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + return beginSuspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName, context).getSyncPoller(); + } + + /** + * This operation will stop backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono suspendBackupsAsync(String resourceGroupName, String vaultName, String backupInstanceName) { + return beginSuspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * This operation will stop backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono suspendBackupsAsync( + String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + return beginSuspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * This operation will stop backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void suspendBackups(String resourceGroupName, String vaultName, String backupInstanceName) { + suspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName).block(); + } + + /** + * This operation will stop backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void suspendBackups(String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + suspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName, context).block(); + } + + /** + * Sync backup instance again in case of failure This action will retry last failed operation and will bring backup + * instance to valid state. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> syncBackupInstanceWithResponseAsync( + String resourceGroupName, String vaultName, String backupInstanceName, SyncBackupInstanceRequest parameters) { + 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (backupInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .syncBackupInstance( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + vaultName, + backupInstanceName, + this.client.getApiVersion(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Sync backup instance again in case of failure This action will retry last failed operation and will bring backup + * instance to valid state. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> syncBackupInstanceWithResponseAsync( + String resourceGroupName, + String vaultName, + String backupInstanceName, + SyncBackupInstanceRequest parameters, + 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (backupInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .syncBackupInstance( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + vaultName, + backupInstanceName, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Sync backup instance again in case of failure This action will retry last failed operation and will bring backup + * instance to valid state. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginSyncBackupInstanceAsync( + String resourceGroupName, String vaultName, String backupInstanceName, SyncBackupInstanceRequest parameters) { + Mono>> mono = + syncBackupInstanceWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Sync backup instance again in case of failure This action will retry last failed operation and will bring backup + * instance to valid state. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginSyncBackupInstanceAsync( + String resourceGroupName, + String vaultName, + String backupInstanceName, + SyncBackupInstanceRequest parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + syncBackupInstanceWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Sync backup instance again in case of failure This action will retry last failed operation and will bring backup + * instance to valid state. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginSyncBackupInstance( + String resourceGroupName, String vaultName, String backupInstanceName, SyncBackupInstanceRequest parameters) { + return beginSyncBackupInstanceAsync(resourceGroupName, vaultName, backupInstanceName, parameters) + .getSyncPoller(); + } + + /** + * Sync backup instance again in case of failure This action will retry last failed operation and will bring backup + * instance to valid state. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginSyncBackupInstance( + String resourceGroupName, + String vaultName, + String backupInstanceName, + SyncBackupInstanceRequest parameters, + Context context) { + return beginSyncBackupInstanceAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) + .getSyncPoller(); + } + + /** + * Sync backup instance again in case of failure This action will retry last failed operation and will bring backup + * instance to valid state. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono syncBackupInstanceAsync( + String resourceGroupName, String vaultName, String backupInstanceName, SyncBackupInstanceRequest parameters) { + return beginSyncBackupInstanceAsync(resourceGroupName, vaultName, backupInstanceName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Sync backup instance again in case of failure This action will retry last failed operation and will bring backup + * instance to valid state. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono syncBackupInstanceAsync( + String resourceGroupName, + String vaultName, + String backupInstanceName, + SyncBackupInstanceRequest parameters, + Context context) { + return beginSyncBackupInstanceAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Sync backup instance again in case of failure This action will retry last failed operation and will bring backup + * instance to valid state. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 syncBackupInstance( + String resourceGroupName, String vaultName, String backupInstanceName, SyncBackupInstanceRequest parameters) { + syncBackupInstanceAsync(resourceGroupName, vaultName, backupInstanceName, parameters).block(); + } + + /** + * Sync backup instance again in case of failure This action will retry last failed operation and will bring backup + * instance to valid state. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param parameters Request body for 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 syncBackupInstance( + String resourceGroupName, + String vaultName, + String backupInstanceName, + SyncBackupInstanceRequest parameters, + Context context) { + syncBackupInstanceAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context).block(); + } + + /** + * Validates if Restore can be triggered for a DataSource. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The name of the backup instance. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operationJobExtendedInfo along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> validateForRestoreWithResponseAsync( + String resourceGroupName, + String vaultName, + String backupInstanceName, + ValidateRestoreRequestObject parameters) { + 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (backupInstanceName == null) { return Mono .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); } @@ -2413,9 +4033,9 @@ private Mono>> validateForRestoreWithResponseAsync( .validateForRestore( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupInstanceName, parameters, accept, @@ -2426,20 +4046,20 @@ private Mono>> validateForRestoreWithResponseAsync( /** * Validates if Restore can be triggered for a DataSource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 operationJobExtendedInfo. + * @return operationJobExtendedInfo along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> validateForRestoreWithResponseAsync( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters, Context context) { @@ -2449,19 +4069,19 @@ private Mono>> validateForRestoreWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupInstanceName == null) { return Mono .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); @@ -2477,9 +4097,9 @@ private Mono>> validateForRestoreWithResponseAsync( .validateForRestore( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupInstanceName, parameters, accept, @@ -2489,24 +4109,24 @@ private Mono>> validateForRestoreWithResponseAsync( /** * Validates if Restore can be triggered for a DataSource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operationJobExtendedInfo. + * @return the {@link PollerFlux} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationJobExtendedInfoInner> beginValidateForRestoreAsync( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters) { Mono>> mono = - validateForRestoreWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, parameters); + validateForRestoreWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters); return this .client .getLroResult( @@ -2514,33 +4134,33 @@ private Mono>> validateForRestoreWithResponseAsync( this.client.getHttpPipeline(), OperationJobExtendedInfoInner.class, OperationJobExtendedInfoInner.class, - Context.NONE); + this.client.getContext()); } /** * Validates if Restore can be triggered for a DataSource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 operationJobExtendedInfo. + * @return the {@link PollerFlux} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationJobExtendedInfoInner> beginValidateForRestoreAsync( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono = - validateForRestoreWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context); + validateForRestoreWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context); return this .client .getLroResult( @@ -2554,68 +4174,68 @@ private Mono>> validateForRestoreWithResponseAsync( /** * Validates if Restore can be triggered for a DataSource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operationJobExtendedInfo. + * @return the {@link SyncPoller} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationJobExtendedInfoInner> beginValidateForRestore( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters) { - return beginValidateForRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters) + return beginValidateForRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters) .getSyncPoller(); } /** * Validates if Restore can be triggered for a DataSource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 operationJobExtendedInfo. + * @return the {@link SyncPoller} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationJobExtendedInfoInner> beginValidateForRestore( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters, Context context) { - return beginValidateForRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context) + return beginValidateForRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) .getSyncPoller(); } /** * Validates if Restore can be triggered for a DataSource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operationJobExtendedInfo. + * @return operationJobExtendedInfo on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono validateForRestoreAsync( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters) { - return beginValidateForRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters) + return beginValidateForRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -2623,24 +4243,24 @@ private Mono validateForRestoreAsync( /** * Validates if Restore can be triggered for a DataSource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 operationJobExtendedInfo. + * @return operationJobExtendedInfo on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono validateForRestoreAsync( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters, Context context) { - return beginValidateForRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context) + return beginValidateForRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -2648,8 +4268,8 @@ private Mono validateForRestoreAsync( /** * Validates if Restore can be triggered for a DataSource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2659,18 +4279,18 @@ private Mono validateForRestoreAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public OperationJobExtendedInfoInner validateForRestore( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters) { - return validateForRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters).block(); + return validateForRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters).block(); } /** * Validates if Restore can be triggered for a DataSource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @param context The context to associate with this operation. @@ -2681,12 +4301,12 @@ public OperationJobExtendedInfoInner validateForRestore( */ @ServiceMethod(returns = ReturnType.SINGLE) public OperationJobExtendedInfoInner validateForRestore( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters, Context context) { - return validateForRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context).block(); + return validateForRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context).block(); } /** @@ -2696,7 +4316,7 @@ public OperationJobExtendedInfoInner validateForRestore( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupInstanceResourceList. + * @return backupInstanceResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -2732,7 +4352,7 @@ private Mono> listNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupInstanceResourceList. + * @return backupInstanceResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesExtensionRoutingsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesExtensionRoutingsClientImpl.java new file mode 100644 index 0000000000000..cfceecb44cbaf --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesExtensionRoutingsClientImpl.java @@ -0,0 +1,293 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.dataprotection.fluent.BackupInstancesExtensionRoutingsClient; +import com.azure.resourcemanager.dataprotection.fluent.models.BackupInstanceResourceInner; +import com.azure.resourcemanager.dataprotection.models.BackupInstanceResourceList; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in BackupInstancesExtensionRoutingsClient. + */ +public final class BackupInstancesExtensionRoutingsClientImpl implements BackupInstancesExtensionRoutingsClient { + /** The proxy service used to perform REST calls. */ + private final BackupInstancesExtensionRoutingsService service; + + /** The service client containing this operation class. */ + private final DataProtectionClientImpl client; + + /** + * Initializes an instance of BackupInstancesExtensionRoutingsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BackupInstancesExtensionRoutingsClientImpl(DataProtectionClientImpl client) { + this.service = + RestProxy + .create( + BackupInstancesExtensionRoutingsService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DataProtectionClientBackupInstancesExtensionRoutings to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DataProtectionClient") + private interface BackupInstancesExtensionRoutingsService { + @Headers({"Content-Type: application/json"}) + @Get("/{resourceId}/providers/Microsoft.DataProtection/backupInstances") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("resourceId") String resourceId, + @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); + } + + /** + * Gets a list backup instances associated with a tracked resource. + * + * @param resourceId ARM path of the resource to be protected using Microsoft.DataProtection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list backup instances associated with a tracked resource along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceId == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceId, accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list backup instances associated with a tracked resource. + * + * @param resourceId ARM path of the resource to be protected using Microsoft.DataProtection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list backup instances associated with a tracked resource along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceId == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceId 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(), resourceId, accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets a list backup instances associated with a tracked resource. + * + * @param resourceId ARM path of the resource to be protected using Microsoft.DataProtection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list backup instances associated with a tracked resource as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceId) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceId), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list backup instances associated with a tracked resource. + * + * @param resourceId ARM path of the resource to be protected using Microsoft.DataProtection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list backup instances associated with a tracked resource as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceId, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceId, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list backup instances associated with a tracked resource. + * + * @param resourceId ARM path of the resource to be protected using Microsoft.DataProtection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list backup instances associated with a tracked resource as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceId) { + return new PagedIterable<>(listAsync(resourceId)); + } + + /** + * Gets a list backup instances associated with a tracked resource. + * + * @param resourceId ARM path of the resource to be protected using Microsoft.DataProtection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list backup instances associated with a tracked resource as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceId, Context context) { + return new PagedIterable<>(listAsync(resourceId, context)); + } + + /** + * 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 backupInstanceResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The 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 backupInstanceResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesExtensionRoutingsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesExtensionRoutingsImpl.java new file mode 100644 index 0000000000000..cafd38d8058a5 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesExtensionRoutingsImpl.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.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.dataprotection.fluent.BackupInstancesExtensionRoutingsClient; +import com.azure.resourcemanager.dataprotection.fluent.models.BackupInstanceResourceInner; +import com.azure.resourcemanager.dataprotection.models.BackupInstanceResource; +import com.azure.resourcemanager.dataprotection.models.BackupInstancesExtensionRoutings; + +public final class BackupInstancesExtensionRoutingsImpl implements BackupInstancesExtensionRoutings { + private static final ClientLogger LOGGER = new ClientLogger(BackupInstancesExtensionRoutingsImpl.class); + + private final BackupInstancesExtensionRoutingsClient innerClient; + + private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; + + public BackupInstancesExtensionRoutingsImpl( + BackupInstancesExtensionRoutingsClient innerClient, + com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceId) { + PagedIterable inner = this.serviceClient().list(resourceId); + return Utils.mapPage(inner, inner1 -> new BackupInstanceResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceId, Context context) { + PagedIterable inner = this.serviceClient().list(resourceId, context); + return Utils.mapPage(inner, inner1 -> new BackupInstanceResourceImpl(inner1, this.manager())); + } + + private BackupInstancesExtensionRoutingsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.dataprotection.DataProtectionManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesImpl.java index d4380187ee44f..a430cb5fd554d 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesImpl.java @@ -17,13 +17,13 @@ import com.azure.resourcemanager.dataprotection.models.BackupInstanceResource; import com.azure.resourcemanager.dataprotection.models.BackupInstances; import com.azure.resourcemanager.dataprotection.models.OperationJobExtendedInfo; +import com.azure.resourcemanager.dataprotection.models.SyncBackupInstanceRequest; import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest; import com.azure.resourcemanager.dataprotection.models.ValidateForBackupRequest; import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class BackupInstancesImpl implements BackupInstances { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupInstancesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(BackupInstancesImpl.class); private final BackupInstancesClient innerClient; @@ -36,19 +36,19 @@ public BackupInstancesImpl( this.serviceManager = serviceManager; } - public PagedIterable list(String vaultName, String resourceGroupName) { - PagedIterable inner = this.serviceClient().list(vaultName, resourceGroupName); + public PagedIterable list(String resourceGroupName, String vaultName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, vaultName); return Utils.mapPage(inner, inner1 -> new BackupInstanceResourceImpl(inner1, this.manager())); } - public PagedIterable list(String vaultName, String resourceGroupName, Context context) { + public PagedIterable list(String resourceGroupName, String vaultName, Context context) { PagedIterable inner = - this.serviceClient().list(vaultName, resourceGroupName, context); + this.serviceClient().list(resourceGroupName, vaultName, context); return Utils.mapPage(inner, inner1 -> new BackupInstanceResourceImpl(inner1, this.manager())); } - public BackupInstanceResource get(String vaultName, String resourceGroupName, String backupInstanceName) { - BackupInstanceResourceInner inner = this.serviceClient().get(vaultName, resourceGroupName, backupInstanceName); + public BackupInstanceResource get(String resourceGroupName, String vaultName, String backupInstanceName) { + BackupInstanceResourceInner inner = this.serviceClient().get(resourceGroupName, vaultName, backupInstanceName); if (inner != null) { return new BackupInstanceResourceImpl(inner, this.manager()); } else { @@ -57,9 +57,9 @@ public BackupInstanceResource get(String vaultName, String resourceGroupName, St } public Response getWithResponse( - String vaultName, String resourceGroupName, String backupInstanceName, Context context) { + String resourceGroupName, String vaultName, String backupInstanceName, Context context) { Response inner = - this.serviceClient().getWithResponse(vaultName, resourceGroupName, backupInstanceName, context); + this.serviceClient().getWithResponse(resourceGroupName, vaultName, backupInstanceName, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), @@ -71,18 +71,18 @@ public Response getWithResponse( } } - public void delete(String vaultName, String resourceGroupName, String backupInstanceName) { - this.serviceClient().delete(vaultName, resourceGroupName, backupInstanceName); + public void delete(String resourceGroupName, String vaultName, String backupInstanceName) { + this.serviceClient().delete(resourceGroupName, vaultName, backupInstanceName); } - public void delete(String vaultName, String resourceGroupName, String backupInstanceName, Context context) { - this.serviceClient().delete(vaultName, resourceGroupName, backupInstanceName, context); + public void delete(String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + this.serviceClient().delete(resourceGroupName, vaultName, backupInstanceName, context); } public OperationJobExtendedInfo adhocBackup( - String vaultName, String resourceGroupName, String backupInstanceName, TriggerBackupRequest parameters) { + String resourceGroupName, String vaultName, String backupInstanceName, TriggerBackupRequest parameters) { OperationJobExtendedInfoInner inner = - this.serviceClient().adhocBackup(vaultName, resourceGroupName, backupInstanceName, parameters); + this.serviceClient().adhocBackup(resourceGroupName, vaultName, backupInstanceName, parameters); if (inner != null) { return new OperationJobExtendedInfoImpl(inner, this.manager()); } else { @@ -91,13 +91,13 @@ public OperationJobExtendedInfo adhocBackup( } public OperationJobExtendedInfo adhocBackup( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, TriggerBackupRequest parameters, Context context) { OperationJobExtendedInfoInner inner = - this.serviceClient().adhocBackup(vaultName, resourceGroupName, backupInstanceName, parameters, context); + this.serviceClient().adhocBackup(resourceGroupName, vaultName, backupInstanceName, parameters, context); if (inner != null) { return new OperationJobExtendedInfoImpl(inner, this.manager()); } else { @@ -106,9 +106,9 @@ public OperationJobExtendedInfo adhocBackup( } public OperationJobExtendedInfo validateForBackup( - String vaultName, String resourceGroupName, ValidateForBackupRequest parameters) { + String resourceGroupName, String vaultName, ValidateForBackupRequest parameters) { OperationJobExtendedInfoInner inner = - this.serviceClient().validateForBackup(vaultName, resourceGroupName, parameters); + this.serviceClient().validateForBackup(resourceGroupName, vaultName, parameters); if (inner != null) { return new OperationJobExtendedInfoImpl(inner, this.manager()); } else { @@ -117,9 +117,9 @@ public OperationJobExtendedInfo validateForBackup( } public OperationJobExtendedInfo validateForBackup( - String vaultName, String resourceGroupName, ValidateForBackupRequest parameters, Context context) { + String resourceGroupName, String vaultName, ValidateForBackupRequest parameters, Context context) { OperationJobExtendedInfoInner inner = - this.serviceClient().validateForBackup(vaultName, resourceGroupName, parameters, context); + this.serviceClient().validateForBackup(resourceGroupName, vaultName, parameters, context); if (inner != null) { return new OperationJobExtendedInfoImpl(inner, this.manager()); } else { @@ -127,6 +127,37 @@ public OperationJobExtendedInfo validateForBackup( } } + public BackupInstanceResource getBackupInstanceOperationResult( + String resourceGroupName, String vaultName, String backupInstanceName, String operationId) { + BackupInstanceResourceInner inner = + this + .serviceClient() + .getBackupInstanceOperationResult(resourceGroupName, vaultName, backupInstanceName, operationId); + if (inner != null) { + return new BackupInstanceResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getBackupInstanceOperationResultWithResponse( + String resourceGroupName, String vaultName, String backupInstanceName, String operationId, Context context) { + Response inner = + this + .serviceClient() + .getBackupInstanceOperationResultWithResponse( + resourceGroupName, vaultName, backupInstanceName, operationId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new BackupInstanceResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + public void triggerRehydrate( String resourceGroupName, String vaultName, @@ -145,9 +176,9 @@ public void triggerRehydrate( } public OperationJobExtendedInfo triggerRestore( - String vaultName, String resourceGroupName, String backupInstanceName, AzureBackupRestoreRequest parameters) { + String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters) { OperationJobExtendedInfoInner inner = - this.serviceClient().triggerRestore(vaultName, resourceGroupName, backupInstanceName, parameters); + this.serviceClient().triggerRestore(resourceGroupName, vaultName, backupInstanceName, parameters); if (inner != null) { return new OperationJobExtendedInfoImpl(inner, this.manager()); } else { @@ -156,13 +187,13 @@ public OperationJobExtendedInfo triggerRestore( } public OperationJobExtendedInfo triggerRestore( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters, Context context) { OperationJobExtendedInfoInner inner = - this.serviceClient().triggerRestore(vaultName, resourceGroupName, backupInstanceName, parameters, context); + this.serviceClient().triggerRestore(resourceGroupName, vaultName, backupInstanceName, parameters, context); if (inner != null) { return new OperationJobExtendedInfoImpl(inner, this.manager()); } else { @@ -170,13 +201,60 @@ public OperationJobExtendedInfo triggerRestore( } } - public OperationJobExtendedInfo validateForRestore( + public void resumeBackups(String resourceGroupName, String vaultName, String backupInstanceName) { + this.serviceClient().resumeBackups(resourceGroupName, vaultName, backupInstanceName); + } + + public void resumeBackups(String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + this.serviceClient().resumeBackups(resourceGroupName, vaultName, backupInstanceName, context); + } + + public void resumeProtection(String resourceGroupName, String vaultName, String backupInstanceName) { + this.serviceClient().resumeProtection(resourceGroupName, vaultName, backupInstanceName); + } + + public void resumeProtection( + String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + this.serviceClient().resumeProtection(resourceGroupName, vaultName, backupInstanceName, context); + } + + public void stopProtection(String resourceGroupName, String vaultName, String backupInstanceName) { + this.serviceClient().stopProtection(resourceGroupName, vaultName, backupInstanceName); + } + + public void stopProtection(String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + this.serviceClient().stopProtection(resourceGroupName, vaultName, backupInstanceName, context); + } + + public void suspendBackups(String resourceGroupName, String vaultName, String backupInstanceName) { + this.serviceClient().suspendBackups(resourceGroupName, vaultName, backupInstanceName); + } + + public void suspendBackups(String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + this.serviceClient().suspendBackups(resourceGroupName, vaultName, backupInstanceName, context); + } + + public void syncBackupInstance( + String resourceGroupName, String vaultName, String backupInstanceName, SyncBackupInstanceRequest parameters) { + this.serviceClient().syncBackupInstance(resourceGroupName, vaultName, backupInstanceName, parameters); + } + + public void syncBackupInstance( + String resourceGroupName, String vaultName, + String backupInstanceName, + SyncBackupInstanceRequest parameters, + Context context) { + this.serviceClient().syncBackupInstance(resourceGroupName, vaultName, backupInstanceName, parameters, context); + } + + public OperationJobExtendedInfo validateForRestore( String resourceGroupName, + String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters) { OperationJobExtendedInfoInner inner = - this.serviceClient().validateForRestore(vaultName, resourceGroupName, backupInstanceName, parameters); + this.serviceClient().validateForRestore(resourceGroupName, vaultName, backupInstanceName, parameters); if (inner != null) { return new OperationJobExtendedInfoImpl(inner, this.manager()); } else { @@ -185,15 +263,15 @@ public OperationJobExtendedInfo validateForRestore( } public OperationJobExtendedInfo validateForRestore( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters, Context context) { OperationJobExtendedInfoInner inner = this .serviceClient() - .validateForRestore(vaultName, resourceGroupName, backupInstanceName, parameters, context); + .validateForRestore(resourceGroupName, vaultName, backupInstanceName, parameters, context); if (inner != null) { return new OperationJobExtendedInfoImpl(inner, this.manager()); } else { @@ -202,111 +280,111 @@ public OperationJobExtendedInfo validateForRestore( } public BackupInstanceResource getById(String id) { - String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); - if (vaultName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); - } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } + String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); + if (vaultName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); + } String backupInstanceName = Utils.getValueFromIdByName(id, "backupInstances"); if (backupInstanceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String .format("The resource ID '%s' is not valid. Missing path segment 'backupInstances'.", id))); } - return this.getWithResponse(vaultName, resourceGroupName, backupInstanceName, Context.NONE).getValue(); + return this.getWithResponse(resourceGroupName, vaultName, backupInstanceName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); - if (vaultName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); - } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } + String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); + if (vaultName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); + } String backupInstanceName = Utils.getValueFromIdByName(id, "backupInstances"); if (backupInstanceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String .format("The resource ID '%s' is not valid. Missing path segment 'backupInstances'.", id))); } - return this.getWithResponse(vaultName, resourceGroupName, backupInstanceName, context); + return this.getWithResponse(resourceGroupName, vaultName, backupInstanceName, context); } public void deleteById(String id) { - String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); - if (vaultName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); - } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } + String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); + if (vaultName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); + } String backupInstanceName = Utils.getValueFromIdByName(id, "backupInstances"); if (backupInstanceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String .format("The resource ID '%s' is not valid. Missing path segment 'backupInstances'.", id))); } - this.delete(vaultName, resourceGroupName, backupInstanceName, Context.NONE); + this.delete(resourceGroupName, vaultName, backupInstanceName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); - if (vaultName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); - } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } + String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); + if (vaultName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); + } String backupInstanceName = Utils.getValueFromIdByName(id, "backupInstances"); if (backupInstanceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String .format("The resource ID '%s' is not valid. Missing path segment 'backupInstances'.", id))); } - this.delete(vaultName, resourceGroupName, backupInstanceName, context); + this.delete(resourceGroupName, vaultName, backupInstanceName, context); } private BackupInstancesClient serviceClient() { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupPoliciesClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupPoliciesClientImpl.java index 745ec656b5f53..9c507ff40d8e7 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupPoliciesClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupPoliciesClientImpl.java @@ -28,7 +28,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.fluent.BackupPoliciesClient; import com.azure.resourcemanager.dataprotection.fluent.models.BaseBackupPolicyResourceInner; import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicyResourceList; @@ -36,8 +35,6 @@ /** An instance of this class provides access to all the operations defined in BackupPoliciesClient. */ public final class BackupPoliciesClientImpl implements BackupPoliciesClient { - private final ClientLogger logger = new ClientLogger(BackupPoliciesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final BackupPoliciesService service; @@ -71,9 +68,9 @@ private interface BackupPoliciesService { Mono> list( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, @HeaderParam("Accept") String accept, Context context); @@ -86,9 +83,9 @@ Mono> list( Mono> get( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, @PathParam("backupPolicyName") String backupPolicyName, @HeaderParam("Accept") String accept, Context context); @@ -102,9 +99,9 @@ Mono> get( Mono> createOrUpdate( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, @PathParam("backupPolicyName") String backupPolicyName, @BodyParam("application/json") BaseBackupPolicyResourceInner parameters, @HeaderParam("Accept") String accept, @@ -119,9 +116,9 @@ Mono> createOrUpdate( Mono> delete( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, @PathParam("backupPolicyName") String backupPolicyName, @HeaderParam("Accept") String accept, Context context); @@ -140,35 +137,35 @@ Mono> listNext( /** * Returns list of backup policies belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return baseBackupPolicyResourceList. + * @return baseBackupPolicyResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String vaultName, String resourceGroupName) { + String resourceGroupName, String vaultName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext( @@ -177,9 +174,9 @@ private Mono> listSinglePageAsync( .list( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, accept, context)) .>map( @@ -197,45 +194,45 @@ private Mono> listSinglePageAsync( /** * Returns list of backup policies belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return baseBackupPolicyResourceList. + * @return baseBackupPolicyResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String vaultName, String resourceGroupName, Context context) { + String resourceGroupName, String vaultName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName 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(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, accept, context) .map( @@ -252,103 +249,104 @@ private Mono> listSinglePageAsync( /** * Returns list of backup policies belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return baseBackupPolicyResourceList. + * @return baseBackupPolicyResourceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName) { + private PagedFlux listAsync(String resourceGroupName, String vaultName) { return new PagedFlux<>( - () -> listSinglePageAsync(vaultName, resourceGroupName), nextLink -> listNextSinglePageAsync(nextLink)); + () -> listSinglePageAsync(resourceGroupName, vaultName), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Returns list of backup policies belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return baseBackupPolicyResourceList. + * @return baseBackupPolicyResourceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String vaultName, String resourceGroupName, Context context) { + String resourceGroupName, String vaultName, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(vaultName, resourceGroupName, context), + () -> listSinglePageAsync(resourceGroupName, vaultName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Returns list of backup policies belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return baseBackupPolicyResourceList. + * @return baseBackupPolicyResourceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String vaultName, String resourceGroupName) { - return new PagedIterable<>(listAsync(vaultName, resourceGroupName)); + public PagedIterable list(String resourceGroupName, String vaultName) { + return new PagedIterable<>(listAsync(resourceGroupName, vaultName)); } /** * Returns list of backup policies belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return baseBackupPolicyResourceList. + * @return baseBackupPolicyResourceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( - String vaultName, String resourceGroupName, Context context) { - return new PagedIterable<>(listAsync(vaultName, resourceGroupName, context)); + String resourceGroupName, String vaultName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, vaultName, context)); } /** * Gets a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName 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 a backup policy belonging to a backup vault. + * @return a backup policy belonging to a backup vault along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( - String vaultName, String resourceGroupName, String backupPolicyName) { + String resourceGroupName, String vaultName, String backupPolicyName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupPolicyName == null) { return Mono .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); @@ -361,9 +359,9 @@ private Mono> getWithResponseAsync( .get( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupPolicyName, accept, context)) @@ -373,37 +371,38 @@ private Mono> getWithResponseAsync( /** * Gets a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName 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 a backup policy belonging to a backup vault. + * @return a backup policy belonging to a backup vault along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( - String vaultName, String resourceGroupName, String backupPolicyName, Context context) { + String resourceGroupName, String vaultName, 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 (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupPolicyName == null) { return Mono .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); @@ -414,9 +413,9 @@ private Mono> getWithResponseAsync( .get( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupPolicyName, accept, context); @@ -425,18 +424,18 @@ private Mono> getWithResponseAsync( /** * Gets a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName 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 a backup policy belonging to a backup vault. + * @return a backup policy belonging to a backup vault on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( - String vaultName, String resourceGroupName, String backupPolicyName) { - return getWithResponseAsync(vaultName, resourceGroupName, backupPolicyName) + String resourceGroupName, String vaultName, String backupPolicyName) { + return getWithResponseAsync(resourceGroupName, vaultName, backupPolicyName) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -450,8 +449,8 @@ private Mono getAsync( /** * Gets a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -459,62 +458,62 @@ private Mono getAsync( * @return a backup policy belonging to a backup vault. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BaseBackupPolicyResourceInner get(String vaultName, String resourceGroupName, String backupPolicyName) { - return getAsync(vaultName, resourceGroupName, backupPolicyName).block(); + public BaseBackupPolicyResourceInner get(String resourceGroupName, String vaultName, String backupPolicyName) { + return getAsync(resourceGroupName, vaultName, backupPolicyName).block(); } /** * Gets a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName 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 a backup policy belonging to a backup vault. + * @return a backup policy belonging to a backup vault along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( - String vaultName, String resourceGroupName, String backupPolicyName, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, backupPolicyName, context).block(); + String resourceGroupName, String vaultName, String backupPolicyName, Context context) { + return getWithResponseAsync(resourceGroupName, vaultName, backupPolicyName, context).block(); } /** * Creates or Updates a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName Name of the policy. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return baseBackupPolicyResource. + * @return baseBackupPolicyResource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( - String vaultName, String resourceGroupName, String backupPolicyName, BaseBackupPolicyResourceInner parameters) { + String resourceGroupName, String vaultName, String backupPolicyName, BaseBackupPolicyResourceInner parameters) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupPolicyName == null) { return Mono .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); @@ -532,9 +531,9 @@ private Mono> createOrUpdateWithResponse .createOrUpdate( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupPolicyName, parameters, accept, @@ -545,20 +544,20 @@ private Mono> createOrUpdateWithResponse /** * Creates or Updates a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName Name of the policy. * @param parameters Request body for 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 baseBackupPolicyResource. + * @return baseBackupPolicyResource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( - String vaultName, String resourceGroupName, + String vaultName, String backupPolicyName, BaseBackupPolicyResourceInner parameters, Context context) { @@ -568,19 +567,19 @@ private Mono> createOrUpdateWithResponse new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupPolicyName == null) { return Mono .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); @@ -596,9 +595,9 @@ private Mono> createOrUpdateWithResponse .createOrUpdate( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupPolicyName, parameters, accept, @@ -608,19 +607,19 @@ private Mono> createOrUpdateWithResponse /** * Creates or Updates a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName Name of the policy. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return baseBackupPolicyResource. + * @return baseBackupPolicyResource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( - String vaultName, String resourceGroupName, String backupPolicyName, BaseBackupPolicyResourceInner parameters) { - return createOrUpdateWithResponseAsync(vaultName, resourceGroupName, backupPolicyName, parameters) + String resourceGroupName, String vaultName, String backupPolicyName, BaseBackupPolicyResourceInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, vaultName, backupPolicyName, parameters) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -634,8 +633,8 @@ private Mono createOrUpdateAsync( /** * Creates or Updates a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName Name of the policy. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -645,67 +644,67 @@ private Mono createOrUpdateAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public BaseBackupPolicyResourceInner createOrUpdate( - String vaultName, String resourceGroupName, String backupPolicyName, BaseBackupPolicyResourceInner parameters) { - return createOrUpdateAsync(vaultName, resourceGroupName, backupPolicyName, parameters).block(); + String resourceGroupName, String vaultName, String backupPolicyName, BaseBackupPolicyResourceInner parameters) { + return createOrUpdateAsync(resourceGroupName, vaultName, backupPolicyName, parameters).block(); } /** * Creates or Updates a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName Name of the policy. * @param parameters Request body for 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 baseBackupPolicyResource. + * @return baseBackupPolicyResource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( - String vaultName, String resourceGroupName, + String vaultName, String backupPolicyName, BaseBackupPolicyResourceInner parameters, Context context) { - return createOrUpdateWithResponseAsync(vaultName, resourceGroupName, backupPolicyName, parameters, context) + return createOrUpdateWithResponseAsync(resourceGroupName, vaultName, backupPolicyName, parameters, context) .block(); } /** * Deletes a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName 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 the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( - String vaultName, String resourceGroupName, String backupPolicyName) { + String resourceGroupName, String vaultName, String backupPolicyName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupPolicyName == null) { return Mono .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); @@ -718,9 +717,9 @@ private Mono> deleteWithResponseAsync( .delete( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupPolicyName, accept, context)) @@ -730,37 +729,37 @@ private Mono> deleteWithResponseAsync( /** * Deletes a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName 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 the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( - String vaultName, String resourceGroupName, String backupPolicyName, Context context) { + String resourceGroupName, String vaultName, 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 (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupPolicyName == null) { return Mono .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); @@ -771,9 +770,9 @@ private Mono> deleteWithResponseAsync( .delete( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupPolicyName, accept, context); @@ -782,51 +781,51 @@ private Mono> deleteWithResponseAsync( /** * Deletes a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName 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 the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String vaultName, String resourceGroupName, String backupPolicyName) { - return deleteWithResponseAsync(vaultName, resourceGroupName, backupPolicyName) + private Mono deleteAsync(String resourceGroupName, String vaultName, String backupPolicyName) { + return deleteWithResponseAsync(resourceGroupName, vaultName, backupPolicyName) .flatMap((Response res) -> Mono.empty()); } /** * Deletes a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String vaultName, String resourceGroupName, String backupPolicyName) { - deleteAsync(vaultName, resourceGroupName, backupPolicyName).block(); + public void delete(String resourceGroupName, String vaultName, String backupPolicyName) { + deleteAsync(resourceGroupName, vaultName, backupPolicyName).block(); } /** * Deletes a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName 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 the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse( - String vaultName, String resourceGroupName, String backupPolicyName, Context context) { - return deleteWithResponseAsync(vaultName, resourceGroupName, backupPolicyName, context).block(); + String resourceGroupName, String vaultName, String backupPolicyName, Context context) { + return deleteWithResponseAsync(resourceGroupName, vaultName, backupPolicyName, context).block(); } /** @@ -836,7 +835,7 @@ public Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return baseBackupPolicyResourceList. + * @return baseBackupPolicyResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -872,7 +871,7 @@ private Mono> listNextSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return baseBackupPolicyResourceList. + * @return baseBackupPolicyResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync( diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupPoliciesImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupPoliciesImpl.java index 61a5f27047556..2f259c82db0d8 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupPoliciesImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupPoliciesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.dataprotection.fluent.models.BaseBackupPolicyResourceInner; import com.azure.resourcemanager.dataprotection.models.BackupPolicies; import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicyResource; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class BackupPoliciesImpl implements BackupPolicies { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupPoliciesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(BackupPoliciesImpl.class); private final BackupPoliciesClient innerClient; @@ -29,19 +28,19 @@ public BackupPoliciesImpl( this.serviceManager = serviceManager; } - public PagedIterable list(String vaultName, String resourceGroupName) { - PagedIterable inner = this.serviceClient().list(vaultName, resourceGroupName); + public PagedIterable list(String resourceGroupName, String vaultName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, vaultName); return Utils.mapPage(inner, inner1 -> new BaseBackupPolicyResourceImpl(inner1, this.manager())); } - public PagedIterable list(String vaultName, String resourceGroupName, Context context) { + public PagedIterable list(String resourceGroupName, String vaultName, Context context) { PagedIterable inner = - this.serviceClient().list(vaultName, resourceGroupName, context); + this.serviceClient().list(resourceGroupName, vaultName, context); return Utils.mapPage(inner, inner1 -> new BaseBackupPolicyResourceImpl(inner1, this.manager())); } - public BaseBackupPolicyResource get(String vaultName, String resourceGroupName, String backupPolicyName) { - BaseBackupPolicyResourceInner inner = this.serviceClient().get(vaultName, resourceGroupName, backupPolicyName); + public BaseBackupPolicyResource get(String resourceGroupName, String vaultName, String backupPolicyName) { + BaseBackupPolicyResourceInner inner = this.serviceClient().get(resourceGroupName, vaultName, backupPolicyName); if (inner != null) { return new BaseBackupPolicyResourceImpl(inner, this.manager()); } else { @@ -50,9 +49,9 @@ public BaseBackupPolicyResource get(String vaultName, String resourceGroupName, } public Response getWithResponse( - String vaultName, String resourceGroupName, String backupPolicyName, Context context) { + String resourceGroupName, String vaultName, String backupPolicyName, Context context) { Response inner = - this.serviceClient().getWithResponse(vaultName, resourceGroupName, backupPolicyName, context); + this.serviceClient().getWithResponse(resourceGroupName, vaultName, backupPolicyName, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), @@ -64,121 +63,121 @@ public Response getWithResponse( } } - public void delete(String vaultName, String resourceGroupName, String backupPolicyName) { - this.serviceClient().delete(vaultName, resourceGroupName, backupPolicyName); + public void delete(String resourceGroupName, String vaultName, String backupPolicyName) { + this.serviceClient().delete(resourceGroupName, vaultName, backupPolicyName); } public Response deleteWithResponse( - String vaultName, String resourceGroupName, String backupPolicyName, Context context) { - return this.serviceClient().deleteWithResponse(vaultName, resourceGroupName, backupPolicyName, context); + String resourceGroupName, String vaultName, String backupPolicyName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, vaultName, backupPolicyName, context); } public BaseBackupPolicyResource getById(String id) { - String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); - if (vaultName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); - } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } + String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); + if (vaultName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); + } String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies"); if (backupPolicyName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String .format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id))); } - return this.getWithResponse(vaultName, resourceGroupName, backupPolicyName, Context.NONE).getValue(); + return this.getWithResponse(resourceGroupName, vaultName, backupPolicyName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); - if (vaultName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); - } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } + String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); + if (vaultName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); + } String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies"); if (backupPolicyName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String .format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id))); } - return this.getWithResponse(vaultName, resourceGroupName, backupPolicyName, context); + return this.getWithResponse(resourceGroupName, vaultName, backupPolicyName, context); } public void deleteById(String id) { - String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); - if (vaultName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); - } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } + String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); + if (vaultName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); + } String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies"); if (backupPolicyName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String .format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id))); } - this.deleteWithResponse(vaultName, resourceGroupName, backupPolicyName, Context.NONE); + this.deleteWithResponse(resourceGroupName, vaultName, backupPolicyName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); - if (vaultName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); - } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } + String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); + if (vaultName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); + } String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies"); if (backupPolicyName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String .format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id))); } - return this.deleteWithResponse(vaultName, resourceGroupName, backupPolicyName, context); + return this.deleteWithResponse(resourceGroupName, vaultName, backupPolicyName, context); } private BackupPoliciesClient serviceClient() { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultOperationResultsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultOperationResultsClientImpl.java index 9cb08e1eb523e..aa60ecedac283 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultOperationResultsClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultOperationResultsClientImpl.java @@ -20,7 +20,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.fluent.BackupVaultOperationResultsClient; import com.azure.resourcemanager.dataprotection.fluent.models.BackupVaultResourceInner; import com.azure.resourcemanager.dataprotection.models.BackupVaultOperationResultsGetResponse; @@ -28,8 +27,6 @@ /** An instance of this class provides access to all the operations defined in BackupVaultOperationResultsClient. */ public final class BackupVaultOperationResultsClientImpl implements BackupVaultOperationResultsClient { - private final ClientLogger logger = new ClientLogger(BackupVaultOperationResultsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final BackupVaultOperationResultsService service; @@ -65,45 +62,45 @@ private interface BackupVaultOperationResultsService { Mono get( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); } /** - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param operationId The operationId 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 backupVault Resource. + * @return backupVault Resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getWithResponseAsync( - String vaultName, String resourceGroupName, String operationId) { + String resourceGroupName, String vaultName, String operationId) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } @@ -115,9 +112,9 @@ private Mono getWithResponseAsync( .get( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, operationId, accept, context)) @@ -125,37 +122,37 @@ private Mono getWithResponseAsync( } /** - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param operationId The operationId 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 backupVault Resource. + * @return backupVault Resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getWithResponseAsync( - String vaultName, String resourceGroupName, String operationId, Context context) { + String resourceGroupName, String vaultName, String operationId, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } @@ -165,26 +162,26 @@ private Mono getWithResponseAsync( .get( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, operationId, accept, context); } /** - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param operationId The operationId 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 backupVault Resource. + * @return backupVault Resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String vaultName, String resourceGroupName, String operationId) { - return getWithResponseAsync(vaultName, resourceGroupName, operationId) + private Mono getAsync(String resourceGroupName, String vaultName, String operationId) { + return getWithResponseAsync(resourceGroupName, vaultName, operationId) .flatMap( (BackupVaultOperationResultsGetResponse res) -> { if (res.getValue() != null) { @@ -196,8 +193,8 @@ private Mono getAsync(String vaultName, String resourc } /** - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -205,13 +202,13 @@ private Mono getAsync(String vaultName, String resourc * @return backupVault Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BackupVaultResourceInner get(String vaultName, String resourceGroupName, String operationId) { - return getAsync(vaultName, resourceGroupName, operationId).block(); + public BackupVaultResourceInner get(String resourceGroupName, String vaultName, String operationId) { + return getAsync(resourceGroupName, vaultName, operationId).block(); } /** - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -221,7 +218,7 @@ public BackupVaultResourceInner get(String vaultName, String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) public BackupVaultOperationResultsGetResponse getWithResponse( - String vaultName, String resourceGroupName, String operationId, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, operationId, context).block(); + String resourceGroupName, String vaultName, String operationId, Context context) { + return getWithResponseAsync(resourceGroupName, vaultName, operationId, context).block(); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultOperationResultsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultOperationResultsImpl.java index 2046845383f6d..bee4119f1e59c 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultOperationResultsImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultOperationResultsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.dataprotection.models.BackupVaultOperationResults; import com.azure.resourcemanager.dataprotection.models.BackupVaultOperationResultsGetResponse; import com.azure.resourcemanager.dataprotection.models.BackupVaultResource; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class BackupVaultOperationResultsImpl implements BackupVaultOperationResults { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupVaultOperationResultsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(BackupVaultOperationResultsImpl.class); private final BackupVaultOperationResultsClient innerClient; @@ -29,8 +28,8 @@ public BackupVaultOperationResultsImpl( this.serviceManager = serviceManager; } - public BackupVaultResource get(String vaultName, String resourceGroupName, String operationId) { - BackupVaultResourceInner inner = this.serviceClient().get(vaultName, resourceGroupName, operationId); + public BackupVaultResource get(String resourceGroupName, String vaultName, String operationId) { + BackupVaultResourceInner inner = this.serviceClient().get(resourceGroupName, vaultName, operationId); if (inner != null) { return new BackupVaultResourceImpl(inner, this.manager()); } else { @@ -39,9 +38,9 @@ public BackupVaultResource get(String vaultName, String resourceGroupName, Strin } public Response getWithResponse( - String vaultName, String resourceGroupName, String operationId, Context context) { + String resourceGroupName, String vaultName, String operationId, Context context) { BackupVaultOperationResultsGetResponse inner = - this.serviceClient().getWithResponse(vaultName, resourceGroupName, operationId, context); + this.serviceClient().getWithResponse(resourceGroupName, vaultName, operationId, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultResourceImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultResourceImpl.java index 866824bb7241f..615bc75c810ff 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultResourceImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultResourceImpl.java @@ -11,6 +11,7 @@ import com.azure.resourcemanager.dataprotection.models.BackupVault; import com.azure.resourcemanager.dataprotection.models.BackupVaultResource; import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails; +import com.azure.resourcemanager.dataprotection.models.PatchBackupVaultInput; import com.azure.resourcemanager.dataprotection.models.PatchResourceRequestInput; import java.util.Collections; import java.util.Map; @@ -78,10 +79,10 @@ private com.azure.resourcemanager.dataprotection.DataProtectionManager manager() return this.serviceManager; } - private String vaultName; - private String resourceGroupName; + private String vaultName; + private PatchResourceRequestInput updateParameters; public BackupVaultResourceImpl withExistingResourceGroup(String resourceGroupName) { @@ -94,7 +95,7 @@ public BackupVaultResource create() { serviceManager .serviceClient() .getBackupVaults() - .createOrUpdate(vaultName, resourceGroupName, this.innerModel(), Context.NONE); + .createOrUpdate(resourceGroupName, vaultName, this.innerModel(), Context.NONE); return this; } @@ -103,7 +104,7 @@ public BackupVaultResource create(Context context) { serviceManager .serviceClient() .getBackupVaults() - .createOrUpdate(vaultName, resourceGroupName, this.innerModel(), context); + .createOrUpdate(resourceGroupName, vaultName, this.innerModel(), context); return this; } @@ -124,7 +125,7 @@ public BackupVaultResource apply() { serviceManager .serviceClient() .getBackupVaults() - .update(vaultName, resourceGroupName, updateParameters, Context.NONE); + .update(resourceGroupName, vaultName, updateParameters, Context.NONE); return this; } @@ -133,7 +134,7 @@ public BackupVaultResource apply(Context context) { serviceManager .serviceClient() .getBackupVaults() - .update(vaultName, resourceGroupName, updateParameters, context); + .update(resourceGroupName, vaultName, updateParameters, context); return this; } @@ -142,8 +143,8 @@ public BackupVaultResource apply(Context context) { com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.vaultName = Utils.getValueFromIdByName(innerObject.id(), "backupVaults"); this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.vaultName = Utils.getValueFromIdByName(innerObject.id(), "backupVaults"); } public BackupVaultResource refresh() { @@ -206,6 +207,11 @@ public BackupVaultResourceImpl withIdentity(DppIdentityDetails identity) { } } + public BackupVaultResourceImpl withProperties(PatchBackupVaultInput properties) { + this.updateParameters.withProperties(properties); + return this; + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultsClientImpl.java index e702298e64037..713615e1f1c2d 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultsClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultsClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.dataprotection.fluent.BackupVaultsClient; @@ -46,8 +45,6 @@ /** An instance of this class provides access to all the operations defined in BackupVaultsClient. */ public final class BackupVaultsClientImpl implements BackupVaultsClient { - private final ClientLogger logger = new ClientLogger(BackupVaultsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final BackupVaultsService service; @@ -106,9 +103,9 @@ Mono> listByResourceGroup( Mono> getByResourceGroup( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @@ -121,9 +118,9 @@ Mono> getByResourceGroup( Mono>> createOrUpdate( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, @BodyParam("application/json") BackupVaultResourceInner parameters, @HeaderParam("Accept") String accept, Context context); @@ -137,9 +134,9 @@ Mono>> createOrUpdate( Mono> delete( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @@ -152,9 +149,9 @@ Mono> delete( Mono>> update( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, @BodyParam("application/json") PatchResourceRequestInput parameters, @HeaderParam("Accept") String accept, Context context); @@ -201,7 +198,7 @@ Mono> getInResourceGroupNext( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -247,7 +244,7 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -288,7 +285,7 @@ private Mono> listSinglePageAsync(Contex * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -302,7 +299,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -315,7 +312,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -329,7 +326,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -343,7 +340,7 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { @@ -395,7 +392,7 @@ private Mono> listByResourceGroupSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -444,7 +441,7 @@ private Mono> listByResourceGroupSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -461,7 +458,7 @@ private PagedFlux listByResourceGroupAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -477,7 +474,7 @@ private PagedFlux listByResourceGroupAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -492,7 +489,7 @@ public PagedIterable listByResourceGroup(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -507,7 +504,7 @@ public PagedIterable listByResourceGroup(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVault Resource. + * @return backupVault Resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -518,6 +515,12 @@ private Mono> getByResourceGroupWithResponseA 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.")); @@ -525,12 +528,6 @@ private Mono> getByResourceGroupWithResponseA if (vaultName == null) { return Mono.error(new IllegalArgumentException("Parameter vaultName 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( @@ -539,9 +536,9 @@ private Mono> getByResourceGroupWithResponseA .getByResourceGroup( this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, - this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -556,7 +553,7 @@ private Mono> getByResourceGroupWithResponseA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVault Resource. + * @return backupVault Resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -567,6 +564,12 @@ private Mono> getByResourceGroupWithResponseA 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.")); @@ -574,21 +577,15 @@ private Mono> getByResourceGroupWithResponseA if (vaultName == null) { return Mono.error(new IllegalArgumentException("Parameter vaultName 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 .getByResourceGroup( this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, - this.client.getSubscriptionId(), accept, context); } @@ -601,7 +598,7 @@ private Mono> getByResourceGroupWithResponseA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVault Resource. + * @return backupVault Resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String vaultName) { @@ -640,7 +637,7 @@ public BackupVaultResourceInner getByResourceGroup(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVault Resource. + * @return backupVault Resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -651,36 +648,36 @@ public Response getByResourceGroupWithResponse( /** * Creates or updates a BackupVault resource belonging to a resource group. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVault Resource. + * @return backupVault Resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( - String vaultName, String resourceGroupName, BackupVaultResourceInner parameters) { + String resourceGroupName, String vaultName, BackupVaultResourceInner parameters) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { @@ -694,9 +691,9 @@ private Mono>> createOrUpdateWithResponseAsync( .createOrUpdate( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, parameters, accept, context)) @@ -706,37 +703,37 @@ private Mono>> createOrUpdateWithResponseAsync( /** * Creates or updates a BackupVault resource belonging to a resource group. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for 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 backupVault Resource. + * @return backupVault Resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( - String vaultName, String resourceGroupName, BackupVaultResourceInner parameters, Context context) { + String resourceGroupName, String vaultName, BackupVaultResourceInner parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { @@ -748,9 +745,9 @@ private Mono>> createOrUpdateWithResponseAsync( .createOrUpdate( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, parameters, accept, context); @@ -759,19 +756,19 @@ private Mono>> createOrUpdateWithResponseAsync( /** * Creates or updates a BackupVault resource belonging to a resource group. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVault Resource. + * @return the {@link PollerFlux} for polling of backupVault Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BackupVaultResourceInner> beginCreateOrUpdateAsync( - String vaultName, String resourceGroupName, BackupVaultResourceInner parameters) { + String resourceGroupName, String vaultName, BackupVaultResourceInner parameters) { Mono>> mono = - createOrUpdateWithResponseAsync(vaultName, resourceGroupName, parameters); + createOrUpdateWithResponseAsync(resourceGroupName, vaultName, parameters); return this .client .getLroResult( @@ -779,27 +776,27 @@ private PollerFlux, BackupVaultResourceInne this.client.getHttpPipeline(), BackupVaultResourceInner.class, BackupVaultResourceInner.class, - Context.NONE); + this.client.getContext()); } /** * Creates or updates a BackupVault resource belonging to a resource group. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for 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 backupVault Resource. + * @return the {@link PollerFlux} for polling of backupVault Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BackupVaultResourceInner> beginCreateOrUpdateAsync( - String vaultName, String resourceGroupName, BackupVaultResourceInner parameters, Context context) { + String resourceGroupName, String vaultName, BackupVaultResourceInner parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono = - createOrUpdateWithResponseAsync(vaultName, resourceGroupName, parameters, context); + createOrUpdateWithResponseAsync(resourceGroupName, vaultName, parameters, context); return this .client .getLroResult( @@ -813,53 +810,53 @@ private PollerFlux, BackupVaultResourceInne /** * Creates or updates a BackupVault resource belonging to a resource group. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVault Resource. + * @return the {@link SyncPoller} for polling of backupVault Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BackupVaultResourceInner> beginCreateOrUpdate( - String vaultName, String resourceGroupName, BackupVaultResourceInner parameters) { - return beginCreateOrUpdateAsync(vaultName, resourceGroupName, parameters).getSyncPoller(); + String resourceGroupName, String vaultName, BackupVaultResourceInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, vaultName, parameters).getSyncPoller(); } /** * Creates or updates a BackupVault resource belonging to a resource group. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for 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 backupVault Resource. + * @return the {@link SyncPoller} for polling of backupVault Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BackupVaultResourceInner> beginCreateOrUpdate( - String vaultName, String resourceGroupName, BackupVaultResourceInner parameters, Context context) { - return beginCreateOrUpdateAsync(vaultName, resourceGroupName, parameters, context).getSyncPoller(); + String resourceGroupName, String vaultName, BackupVaultResourceInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, vaultName, parameters, context).getSyncPoller(); } /** * Creates or updates a BackupVault resource belonging to a resource group. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVault Resource. + * @return backupVault Resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( - String vaultName, String resourceGroupName, BackupVaultResourceInner parameters) { - return beginCreateOrUpdateAsync(vaultName, resourceGroupName, parameters) + String resourceGroupName, String vaultName, BackupVaultResourceInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, vaultName, parameters) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -867,19 +864,19 @@ private Mono createOrUpdateAsync( /** * Creates or updates a BackupVault resource belonging to a resource group. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for 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 backupVault Resource. + * @return backupVault Resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( - String vaultName, String resourceGroupName, BackupVaultResourceInner parameters, Context context) { - return beginCreateOrUpdateAsync(vaultName, resourceGroupName, parameters, context) + String resourceGroupName, String vaultName, BackupVaultResourceInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, vaultName, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -887,8 +884,8 @@ private Mono createOrUpdateAsync( /** * Creates or updates a BackupVault resource belonging to a resource group. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -897,15 +894,15 @@ private Mono createOrUpdateAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public BackupVaultResourceInner createOrUpdate( - String vaultName, String resourceGroupName, BackupVaultResourceInner parameters) { - return createOrUpdateAsync(vaultName, resourceGroupName, parameters).block(); + String resourceGroupName, String vaultName, BackupVaultResourceInner parameters) { + return createOrUpdateAsync(resourceGroupName, vaultName, parameters).block(); } /** * Creates or updates a BackupVault resource belonging to a resource group. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -915,8 +912,8 @@ public BackupVaultResourceInner createOrUpdate( */ @ServiceMethod(returns = ReturnType.SINGLE) public BackupVaultResourceInner createOrUpdate( - String vaultName, String resourceGroupName, BackupVaultResourceInner parameters, Context context) { - return createOrUpdateAsync(vaultName, resourceGroupName, parameters, context).block(); + String resourceGroupName, String vaultName, BackupVaultResourceInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, vaultName, parameters, context).block(); } /** @@ -927,7 +924,7 @@ public BackupVaultResourceInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String vaultName) { @@ -937,6 +934,12 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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.")); @@ -944,12 +947,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (vaultName == null) { return Mono.error(new IllegalArgumentException("Parameter vaultName 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( @@ -958,9 +955,9 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S .delete( this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, - this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -975,7 +972,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String vaultName, Context context) { @@ -985,6 +982,12 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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.")); @@ -992,21 +995,15 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (vaultName == null) { return Mono.error(new IllegalArgumentException("Parameter vaultName 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 .delete( this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, - this.client.getSubscriptionId(), accept, context); } @@ -1019,7 +1016,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String vaultName) { @@ -1049,7 +1046,7 @@ public void delete(String resourceGroupName, String vaultName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String vaultName, Context context) { @@ -1059,36 +1056,36 @@ public Response deleteWithResponse(String resourceGroupName, String vaultN /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVault Resource. + * @return backupVault Resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( - String vaultName, String resourceGroupName, PatchResourceRequestInput parameters) { + String resourceGroupName, String vaultName, PatchResourceRequestInput parameters) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { @@ -1102,9 +1099,9 @@ private Mono>> updateWithResponseAsync( .update( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, parameters, accept, context)) @@ -1114,37 +1111,37 @@ private Mono>> updateWithResponseAsync( /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for 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 backupVault Resource. + * @return backupVault Resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( - String vaultName, String resourceGroupName, PatchResourceRequestInput parameters, Context context) { + String resourceGroupName, String vaultName, PatchResourceRequestInput parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { @@ -1156,9 +1153,9 @@ private Mono>> updateWithResponseAsync( .update( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, parameters, accept, context); @@ -1167,18 +1164,18 @@ private Mono>> updateWithResponseAsync( /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVault Resource. + * @return the {@link PollerFlux} for polling of backupVault Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BackupVaultResourceInner> beginUpdateAsync( - String vaultName, String resourceGroupName, PatchResourceRequestInput parameters) { - Mono>> mono = updateWithResponseAsync(vaultName, resourceGroupName, parameters); + String resourceGroupName, String vaultName, PatchResourceRequestInput parameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, vaultName, parameters); return this .client .getLroResult( @@ -1186,27 +1183,27 @@ private PollerFlux, BackupVaultResourceInne this.client.getHttpPipeline(), BackupVaultResourceInner.class, BackupVaultResourceInner.class, - Context.NONE); + this.client.getContext()); } /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for 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 backupVault Resource. + * @return the {@link PollerFlux} for polling of backupVault Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BackupVaultResourceInner> beginUpdateAsync( - String vaultName, String resourceGroupName, PatchResourceRequestInput parameters, Context context) { + String resourceGroupName, String vaultName, PatchResourceRequestInput parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono = - updateWithResponseAsync(vaultName, resourceGroupName, parameters, context); + updateWithResponseAsync(resourceGroupName, vaultName, parameters, context); return this .client .getLroResult( @@ -1220,53 +1217,53 @@ private PollerFlux, BackupVaultResourceInne /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVault Resource. + * @return the {@link SyncPoller} for polling of backupVault Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BackupVaultResourceInner> beginUpdate( - String vaultName, String resourceGroupName, PatchResourceRequestInput parameters) { - return beginUpdateAsync(vaultName, resourceGroupName, parameters).getSyncPoller(); + String resourceGroupName, String vaultName, PatchResourceRequestInput parameters) { + return beginUpdateAsync(resourceGroupName, vaultName, parameters).getSyncPoller(); } /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for 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 backupVault Resource. + * @return the {@link SyncPoller} for polling of backupVault Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BackupVaultResourceInner> beginUpdate( - String vaultName, String resourceGroupName, PatchResourceRequestInput parameters, Context context) { - return beginUpdateAsync(vaultName, resourceGroupName, parameters, context).getSyncPoller(); + String resourceGroupName, String vaultName, PatchResourceRequestInput parameters, Context context) { + return beginUpdateAsync(resourceGroupName, vaultName, parameters, context).getSyncPoller(); } /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVault Resource. + * @return backupVault Resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( - String vaultName, String resourceGroupName, PatchResourceRequestInput parameters) { - return beginUpdateAsync(vaultName, resourceGroupName, parameters) + String resourceGroupName, String vaultName, PatchResourceRequestInput parameters) { + return beginUpdateAsync(resourceGroupName, vaultName, parameters) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1274,19 +1271,19 @@ private Mono updateAsync( /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for 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 backupVault Resource. + * @return backupVault Resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( - String vaultName, String resourceGroupName, PatchResourceRequestInput parameters, Context context) { - return beginUpdateAsync(vaultName, resourceGroupName, parameters, context) + String resourceGroupName, String vaultName, PatchResourceRequestInput parameters, Context context) { + return beginUpdateAsync(resourceGroupName, vaultName, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1294,8 +1291,8 @@ private Mono updateAsync( /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1304,15 +1301,15 @@ private Mono updateAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public BackupVaultResourceInner update( - String vaultName, String resourceGroupName, PatchResourceRequestInput parameters) { - return updateAsync(vaultName, resourceGroupName, parameters).block(); + String resourceGroupName, String vaultName, PatchResourceRequestInput parameters) { + return updateAsync(resourceGroupName, vaultName, parameters).block(); } /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1322,8 +1319,8 @@ public BackupVaultResourceInner update( */ @ServiceMethod(returns = ReturnType.SINGLE) public BackupVaultResourceInner update( - String vaultName, String resourceGroupName, PatchResourceRequestInput parameters, Context context) { - return updateAsync(vaultName, resourceGroupName, parameters, context).block(); + String resourceGroupName, String vaultName, PatchResourceRequestInput parameters, Context context) { + return updateAsync(resourceGroupName, vaultName, parameters, context).block(); } /** @@ -1335,7 +1332,7 @@ public BackupVaultResourceInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return checkNameAvailabilityResult. + * @return checkNameAvailabilityResult along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkNameAvailabilityWithResponseAsync( @@ -1391,7 +1388,7 @@ private Mono> checkNameAvailabilityWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return checkNameAvailabilityResult. + * @return checkNameAvailabilityResult along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkNameAvailabilityWithResponseAsync( @@ -1443,7 +1440,7 @@ private Mono> checkNameAvailabilityWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return checkNameAvailabilityResult. + * @return checkNameAvailabilityResult on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono checkNameAvailabilityAsync( @@ -1486,7 +1483,7 @@ public CheckNameAvailabilityResultInner checkNameAvailability( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return checkNameAvailabilityResult. + * @return checkNameAvailabilityResult along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response checkNameAvailabilityWithResponse( @@ -1501,7 +1498,7 @@ public Response checkNameAvailabilityWithRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getInSubscriptionNextSinglePageAsync(String nextLink) { @@ -1537,7 +1534,7 @@ private Mono> getInSubscriptionNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getInSubscriptionNextSinglePageAsync( @@ -1573,7 +1570,7 @@ private Mono> getInSubscriptionNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getInResourceGroupNextSinglePageAsync(String nextLink) { @@ -1610,7 +1607,7 @@ private Mono> getInResourceGroupNextSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getInResourceGroupNextSinglePageAsync( diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultsImpl.java index c3542900bf170..187a667b81bc3 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultsImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultsImpl.java @@ -16,10 +16,9 @@ import com.azure.resourcemanager.dataprotection.models.BackupVaults; import com.azure.resourcemanager.dataprotection.models.CheckNameAvailabilityRequest; import com.azure.resourcemanager.dataprotection.models.CheckNameAvailabilityResult; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class BackupVaultsImpl implements BackupVaults { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupVaultsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(BackupVaultsImpl.class); private final BackupVaultsClient innerClient; @@ -113,7 +112,7 @@ public Response checkNameAvailabilityWithResponse( public BackupVaultResource getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -121,7 +120,7 @@ public BackupVaultResource getById(String id) { } String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); if (vaultName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); @@ -132,7 +131,7 @@ public BackupVaultResource getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -140,7 +139,7 @@ public Response getByIdWithResponse(String id, Context cont } String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); if (vaultName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); @@ -151,7 +150,7 @@ public Response getByIdWithResponse(String id, Context cont public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -159,7 +158,7 @@ public void deleteById(String id) { } String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); if (vaultName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); @@ -170,7 +169,7 @@ public void deleteById(String id) { public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -178,7 +177,7 @@ public Response deleteByIdWithResponse(String id, Context context) { } String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); if (vaultName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BaseBackupPolicyResourceImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BaseBackupPolicyResourceImpl.java index 1e6f43498a571..ac38712088629 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BaseBackupPolicyResourceImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BaseBackupPolicyResourceImpl.java @@ -44,15 +44,15 @@ private com.azure.resourcemanager.dataprotection.DataProtectionManager manager() return this.serviceManager; } - private String vaultName; - private String resourceGroupName; + private String vaultName; + private String backupPolicyName; - public BaseBackupPolicyResourceImpl withExistingBackupVault(String vaultName, String resourceGroupName) { - this.vaultName = vaultName; + public BaseBackupPolicyResourceImpl withExistingBackupVault(String resourceGroupName, String vaultName) { this.resourceGroupName = resourceGroupName; + this.vaultName = vaultName; return this; } @@ -62,7 +62,7 @@ public BaseBackupPolicyResource create() { .serviceClient() .getBackupPolicies() .createOrUpdateWithResponse( - vaultName, resourceGroupName, backupPolicyName, this.innerModel(), Context.NONE) + resourceGroupName, vaultName, backupPolicyName, this.innerModel(), Context.NONE) .getValue(); return this; } @@ -72,7 +72,7 @@ public BaseBackupPolicyResource create(Context context) { serviceManager .serviceClient() .getBackupPolicies() - .createOrUpdateWithResponse(vaultName, resourceGroupName, backupPolicyName, this.innerModel(), context) + .createOrUpdateWithResponse(resourceGroupName, vaultName, backupPolicyName, this.innerModel(), context) .getValue(); return this; } @@ -94,7 +94,7 @@ public BaseBackupPolicyResource apply() { .serviceClient() .getBackupPolicies() .createOrUpdateWithResponse( - vaultName, resourceGroupName, backupPolicyName, this.innerModel(), Context.NONE) + resourceGroupName, vaultName, backupPolicyName, this.innerModel(), Context.NONE) .getValue(); return this; } @@ -104,7 +104,7 @@ public BaseBackupPolicyResource apply(Context context) { serviceManager .serviceClient() .getBackupPolicies() - .createOrUpdateWithResponse(vaultName, resourceGroupName, backupPolicyName, this.innerModel(), context) + .createOrUpdateWithResponse(resourceGroupName, vaultName, backupPolicyName, this.innerModel(), context) .getValue(); return this; } @@ -114,8 +114,8 @@ public BaseBackupPolicyResource apply(Context context) { com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.vaultName = Utils.getValueFromIdByName(innerObject.id(), "backupVaults"); this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.vaultName = Utils.getValueFromIdByName(innerObject.id(), "backupVaults"); this.backupPolicyName = Utils.getValueFromIdByName(innerObject.id(), "backupPolicies"); } @@ -124,7 +124,7 @@ public BaseBackupPolicyResource refresh() { serviceManager .serviceClient() .getBackupPolicies() - .getWithResponse(vaultName, resourceGroupName, backupPolicyName, Context.NONE) + .getWithResponse(resourceGroupName, vaultName, backupPolicyName, Context.NONE) .getValue(); return this; } @@ -134,7 +134,7 @@ public BaseBackupPolicyResource refresh(Context context) { serviceManager .serviceClient() .getBackupPolicies() - .getWithResponse(vaultName, resourceGroupName, backupPolicyName, context) + .getWithResponse(resourceGroupName, vaultName, backupPolicyName, context) .getValue(); return this; } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientBuilder.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientBuilder.java index 3b406729a3ef3..288bc3dbf454f 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientBuilder.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientBuilder.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.AzureEnvironment; @@ -67,34 +66,34 @@ public DataProtectionClientBuilder environment(AzureEnvironment environment) { } /* - * The default poll interval for long-running operation + * The HTTP pipeline to send requests through */ - private Duration defaultPollInterval; + private HttpPipeline pipeline; /** - * Sets The default poll interval for long-running operation. + * Sets The HTTP pipeline to send requests through. * - * @param defaultPollInterval the defaultPollInterval value. + * @param pipeline the pipeline value. * @return the DataProtectionClientBuilder. */ - public DataProtectionClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; + public DataProtectionClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; return this; } /* - * The HTTP pipeline to send requests through + * The default poll interval for long-running operation */ - private HttpPipeline pipeline; + private Duration defaultPollInterval; /** - * Sets The HTTP pipeline to send requests through. + * Sets The default poll interval for long-running operation. * - * @param pipeline the pipeline value. + * @param defaultPollInterval the defaultPollInterval value. * @return the DataProtectionClientBuilder. */ - public DataProtectionClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; + public DataProtectionClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; return this; } @@ -126,15 +125,12 @@ public DataProtectionClientImpl buildClient() { if (environment == null) { this.environment = AzureEnvironment.AZURE; } + if (pipeline == null) { + this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + } if (defaultPollInterval == null) { this.defaultPollInterval = Duration.ofSeconds(30); } - if (pipeline == null) { - this.pipeline = - new HttpPipelineBuilder() - .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) - .build(); - } if (serializerAdapter == null) { this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientImpl.java index 9b21a94c02f46..23e4ed92f88a4 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientImpl.java @@ -22,6 +22,7 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.dataprotection.fluent.BackupInstancesClient; +import com.azure.resourcemanager.dataprotection.fluent.BackupInstancesExtensionRoutingsClient; import com.azure.resourcemanager.dataprotection.fluent.BackupPoliciesClient; import com.azure.resourcemanager.dataprotection.fluent.BackupVaultOperationResultsClient; import com.azure.resourcemanager.dataprotection.fluent.BackupVaultsClient; @@ -32,7 +33,9 @@ import com.azure.resourcemanager.dataprotection.fluent.ExportJobsOperationResultsClient; import com.azure.resourcemanager.dataprotection.fluent.JobsClient; import com.azure.resourcemanager.dataprotection.fluent.OperationResultsClient; +import com.azure.resourcemanager.dataprotection.fluent.OperationStatusBackupVaultContextsClient; import com.azure.resourcemanager.dataprotection.fluent.OperationStatusClient; +import com.azure.resourcemanager.dataprotection.fluent.OperationStatusResourceGroupContextsClient; import com.azure.resourcemanager.dataprotection.fluent.RecoveryPointsClient; import com.azure.resourcemanager.dataprotection.fluent.ResourceGuardsClient; import com.azure.resourcemanager.dataprotection.fluent.RestorableTimeRangesClient; @@ -49,8 +52,6 @@ /** Initializes a new instance of the DataProtectionClientImpl type. */ @ServiceClient(builder = DataProtectionClientBuilder.class) public final class DataProtectionClientImpl implements DataProtectionClient { - private final ClientLogger logger = new ClientLogger(DataProtectionClientImpl.class); - /** The subscription Id. */ private final String subscriptionId; @@ -159,6 +160,30 @@ public OperationStatusClient getOperationStatus() { return this.operationStatus; } + /** The OperationStatusBackupVaultContextsClient object to access its operations. */ + private final OperationStatusBackupVaultContextsClient operationStatusBackupVaultContexts; + + /** + * Gets the OperationStatusBackupVaultContextsClient object to access its operations. + * + * @return the OperationStatusBackupVaultContextsClient object. + */ + public OperationStatusBackupVaultContextsClient getOperationStatusBackupVaultContexts() { + return this.operationStatusBackupVaultContexts; + } + + /** The OperationStatusResourceGroupContextsClient object to access its operations. */ + private final OperationStatusResourceGroupContextsClient operationStatusResourceGroupContexts; + + /** + * Gets the OperationStatusResourceGroupContextsClient object to access its operations. + * + * @return the OperationStatusResourceGroupContextsClient object. + */ + public OperationStatusResourceGroupContextsClient getOperationStatusResourceGroupContexts() { + return this.operationStatusResourceGroupContexts; + } + /** The BackupVaultOperationResultsClient object to access its operations. */ private final BackupVaultOperationResultsClient backupVaultOperationResults; @@ -219,6 +244,18 @@ public BackupInstancesClient getBackupInstances() { return this.backupInstances; } + /** The BackupInstancesExtensionRoutingsClient object to access its operations. */ + private final BackupInstancesExtensionRoutingsClient backupInstancesExtensionRoutings; + + /** + * Gets the BackupInstancesExtensionRoutingsClient object to access its operations. + * + * @return the BackupInstancesExtensionRoutingsClient object. + */ + public BackupInstancesExtensionRoutingsClient getBackupInstancesExtensionRoutings() { + return this.backupInstancesExtensionRoutings; + } + /** The RecoveryPointsClient object to access its operations. */ private final RecoveryPointsClient recoveryPoints; @@ -313,15 +350,18 @@ public ResourceGuardsClient getResourceGuards() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-07-01"; + this.apiVersion = "2022-03-31-preview"; this.backupVaults = new BackupVaultsClientImpl(this); this.operationResults = new OperationResultsClientImpl(this); this.operationStatus = new OperationStatusClientImpl(this); + this.operationStatusBackupVaultContexts = new OperationStatusBackupVaultContextsClientImpl(this); + this.operationStatusResourceGroupContexts = new OperationStatusResourceGroupContextsClientImpl(this); this.backupVaultOperationResults = new BackupVaultOperationResultsClientImpl(this); this.dataProtections = new DataProtectionsClientImpl(this); this.dataProtectionOperations = new DataProtectionOperationsClientImpl(this); this.backupPolicies = new BackupPoliciesClientImpl(this); this.backupInstances = new BackupInstancesClientImpl(this); + this.backupInstancesExtensionRoutings = new BackupInstancesExtensionRoutingsClientImpl(this); this.recoveryPoints = new RecoveryPointsClientImpl(this); this.jobs = new JobsClientImpl(this); this.restorableTimeRanges = new RestorableTimeRangesClientImpl(this); @@ -413,7 +453,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -472,4 +512,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(DataProtectionClientImpl.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionOperationsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionOperationsClientImpl.java index 6055bbc399cfd..d3ca4c7efbdb4 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionOperationsClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionOperationsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.fluent.DataProtectionOperationsClient; import com.azure.resourcemanager.dataprotection.fluent.models.ClientDiscoveryValueForSingleApiInner; import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryResponse; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in DataProtectionOperationsClient. */ public final class DataProtectionOperationsClientImpl implements DataProtectionOperationsClient { - private final ClientLogger logger = new ClientLogger(DataProtectionOperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final DataProtectionOperationsService service; @@ -86,7 +83,7 @@ Mono> listNext( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clientDiscoveryResponse. + * @return clientDiscoveryResponse along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -119,7 +116,7 @@ private Mono> listSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clientDiscoveryResponse. + * @return clientDiscoveryResponse along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -149,7 +146,7 @@ private Mono> listSinglePag * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clientDiscoveryResponse. + * @return clientDiscoveryResponse as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -163,7 +160,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clientDiscoveryResponse. + * @return clientDiscoveryResponse as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -176,7 +173,7 @@ private PagedFlux listAsync(Context conte * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clientDiscoveryResponse. + * @return clientDiscoveryResponse as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -190,7 +187,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clientDiscoveryResponse. + * @return clientDiscoveryResponse as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -204,7 +201,7 @@ public PagedIterable list(Context context * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clientDiscoveryResponse. + * @return clientDiscoveryResponse along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -240,7 +237,7 @@ private Mono> listNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clientDiscoveryResponse. + * @return clientDiscoveryResponse along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync( diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionOperationsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionOperationsImpl.java index 114fdd3f24ab6..661b14ac3f9ff 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionOperationsImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionOperationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.dataprotection.fluent.models.ClientDiscoveryValueForSingleApiInner; import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryValueForSingleApi; import com.azure.resourcemanager.dataprotection.models.DataProtectionOperations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class DataProtectionOperationsImpl implements DataProtectionOperations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataProtectionOperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(DataProtectionOperationsImpl.class); private final DataProtectionOperationsClient innerClient; diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionsClientImpl.java index 3f10d955d562c..5e3e9c71cc7e3 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionsClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionsClientImpl.java @@ -22,7 +22,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.fluent.DataProtectionsClient; import com.azure.resourcemanager.dataprotection.fluent.models.FeatureValidationResponseBaseInner; import com.azure.resourcemanager.dataprotection.models.FeatureValidationRequestBase; @@ -30,8 +29,6 @@ /** An instance of this class provides access to all the operations defined in DataProtectionsClient. */ public final class DataProtectionsClientImpl implements DataProtectionsClient { - private final ClientLogger logger = new ClientLogger(DataProtectionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final DataProtectionsService service; @@ -80,7 +77,8 @@ Mono> checkFeatureSupport( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for Backup Feature support. + * @return base class for Backup Feature support along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkFeatureSupportWithResponseAsync( @@ -130,7 +128,8 @@ private Mono> checkFeatureSupportWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for Backup Feature support. + * @return base class for Backup Feature support along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkFeatureSupportWithResponseAsync( @@ -176,7 +175,7 @@ private Mono> checkFeatureSupportWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for Backup Feature support. + * @return base class for Backup Feature support on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono checkFeatureSupportAsync( @@ -217,7 +216,7 @@ public FeatureValidationResponseBaseInner checkFeatureSupport( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for Backup Feature support. + * @return base class for Backup Feature support along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response checkFeatureSupportWithResponse( diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionsImpl.java index dd2287e8677b3..d3258e8b731f2 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionsImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.dataprotection.models.DataProtections; import com.azure.resourcemanager.dataprotection.models.FeatureValidationRequestBase; import com.azure.resourcemanager.dataprotection.models.FeatureValidationResponseBase; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class DataProtectionsImpl implements DataProtections { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataProtectionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(DataProtectionsImpl.class); private final DataProtectionsClient innerClient; diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsClientImpl.java index 0f71214607b7b..33de58eff16a9 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsClientImpl.java @@ -22,7 +22,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.dataprotection.fluent.ExportJobsClient; @@ -32,8 +31,6 @@ /** An instance of this class provides access to all the operations defined in ExportJobsClient. */ public final class ExportJobsClientImpl implements ExportJobsClient { - private final ClientLogger logger = new ClientLogger(ExportJobsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ExportJobsService service; @@ -82,7 +79,7 @@ Mono>> trigger( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> triggerWithResponseAsync(String resourceGroupName, String vaultName) { @@ -130,7 +127,7 @@ private Mono>> triggerWithResponseAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> triggerWithResponseAsync( @@ -175,14 +172,15 @@ private Mono>> triggerWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginTriggerAsync(String resourceGroupName, String vaultName) { Mono>> mono = triggerWithResponseAsync(resourceGroupName, vaultName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -194,7 +192,7 @@ private PollerFlux, Void> beginTriggerAsync(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginTriggerAsync( @@ -214,7 +212,7 @@ private PollerFlux, Void> beginTriggerAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginTrigger(String resourceGroupName, String vaultName) { @@ -230,7 +228,7 @@ public SyncPoller, Void> beginTrigger(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginTrigger( @@ -246,7 +244,7 @@ public SyncPoller, Void> beginTrigger( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono triggerAsync(String resourceGroupName, String vaultName) { @@ -262,7 +260,7 @@ private Mono triggerAsync(String resourceGroupName, String vaultName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono triggerAsync(String resourceGroupName, String vaultName, Context context) { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsImpl.java index 7af592eaa57fc..38570717c214d 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsImpl.java @@ -8,10 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.fluent.ExportJobsClient; import com.azure.resourcemanager.dataprotection.models.ExportJobs; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ExportJobsImpl implements ExportJobs { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ExportJobsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ExportJobsImpl.class); private final ExportJobsClient innerClient; diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsOperationResultsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsOperationResultsClientImpl.java index e9334f24905bb..19ac054fcdadc 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsOperationResultsClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsOperationResultsClientImpl.java @@ -21,15 +21,12 @@ 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.dataprotection.fluent.ExportJobsOperationResultsClient; import com.azure.resourcemanager.dataprotection.fluent.models.ExportJobsResultInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in ExportJobsOperationResultsClient. */ public final class ExportJobsOperationResultsClientImpl implements ExportJobsOperationResultsClient { - private final ClientLogger logger = new ClientLogger(ExportJobsOperationResultsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ExportJobsOperationResultsService service; @@ -84,7 +81,8 @@ Mono> get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation result of operation triggered by Export Jobs API. + * @return the operation result of operation triggered by Export Jobs API along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -140,7 +138,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation result of operation triggered by Export Jobs API. + * @return the operation result of operation triggered by Export Jobs API along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -192,7 +191,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation result of operation triggered by Export Jobs API. + * @return the operation result of operation triggered by Export Jobs API on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String vaultName, String operationId) { @@ -237,7 +236,7 @@ public ExportJobsResultInner get(String resourceGroupName, String vaultName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation result of operation triggered by Export Jobs API. + * @return the operation result of operation triggered by Export Jobs API along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsOperationResultsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsOperationResultsImpl.java index 582451cf433a7..89a5ca6b2bf2d 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsOperationResultsImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsOperationResultsImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.dataprotection.fluent.models.ExportJobsResultInner; import com.azure.resourcemanager.dataprotection.models.ExportJobsOperationResults; import com.azure.resourcemanager.dataprotection.models.ExportJobsResult; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ExportJobsOperationResultsImpl implements ExportJobsOperationResults { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ExportJobsOperationResultsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ExportJobsOperationResultsImpl.class); private final ExportJobsOperationResultsClient innerClient; diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobsClientImpl.java index 9b9e7f019fee4..410317f3f3a64 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobsClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.fluent.JobsClient; import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner; import com.azure.resourcemanager.dataprotection.models.AzureBackupJobResourceList; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in JobsClient. */ public final class JobsClientImpl implements JobsClient { - private final ClientLogger logger = new ClientLogger(JobsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final JobsService service; @@ -108,7 +105,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 AzureBackup Job resources. + * @return list of AzureBackup Job resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -166,7 +164,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 AzureBackup Job resources. + * @return list of AzureBackup Job resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -220,7 +219,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 AzureBackup Job resources. + * @return list of AzureBackup Job resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String vaultName) { @@ -237,7 +236,7 @@ private PagedFlux listAsync(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 AzureBackup Job resources. + * @return list of AzureBackup Job resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -255,7 +254,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 AzureBackup Job resources. + * @return list of AzureBackup Job resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String vaultName) { @@ -271,7 +270,7 @@ public PagedIterable list(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AzureBackup Job resources. + * @return list of AzureBackup Job resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -288,7 +287,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 job with id in a backup vault. + * @return a job with id in a backup vault along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -342,7 +341,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 job with id in a backup vault. + * @return a job with id in a backup vault along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -392,7 +391,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 job with id in a backup vault. + * @return a job with id in a backup vault on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String vaultName, String jobId) { @@ -433,7 +432,7 @@ public AzureBackupJobResourceInner get(String resourceGroupName, String vaultNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 job with id in a backup vault. + * @return a job with id in a backup vault along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -448,7 +447,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 AzureBackup Job resources. + * @return list of AzureBackup Job resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -484,7 +484,8 @@ private Mono> listNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 AzureBackup Job resources. + * @return list of AzureBackup Job resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobsImpl.java index 40eed436900a1..2a1c4d62c225a 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobsImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner; import com.azure.resourcemanager.dataprotection.models.AzureBackupJobResource; import com.azure.resourcemanager.dataprotection.models.Jobs; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class JobsImpl implements Jobs { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(JobsImpl.class); private final JobsClient innerClient; diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationResultsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationResultsClientImpl.java index e1c97bfa3aa12..43dc8e0161980 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationResultsClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationResultsClientImpl.java @@ -20,7 +20,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.fluent.OperationResultsClient; import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner; import com.azure.resourcemanager.dataprotection.models.OperationResultsGetResponse; @@ -28,8 +27,6 @@ /** An instance of this class provides access to all the operations defined in OperationResultsClient. */ public final class OperationResultsClientImpl implements OperationResultsClient { - private final ClientLogger logger = new ClientLogger(OperationResultsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationResultsService service; @@ -78,7 +75,7 @@ Mono get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation result for a resource. + * @return the operation result for a resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getWithResponseAsync(String operationId, String location) { @@ -125,7 +122,7 @@ private Mono getWithResponseAsync(String operationI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation result for a resource. + * @return the operation result for a resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getWithResponseAsync( @@ -169,7 +166,7 @@ private Mono getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation result for a resource. + * @return the operation result for a resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String operationId, String location) { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationResultsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationResultsImpl.java index 1e0fb849fea67..3bc57cd307119 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationResultsImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationResultsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.dataprotection.models.OperationJobExtendedInfo; import com.azure.resourcemanager.dataprotection.models.OperationResults; import com.azure.resourcemanager.dataprotection.models.OperationResultsGetResponse; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationResultsImpl implements OperationResults { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationResultsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationResultsImpl.class); private final OperationResultsClient innerClient; diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusBackupVaultContextsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusBackupVaultContextsClientImpl.java new file mode 100644 index 0000000000000..5cb06f6664342 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusBackupVaultContextsClientImpl.java @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.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.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.dataprotection.fluent.OperationStatusBackupVaultContextsClient; +import com.azure.resourcemanager.dataprotection.fluent.models.OperationResourceInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in OperationStatusBackupVaultContextsClient. + */ +public final class OperationStatusBackupVaultContextsClientImpl implements OperationStatusBackupVaultContextsClient { + /** The proxy service used to perform REST calls. */ + private final OperationStatusBackupVaultContextsService service; + + /** The service client containing this operation class. */ + private final DataProtectionClientImpl client; + + /** + * Initializes an instance of OperationStatusBackupVaultContextsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationStatusBackupVaultContextsClientImpl(DataProtectionClientImpl client) { + this.service = + RestProxy + .create( + OperationStatusBackupVaultContextsService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DataProtectionClientOperationStatusBackupVaultContexts to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DataProtectionClient") + private interface OperationStatusBackupVaultContextsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" + + "/backupVaults/{vaultName}/operationStatus/{operationId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, + @PathParam("operationId") String operationId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets the operation status for an operation over a BackupVault's context. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param operationId The operationId 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 the operation status for an operation over a BackupVault's context along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String vaultName, String operationId) { + 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + vaultName, + operationId, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the operation status for an operation over a BackupVault's context. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param operationId The operationId 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 the operation status for an operation over a BackupVault's context along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String vaultName, String operationId, 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId 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, + vaultName, + operationId, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Gets the operation status for an operation over a BackupVault's context. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param operationId The operationId 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 the operation status for an operation over a BackupVault's context on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String vaultName, String operationId) { + return getWithResponseAsync(resourceGroupName, vaultName, operationId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the operation status for an operation over a BackupVault's context. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param operationId The operationId 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 the operation status for an operation over a BackupVault's context. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationResourceInner get(String resourceGroupName, String vaultName, String operationId) { + return getAsync(resourceGroupName, vaultName, operationId).block(); + } + + /** + * Gets the operation status for an operation over a BackupVault's context. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param operationId The operationId 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 the operation status for an operation over a BackupVault's context along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String vaultName, String operationId, Context context) { + return getWithResponseAsync(resourceGroupName, vaultName, operationId, context).block(); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusBackupVaultContextsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusBackupVaultContextsImpl.java new file mode 100644 index 0000000000000..51d5cd23979c0 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusBackupVaultContextsImpl.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.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.dataprotection.fluent.OperationStatusBackupVaultContextsClient; +import com.azure.resourcemanager.dataprotection.fluent.models.OperationResourceInner; +import com.azure.resourcemanager.dataprotection.models.OperationResource; +import com.azure.resourcemanager.dataprotection.models.OperationStatusBackupVaultContexts; + +public final class OperationStatusBackupVaultContextsImpl implements OperationStatusBackupVaultContexts { + private static final ClientLogger LOGGER = new ClientLogger(OperationStatusBackupVaultContextsImpl.class); + + private final OperationStatusBackupVaultContextsClient innerClient; + + private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; + + public OperationStatusBackupVaultContextsImpl( + OperationStatusBackupVaultContextsClient innerClient, + com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public OperationResource get(String resourceGroupName, String vaultName, String operationId) { + OperationResourceInner inner = this.serviceClient().get(resourceGroupName, vaultName, operationId); + if (inner != null) { + return new OperationResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String vaultName, String operationId, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, vaultName, operationId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new OperationResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private OperationStatusBackupVaultContextsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.dataprotection.DataProtectionManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusClientImpl.java index 96d2d67a1e226..53d87bc1a2184 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusClientImpl.java @@ -21,15 +21,12 @@ 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.dataprotection.fluent.OperationStatusClient; import com.azure.resourcemanager.dataprotection.fluent.models.OperationResourceInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in OperationStatusClient. */ public final class OperationStatusClientImpl implements OperationStatusClient { - private final ClientLogger logger = new ClientLogger(OperationStatusClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationStatusService service; @@ -78,7 +75,7 @@ Mono> get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation status for a resource. + * @return the operation status for a resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String location, String operationId) { @@ -125,7 +122,7 @@ private Mono> getWithResponseAsync(String locat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation status for a resource. + * @return the operation status for a resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -169,7 +166,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation status for a resource. + * @return the operation status for a resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String location, String operationId) { @@ -208,7 +205,7 @@ public OperationResourceInner get(String location, String operationId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation status for a resource. + * @return the operation status for a resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String location, String operationId, Context context) { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusImpl.java index 33b77df3fb688..6a2ea1d359550 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.dataprotection.fluent.models.OperationResourceInner; import com.azure.resourcemanager.dataprotection.models.OperationResource; import com.azure.resourcemanager.dataprotection.models.OperationStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationStatusImpl implements OperationStatus { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationStatusImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationStatusImpl.class); private final OperationStatusClient innerClient; diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusResourceGroupContextsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusResourceGroupContextsClientImpl.java new file mode 100644 index 0000000000000..9579715ae0ea3 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusResourceGroupContextsClientImpl.java @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.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.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.dataprotection.fluent.OperationStatusResourceGroupContextsClient; +import com.azure.resourcemanager.dataprotection.fluent.models.OperationResourceInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in + * OperationStatusResourceGroupContextsClient. + */ +public final class OperationStatusResourceGroupContextsClientImpl + implements OperationStatusResourceGroupContextsClient { + /** The proxy service used to perform REST calls. */ + private final OperationStatusResourceGroupContextsService service; + + /** The service client containing this operation class. */ + private final DataProtectionClientImpl client; + + /** + * Initializes an instance of OperationStatusResourceGroupContextsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationStatusResourceGroupContextsClientImpl(DataProtectionClientImpl client) { + this.service = + RestProxy + .create( + OperationStatusResourceGroupContextsService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DataProtectionClientOperationStatusResourceGroupContexts to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DataProtectionClient") + private interface OperationStatusResourceGroupContextsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" + + "/operationStatus/{operationId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("operationId") String operationId, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets the operation status for an operation over a ResourceGroup's context. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param operationId The operationId 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 the operation status for an operation over a ResourceGroup's context along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String operationId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName 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 (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + resourceGroupName, + this.client.getSubscriptionId(), + operationId, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the operation status for an operation over a ResourceGroup's context. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param operationId The operationId 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 the operation status for an operation over a ResourceGroup's context along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String operationId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName 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 (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + resourceGroupName, + this.client.getSubscriptionId(), + operationId, + accept, + context); + } + + /** + * Gets the operation status for an operation over a ResourceGroup's context. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param operationId The operationId 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 the operation status for an operation over a ResourceGroup's context on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String operationId) { + return getByResourceGroupWithResponseAsync(resourceGroupName, operationId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets the operation status for an operation over a ResourceGroup's context. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param operationId The operationId 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 the operation status for an operation over a ResourceGroup's context. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationResourceInner getByResourceGroup(String resourceGroupName, String operationId) { + return getByResourceGroupAsync(resourceGroupName, operationId).block(); + } + + /** + * Gets the operation status for an operation over a ResourceGroup's context. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param operationId The operationId 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 the operation status for an operation over a ResourceGroup's context along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String operationId, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, operationId, context).block(); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusResourceGroupContextsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusResourceGroupContextsImpl.java new file mode 100644 index 0000000000000..cb257ccd51095 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusResourceGroupContextsImpl.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.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.dataprotection.fluent.OperationStatusResourceGroupContextsClient; +import com.azure.resourcemanager.dataprotection.fluent.models.OperationResourceInner; +import com.azure.resourcemanager.dataprotection.models.OperationResource; +import com.azure.resourcemanager.dataprotection.models.OperationStatusResourceGroupContexts; + +public final class OperationStatusResourceGroupContextsImpl implements OperationStatusResourceGroupContexts { + private static final ClientLogger LOGGER = new ClientLogger(OperationStatusResourceGroupContextsImpl.class); + + private final OperationStatusResourceGroupContextsClient innerClient; + + private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; + + public OperationStatusResourceGroupContextsImpl( + OperationStatusResourceGroupContextsClient innerClient, + com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public OperationResource getByResourceGroup(String resourceGroupName, String operationId) { + OperationResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, operationId); + if (inner != null) { + return new OperationResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String operationId, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, operationId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new OperationResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private OperationStatusResourceGroupContextsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.dataprotection.DataProtectionManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointsClientImpl.java index bea162e175a81..de8c67dffe31a 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointsClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.fluent.RecoveryPointsClient; import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner; import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointResourceList; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in RecoveryPointsClient. */ public final class RecoveryPointsClientImpl implements RecoveryPointsClient { - private final ClientLogger logger = new ClientLogger(RecoveryPointsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final RecoveryPointsService service; @@ -68,9 +65,9 @@ private interface RecoveryPointsService { Mono> list( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @QueryParam("$filter") String filter, @QueryParam("$skipToken") String skipToken, @@ -86,9 +83,9 @@ Mono> list( Mono> get( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @PathParam("recoveryPointId") String recoveryPointId, @HeaderParam("Accept") String accept, @@ -108,38 +105,39 @@ Mono> listNext( /** * Returns a list of Recovery Points for a DataSource in a vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param filter OData filter options. * @param skipToken skipToken Filter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azureBackupRecoveryPointResourceList. + * @return azureBackupRecoveryPointResourceList along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String vaultName, String resourceGroupName, String backupInstanceName, String filter, String skipToken) { + String resourceGroupName, String vaultName, String backupInstanceName, String filter, String skipToken) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupInstanceName == null) { return Mono .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); @@ -152,9 +150,9 @@ private Mono> listSinglePag .list( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupInstanceName, filter, skipToken, @@ -175,8 +173,8 @@ private Mono> listSinglePag /** * Returns a list of Recovery Points for a DataSource in a vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param filter OData filter options. * @param skipToken skipToken Filter. @@ -184,12 +182,13 @@ private Mono> listSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azureBackupRecoveryPointResourceList. + * @return azureBackupRecoveryPointResourceList along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, String filter, String skipToken, @@ -200,19 +199,19 @@ private Mono> listSinglePag new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupInstanceName == null) { return Mono .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); @@ -223,9 +222,9 @@ private Mono> listSinglePag .list( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupInstanceName, filter, skipToken, @@ -245,50 +244,50 @@ private Mono> listSinglePag /** * Returns a list of Recovery Points for a DataSource in a vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param filter OData filter options. * @param skipToken skipToken Filter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azureBackupRecoveryPointResourceList. + * @return azureBackupRecoveryPointResourceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String vaultName, String resourceGroupName, String backupInstanceName, String filter, String skipToken) { + String resourceGroupName, String vaultName, String backupInstanceName, String filter, String skipToken) { return new PagedFlux<>( - () -> listSinglePageAsync(vaultName, resourceGroupName, backupInstanceName, filter, skipToken), + () -> listSinglePageAsync(resourceGroupName, vaultName, backupInstanceName, filter, skipToken), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Returns a list of Recovery Points for a DataSource in a vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azureBackupRecoveryPointResourceList. + * @return azureBackupRecoveryPointResourceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String vaultName, String resourceGroupName, String backupInstanceName) { + String resourceGroupName, String vaultName, String backupInstanceName) { final String filter = null; final String skipToken = null; return new PagedFlux<>( - () -> listSinglePageAsync(vaultName, resourceGroupName, backupInstanceName, filter, skipToken), + () -> listSinglePageAsync(resourceGroupName, vaultName, backupInstanceName, filter, skipToken), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Returns a list of Recovery Points for a DataSource in a vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param filter OData filter options. * @param skipToken skipToken Filter. @@ -296,45 +295,45 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azureBackupRecoveryPointResourceList. + * @return azureBackupRecoveryPointResourceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, String filter, String skipToken, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(vaultName, resourceGroupName, backupInstanceName, filter, skipToken, context), + () -> listSinglePageAsync(resourceGroupName, vaultName, backupInstanceName, filter, skipToken, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Returns a list of Recovery Points for a DataSource in a vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azureBackupRecoveryPointResourceList. + * @return azureBackupRecoveryPointResourceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( - String vaultName, String resourceGroupName, String backupInstanceName) { + String resourceGroupName, String vaultName, String backupInstanceName) { final String filter = null; final String skipToken = null; - return new PagedIterable<>(listAsync(vaultName, resourceGroupName, backupInstanceName, filter, skipToken)); + return new PagedIterable<>(listAsync(resourceGroupName, vaultName, backupInstanceName, filter, skipToken)); } /** * Returns a list of Recovery Points for a DataSource in a vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param filter OData filter options. * @param skipToken skipToken Filter. @@ -342,54 +341,55 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azureBackupRecoveryPointResourceList. + * @return azureBackupRecoveryPointResourceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, String filter, String skipToken, Context context) { return new PagedIterable<>( - listAsync(vaultName, resourceGroupName, backupInstanceName, filter, skipToken, context)); + listAsync(resourceGroupName, vaultName, backupInstanceName, filter, skipToken, context)); } /** * Gets a Recovery Point using recoveryPointId for a Datasource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param recoveryPointId The recoveryPointId 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 a Recovery Point using recoveryPointId for a Datasource. + * @return a Recovery Point using recoveryPointId for a Datasource along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( - String vaultName, String resourceGroupName, String backupInstanceName, String recoveryPointId) { + String resourceGroupName, String vaultName, String backupInstanceName, String recoveryPointId) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupInstanceName == null) { return Mono .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); @@ -406,9 +406,9 @@ private Mono> getWithResponseAsy .get( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupInstanceName, recoveryPointId, accept, @@ -419,20 +419,21 @@ private Mono> getWithResponseAsy /** * Gets a Recovery Point using recoveryPointId for a Datasource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param recoveryPointId The recoveryPointId 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 a Recovery Point using recoveryPointId for a Datasource. + * @return a Recovery Point using recoveryPointId for a Datasource along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, String recoveryPointId, Context context) { @@ -442,19 +443,19 @@ private Mono> getWithResponseAsy new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupInstanceName == null) { return Mono .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); @@ -469,9 +470,9 @@ private Mono> getWithResponseAsy .get( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupInstanceName, recoveryPointId, accept, @@ -481,19 +482,19 @@ private Mono> getWithResponseAsy /** * Gets a Recovery Point using recoveryPointId for a Datasource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param recoveryPointId The recoveryPointId 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 a Recovery Point using recoveryPointId for a Datasource. + * @return a Recovery Point using recoveryPointId for a Datasource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( - String vaultName, String resourceGroupName, String backupInstanceName, String recoveryPointId) { - return getWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, recoveryPointId) + String resourceGroupName, String vaultName, String backupInstanceName, String recoveryPointId) { + return getWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, recoveryPointId) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -507,8 +508,8 @@ private Mono getAsync( /** * Gets a Recovery Point using recoveryPointId for a Datasource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param recoveryPointId The recoveryPointId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -518,31 +519,31 @@ private Mono getAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public AzureBackupRecoveryPointResourceInner get( - String vaultName, String resourceGroupName, String backupInstanceName, String recoveryPointId) { - return getAsync(vaultName, resourceGroupName, backupInstanceName, recoveryPointId).block(); + String resourceGroupName, String vaultName, String backupInstanceName, String recoveryPointId) { + return getAsync(resourceGroupName, vaultName, backupInstanceName, recoveryPointId).block(); } /** * Gets a Recovery Point using recoveryPointId for a Datasource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param recoveryPointId The recoveryPointId 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 a Recovery Point using recoveryPointId for a Datasource. + * @return a Recovery Point using recoveryPointId for a Datasource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, String recoveryPointId, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, recoveryPointId, context).block(); + return getWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, recoveryPointId, context).block(); } /** @@ -552,7 +553,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azureBackupRecoveryPointResourceList. + * @return azureBackupRecoveryPointResourceList along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -588,7 +590,8 @@ private Mono> listNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azureBackupRecoveryPointResourceList. + * @return azureBackupRecoveryPointResourceList along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync( diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointsImpl.java index e3e2c0d2ae767..a2535e6d97d42 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointsImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner; import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointResource; import com.azure.resourcemanager.dataprotection.models.RecoveryPoints; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class RecoveryPointsImpl implements RecoveryPoints { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RecoveryPointsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(RecoveryPointsImpl.class); private final RecoveryPointsClient innerClient; @@ -30,28 +29,28 @@ public RecoveryPointsImpl( } public PagedIterable list( - String vaultName, String resourceGroupName, String backupInstanceName) { + String resourceGroupName, String vaultName, String backupInstanceName) { PagedIterable inner = - this.serviceClient().list(vaultName, resourceGroupName, backupInstanceName); + this.serviceClient().list(resourceGroupName, vaultName, backupInstanceName); return Utils.mapPage(inner, inner1 -> new AzureBackupRecoveryPointResourceImpl(inner1, this.manager())); } public PagedIterable list( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, String filter, String skipToken, Context context) { PagedIterable inner = - this.serviceClient().list(vaultName, resourceGroupName, backupInstanceName, filter, skipToken, context); + this.serviceClient().list(resourceGroupName, vaultName, backupInstanceName, filter, skipToken, context); return Utils.mapPage(inner, inner1 -> new AzureBackupRecoveryPointResourceImpl(inner1, this.manager())); } public AzureBackupRecoveryPointResource get( - String vaultName, String resourceGroupName, String backupInstanceName, String recoveryPointId) { + String resourceGroupName, String vaultName, String backupInstanceName, String recoveryPointId) { AzureBackupRecoveryPointResourceInner inner = - this.serviceClient().get(vaultName, resourceGroupName, backupInstanceName, recoveryPointId); + this.serviceClient().get(resourceGroupName, vaultName, backupInstanceName, recoveryPointId); if (inner != null) { return new AzureBackupRecoveryPointResourceImpl(inner, this.manager()); } else { @@ -60,15 +59,15 @@ public AzureBackupRecoveryPointResource get( } public Response getWithResponse( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, String recoveryPointId, Context context) { Response inner = this .serviceClient() - .getWithResponse(vaultName, resourceGroupName, backupInstanceName, recoveryPointId, context); + .getWithResponse(resourceGroupName, vaultName, backupInstanceName, recoveryPointId, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardResourceImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardResourceImpl.java index 62c49469b7820..f32617e75c598 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardResourceImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardResourceImpl.java @@ -9,6 +9,7 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardResourceInner; import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails; +import com.azure.resourcemanager.dataprotection.models.PatchBackupVaultInput; import com.azure.resourcemanager.dataprotection.models.PatchResourceRequestInput; import com.azure.resourcemanager.dataprotection.models.ResourceGuard; import com.azure.resourcemanager.dataprotection.models.ResourceGuardResource; @@ -210,6 +211,11 @@ public ResourceGuardResourceImpl withProperties(ResourceGuard properties) { return this; } + public ResourceGuardResourceImpl withProperties(PatchBackupVaultInput properties) { + this.updateParameters.withProperties(properties); + return this; + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardsClientImpl.java index 7a4a0342f8fa9..2cd588b5a001b 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardsClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardsClientImpl.java @@ -29,7 +29,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.fluent.ResourceGuardsClient; import com.azure.resourcemanager.dataprotection.fluent.models.DppBaseResourceInner; import com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardResourceInner; @@ -40,8 +39,6 @@ /** An instance of this class provides access to all the operations defined in ResourceGuardsClient. */ public final class ResourceGuardsClientImpl implements ResourceGuardsClient { - private final ClientLogger logger = new ClientLogger(ResourceGuardsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ResourceGuardsService service; @@ -425,7 +422,8 @@ Mono> getUpdateProtectedItemRequestsObjectsNext( * * @throws 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 ResourceGuard resources. + * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -471,7 +469,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 ResourceGuard resources. + * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -512,7 +511,7 @@ private Mono> listSinglePageAsync(Cont * * @throws 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 ResourceGuard resources. + * @return list of ResourceGuard resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -527,7 +526,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 ResourceGuard resources. + * @return list of ResourceGuard resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -541,7 +540,7 @@ private PagedFlux listAsync(Context context) { * * @throws 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 ResourceGuard resources. + * @return list of ResourceGuard resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -555,7 +554,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 ResourceGuard resources. + * @return list of ResourceGuard resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -569,7 +568,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 ResourceGuard resources. + * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -622,7 +622,8 @@ private Mono> listByResourceGroupSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 ResourceGuard resources. + * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -671,7 +672,7 @@ private Mono> listByResourceGroupSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 ResourceGuard resources. + * @return list of ResourceGuard resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -688,7 +689,7 @@ private PagedFlux listByResourceGroupAsync(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ResourceGuard resources. + * @return list of ResourceGuard resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -704,7 +705,7 @@ private PagedFlux listByResourceGroupAsync(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ResourceGuard resources. + * @return list of ResourceGuard resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -719,7 +720,7 @@ public PagedIterable listByResourceGroup(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 ResourceGuard resources. + * @return list of ResourceGuard resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -735,7 +736,7 @@ public PagedIterable listByResourceGroup(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> putWithResponseAsync( @@ -792,7 +793,7 @@ private Mono> putWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> putWithResponseAsync( @@ -845,7 +846,7 @@ private Mono> putWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono putAsync( @@ -888,7 +889,7 @@ public ResourceGuardResourceInner put( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response putWithResponse( @@ -904,7 +905,7 @@ public Response putWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -954,7 +955,7 @@ private Mono> getByResourceGroupWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -1000,7 +1001,7 @@ private Mono> getByResourceGroupWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync( @@ -1040,7 +1041,7 @@ public ResourceGuardResourceInner getByResourceGroup(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -1056,7 +1057,7 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceGuardsName) { @@ -1105,7 +1106,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -1151,7 +1152,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String resourceGuardsName) { @@ -1182,7 +1183,7 @@ public void delete(String resourceGroupName, String resourceGuardsName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String resourceGuardsName, Context context) { @@ -1198,7 +1199,7 @@ public Response deleteWithResponse(String resourceGroupName, String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> patchWithResponseAsync( @@ -1255,7 +1256,7 @@ private Mono> patchWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> patchWithResponseAsync( @@ -1308,7 +1309,7 @@ private Mono> patchWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono patchAsync( @@ -1351,7 +1352,7 @@ public ResourceGuardResourceInner patch( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response patchWithResponse( @@ -1368,7 +1369,8 @@ public Response patchWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDisableSoftDeleteRequestsObjectsSinglePageAsync( @@ -1428,7 +1430,8 @@ private Mono> getDisableSoftDeleteRequestsOb * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDisableSoftDeleteRequestsObjectsSinglePageAsync( @@ -1484,7 +1487,7 @@ private Mono> getDisableSoftDeleteRequestsOb * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getDisableSoftDeleteRequestsObjectsAsync( @@ -1504,7 +1507,7 @@ private PagedFlux getDisableSoftDeleteRequestsObjectsAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getDisableSoftDeleteRequestsObjectsAsync( @@ -1523,7 +1526,7 @@ private PagedFlux getDisableSoftDeleteRequestsObjectsAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getDisableSoftDeleteRequestsObjects( @@ -1541,7 +1544,7 @@ public PagedIterable getDisableSoftDeleteRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getDisableSoftDeleteRequestsObjects( @@ -1559,7 +1562,8 @@ public PagedIterable getDisableSoftDeleteRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDeleteResourceGuardProxyRequestsObjectsSinglePageAsync( @@ -1619,7 +1623,8 @@ private Mono> getDeleteResourceGuardProxyReq * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDeleteResourceGuardProxyRequestsObjectsSinglePageAsync( @@ -1675,7 +1680,7 @@ private Mono> getDeleteResourceGuardProxyReq * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getDeleteResourceGuardProxyRequestsObjectsAsync( @@ -1695,7 +1700,7 @@ private PagedFlux getDeleteResourceGuardProxyRequestsObjec * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getDeleteResourceGuardProxyRequestsObjectsAsync( @@ -1716,7 +1721,7 @@ private PagedFlux getDeleteResourceGuardProxyRequestsObjec * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getDeleteResourceGuardProxyRequestsObjects( @@ -1735,7 +1740,7 @@ public PagedIterable getDeleteResourceGuardProxyRequestsOb * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getDeleteResourceGuardProxyRequestsObjects( @@ -1753,7 +1758,8 @@ public PagedIterable getDeleteResourceGuardProxyRequestsOb * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getBackupSecurityPinRequestsObjectsSinglePageAsync( @@ -1813,7 +1819,8 @@ private Mono> getBackupSecurityPinRequestsOb * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getBackupSecurityPinRequestsObjectsSinglePageAsync( @@ -1869,7 +1876,7 @@ private Mono> getBackupSecurityPinRequestsOb * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getBackupSecurityPinRequestsObjectsAsync( @@ -1889,7 +1896,7 @@ private PagedFlux getBackupSecurityPinRequestsObjectsAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getBackupSecurityPinRequestsObjectsAsync( @@ -1908,7 +1915,7 @@ private PagedFlux getBackupSecurityPinRequestsObjectsAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getBackupSecurityPinRequestsObjects( @@ -1926,7 +1933,7 @@ public PagedIterable getBackupSecurityPinRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getBackupSecurityPinRequestsObjects( @@ -1944,7 +1951,8 @@ public PagedIterable getBackupSecurityPinRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDeleteProtectedItemRequestsObjectsSinglePageAsync( @@ -2004,7 +2012,8 @@ private Mono> getDeleteProtectedItemRequests * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDeleteProtectedItemRequestsObjectsSinglePageAsync( @@ -2060,7 +2069,7 @@ private Mono> getDeleteProtectedItemRequests * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getDeleteProtectedItemRequestsObjectsAsync( @@ -2080,7 +2089,7 @@ private PagedFlux getDeleteProtectedItemRequestsObjectsAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getDeleteProtectedItemRequestsObjectsAsync( @@ -2099,7 +2108,7 @@ private PagedFlux getDeleteProtectedItemRequestsObjectsAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getDeleteProtectedItemRequestsObjects( @@ -2117,7 +2126,7 @@ public PagedIterable getDeleteProtectedItemRequestsObjects * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getDeleteProtectedItemRequestsObjects( @@ -2135,7 +2144,8 @@ public PagedIterable getDeleteProtectedItemRequestsObjects * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getUpdateProtectionPolicyRequestsObjectsSinglePageAsync( @@ -2195,7 +2205,8 @@ private Mono> getUpdateProtectionPolicyReque * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getUpdateProtectionPolicyRequestsObjectsSinglePageAsync( @@ -2251,7 +2262,7 @@ private Mono> getUpdateProtectionPolicyReque * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getUpdateProtectionPolicyRequestsObjectsAsync( @@ -2271,7 +2282,7 @@ private PagedFlux getUpdateProtectionPolicyRequestsObjects * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getUpdateProtectionPolicyRequestsObjectsAsync( @@ -2291,7 +2302,7 @@ private PagedFlux getUpdateProtectionPolicyRequestsObjects * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getUpdateProtectionPolicyRequestsObjects( @@ -2310,7 +2321,7 @@ public PagedIterable getUpdateProtectionPolicyRequestsObje * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getUpdateProtectionPolicyRequestsObjects( @@ -2328,7 +2339,8 @@ public PagedIterable getUpdateProtectionPolicyRequestsObje * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getUpdateProtectedItemRequestsObjectsSinglePageAsync( @@ -2388,7 +2400,8 @@ private Mono> getUpdateProtectedItemRequests * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getUpdateProtectedItemRequestsObjectsSinglePageAsync( @@ -2444,7 +2457,7 @@ private Mono> getUpdateProtectedItemRequests * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getUpdateProtectedItemRequestsObjectsAsync( @@ -2464,7 +2477,7 @@ private PagedFlux getUpdateProtectedItemRequestsObjectsAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getUpdateProtectedItemRequestsObjectsAsync( @@ -2483,7 +2496,7 @@ private PagedFlux getUpdateProtectedItemRequestsObjectsAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getUpdateProtectedItemRequestsObjects( @@ -2501,7 +2514,7 @@ public PagedIterable getUpdateProtectedItemRequestsObjects * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getUpdateProtectedItemRequestsObjects( @@ -2520,7 +2533,8 @@ public PagedIterable getUpdateProtectedItemRequestsObjects * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultDisableSoftDeleteRequestsObjectWithResponseAsync( @@ -2576,7 +2590,8 @@ private Mono> getDefaultDisableSoftDeleteRequests * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultDisableSoftDeleteRequestsObjectWithResponseAsync( @@ -2628,7 +2643,7 @@ private Mono> getDefaultDisableSoftDeleteRequests * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getDefaultDisableSoftDeleteRequestsObjectAsync( @@ -2675,7 +2690,7 @@ public DppBaseResourceInner getDefaultDisableSoftDeleteRequestsObject( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getDefaultDisableSoftDeleteRequestsObjectWithResponse( @@ -2695,7 +2710,8 @@ public Response getDefaultDisableSoftDeleteRequestsObjectW * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultDeleteResourceGuardProxyRequestsObjectWithResponseAsync( @@ -2751,7 +2767,8 @@ private Mono> getDefaultDeleteResourceGuardProxyR * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultDeleteResourceGuardProxyRequestsObjectWithResponseAsync( @@ -2803,7 +2820,7 @@ private Mono> getDefaultDeleteResourceGuardProxyR * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getDefaultDeleteResourceGuardProxyRequestsObjectAsync( @@ -2850,7 +2867,7 @@ public DppBaseResourceInner getDefaultDeleteResourceGuardProxyRequestsObject( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getDefaultDeleteResourceGuardProxyRequestsObjectWithResponse( @@ -2870,7 +2887,8 @@ public Response getDefaultDeleteResourceGuardProxyRequests * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultBackupSecurityPinRequestsObjectWithResponseAsync( @@ -2926,7 +2944,8 @@ private Mono> getDefaultBackupSecurityPinRequests * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultBackupSecurityPinRequestsObjectWithResponseAsync( @@ -2978,7 +2997,7 @@ private Mono> getDefaultBackupSecurityPinRequests * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getDefaultBackupSecurityPinRequestsObjectAsync( @@ -3025,7 +3044,7 @@ public DppBaseResourceInner getDefaultBackupSecurityPinRequestsObject( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getDefaultBackupSecurityPinRequestsObjectWithResponse( @@ -3045,7 +3064,8 @@ public Response getDefaultBackupSecurityPinRequestsObjectW * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultDeleteProtectedItemRequestsObjectWithResponseAsync( @@ -3101,7 +3121,8 @@ private Mono> getDefaultDeleteProtectedItemReques * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultDeleteProtectedItemRequestsObjectWithResponseAsync( @@ -3153,7 +3174,7 @@ private Mono> getDefaultDeleteProtectedItemReques * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getDefaultDeleteProtectedItemRequestsObjectAsync( @@ -3200,7 +3221,7 @@ public DppBaseResourceInner getDefaultDeleteProtectedItemRequestsObject( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getDefaultDeleteProtectedItemRequestsObjectWithResponse( @@ -3220,7 +3241,8 @@ public Response getDefaultDeleteProtectedItemRequestsObjec * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultUpdateProtectionPolicyRequestsObjectWithResponseAsync( @@ -3276,7 +3298,8 @@ private Mono> getDefaultUpdateProtectionPolicyReq * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultUpdateProtectionPolicyRequestsObjectWithResponseAsync( @@ -3328,7 +3351,7 @@ private Mono> getDefaultUpdateProtectionPolicyReq * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getDefaultUpdateProtectionPolicyRequestsObjectAsync( @@ -3375,7 +3398,7 @@ public DppBaseResourceInner getDefaultUpdateProtectionPolicyRequestsObject( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getDefaultUpdateProtectionPolicyRequestsObjectWithResponse( @@ -3395,7 +3418,8 @@ public Response getDefaultUpdateProtectionPolicyRequestsOb * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultUpdateProtectedItemRequestsObjectWithResponseAsync( @@ -3451,7 +3475,8 @@ private Mono> getDefaultUpdateProtectedItemReques * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultUpdateProtectedItemRequestsObjectWithResponseAsync( @@ -3503,7 +3528,7 @@ private Mono> getDefaultUpdateProtectedItemReques * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getDefaultUpdateProtectedItemRequestsObjectAsync( @@ -3550,7 +3575,7 @@ public DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getDefaultUpdateProtectedItemRequestsObjectWithResponse( @@ -3567,7 +3592,8 @@ public Response getDefaultUpdateProtectedItemRequestsObjec * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 ResourceGuard resources. + * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getResourcesInSubscriptionNextSinglePageAsync( @@ -3605,7 +3631,8 @@ private Mono> getResourcesInSubscripti * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 ResourceGuard resources. + * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getResourcesInSubscriptionNextSinglePageAsync( @@ -3641,7 +3668,8 @@ private Mono> getResourcesInSubscripti * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 ResourceGuard resources. + * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getResourcesInResourceGroupNextSinglePageAsync( @@ -3680,7 +3708,8 @@ private Mono> getResourcesInResourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 ResourceGuard resources. + * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getResourcesInResourceGroupNextSinglePageAsync( @@ -3716,7 +3745,8 @@ private Mono> getResourcesInResourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDisableSoftDeleteRequestsObjectsNextSinglePageAsync( @@ -3756,7 +3786,8 @@ private Mono> getDisableSoftDeleteRequestsOb * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDisableSoftDeleteRequestsObjectsNextSinglePageAsync( @@ -3792,7 +3823,8 @@ private Mono> getDisableSoftDeleteRequestsOb * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDeleteResourceGuardProxyRequestsObjectsNextSinglePageAsync( @@ -3833,7 +3865,8 @@ private Mono> getDeleteResourceGuardProxyReq * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDeleteResourceGuardProxyRequestsObjectsNextSinglePageAsync( @@ -3869,7 +3902,8 @@ private Mono> getDeleteResourceGuardProxyReq * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getBackupSecurityPinRequestsObjectsNextSinglePageAsync( @@ -3909,7 +3943,8 @@ private Mono> getBackupSecurityPinRequestsOb * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getBackupSecurityPinRequestsObjectsNextSinglePageAsync( @@ -3945,7 +3980,8 @@ private Mono> getBackupSecurityPinRequestsOb * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDeleteProtectedItemRequestsObjectsNextSinglePageAsync( @@ -3986,7 +4022,8 @@ private Mono> getDeleteProtectedItemRequests * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDeleteProtectedItemRequestsObjectsNextSinglePageAsync( @@ -4022,7 +4059,8 @@ private Mono> getDeleteProtectedItemRequests * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getUpdateProtectionPolicyRequestsObjectsNextSinglePageAsync( @@ -4063,7 +4101,8 @@ private Mono> getUpdateProtectionPolicyReque * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getUpdateProtectionPolicyRequestsObjectsNextSinglePageAsync( @@ -4099,7 +4138,8 @@ private Mono> getUpdateProtectionPolicyReque * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getUpdateProtectedItemRequestsObjectsNextSinglePageAsync( @@ -4140,7 +4180,8 @@ private Mono> getUpdateProtectedItemRequests * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getUpdateProtectedItemRequestsObjectsNextSinglePageAsync( diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardsImpl.java index e26cf4ef189eb..cd8960a73e3c6 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardsImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardsImpl.java @@ -15,10 +15,9 @@ import com.azure.resourcemanager.dataprotection.models.DppBaseResource; import com.azure.resourcemanager.dataprotection.models.ResourceGuardResource; import com.azure.resourcemanager.dataprotection.models.ResourceGuards; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ResourceGuardsImpl implements ResourceGuards { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceGuardsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ResourceGuardsImpl.class); private final ResourceGuardsClient innerClient; @@ -362,7 +361,7 @@ public Response getDefaultUpdateProtectedItemRequestsObjectWith public ResourceGuardResource getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -370,7 +369,7 @@ public ResourceGuardResource getById(String id) { } String resourceGuardsName = Utils.getValueFromIdByName(id, "resourceGuards"); if (resourceGuardsName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -382,7 +381,7 @@ public ResourceGuardResource getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -390,7 +389,7 @@ public Response getByIdWithResponse(String id, Context co } String resourceGuardsName = Utils.getValueFromIdByName(id, "resourceGuards"); if (resourceGuardsName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -402,7 +401,7 @@ public Response getByIdWithResponse(String id, Context co public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -410,7 +409,7 @@ public void deleteById(String id) { } String resourceGuardsName = Utils.getValueFromIdByName(id, "resourceGuards"); if (resourceGuardsName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -422,7 +421,7 @@ public void deleteById(String id) { public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -430,7 +429,7 @@ public Response deleteByIdWithResponse(String id, Context context) { } String resourceGuardsName = Utils.getValueFromIdByName(id, "resourceGuards"); if (resourceGuardsName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RestorableTimeRangesClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RestorableTimeRangesClientImpl.java index c020605b84404..acd1ba42d71de 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RestorableTimeRangesClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RestorableTimeRangesClientImpl.java @@ -22,7 +22,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.fluent.RestorableTimeRangesClient; import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupFindRestorableTimeRangesResponseResourceInner; import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest; @@ -30,8 +29,6 @@ /** An instance of this class provides access to all the operations defined in RestorableTimeRangesClient. */ public final class RestorableTimeRangesClientImpl implements RestorableTimeRangesClient { - private final ClientLogger logger = new ClientLogger(RestorableTimeRangesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final RestorableTimeRangesService service; @@ -66,9 +63,9 @@ private interface RestorableTimeRangesService { Mono> find( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @BodyParam("application/json") AzureBackupFindRestorableTimeRangesRequest parameters, @HeaderParam("Accept") String accept, @@ -76,19 +73,19 @@ Mono> find( } /** - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Restore Ranges Response. + * @return list Restore Ranges Response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> findWithResponseAsync( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters) { if (this.client.getEndpoint() == null) { @@ -97,19 +94,19 @@ private Mono> new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupInstanceName == null) { return Mono .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); @@ -127,9 +124,9 @@ private Mono> .find( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupInstanceName, parameters, accept, @@ -138,20 +135,20 @@ private Mono> } /** - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 list Restore Ranges Response. + * @return list Restore Ranges Response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> findWithResponseAsync( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters, Context context) { @@ -161,19 +158,19 @@ private Mono> new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } if (backupInstanceName == null) { return Mono .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null.")); @@ -189,9 +186,9 @@ private Mono> .find( this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, - resourceGroupName, this.client.getSubscriptionId(), + resourceGroupName, + vaultName, backupInstanceName, parameters, accept, @@ -199,22 +196,22 @@ private Mono> } /** - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Restore Ranges Response. + * @return list Restore Ranges Response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono findAsync( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters) { - return findWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, parameters) + return findWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -226,8 +223,8 @@ private Mono findAsync } /** - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -237,31 +234,31 @@ private Mono findAsync */ @ServiceMethod(returns = ReturnType.SINGLE) public AzureBackupFindRestorableTimeRangesResponseResourceInner find( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters) { - return findAsync(vaultName, resourceGroupName, backupInstanceName, parameters).block(); + return findAsync(resourceGroupName, vaultName, backupInstanceName, parameters).block(); } /** - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 list Restore Ranges Response. + * @return list Restore Ranges Response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response findWithResponse( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters, Context context) { - return findWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context).block(); + return findWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context).block(); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RestorableTimeRangesImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RestorableTimeRangesImpl.java index 9bba70072f7d0..b574840621a11 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RestorableTimeRangesImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RestorableTimeRangesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest; import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesResponseResource; import com.azure.resourcemanager.dataprotection.models.RestorableTimeRanges; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class RestorableTimeRangesImpl implements RestorableTimeRanges { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RestorableTimeRangesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(RestorableTimeRangesImpl.class); private final RestorableTimeRangesClient innerClient; @@ -30,12 +29,12 @@ public RestorableTimeRangesImpl( } public AzureBackupFindRestorableTimeRangesResponseResource find( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters) { AzureBackupFindRestorableTimeRangesResponseResourceInner inner = - this.serviceClient().find(vaultName, resourceGroupName, backupInstanceName, parameters); + this.serviceClient().find(resourceGroupName, vaultName, backupInstanceName, parameters); if (inner != null) { return new AzureBackupFindRestorableTimeRangesResponseResourceImpl(inner, this.manager()); } else { @@ -44,15 +43,15 @@ public AzureBackupFindRestorableTimeRangesResponseResource find( } public Response findWithResponse( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters, Context context) { Response inner = this .serviceClient() - .findWithResponse(vaultName, resourceGroupName, backupInstanceName, parameters, context); + .findWithResponse(resourceGroupName, vaultName, backupInstanceName, parameters, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AbsoluteDeleteOption.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AbsoluteDeleteOption.java index 40c06dcc20097..8561f88f887bb 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AbsoluteDeleteOption.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AbsoluteDeleteOption.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -15,8 +13,6 @@ @JsonTypeName("AbsoluteDeleteOption") @Fluent public final class AbsoluteDeleteOption extends DeleteOption { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AbsoluteDeleteOption.class); - /** {@inheritDoc} */ @Override public AbsoluteDeleteOption withDuration(String duration) { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AdHocBackupRuleOptions.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AdHocBackupRuleOptions.java index 7f5b684ce2524..c731ee0049b5e 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AdHocBackupRuleOptions.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AdHocBackupRuleOptions.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** AdHocBackupRuleOptions Adhoc backup rules. */ @Fluent public final class AdHocBackupRuleOptions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AdHocBackupRuleOptions.class); - /* * The ruleName property. */ @@ -73,12 +70,12 @@ public AdHocBackupRuleOptions withTriggerOption(AdhocBackupTriggerOption trigger */ public void validate() { if (ruleName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property ruleName in model AdHocBackupRuleOptions")); } if (triggerOption() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property triggerOption in model AdHocBackupRuleOptions")); @@ -86,4 +83,6 @@ public void validate() { triggerOption().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(AdHocBackupRuleOptions.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AdhocBackupTriggerOption.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AdhocBackupTriggerOption.java index 711b8b4c5b121..21729630b8e52 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AdhocBackupTriggerOption.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AdhocBackupTriggerOption.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.dataprotection.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; /** AdhocBackupTriggerOption Adhoc backup trigger option. */ @Fluent public final class AdhocBackupTriggerOption { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AdhocBackupTriggerOption.class); - /* * The retentionTagOverride property. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AdhocBasedTaggingCriteria.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AdhocBasedTaggingCriteria.java index 9b1cb6c1c8eae..36e322bed67d2 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AdhocBasedTaggingCriteria.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AdhocBasedTaggingCriteria.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.dataprotection.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; /** AdhocBasedTaggingCriteria Adhoc backup tagging criteria. */ @Fluent public final class AdhocBasedTaggingCriteria { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AdhocBasedTaggingCriteria.class); - /* * RetentionTag Retention tag information */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AdhocBasedTriggerContext.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AdhocBasedTriggerContext.java index d070b54c6dfa7..fb8a446e4d15a 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AdhocBasedTriggerContext.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AdhocBasedTriggerContext.java @@ -6,7 +6,6 @@ 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 com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,8 +15,6 @@ @JsonTypeName("AdhocBasedTriggerContext") @Fluent public final class AdhocBasedTriggerContext extends TriggerContext { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AdhocBasedTriggerContext.class); - /* * AdhocBasedTaggingCriteria Tagging Criteria containing retention tag for * adhoc backup. @@ -56,7 +53,7 @@ public AdhocBasedTriggerContext withTaggingCriteria(AdhocBasedTaggingCriteria ta public void validate() { super.validate(); if (taggingCriteria() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property taggingCriteria in model AdhocBasedTriggerContext")); @@ -64,4 +61,6 @@ public void validate() { taggingCriteria().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(AdhocBasedTriggerContext.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AlertsState.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AlertsState.java new file mode 100644 index 0000000000000..c5245fbe6abe5 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AlertsState.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for AlertsState. */ +public final class AlertsState extends ExpandableStringEnum { + /** Static value Enabled for AlertsState. */ + public static final AlertsState ENABLED = fromString("Enabled"); + + /** Static value Disabled for AlertsState. */ + public static final AlertsState DISABLED = fromString("Disabled"); + + /** + * Creates or finds a AlertsState from its string representation. + * + * @param name a name to look for. + * @return the corresponding AlertsState. + */ + @JsonCreator + public static AlertsState fromString(String name) { + return fromString(name, AlertsState.class); + } + + /** @return known AlertsState values. */ + public static Collection values() { + return values(AlertsState.class); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AuthCredentials.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AuthCredentials.java index a2cd8f6bef480..623daeff52281 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AuthCredentials.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AuthCredentials.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -23,8 +21,6 @@ }) @Immutable public class AuthCredentials { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AuthCredentials.class); - /** * Validates the instance. * diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupDiscreteRecoveryPoint.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupDiscreteRecoveryPoint.java index 2565d2a1d2450..6ffd663661b4e 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupDiscreteRecoveryPoint.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupDiscreteRecoveryPoint.java @@ -6,7 +6,6 @@ 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 com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +17,6 @@ @JsonTypeName("AzureBackupDiscreteRecoveryPoint") @Fluent public final class AzureBackupDiscreteRecoveryPoint extends AzureBackupRecoveryPoint { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBackupDiscreteRecoveryPoint.class); - /* * The friendlyName property. */ @@ -267,10 +264,12 @@ public void validate() { recoveryPointDataStoresDetails().forEach(e -> e.validate()); } if (recoveryPointTime() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property recoveryPointTime in model AzureBackupDiscreteRecoveryPoint")); } } + + private static final ClientLogger LOGGER = new ClientLogger(AzureBackupDiscreteRecoveryPoint.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupFindRestorableTimeRangesRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupFindRestorableTimeRangesRequest.java index 2d2a4f238f079..fd3b4c9606793 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupFindRestorableTimeRangesRequest.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupFindRestorableTimeRangesRequest.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** List Restore Ranges Request. */ @Fluent public final class AzureBackupFindRestorableTimeRangesRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBackupFindRestorableTimeRangesRequest.class); - /* * Gets or sets the type of the source data store. */ @@ -100,11 +97,13 @@ public AzureBackupFindRestorableTimeRangesRequest withEndTime(String endTime) { */ public void validate() { if (sourceDataStoreType() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property sourceDataStoreType in model" + " AzureBackupFindRestorableTimeRangesRequest")); } } + + private static final ClientLogger LOGGER = new ClientLogger(AzureBackupFindRestorableTimeRangesRequest.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupFindRestorableTimeRangesRequestResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupFindRestorableTimeRangesRequestResource.java index 143f9a904f524..27104de857d92 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupFindRestorableTimeRangesRequestResource.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupFindRestorableTimeRangesRequestResource.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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; import java.util.Map; @@ -14,9 +12,6 @@ /** List Restore Ranges Request. */ @Fluent public final class AzureBackupFindRestorableTimeRangesRequestResource extends DppWorkerRequest { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AzureBackupFindRestorableTimeRangesRequestResource.class); - /* * AzureBackupFindRestorableTimeRangesRequestResource content */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupFindRestorableTimeRangesResponse.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupFindRestorableTimeRangesResponse.java index 44b70e9bb782b..f99a6968cec8f 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupFindRestorableTimeRangesResponse.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupFindRestorableTimeRangesResponse.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.dataprotection.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; /** List Restore Ranges Response. */ @Fluent public final class AzureBackupFindRestorableTimeRangesResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBackupFindRestorableTimeRangesResponse.class); - /* * Returns the Restore Ranges available on the Backup Instance. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupJob.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupJob.java index 1851cce68605d..b31f7ce702596 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupJob.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupJob.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -14,8 +13,6 @@ /** AzureBackup Job Class. */ @Fluent public final class AzureBackupJob { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBackupJob.class); - /* * Job Activity Id */ @@ -720,34 +717,34 @@ public AzureBackupJob withDestinationDataStoreName(String destinationDataStoreNa */ public void validate() { if (activityId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property activityId in model AzureBackupJob")); } if (backupInstanceFriendlyName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property backupInstanceFriendlyName in model AzureBackupJob")); } if (dataSourceId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property dataSourceId in model AzureBackupJob")); } if (dataSourceLocation() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property dataSourceLocation in model AzureBackupJob")); } if (dataSourceName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property dataSourceName in model AzureBackupJob")); } if (dataSourceType() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property dataSourceType in model AzureBackupJob")); } @@ -758,52 +755,54 @@ public void validate() { extendedInfo().validate(); } if (operation() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property operation in model AzureBackupJob")); } if (operationCategory() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property operationCategory in model AzureBackupJob")); } if (sourceResourceGroup() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property sourceResourceGroup in model AzureBackupJob")); } if (sourceSubscriptionId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property sourceSubscriptionId in model AzureBackupJob")); } if (startTime() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property startTime in model AzureBackupJob")); } if (status() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property status in model AzureBackupJob")); } if (subscriptionId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property subscriptionId in model AzureBackupJob")); } if (supportedActions() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property supportedActions in model AzureBackupJob")); } if (vaultName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property vaultName in model AzureBackupJob")); } } + + private static final ClientLogger LOGGER = new ClientLogger(AzureBackupJob.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupJobResourceList.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupJobResourceList.java index 5e07952c798fb..381a17e607c99 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupJobResourceList.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupJobResourceList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.dataprotection.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of AzureBackup Job resources. */ @Fluent public final class AzureBackupJobResourceList extends DppResourceList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBackupJobResourceList.class); - /* * List of resources. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupParams.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupParams.java index 02bfa0b4fd1fb..7ca25eaa6659b 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupParams.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupParams.java @@ -6,7 +6,6 @@ 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 com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,8 +15,6 @@ @JsonTypeName("AzureBackupParams") @Fluent public final class AzureBackupParams extends BackupParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBackupParams.class); - /* * BackupType ; Full/Incremental etc */ @@ -53,9 +50,11 @@ public AzureBackupParams withBackupType(String backupType) { public void validate() { super.validate(); if (backupType() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property backupType in model AzureBackupParams")); } } + + private static final ClientLogger LOGGER = new ClientLogger(AzureBackupParams.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryPoint.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryPoint.java index 91d964de7f85c..13031c20bc271 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryPoint.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryPoint.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -23,8 +21,6 @@ }) @Immutable public class AzureBackupRecoveryPoint { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBackupRecoveryPoint.class); - /** * Validates the instance. * diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryPointBasedRestoreRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryPointBasedRestoreRequest.java index f38bb4427d135..393128c3877f9 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryPointBasedRestoreRequest.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryPointBasedRestoreRequest.java @@ -6,7 +6,6 @@ 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 com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -26,8 +25,6 @@ }) @Fluent public class AzureBackupRecoveryPointBasedRestoreRequest extends AzureBackupRestoreRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBackupRecoveryPointBasedRestoreRequest.class); - /* * The recoveryPointId property. */ @@ -69,6 +66,13 @@ public AzureBackupRecoveryPointBasedRestoreRequest withSourceDataStoreType( return this; } + /** {@inheritDoc} */ + @Override + public AzureBackupRecoveryPointBasedRestoreRequest withSourceResourceId(String sourceResourceId) { + super.withSourceResourceId(sourceResourceId); + return this; + } + /** * Validates the instance. * @@ -78,11 +82,13 @@ public AzureBackupRecoveryPointBasedRestoreRequest withSourceDataStoreType( public void validate() { super.validate(); if (recoveryPointId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property recoveryPointId in model" + " AzureBackupRecoveryPointBasedRestoreRequest")); } } + + private static final ClientLogger LOGGER = new ClientLogger(AzureBackupRecoveryPointBasedRestoreRequest.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryPointResourceList.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryPointResourceList.java index 7d874a2d78957..c23456b7cc9d6 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryPointResourceList.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryPointResourceList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.dataprotection.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** AzureBackupRecoveryPointResourceList Azure backup recoveryPoint resource list. */ @Fluent public final class AzureBackupRecoveryPointResourceList extends DppResourceList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBackupRecoveryPointResourceList.class); - /* * List of resources. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryTimeBasedRestoreRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryTimeBasedRestoreRequest.java index 5915906c00d82..82685a0120ba5 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryTimeBasedRestoreRequest.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryTimeBasedRestoreRequest.java @@ -6,7 +6,6 @@ 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 com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,8 +15,6 @@ @JsonTypeName("AzureBackupRecoveryTimeBasedRestoreRequest") @Fluent public final class AzureBackupRecoveryTimeBasedRestoreRequest extends AzureBackupRestoreRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBackupRecoveryTimeBasedRestoreRequest.class); - /* * The recovery time in ISO 8601 format example - * 2020-08-14T17:30:00.0000000Z. @@ -59,6 +56,13 @@ public AzureBackupRecoveryTimeBasedRestoreRequest withSourceDataStoreType(Source return this; } + /** {@inheritDoc} */ + @Override + public AzureBackupRecoveryTimeBasedRestoreRequest withSourceResourceId(String sourceResourceId) { + super.withSourceResourceId(sourceResourceId); + return this; + } + /** * Validates the instance. * @@ -68,11 +72,13 @@ public AzureBackupRecoveryTimeBasedRestoreRequest withSourceDataStoreType(Source public void validate() { super.validate(); if (recoveryPointTime() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property recoveryPointTime in model" + " AzureBackupRecoveryTimeBasedRestoreRequest")); } } + + private static final ClientLogger LOGGER = new ClientLogger(AzureBackupRecoveryTimeBasedRestoreRequest.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRehydrationRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRehydrationRequest.java index e1a00d7d27d07..1c15b665d04a4 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRehydrationRequest.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRehydrationRequest.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** AzureBackupRehydrationRequest Azure Backup Rehydrate Request. */ @Fluent public final class AzureBackupRehydrationRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBackupRehydrationRequest.class); - /* * Id of the recovery point to be recovered */ @@ -99,17 +96,19 @@ public AzureBackupRehydrationRequest withRehydrationRetentionDuration(String reh */ public void validate() { if (recoveryPointId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property recoveryPointId in model AzureBackupRehydrationRequest")); } if (rehydrationRetentionDuration() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property rehydrationRetentionDuration in model" + " AzureBackupRehydrationRequest")); } } + + private static final ClientLogger LOGGER = new ClientLogger(AzureBackupRehydrationRequest.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRestoreRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRestoreRequest.java index a12b864492d5a..d5aafa6914cba 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRestoreRequest.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRestoreRequest.java @@ -6,7 +6,6 @@ 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 com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -29,8 +28,6 @@ }) @Fluent public class AzureBackupRestoreRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBackupRestoreRequest.class); - /* * Gets or sets the restore target information. */ @@ -43,6 +40,13 @@ public class AzureBackupRestoreRequest { @JsonProperty(value = "sourceDataStoreType", required = true) private SourceDataStoreType sourceDataStoreType; + /* + * Fully qualified Azure Resource Manager ID of the datasource which is + * being recovered. + */ + @JsonProperty(value = "sourceResourceId") + private String sourceResourceId; + /** * Get the restoreTargetInfo property: Gets or sets the restore target information. * @@ -83,6 +87,28 @@ public AzureBackupRestoreRequest withSourceDataStoreType(SourceDataStoreType sou return this; } + /** + * Get the sourceResourceId property: Fully qualified Azure Resource Manager ID of the datasource which is being + * recovered. + * + * @return the sourceResourceId value. + */ + public String sourceResourceId() { + return this.sourceResourceId; + } + + /** + * Set the sourceResourceId property: Fully qualified Azure Resource Manager ID of the datasource which is being + * recovered. + * + * @param sourceResourceId the sourceResourceId value to set. + * @return the AzureBackupRestoreRequest object itself. + */ + public AzureBackupRestoreRequest withSourceResourceId(String sourceResourceId) { + this.sourceResourceId = sourceResourceId; + return this; + } + /** * Validates the instance. * @@ -90,7 +116,7 @@ public AzureBackupRestoreRequest withSourceDataStoreType(SourceDataStoreType sou */ public void validate() { if (restoreTargetInfo() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property restoreTargetInfo in model AzureBackupRestoreRequest")); @@ -98,10 +124,12 @@ public void validate() { restoreTargetInfo().validate(); } if (sourceDataStoreType() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property sourceDataStoreType in model AzureBackupRestoreRequest")); } } + + private static final ClientLogger LOGGER = new ClientLogger(AzureBackupRestoreRequest.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRestoreWithRehydrationRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRestoreWithRehydrationRequest.java index d38a9d00c4518..c20e9a96eba3a 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRestoreWithRehydrationRequest.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRestoreWithRehydrationRequest.java @@ -6,7 +6,6 @@ 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 com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,8 +15,6 @@ @JsonTypeName("AzureBackupRestoreWithRehydrationRequest") @Fluent public final class AzureBackupRestoreWithRehydrationRequest extends AzureBackupRecoveryPointBasedRestoreRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBackupRestoreWithRehydrationRequest.class); - /* * Priority to be used for rehydration. Values High or Standard */ @@ -92,6 +89,13 @@ public AzureBackupRestoreWithRehydrationRequest withSourceDataStoreType(SourceDa return this; } + /** {@inheritDoc} */ + @Override + public AzureBackupRestoreWithRehydrationRequest withSourceResourceId(String sourceResourceId) { + super.withSourceResourceId(sourceResourceId); + return this; + } + /** * Validates the instance. * @@ -101,18 +105,20 @@ public AzureBackupRestoreWithRehydrationRequest withSourceDataStoreType(SourceDa public void validate() { super.validate(); if (rehydrationPriority() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property rehydrationPriority in model" + " AzureBackupRestoreWithRehydrationRequest")); } if (rehydrationRetentionDuration() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property rehydrationRetentionDuration in model" + " AzureBackupRestoreWithRehydrationRequest")); } } + + private static final ClientLogger LOGGER = new ClientLogger(AzureBackupRestoreWithRehydrationRequest.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRule.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRule.java index 0e6d2b189fead..fe0999604d8e0 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRule.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRule.java @@ -6,7 +6,6 @@ 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 com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,8 +15,6 @@ @JsonTypeName("AzureBackupRule") @Fluent public final class AzureBackupRule extends BasePolicyRule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBackupRule.class); - /* * BackupParameters BackupParameters base */ @@ -115,18 +112,20 @@ public void validate() { backupParameters().validate(); } if (dataStore() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property dataStore in model AzureBackupRule")); } else { dataStore().validate(); } if (trigger() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property trigger in model AzureBackupRule")); } else { trigger().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(AzureBackupRule.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureMonitorAlertSettings.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureMonitorAlertSettings.java new file mode 100644 index 0000000000000..bc75b435f03a4 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureMonitorAlertSettings.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Settings for Azure Monitor based alerts. */ +@Fluent +public final class AzureMonitorAlertSettings { + /* + * The alertsForAllJobFailures property. + */ + @JsonProperty(value = "alertsForAllJobFailures") + private AlertsState alertsForAllJobFailures; + + /** + * Get the alertsForAllJobFailures property: The alertsForAllJobFailures property. + * + * @return the alertsForAllJobFailures value. + */ + public AlertsState alertsForAllJobFailures() { + return this.alertsForAllJobFailures; + } + + /** + * Set the alertsForAllJobFailures property: The alertsForAllJobFailures property. + * + * @param alertsForAllJobFailures the alertsForAllJobFailures value to set. + * @return the AzureMonitorAlertSettings object itself. + */ + public AzureMonitorAlertSettings withAlertsForAllJobFailures(AlertsState alertsForAllJobFailures) { + this.alertsForAllJobFailures = alertsForAllJobFailures; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureOperationalStoreParameters.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureOperationalStoreParameters.java index 1e613e1a8360e..f351d969b02ea 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureOperationalStoreParameters.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureOperationalStoreParameters.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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 com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,8 +14,6 @@ @JsonTypeName("AzureOperationalStoreParameters") @Fluent public final class AzureOperationalStoreParameters extends DataStoreParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureOperationalStoreParameters.class); - /* * Gets or sets the Snapshot Resource Group Uri. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureRetentionRule.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureRetentionRule.java index 46df3e5779be5..aed1e56d0e02c 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureRetentionRule.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureRetentionRule.java @@ -6,7 +6,6 @@ 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 com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +16,6 @@ @JsonTypeName("AzureRetentionRule") @Fluent public final class AzureRetentionRule extends BasePolicyRule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureRetentionRule.class); - /* * The isDefault property. */ @@ -87,11 +84,13 @@ public AzureRetentionRule withName(String name) { public void validate() { super.validate(); if (lifecycles() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property lifecycles in model AzureRetentionRule")); } else { lifecycles().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(AzureRetentionRule.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupCriteria.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupCriteria.java index c99b3ee5bcde2..a9c13c8cbdbbf 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupCriteria.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupCriteria.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -21,8 +19,6 @@ @JsonSubTypes({@JsonSubTypes.Type(name = "ScheduleBasedBackupCriteria", value = ScheduleBasedBackupCriteria.class)}) @Immutable public class BackupCriteria { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupCriteria.class); - /** * Validates the instance. * diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstance.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstance.java index c1a012b9867e2..131cc0eb5f087 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstance.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstance.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Backup Instance. */ @Fluent public final class BackupInstance { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupInstance.class); - /* * Gets or sets the Backup Instance friendly name. */ @@ -69,6 +66,13 @@ public final class BackupInstance { @JsonProperty(value = "datasourceAuthCredentials") private AuthCredentials datasourceAuthCredentials; + /* + * Specifies the type of validation. In case of DeepValidation, all + * validations from /validateForBackup API will run again. + */ + @JsonProperty(value = "validationType") + private ValidationType validationType; + /* * The objectType property. */ @@ -212,6 +216,28 @@ public BackupInstance withDatasourceAuthCredentials(AuthCredentials datasourceAu return this; } + /** + * Get the validationType property: Specifies the type of validation. In case of DeepValidation, all validations + * from /validateForBackup API will run again. + * + * @return the validationType value. + */ + public ValidationType validationType() { + return this.validationType; + } + + /** + * Set the validationType property: Specifies the type of validation. In case of DeepValidation, all validations + * from /validateForBackup API will run again. + * + * @param validationType the validationType value to set. + * @return the BackupInstance object itself. + */ + public BackupInstance withValidationType(ValidationType validationType) { + this.validationType = validationType; + return this; + } + /** * Get the objectType property: The objectType property. * @@ -239,7 +265,7 @@ public BackupInstance withObjectType(String objectType) { */ public void validate() { if (dataSourceInfo() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property dataSourceInfo in model BackupInstance")); } else { @@ -249,7 +275,7 @@ public void validate() { dataSourceSetInfo().validate(); } if (policyInfo() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property policyInfo in model BackupInstance")); } else { @@ -265,9 +291,11 @@ public void validate() { datasourceAuthCredentials().validate(); } if (objectType() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property objectType in model BackupInstance")); } } + + private static final ClientLogger LOGGER = new ClientLogger(BackupInstance.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceResource.java index fad249e635e86..3faa12c460eb4 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceResource.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceResource.java @@ -64,13 +64,13 @@ interface Blank extends WithParentResource { /** The stage of the BackupInstanceResource definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies vaultName, resourceGroupName. + * Specifies resourceGroupName, vaultName. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @return the next definition stage. */ - WithCreate withExistingBackupVault(String vaultName, String resourceGroupName); + WithCreate withExistingBackupVault(String resourceGroupName, String vaultName); } /** * The stage of the BackupInstanceResource definition which contains all the minimum required properties for the @@ -222,6 +222,101 @@ interface WithProperties { */ OperationJobExtendedInfo triggerRestore(AzureBackupRestoreRequest parameters, Context context); + /** + * This operation will resume backups for backup instance. + * + * @throws com.azure.core.management.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 resumeBackups(); + + /** + * This operation will resume backups for backup instance. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 resumeBackups(Context context); + + /** + * This operation will resume protection for a stopped backup instance. + * + * @throws com.azure.core.management.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 resumeProtection(); + + /** + * This operation will resume protection for a stopped backup instance. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 resumeProtection(Context context); + + /** + * This operation will stop protection of a backup instance and data will be held forever. + * + * @throws com.azure.core.management.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 stopProtection(); + + /** + * This operation will stop protection of a backup instance and data will be held forever. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 stopProtection(Context context); + + /** + * This operation will stop backups for backup instance. + * + * @throws com.azure.core.management.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 suspendBackups(); + + /** + * This operation will stop backups for backup instance. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 suspendBackups(Context context); + + /** + * Sync backup instance again in case of failure This action will retry last failed operation and will bring backup + * instance to valid state. + * + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 syncBackupInstance(SyncBackupInstanceRequest parameters); + + /** + * Sync backup instance again in case of failure This action will retry last failed operation and will bring backup + * instance to valid state. + * + * @param parameters Request body for 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 syncBackupInstance(SyncBackupInstanceRequest parameters, Context context); + /** * Validates if Restore can be triggered for a DataSource. * diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceResourceList.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceResourceList.java index 37255c532eb8a..b94ed03171d1c 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceResourceList.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceResourceList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.dataprotection.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.fluent.models.BackupInstanceResourceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** BackupInstanceResourceList BackupInstance Resource list response. */ @Fluent public final class BackupInstanceResourceList extends DppResourceList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupInstanceResourceList.class); - /* * List of resources. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstances.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstances.java index eafd4ea6ad66f..b054c37ec8c3a 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstances.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstances.java @@ -13,86 +13,86 @@ public interface BackupInstances { /** * Gets a backup instances belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a backup instances belonging to a backup vault. + * @return a backup instances belonging to a backup vault as paginated response with {@link PagedIterable}. */ - PagedIterable list(String vaultName, String resourceGroupName); + PagedIterable list(String resourceGroupName, String vaultName); /** * Gets a backup instances belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a backup instances belonging to a backup vault. + * @return a backup instances belonging to a backup vault as paginated response with {@link PagedIterable}. */ - PagedIterable list(String vaultName, String resourceGroupName, Context context); + PagedIterable list(String resourceGroupName, String vaultName, Context context); /** * Gets a backup instance with name in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 backup instance with name in a backup vault. */ - BackupInstanceResource get(String vaultName, String resourceGroupName, String backupInstanceName); + BackupInstanceResource get(String resourceGroupName, String vaultName, String backupInstanceName); /** * Gets a backup instance with name in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 backup instance with name in a backup vault. + * @return a backup instance with name in a backup vault along with {@link Response}. */ Response getWithResponse( - String vaultName, String resourceGroupName, String backupInstanceName, Context context); + String resourceGroupName, String vaultName, String backupInstanceName, Context context); /** * Delete a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 vaultName, String resourceGroupName, String backupInstanceName); + void delete(String resourceGroupName, String vaultName, String backupInstanceName); /** * Delete a backup instance in a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 vaultName, String resourceGroupName, String backupInstanceName, Context context); + void delete(String resourceGroupName, String vaultName, String backupInstanceName, Context context); /** * Trigger adhoc backup. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -101,13 +101,13 @@ Response getWithResponse( * @return operationJobExtendedInfo. */ OperationJobExtendedInfo adhocBackup( - String vaultName, String resourceGroupName, String backupInstanceName, TriggerBackupRequest parameters); + String resourceGroupName, String vaultName, String backupInstanceName, TriggerBackupRequest parameters); /** * Trigger adhoc backup. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @param context The context to associate with this operation. @@ -117,8 +117,8 @@ OperationJobExtendedInfo adhocBackup( * @return operationJobExtendedInfo. */ OperationJobExtendedInfo adhocBackup( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, TriggerBackupRequest parameters, Context context); @@ -126,8 +126,8 @@ OperationJobExtendedInfo adhocBackup( /** * Validate whether adhoc backup will be successful or not. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -135,13 +135,13 @@ OperationJobExtendedInfo adhocBackup( * @return operationJobExtendedInfo. */ OperationJobExtendedInfo validateForBackup( - String vaultName, String resourceGroupName, ValidateForBackupRequest parameters); + String resourceGroupName, String vaultName, ValidateForBackupRequest parameters); /** * Validate whether adhoc backup will be successful or not. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param parameters Request body for operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -150,7 +150,38 @@ OperationJobExtendedInfo validateForBackup( * @return operationJobExtendedInfo. */ OperationJobExtendedInfo validateForBackup( - String vaultName, String resourceGroupName, ValidateForBackupRequest parameters, Context context); + String resourceGroupName, String vaultName, ValidateForBackupRequest parameters, Context context); + + /** + * Get result of backup instance creation operation. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param operationId The operationId parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 backup instance creation operation. + */ + BackupInstanceResource getBackupInstanceOperationResult( + String resourceGroupName, String vaultName, String backupInstanceName, String operationId); + + /** + * Get result of backup instance creation operation. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param operationId The operationId parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 backup instance creation operation along with {@link Response}. + */ + Response getBackupInstanceOperationResultWithResponse( + String resourceGroupName, String vaultName, String backupInstanceName, String operationId, Context context); /** * rehydrate recovery point for restore for a BackupInstance. @@ -191,8 +222,8 @@ void triggerRehydrate( /** * Triggers restore for a BackupInstance. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -201,13 +232,13 @@ void triggerRehydrate( * @return operationJobExtendedInfo. */ OperationJobExtendedInfo triggerRestore( - String vaultName, String resourceGroupName, String backupInstanceName, AzureBackupRestoreRequest parameters); + String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters); /** * Triggers restore for a BackupInstance. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @param context The context to associate with this operation. @@ -217,17 +248,152 @@ OperationJobExtendedInfo triggerRestore( * @return operationJobExtendedInfo. */ OperationJobExtendedInfo triggerRestore( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters, Context context); /** - * Validates if Restore can be triggered for a DataSource. + * This operation will resume backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 resumeBackups(String resourceGroupName, String vaultName, String backupInstanceName); + + /** + * This operation will resume backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 resumeBackups(String resourceGroupName, String vaultName, String backupInstanceName, Context context); + + /** + * This operation will resume protection for a stopped backup instance. * + * @param resourceGroupName The name of the resource group where the backup vault is present. * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 resumeProtection(String resourceGroupName, String vaultName, String backupInstanceName); + + /** + * This operation will resume protection for a stopped backup instance. + * * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 resumeProtection(String resourceGroupName, String vaultName, String backupInstanceName, Context context); + + /** + * This operation will stop protection of a backup instance and data will be held forever. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 stopProtection(String resourceGroupName, String vaultName, String backupInstanceName); + + /** + * This operation will stop protection of a backup instance and data will be held forever. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 stopProtection(String resourceGroupName, String vaultName, String backupInstanceName, Context context); + + /** + * This operation will stop backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 suspendBackups(String resourceGroupName, String vaultName, String backupInstanceName); + + /** + * This operation will stop backups for backup instance. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 suspendBackups(String resourceGroupName, String vaultName, String backupInstanceName, Context context); + + /** + * Sync backup instance again in case of failure This action will retry last failed operation and will bring backup + * instance to valid state. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 syncBackupInstance( + String resourceGroupName, String vaultName, String backupInstanceName, SyncBackupInstanceRequest parameters); + + /** + * Sync backup instance again in case of failure This action will retry last failed operation and will bring backup + * instance to valid state. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param backupInstanceName The backupInstanceName parameter. + * @param parameters Request body for 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 syncBackupInstance( + String resourceGroupName, + String vaultName, + String backupInstanceName, + SyncBackupInstanceRequest parameters, + Context context); + + /** + * Validates if Restore can be triggered for a DataSource. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -236,13 +402,13 @@ OperationJobExtendedInfo triggerRestore( * @return operationJobExtendedInfo. */ OperationJobExtendedInfo validateForRestore( - String vaultName, String resourceGroupName, String backupInstanceName, ValidateRestoreRequestObject parameters); + String resourceGroupName, String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters); /** * Validates if Restore can be triggered for a DataSource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @param context The context to associate with this operation. @@ -252,8 +418,8 @@ OperationJobExtendedInfo validateForRestore( * @return operationJobExtendedInfo. */ OperationJobExtendedInfo validateForRestore( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters, Context context); @@ -265,7 +431,7 @@ OperationJobExtendedInfo validateForRestore( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 backup instance with name in a backup vault. + * @return a backup instance with name in a backup vault along with {@link Response}. */ BackupInstanceResource getById(String id); @@ -277,7 +443,7 @@ OperationJobExtendedInfo validateForRestore( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 backup instance with name in a backup vault. + * @return a backup instance with name in a backup vault along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesAdhocBackupHeaders.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesAdhocBackupHeaders.java deleted file mode 100644 index 55959dd528e34..0000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesAdhocBackupHeaders.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.dataprotection.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; - -/** The BackupInstancesAdhocBackupHeaders model. */ -@Fluent -public final class BackupInstancesAdhocBackupHeaders { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupInstancesAdhocBackupHeaders.class); - - /* - * The Retry-After property. - */ - @JsonProperty(value = "Retry-After") - private Integer retryAfter; - - /* - * The Azure-AsyncOperation property. - */ - @JsonProperty(value = "Azure-AsyncOperation") - private String azureAsyncOperation; - - /* - * The Location property. - */ - @JsonProperty(value = "Location") - private String location; - - /** - * Get the retryAfter property: The Retry-After property. - * - * @return the retryAfter value. - */ - public Integer retryAfter() { - return this.retryAfter; - } - - /** - * Set the retryAfter property: The Retry-After property. - * - * @param retryAfter the retryAfter value to set. - * @return the BackupInstancesAdhocBackupHeaders object itself. - */ - public BackupInstancesAdhocBackupHeaders withRetryAfter(Integer retryAfter) { - this.retryAfter = retryAfter; - return this; - } - - /** - * Get the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @return the azureAsyncOperation value. - */ - public String azureAsyncOperation() { - return this.azureAsyncOperation; - } - - /** - * Set the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @param azureAsyncOperation the azureAsyncOperation value to set. - * @return the BackupInstancesAdhocBackupHeaders object itself. - */ - public BackupInstancesAdhocBackupHeaders withAzureAsyncOperation(String azureAsyncOperation) { - this.azureAsyncOperation = azureAsyncOperation; - return this; - } - - /** - * Get the location property: The Location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The Location property. - * - * @param location the location value to set. - * @return the BackupInstancesAdhocBackupHeaders object itself. - */ - public BackupInstancesAdhocBackupHeaders withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesAdhocBackupResponse.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesAdhocBackupResponse.java deleted file mode 100644 index e00769994a0ba..0000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesAdhocBackupResponse.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.dataprotection.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner; - -/** Contains all response data for the adhocBackup operation. */ -public final class BackupInstancesAdhocBackupResponse - extends ResponseBase { - /** - * Creates an instance of BackupInstancesAdhocBackupResponse. - * - * @param request the request which resulted in this BackupInstancesAdhocBackupResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public BackupInstancesAdhocBackupResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - OperationJobExtendedInfoInner value, - BackupInstancesAdhocBackupHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** @return the deserialized response body. */ - @Override - public OperationJobExtendedInfoInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesDeleteHeaders.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesDeleteHeaders.java deleted file mode 100644 index 79dd0fce3d25c..0000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesDeleteHeaders.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.dataprotection.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; - -/** The BackupInstancesDeleteHeaders model. */ -@Fluent -public final class BackupInstancesDeleteHeaders { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupInstancesDeleteHeaders.class); - - /* - * The Retry-After property. - */ - @JsonProperty(value = "Retry-After") - private Integer retryAfter; - - /* - * The Azure-AsyncOperation property. - */ - @JsonProperty(value = "Azure-AsyncOperation") - private String azureAsyncOperation; - - /* - * The Location property. - */ - @JsonProperty(value = "Location") - private String location; - - /** - * Get the retryAfter property: The Retry-After property. - * - * @return the retryAfter value. - */ - public Integer retryAfter() { - return this.retryAfter; - } - - /** - * Set the retryAfter property: The Retry-After property. - * - * @param retryAfter the retryAfter value to set. - * @return the BackupInstancesDeleteHeaders object itself. - */ - public BackupInstancesDeleteHeaders withRetryAfter(Integer retryAfter) { - this.retryAfter = retryAfter; - return this; - } - - /** - * Get the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @return the azureAsyncOperation value. - */ - public String azureAsyncOperation() { - return this.azureAsyncOperation; - } - - /** - * Set the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @param azureAsyncOperation the azureAsyncOperation value to set. - * @return the BackupInstancesDeleteHeaders object itself. - */ - public BackupInstancesDeleteHeaders withAzureAsyncOperation(String azureAsyncOperation) { - this.azureAsyncOperation = azureAsyncOperation; - return this; - } - - /** - * Get the location property: The Location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The Location property. - * - * @param location the location value to set. - * @return the BackupInstancesDeleteHeaders object itself. - */ - public BackupInstancesDeleteHeaders withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesDeleteResponse.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesDeleteResponse.java deleted file mode 100644 index 6b14721971604..0000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesDeleteResponse.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.dataprotection.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** Contains all response data for the delete operation. */ -public final class BackupInstancesDeleteResponse extends ResponseBase { - /** - * Creates an instance of BackupInstancesDeleteResponse. - * - * @param request the request which resulted in this BackupInstancesDeleteResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public BackupInstancesDeleteResponse( - HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, BackupInstancesDeleteHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesExtensionRoutings.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesExtensionRoutings.java new file mode 100644 index 0000000000000..289b5e5b8f8e6 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesExtensionRoutings.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of BackupInstancesExtensionRoutings. */ +public interface BackupInstancesExtensionRoutings { + /** + * Gets a list backup instances associated with a tracked resource. + * + * @param resourceId ARM path of the resource to be protected using Microsoft.DataProtection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list backup instances associated with a tracked resource as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(String resourceId); + + /** + * Gets a list backup instances associated with a tracked resource. + * + * @param resourceId ARM path of the resource to be protected using Microsoft.DataProtection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list backup instances associated with a tracked resource as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(String resourceId, Context context); +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesTriggerRehydrateHeaders.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesTriggerRehydrateHeaders.java deleted file mode 100644 index c77f61d552e52..0000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesTriggerRehydrateHeaders.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.dataprotection.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; - -/** The BackupInstancesTriggerRehydrateHeaders model. */ -@Fluent -public final class BackupInstancesTriggerRehydrateHeaders { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupInstancesTriggerRehydrateHeaders.class); - - /* - * The Retry-After property. - */ - @JsonProperty(value = "Retry-After") - private Integer retryAfter; - - /* - * The Azure-AsyncOperation property. - */ - @JsonProperty(value = "Azure-AsyncOperation") - private String azureAsyncOperation; - - /* - * The Location property. - */ - @JsonProperty(value = "Location") - private String location; - - /** - * Get the retryAfter property: The Retry-After property. - * - * @return the retryAfter value. - */ - public Integer retryAfter() { - return this.retryAfter; - } - - /** - * Set the retryAfter property: The Retry-After property. - * - * @param retryAfter the retryAfter value to set. - * @return the BackupInstancesTriggerRehydrateHeaders object itself. - */ - public BackupInstancesTriggerRehydrateHeaders withRetryAfter(Integer retryAfter) { - this.retryAfter = retryAfter; - return this; - } - - /** - * Get the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @return the azureAsyncOperation value. - */ - public String azureAsyncOperation() { - return this.azureAsyncOperation; - } - - /** - * Set the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @param azureAsyncOperation the azureAsyncOperation value to set. - * @return the BackupInstancesTriggerRehydrateHeaders object itself. - */ - public BackupInstancesTriggerRehydrateHeaders withAzureAsyncOperation(String azureAsyncOperation) { - this.azureAsyncOperation = azureAsyncOperation; - return this; - } - - /** - * Get the location property: The Location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The Location property. - * - * @param location the location value to set. - * @return the BackupInstancesTriggerRehydrateHeaders object itself. - */ - public BackupInstancesTriggerRehydrateHeaders withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesTriggerRehydrateResponse.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesTriggerRehydrateResponse.java deleted file mode 100644 index 27be63eea233c..0000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesTriggerRehydrateResponse.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.dataprotection.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** Contains all response data for the triggerRehydrate operation. */ -public final class BackupInstancesTriggerRehydrateResponse - extends ResponseBase { - /** - * Creates an instance of BackupInstancesTriggerRehydrateResponse. - * - * @param request the request which resulted in this BackupInstancesTriggerRehydrateResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public BackupInstancesTriggerRehydrateResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - Void value, - BackupInstancesTriggerRehydrateHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesTriggerRestoreHeaders.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesTriggerRestoreHeaders.java deleted file mode 100644 index 385c730a2b3ee..0000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesTriggerRestoreHeaders.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.dataprotection.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; - -/** The BackupInstancesTriggerRestoreHeaders model. */ -@Fluent -public final class BackupInstancesTriggerRestoreHeaders { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupInstancesTriggerRestoreHeaders.class); - - /* - * The Retry-After property. - */ - @JsonProperty(value = "Retry-After") - private Integer retryAfter; - - /* - * The Azure-AsyncOperation property. - */ - @JsonProperty(value = "Azure-AsyncOperation") - private String azureAsyncOperation; - - /* - * The Location property. - */ - @JsonProperty(value = "Location") - private String location; - - /** - * Get the retryAfter property: The Retry-After property. - * - * @return the retryAfter value. - */ - public Integer retryAfter() { - return this.retryAfter; - } - - /** - * Set the retryAfter property: The Retry-After property. - * - * @param retryAfter the retryAfter value to set. - * @return the BackupInstancesTriggerRestoreHeaders object itself. - */ - public BackupInstancesTriggerRestoreHeaders withRetryAfter(Integer retryAfter) { - this.retryAfter = retryAfter; - return this; - } - - /** - * Get the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @return the azureAsyncOperation value. - */ - public String azureAsyncOperation() { - return this.azureAsyncOperation; - } - - /** - * Set the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @param azureAsyncOperation the azureAsyncOperation value to set. - * @return the BackupInstancesTriggerRestoreHeaders object itself. - */ - public BackupInstancesTriggerRestoreHeaders withAzureAsyncOperation(String azureAsyncOperation) { - this.azureAsyncOperation = azureAsyncOperation; - return this; - } - - /** - * Get the location property: The Location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The Location property. - * - * @param location the location value to set. - * @return the BackupInstancesTriggerRestoreHeaders object itself. - */ - public BackupInstancesTriggerRestoreHeaders withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesTriggerRestoreResponse.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesTriggerRestoreResponse.java deleted file mode 100644 index 8c404a68f12e7..0000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesTriggerRestoreResponse.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.dataprotection.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner; - -/** Contains all response data for the triggerRestore operation. */ -public final class BackupInstancesTriggerRestoreResponse - extends ResponseBase { - /** - * Creates an instance of BackupInstancesTriggerRestoreResponse. - * - * @param request the request which resulted in this BackupInstancesTriggerRestoreResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public BackupInstancesTriggerRestoreResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - OperationJobExtendedInfoInner value, - BackupInstancesTriggerRestoreHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** @return the deserialized response body. */ - @Override - public OperationJobExtendedInfoInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesValidateForBackupHeaders.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesValidateForBackupHeaders.java deleted file mode 100644 index 8a1cca7cbba13..0000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesValidateForBackupHeaders.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.dataprotection.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; - -/** The BackupInstancesValidateForBackupHeaders model. */ -@Fluent -public final class BackupInstancesValidateForBackupHeaders { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupInstancesValidateForBackupHeaders.class); - - /* - * The Retry-After property. - */ - @JsonProperty(value = "Retry-After") - private Integer retryAfter; - - /* - * The Azure-AsyncOperation property. - */ - @JsonProperty(value = "Azure-AsyncOperation") - private String azureAsyncOperation; - - /* - * The Location property. - */ - @JsonProperty(value = "Location") - private String location; - - /** - * Get the retryAfter property: The Retry-After property. - * - * @return the retryAfter value. - */ - public Integer retryAfter() { - return this.retryAfter; - } - - /** - * Set the retryAfter property: The Retry-After property. - * - * @param retryAfter the retryAfter value to set. - * @return the BackupInstancesValidateForBackupHeaders object itself. - */ - public BackupInstancesValidateForBackupHeaders withRetryAfter(Integer retryAfter) { - this.retryAfter = retryAfter; - return this; - } - - /** - * Get the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @return the azureAsyncOperation value. - */ - public String azureAsyncOperation() { - return this.azureAsyncOperation; - } - - /** - * Set the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @param azureAsyncOperation the azureAsyncOperation value to set. - * @return the BackupInstancesValidateForBackupHeaders object itself. - */ - public BackupInstancesValidateForBackupHeaders withAzureAsyncOperation(String azureAsyncOperation) { - this.azureAsyncOperation = azureAsyncOperation; - return this; - } - - /** - * Get the location property: The Location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The Location property. - * - * @param location the location value to set. - * @return the BackupInstancesValidateForBackupHeaders object itself. - */ - public BackupInstancesValidateForBackupHeaders withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesValidateForBackupResponse.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesValidateForBackupResponse.java deleted file mode 100644 index 263301e815f22..0000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesValidateForBackupResponse.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.dataprotection.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner; - -/** Contains all response data for the validateForBackup operation. */ -public final class BackupInstancesValidateForBackupResponse - extends ResponseBase { - /** - * Creates an instance of BackupInstancesValidateForBackupResponse. - * - * @param request the request which resulted in this BackupInstancesValidateForBackupResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public BackupInstancesValidateForBackupResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - OperationJobExtendedInfoInner value, - BackupInstancesValidateForBackupHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** @return the deserialized response body. */ - @Override - public OperationJobExtendedInfoInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesValidateForRestoreHeaders.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesValidateForRestoreHeaders.java deleted file mode 100644 index 9ac72c233aa3a..0000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesValidateForRestoreHeaders.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.dataprotection.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; - -/** The BackupInstancesValidateForRestoreHeaders model. */ -@Fluent -public final class BackupInstancesValidateForRestoreHeaders { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupInstancesValidateForRestoreHeaders.class); - - /* - * The Retry-After property. - */ - @JsonProperty(value = "Retry-After") - private Integer retryAfter; - - /* - * The Azure-AsyncOperation property. - */ - @JsonProperty(value = "Azure-AsyncOperation") - private String azureAsyncOperation; - - /* - * The Location property. - */ - @JsonProperty(value = "Location") - private String location; - - /** - * Get the retryAfter property: The Retry-After property. - * - * @return the retryAfter value. - */ - public Integer retryAfter() { - return this.retryAfter; - } - - /** - * Set the retryAfter property: The Retry-After property. - * - * @param retryAfter the retryAfter value to set. - * @return the BackupInstancesValidateForRestoreHeaders object itself. - */ - public BackupInstancesValidateForRestoreHeaders withRetryAfter(Integer retryAfter) { - this.retryAfter = retryAfter; - return this; - } - - /** - * Get the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @return the azureAsyncOperation value. - */ - public String azureAsyncOperation() { - return this.azureAsyncOperation; - } - - /** - * Set the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @param azureAsyncOperation the azureAsyncOperation value to set. - * @return the BackupInstancesValidateForRestoreHeaders object itself. - */ - public BackupInstancesValidateForRestoreHeaders withAzureAsyncOperation(String azureAsyncOperation) { - this.azureAsyncOperation = azureAsyncOperation; - return this; - } - - /** - * Get the location property: The Location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The Location property. - * - * @param location the location value to set. - * @return the BackupInstancesValidateForRestoreHeaders object itself. - */ - public BackupInstancesValidateForRestoreHeaders withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesValidateForRestoreResponse.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesValidateForRestoreResponse.java deleted file mode 100644 index 42ce27c64305f..0000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesValidateForRestoreResponse.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.dataprotection.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner; - -/** Contains all response data for the validateForRestore operation. */ -public final class BackupInstancesValidateForRestoreResponse - extends ResponseBase { - /** - * Creates an instance of BackupInstancesValidateForRestoreResponse. - * - * @param request the request which resulted in this BackupInstancesValidateForRestoreResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public BackupInstancesValidateForRestoreResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - OperationJobExtendedInfoInner value, - BackupInstancesValidateForRestoreHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** @return the deserialized response body. */ - @Override - public OperationJobExtendedInfoInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupParameters.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupParameters.java index 831221414be2f..35aa5c26df95c 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupParameters.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupParameters.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -21,8 +19,6 @@ @JsonSubTypes({@JsonSubTypes.Type(name = "AzureBackupParams", value = AzureBackupParams.class)}) @Immutable public class BackupParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupParameters.class); - /** * Validates the instance. * diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupPolicies.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupPolicies.java index 49d48e980d448..6c41334db48c0 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupPolicies.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupPolicies.java @@ -13,82 +13,82 @@ public interface BackupPolicies { /** * Returns list of backup policies belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return baseBackupPolicyResourceList. + * @return baseBackupPolicyResourceList as paginated response with {@link PagedIterable}. */ - PagedIterable list(String vaultName, String resourceGroupName); + PagedIterable list(String resourceGroupName, String vaultName); /** * Returns list of backup policies belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return baseBackupPolicyResourceList. + * @return baseBackupPolicyResourceList as paginated response with {@link PagedIterable}. */ - PagedIterable list(String vaultName, String resourceGroupName, Context context); + PagedIterable list(String resourceGroupName, String vaultName, Context context); /** * Gets a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 backup policy belonging to a backup vault. */ - BaseBackupPolicyResource get(String vaultName, String resourceGroupName, String backupPolicyName); + BaseBackupPolicyResource get(String resourceGroupName, String vaultName, String backupPolicyName); /** * Gets a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 backup policy belonging to a backup vault. + * @return a backup policy belonging to a backup vault along with {@link Response}. */ Response getWithResponse( - String vaultName, String resourceGroupName, String backupPolicyName, Context context); + String resourceGroupName, String vaultName, String backupPolicyName, Context context); /** * Deletes a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 vaultName, String resourceGroupName, String backupPolicyName); + void delete(String resourceGroupName, String vaultName, String backupPolicyName); /** * Deletes a backup policy belonging to a backup vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse( - String vaultName, String resourceGroupName, String backupPolicyName, Context context); + String resourceGroupName, String vaultName, String backupPolicyName, Context context); /** * Gets a backup policy belonging to a backup vault. @@ -97,7 +97,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 backup policy belonging to a backup vault. + * @return a backup policy belonging to a backup vault along with {@link Response}. */ BaseBackupPolicyResource getById(String id); @@ -109,7 +109,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 backup policy belonging to a backup vault. + * @return a backup policy belonging to a backup vault along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -131,7 +131,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupPolicy.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupPolicy.java index 8296c77c33ca8..5910e5c5e115d 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupPolicy.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupPolicy.java @@ -6,7 +6,6 @@ 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 com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +16,6 @@ @JsonTypeName("BackupPolicy") @Fluent public final class BackupPolicy extends BaseBackupPolicy { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupPolicy.class); - /* * Policy rule dictionary that contains rules for each backuptype i.e * Full/Incremental/Logs etc @@ -64,11 +61,13 @@ public BackupPolicy withDatasourceTypes(List datasourceTypes) { public void validate() { super.validate(); if (policyRules() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property policyRules in model BackupPolicy")); } else { policyRules().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(BackupPolicy.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupSchedule.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupSchedule.java index fc33605eb6708..ea0e4ffce063f 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupSchedule.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupSchedule.java @@ -6,15 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** BackupSchedule Schedule for backup. */ @Fluent public final class BackupSchedule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupSchedule.class); - /* * ISO 8601 repeating time interval format */ @@ -74,10 +71,12 @@ public BackupSchedule withTimeZone(String timeZone) { */ public void validate() { if (repeatingTimeIntervals() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property repeatingTimeIntervals in model BackupSchedule")); } } + + private static final ClientLogger LOGGER = new ClientLogger(BackupSchedule.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVault.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVault.java index 202120ed0d15e..8e547cbe80cf9 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVault.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVault.java @@ -6,15 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** BackupVault Backup Vault. */ @Fluent public final class BackupVault { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupVault.class); - /* * Provisioning state of the BackupVault resource */ @@ -39,6 +36,12 @@ public final class BackupVault { @JsonProperty(value = "storageSettings", required = true) private List storageSettings; + /* + * Monitoring Settings + */ + @JsonProperty(value = "monitoringSettings") + private MonitoringSettings monitoringSettings; + /** * Get the provisioningState property: Provisioning state of the BackupVault resource. * @@ -86,6 +89,26 @@ public BackupVault withStorageSettings(List storageSettings) { return this; } + /** + * Get the monitoringSettings property: Monitoring Settings. + * + * @return the monitoringSettings value. + */ + public MonitoringSettings monitoringSettings() { + return this.monitoringSettings; + } + + /** + * Set the monitoringSettings property: Monitoring Settings. + * + * @param monitoringSettings the monitoringSettings value to set. + * @return the BackupVault object itself. + */ + public BackupVault withMonitoringSettings(MonitoringSettings monitoringSettings) { + this.monitoringSettings = monitoringSettings; + return this; + } + /** * Validates the instance. * @@ -96,11 +119,16 @@ public void validate() { resourceMoveDetails().validate(); } if (storageSettings() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property storageSettings in model BackupVault")); } else { storageSettings().forEach(e -> e.validate()); } + if (monitoringSettings() != null) { + monitoringSettings().validate(); + } } + + private static final ClientLogger LOGGER = new ClientLogger(BackupVault.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaultOperationResults.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaultOperationResults.java index 52e071c866ab3..0853f3fa58e21 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaultOperationResults.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaultOperationResults.java @@ -10,19 +10,19 @@ /** Resource collection API of BackupVaultOperationResults. */ public interface BackupVaultOperationResults { /** - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return backupVault Resource. */ - BackupVaultResource get(String vaultName, String resourceGroupName, String operationId); + BackupVaultResource get(String resourceGroupName, String vaultName, String operationId); /** - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -31,5 +31,5 @@ public interface BackupVaultOperationResults { * @return backupVault Resource. */ Response getWithResponse( - String vaultName, String resourceGroupName, String operationId, Context context); + String resourceGroupName, String vaultName, String operationId, Context context); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaultOperationResultsGetHeaders.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaultOperationResultsGetHeaders.java index 1f333641ba516..ed3cd9019823f 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaultOperationResultsGetHeaders.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaultOperationResultsGetHeaders.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.dataprotection.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; /** The BackupVaultOperationResultsGetHeaders model. */ @Fluent public final class BackupVaultOperationResultsGetHeaders { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupVaultOperationResultsGetHeaders.class); - /* * The Retry-After property. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaultResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaultResource.java index 77d6a2001c068..04f669ad11036 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaultResource.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaultResource.java @@ -207,7 +207,7 @@ interface WithIdentity { BackupVaultResource.Update update(); /** The template for BackupVaultResource update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithProperties { /** * Executes the update request. * @@ -245,6 +245,16 @@ interface WithIdentity { */ Update withIdentity(DppIdentityDetails identity); } + /** The stage of the BackupVaultResource update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Resource properties.. + * + * @param properties Resource properties. + * @return the next definition stage. + */ + Update withProperties(PatchBackupVaultInput properties); + } } /** * Refreshes the resource to sync with Azure. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaultResourceList.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaultResourceList.java index 12029c3d07d2e..740803b570dc9 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaultResourceList.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaultResourceList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.dataprotection.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.fluent.models.BackupVaultResourceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** BackupVaultResourceList List of BackupVault resources. */ @Fluent public final class BackupVaultResourceList extends DppResourceList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupVaultResourceList.class); - /* * List of resources. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaults.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaults.java index dbfbf2e9a270c..c20c8c14f25aa 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaults.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaults.java @@ -15,7 +15,7 @@ public interface BackupVaults { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -26,7 +26,7 @@ public interface BackupVaults { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -37,7 +37,7 @@ public interface BackupVaults { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -49,7 +49,7 @@ public interface BackupVaults { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVaultResourceList. + * @return backupVaultResourceList as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -74,7 +74,7 @@ public interface BackupVaults { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVault Resource. + * @return backupVault Resource along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String vaultName, Context context); @@ -99,7 +99,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse(String resourceGroupName, String vaultName, Context context); @@ -127,7 +127,7 @@ CheckNameAvailabilityResult checkNameAvailability( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return checkNameAvailabilityResult. + * @return checkNameAvailabilityResult along with {@link Response}. */ Response checkNameAvailabilityWithResponse( String resourceGroupName, String location, CheckNameAvailabilityRequest parameters, Context context); @@ -139,7 +139,7 @@ Response checkNameAvailabilityWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVault Resource. + * @return backupVault Resource along with {@link Response}. */ BackupVaultResource getById(String id); @@ -151,7 +151,7 @@ Response checkNameAvailabilityWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backupVault Resource. + * @return backupVault Resource along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -173,7 +173,7 @@ Response checkNameAvailabilityWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseBackupPolicy.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseBackupPolicy.java index 347ba3cd5bb76..c7eb5b64176de 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseBackupPolicy.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseBackupPolicy.java @@ -6,7 +6,6 @@ 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 com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -23,8 +22,6 @@ @JsonSubTypes({@JsonSubTypes.Type(name = "BackupPolicy", value = BackupPolicy.class)}) @Fluent public class BaseBackupPolicy { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BaseBackupPolicy.class); - /* * Type of datasource for the backup management */ @@ -58,10 +55,12 @@ public BaseBackupPolicy withDatasourceTypes(List datasourceTypes) { */ public void validate() { if (datasourceTypes() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property datasourceTypes in model BaseBackupPolicy")); } } + + private static final ClientLogger LOGGER = new ClientLogger(BaseBackupPolicy.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseBackupPolicyResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseBackupPolicyResource.java index 5ed503e146ac5..36ab4b1787e03 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseBackupPolicyResource.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseBackupPolicyResource.java @@ -64,13 +64,13 @@ interface Blank extends WithParentResource { /** The stage of the BaseBackupPolicyResource definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies vaultName, resourceGroupName. + * Specifies resourceGroupName, vaultName. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @return the next definition stage. */ - WithCreate withExistingBackupVault(String vaultName, String resourceGroupName); + WithCreate withExistingBackupVault(String resourceGroupName, String vaultName); } /** * The stage of the BaseBackupPolicyResource definition which contains all the minimum required properties for diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseBackupPolicyResourceList.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseBackupPolicyResourceList.java index ef7a0adbad91f..3ba69f503b1b6 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseBackupPolicyResourceList.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseBackupPolicyResourceList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.dataprotection.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.fluent.models.BaseBackupPolicyResourceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** BaseBackupPolicyResourceList List of BaseBackupPolicy resources. */ @Fluent public final class BaseBackupPolicyResourceList extends DppResourceList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BaseBackupPolicyResourceList.class); - /* * List of resources. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BasePolicyRule.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BasePolicyRule.java index 0954ec9e7841a..ea4a09a33c568 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BasePolicyRule.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BasePolicyRule.java @@ -6,7 +6,6 @@ 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 com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -25,8 +24,6 @@ }) @Fluent public class BasePolicyRule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BasePolicyRule.class); - /* * The name property. */ @@ -60,9 +57,11 @@ public BasePolicyRule withName(String name) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property name in model BasePolicyRule")); } } + + private static final ClientLogger LOGGER = new ClientLogger(BasePolicyRule.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CheckNameAvailabilityRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CheckNameAvailabilityRequest.java index 5d7e33500eb94..7b1ac4c5d80d7 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CheckNameAvailabilityRequest.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CheckNameAvailabilityRequest.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.dataprotection.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; /** CheckNameAvailabilityRequest CheckNameAvailability Request. */ @Fluent public final class CheckNameAvailabilityRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckNameAvailabilityRequest.class); - /* * Resource name for which availability needs to be checked */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryDisplay.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryDisplay.java index 68e0504bca68e..f711eeaf2efa9 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryDisplay.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryDisplay.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.dataprotection.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; /** ClientDiscoveryDisplay Localized display information of an operation. */ @Fluent public final class ClientDiscoveryDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClientDiscoveryDisplay.class); - /* * Description of the operation having details of what operation is about. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryForLogSpecification.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryForLogSpecification.java index 9f4f0645a9607..4580fca2a1433 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryForLogSpecification.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryForLogSpecification.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.dataprotection.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; /** ClientDiscoveryForLogSpecification Class to represent shoebox log specification in json client discovery. */ @Fluent public final class ClientDiscoveryForLogSpecification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClientDiscoveryForLogSpecification.class); - /* * blob duration of shoebox log specification */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryForProperties.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryForProperties.java index f862ba6d75ed5..0e72d59fb646a 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryForProperties.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryForProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.dataprotection.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; /** ClientDiscoveryForProperties Class to represent shoebox properties in json client discovery. */ @Fluent public final class ClientDiscoveryForProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClientDiscoveryForProperties.class); - /* * ClientDiscoveryForServiceSpecification Operation properties. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryForServiceSpecification.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryForServiceSpecification.java index 4098ea8dd0f8f..358718dd8abeb 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryForServiceSpecification.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryForServiceSpecification.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.dataprotection.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; /** ClientDiscoveryForServiceSpecification Class to represent shoebox service specification in json client discovery. */ @Fluent public final class ClientDiscoveryForServiceSpecification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClientDiscoveryForServiceSpecification.class); - /* * List of log specifications of this operation. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryResponse.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryResponse.java index e6e95986c7f1f..f5fc3dda49d62 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryResponse.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryResponse.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.dataprotection.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.fluent.models.ClientDiscoveryValueForSingleApiInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** ClientDiscoveryResponse Operations List response which contains list of available APIs. */ @Fluent public final class ClientDiscoveryResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClientDiscoveryResponse.class); - /* * Link to the next chunk of Response. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CopyOnExpiryOption.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CopyOnExpiryOption.java index 317875f741ae8..cbeacb94aacc8 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CopyOnExpiryOption.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CopyOnExpiryOption.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -15,8 +13,6 @@ @JsonTypeName("CopyOnExpiryOption") @Immutable public final class CopyOnExpiryOption extends CopyOption { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CopyOnExpiryOption.class); - /** * Validates the instance. * diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CopyOption.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CopyOption.java index 3f7fc22bad7d5..b3d64ceb7bd32 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CopyOption.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CopyOption.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -25,8 +23,6 @@ }) @Immutable public class CopyOption { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CopyOption.class); - /** * Validates the instance. * diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CustomCopyOption.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CustomCopyOption.java index 15db2dd13a4d7..fe3ba498539d9 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CustomCopyOption.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CustomCopyOption.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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 com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,8 +14,6 @@ @JsonTypeName("CustomCopyOption") @Fluent public final class CustomCopyOption extends CopyOption { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomCopyOption.class); - /* * Data copied after given timespan */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DataProtectionOperations.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DataProtectionOperations.java index b0259965b3268..f124a2467726d 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DataProtectionOperations.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DataProtectionOperations.java @@ -14,7 +14,7 @@ public interface DataProtectionOperations { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clientDiscoveryResponse. + * @return clientDiscoveryResponse as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -25,7 +25,7 @@ public interface DataProtectionOperations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return clientDiscoveryResponse. + * @return clientDiscoveryResponse as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DataProtections.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DataProtections.java index 9fd9430121dde..ad996cae70fd7 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DataProtections.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DataProtections.java @@ -30,7 +30,7 @@ public interface DataProtections { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for Backup Feature support. + * @return base class for Backup Feature support along with {@link Response}. */ Response checkFeatureSupportWithResponse( String location, FeatureValidationRequestBase parameters, Context context); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DataStoreInfoBase.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DataStoreInfoBase.java index 42e35f9d92e11..5df827007f0f6 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DataStoreInfoBase.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DataStoreInfoBase.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** DataStoreInfoBase DataStoreInfo base. */ @Fluent public final class DataStoreInfoBase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataStoreInfoBase.class); - /* * type of datastore; Operational/Vault/Archive */ @@ -73,14 +70,16 @@ public DataStoreInfoBase withObjectType(String objectType) { */ public void validate() { if (dataStoreType() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property dataStoreType in model DataStoreInfoBase")); } if (objectType() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property objectType in model DataStoreInfoBase")); } } + + private static final ClientLogger LOGGER = new ClientLogger(DataStoreInfoBase.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DataStoreParameters.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DataStoreParameters.java index 84ea553cc511f..a0e977fcd83f8 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DataStoreParameters.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DataStoreParameters.java @@ -6,7 +6,6 @@ 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 com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -24,8 +23,6 @@ }) @Fluent public class DataStoreParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataStoreParameters.class); - /* * type of datastore; Operational/Vault/Archive */ @@ -59,10 +56,12 @@ public DataStoreParameters withDataStoreType(DataStoreTypes dataStoreType) { */ public void validate() { if (dataStoreType() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property dataStoreType in model DataStoreParameters")); } } + + private static final ClientLogger LOGGER = new ClientLogger(DataStoreParameters.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Datasource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Datasource.java index 056cf65e5a346..743c7869516b2 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Datasource.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Datasource.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Datasource Datasource to be backed up. */ @Fluent public final class Datasource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Datasource.class); - /* * DatasourceType of the resource. */ @@ -207,9 +204,11 @@ public Datasource withResourceUri(String resourceUri) { */ public void validate() { if (resourceId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property resourceId in model Datasource")); } } + + private static final ClientLogger LOGGER = new ClientLogger(Datasource.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DatasourceSet.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DatasourceSet.java index 7c641592bee41..a044676a46ae7 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DatasourceSet.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DatasourceSet.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** DatasourceSet DatasourceSet details of datasource to be backed up. */ @Fluent public final class DatasourceSet { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatasourceSet.class); - /* * DatasourceType of the resource. */ @@ -207,9 +204,11 @@ public DatasourceSet withResourceUri(String resourceUri) { */ public void validate() { if (resourceId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property resourceId in model DatasourceSet")); } } + + private static final ClientLogger LOGGER = new ClientLogger(DatasourceSet.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Day.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Day.java index 66f9b6663ab90..02c5f9f3a99c8 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Day.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Day.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.dataprotection.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; /** Day Day of the week. */ @Fluent public final class Day { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Day.class); - /* * Date of the month */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeleteOption.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeleteOption.java index f3259696a62bf..4f0fec30ce6cc 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeleteOption.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeleteOption.java @@ -6,7 +6,6 @@ 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 com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -22,8 +21,6 @@ @JsonSubTypes({@JsonSubTypes.Type(name = "AbsoluteDeleteOption", value = AbsoluteDeleteOption.class)}) @Fluent public class DeleteOption { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DeleteOption.class); - /* * Duration of deletion after given timespan */ @@ -57,9 +54,11 @@ public DeleteOption withDuration(String duration) { */ public void validate() { if (duration() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property duration in model DeleteOption")); } } + + private static final ClientLogger LOGGER = new ClientLogger(DeleteOption.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppBaseResourceList.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppBaseResourceList.java index bed05220dca27..1512a407615c9 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppBaseResourceList.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppBaseResourceList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.dataprotection.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.fluent.models.DppBaseResourceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Base for all lists of V2 resources. */ @Fluent public final class DppBaseResourceList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DppBaseResourceList.class); - /* * List of Dpp resources. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppIdentityDetails.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppIdentityDetails.java index e585b84f4d179..f68a792986c1d 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppIdentityDetails.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppIdentityDetails.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.dataprotection.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; /** DppIdentityDetails Identity details. */ @Fluent public final class DppIdentityDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DppIdentityDetails.class); - /* * The object ID of the service principal object for the managed identity * that is used to grant role-based access to an Azure resource. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppResource.java index c001e9d36f4bf..8bf2fdb2d1b41 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppResource.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppResource.java @@ -7,15 +7,11 @@ import com.azure.core.annotation.Immutable; 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; /** DppResource Resource class. */ @Immutable public class DppResource extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DppResource.class); - /* * Metadata pertaining to creation and last modification of the resource. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppResourceList.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppResourceList.java index 0d1e769b96ca4..7d42eef3fed20 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppResourceList.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppResourceList.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.dataprotection.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; /** List Resource ListResource. */ @Fluent public class DppResourceList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DppResourceList.class); - /* * The uri to fetch the next page of resources. Call ListNext() fetches * next page of resources. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppTrackedResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppTrackedResource.java index 6a2f990adca3f..f6d3a6d83be4d 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppTrackedResource.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppTrackedResource.java @@ -7,16 +7,12 @@ 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.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** The DppTrackedResource model. */ @Fluent public class DppTrackedResource extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DppTrackedResource.class); - /* * Optional ETag. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppTrackedResourceList.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppTrackedResourceList.java index 0f8e080c0f571..043b02952953c 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppTrackedResourceList.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppTrackedResourceList.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.dataprotection.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; /** The DppTrackedResourceList model. */ @Fluent public class DppTrackedResourceList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DppTrackedResourceList.class); - /* * The uri to fetch the next page of resources. Call ListNext() fetches * next page of resources. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppWorkerRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppWorkerRequest.java index c65813fa3196b..49d5e3b18796f 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppWorkerRequest.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppWorkerRequest.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -15,8 +13,6 @@ /** The DppWorkerRequest model. */ @Fluent public class DppWorkerRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DppWorkerRequest.class); - /* * The subscriptionId property. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExportJobsOperationResults.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExportJobsOperationResults.java index 5c011ef84fefa..b225215bf23e3 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExportJobsOperationResults.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExportJobsOperationResults.java @@ -36,7 +36,7 @@ public interface ExportJobsOperationResults { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation result of operation triggered by Export Jobs API. + * @return the operation result of operation triggered by Export Jobs API along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String vaultName, String operationId, Context context); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExportJobsTriggerHeaders.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExportJobsTriggerHeaders.java deleted file mode 100644 index 0bf1e8e6d19aa..0000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExportJobsTriggerHeaders.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.dataprotection.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; - -/** The ExportJobsTriggerHeaders model. */ -@Fluent -public final class ExportJobsTriggerHeaders { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ExportJobsTriggerHeaders.class); - - /* - * The Retry-After property. - */ - @JsonProperty(value = "Retry-After") - private Integer retryAfter; - - /* - * The Location property. - */ - @JsonProperty(value = "Location") - private String location; - - /** - * Get the retryAfter property: The Retry-After property. - * - * @return the retryAfter value. - */ - public Integer retryAfter() { - return this.retryAfter; - } - - /** - * Set the retryAfter property: The Retry-After property. - * - * @param retryAfter the retryAfter value to set. - * @return the ExportJobsTriggerHeaders object itself. - */ - public ExportJobsTriggerHeaders withRetryAfter(Integer retryAfter) { - this.retryAfter = retryAfter; - return this; - } - - /** - * Get the location property: The Location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The Location property. - * - * @param location the location value to set. - * @return the ExportJobsTriggerHeaders object itself. - */ - public ExportJobsTriggerHeaders withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExportJobsTriggerResponse.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExportJobsTriggerResponse.java deleted file mode 100644 index 01d12acd48fad..0000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExportJobsTriggerResponse.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.dataprotection.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** Contains all response data for the trigger operation. */ -public final class ExportJobsTriggerResponse extends ResponseBase { - /** - * Creates an instance of ExportJobsTriggerResponse. - * - * @param request the request which resulted in this ExportJobsTriggerResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public ExportJobsTriggerResponse( - HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, ExportJobsTriggerHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureValidationRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureValidationRequest.java index c7a6f237d7705..254afe8c5dbf5 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureValidationRequest.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureValidationRequest.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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 com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,8 +14,6 @@ @JsonTypeName("FeatureValidationRequest") @Fluent public final class FeatureValidationRequest extends FeatureValidationRequestBase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FeatureValidationRequest.class); - /* * backup support feature type. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureValidationRequestBase.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureValidationRequestBase.java index d2512c6234794..624a6a057b030 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureValidationRequestBase.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureValidationRequestBase.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -21,8 +19,6 @@ @JsonSubTypes({@JsonSubTypes.Type(name = "FeatureValidationRequest", value = FeatureValidationRequest.class)}) @Immutable public class FeatureValidationRequestBase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FeatureValidationRequestBase.class); - /** * Validates the instance. * diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureValidationResponse.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureValidationResponse.java index 4c15bdee23151..58888e9b1dbe9 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureValidationResponse.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureValidationResponse.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.dataprotection.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.fluent.models.FeatureValidationResponseBaseInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +16,6 @@ @JsonTypeName("FeatureValidationResponse") @Fluent public final class FeatureValidationResponse extends FeatureValidationResponseBaseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FeatureValidationResponse.class); - /* * backup support feature type. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ImmediateCopyOption.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ImmediateCopyOption.java index 8885417428fee..a784b5fe25e39 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ImmediateCopyOption.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ImmediateCopyOption.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -15,8 +13,6 @@ @JsonTypeName("ImmediateCopyOption") @Immutable public final class ImmediateCopyOption extends CopyOption { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ImmediateCopyOption.class); - /** * Validates the instance. * diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/InnerError.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/InnerError.java index 1acf073b438ea..3f0dcd657c315 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/InnerError.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/InnerError.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,8 +12,6 @@ /** InnerError Inner Error. */ @Fluent public final class InnerError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InnerError.class); - /* * Any Key value pairs that can be provided to the client for additional * verbose information. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ItemLevelRestoreCriteria.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ItemLevelRestoreCriteria.java index 909ee0691e830..fbaeca79c129b 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ItemLevelRestoreCriteria.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ItemLevelRestoreCriteria.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -19,12 +17,14 @@ defaultImpl = ItemLevelRestoreCriteria.class) @JsonTypeName("ItemLevelRestoreCriteria") @JsonSubTypes({ - @JsonSubTypes.Type(name = "RangeBasedItemLevelRestoreCriteria", value = RangeBasedItemLevelRestoreCriteria.class) + @JsonSubTypes.Type(name = "RangeBasedItemLevelRestoreCriteria", value = RangeBasedItemLevelRestoreCriteria.class), + @JsonSubTypes.Type( + name = "KubernetesStorageClassRestoreCriteria", + value = KubernetesStorageClassRestoreCriteria.class), + @JsonSubTypes.Type(name = "KubernetesPVRestoreCriteria", value = KubernetesPVRestoreCriteria.class) }) @Immutable public class ItemLevelRestoreCriteria { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ItemLevelRestoreCriteria.class); - /** * Validates the instance. * diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ItemLevelRestoreTargetInfo.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ItemLevelRestoreTargetInfo.java index e5fa632e98ece..4b7b4dcd44a1e 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ItemLevelRestoreTargetInfo.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ItemLevelRestoreTargetInfo.java @@ -6,7 +6,6 @@ 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 com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +16,6 @@ @JsonTypeName("ItemLevelRestoreTargetInfo") @Fluent public final class ItemLevelRestoreTargetInfo extends RestoreTargetInfoBase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ItemLevelRestoreTargetInfo.class); - /* * Restore Criteria */ @@ -146,7 +143,7 @@ public ItemLevelRestoreTargetInfo withRestoreLocation(String restoreLocation) { public void validate() { super.validate(); if (restoreCriteria() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property restoreCriteria in model ItemLevelRestoreTargetInfo")); @@ -154,7 +151,7 @@ public void validate() { restoreCriteria().forEach(e -> e.validate()); } if (datasourceInfo() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property datasourceInfo in model ItemLevelRestoreTargetInfo")); @@ -168,4 +165,6 @@ public void validate() { datasourceAuthCredentials().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(ItemLevelRestoreTargetInfo.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/JobExtendedInfo.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/JobExtendedInfo.java index 6951c58f4f27c..6105f43444a20 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/JobExtendedInfo.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/JobExtendedInfo.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -15,8 +13,6 @@ /** Extended Information about the job. */ @Fluent public final class JobExtendedInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobExtendedInfo.class); - /* * Job's Additional Details */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/JobSubTask.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/JobSubTask.java index 47b2a02310e98..6fb9c11a673ee 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/JobSubTask.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/JobSubTask.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,8 +13,6 @@ /** Details of Job's Sub Task. */ @Fluent public final class JobSubTask { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobSubTask.class); - /* * Additional details of Sub Tasks */ @@ -143,14 +140,16 @@ public JobSubTask withTaskStatus(String taskStatus) { */ public void validate() { if (taskName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property taskName in model JobSubTask")); } if (taskStatus() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property taskStatus in model JobSubTask")); } } + + private static final ClientLogger LOGGER = new ClientLogger(JobSubTask.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Jobs.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Jobs.java index 4930b6a7c1288..fe72d84c3a13e 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Jobs.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Jobs.java @@ -18,7 +18,7 @@ public interface Jobs { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 AzureBackup Job resources. + * @return list of AzureBackup Job resources as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String vaultName); @@ -31,7 +31,7 @@ public interface Jobs { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 AzureBackup Job resources. + * @return list of AzureBackup Job resources as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String vaultName, Context context); @@ -58,7 +58,7 @@ public interface Jobs { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 job with id in a backup vault. + * @return a job with id in a backup vault along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String vaultName, String jobId, Context context); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesPVRestoreCriteria.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesPVRestoreCriteria.java new file mode 100644 index 0000000000000..a4a656406432e --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesPVRestoreCriteria.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Item Level kubernetes persistent volume target info for restore operation. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") +@JsonTypeName("KubernetesPVRestoreCriteria") +@Fluent +public final class KubernetesPVRestoreCriteria extends ItemLevelRestoreCriteria { + /* + * Selected persistent volume claim name + */ + @JsonProperty(value = "name") + private String name; + + /* + * Selected storage class name for restore operation + */ + @JsonProperty(value = "storageClassName") + private String storageClassName; + + /** + * Get the name property: Selected persistent volume claim name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Selected persistent volume claim name. + * + * @param name the name value to set. + * @return the KubernetesPVRestoreCriteria object itself. + */ + public KubernetesPVRestoreCriteria withName(String name) { + this.name = name; + return this; + } + + /** + * Get the storageClassName property: Selected storage class name for restore operation. + * + * @return the storageClassName value. + */ + public String storageClassName() { + return this.storageClassName; + } + + /** + * Set the storageClassName property: Selected storage class name for restore operation. + * + * @param storageClassName the storageClassName value to set. + * @return the KubernetesPVRestoreCriteria object itself. + */ + public KubernetesPVRestoreCriteria withStorageClassName(String storageClassName) { + this.storageClassName = storageClassName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesStorageClassRestoreCriteria.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesStorageClassRestoreCriteria.java new file mode 100644 index 0000000000000..2d7bba30e92ec --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesStorageClassRestoreCriteria.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Item Level kubernetes storage class target info for restore operation. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") +@JsonTypeName("KubernetesStorageClassRestoreCriteria") +@Fluent +public final class KubernetesStorageClassRestoreCriteria extends ItemLevelRestoreCriteria { + /* + * Selected storage class name + */ + @JsonProperty(value = "selectedStorageClassName") + private String selectedStorageClassName; + + /* + * Provisioner of the storage class + */ + @JsonProperty(value = "provisioner") + private String provisioner; + + /** + * Get the selectedStorageClassName property: Selected storage class name. + * + * @return the selectedStorageClassName value. + */ + public String selectedStorageClassName() { + return this.selectedStorageClassName; + } + + /** + * Set the selectedStorageClassName property: Selected storage class name. + * + * @param selectedStorageClassName the selectedStorageClassName value to set. + * @return the KubernetesStorageClassRestoreCriteria object itself. + */ + public KubernetesStorageClassRestoreCriteria withSelectedStorageClassName(String selectedStorageClassName) { + this.selectedStorageClassName = selectedStorageClassName; + return this; + } + + /** + * Get the provisioner property: Provisioner of the storage class. + * + * @return the provisioner value. + */ + public String provisioner() { + return this.provisioner; + } + + /** + * Set the provisioner property: Provisioner of the storage class. + * + * @param provisioner the provisioner value to set. + * @return the KubernetesStorageClassRestoreCriteria object itself. + */ + public KubernetesStorageClassRestoreCriteria withProvisioner(String provisioner) { + this.provisioner = provisioner; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/MonitoringSettings.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/MonitoringSettings.java new file mode 100644 index 0000000000000..024576b7068e8 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/MonitoringSettings.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Monitoring Settings. */ +@Fluent +public final class MonitoringSettings { + /* + * Settings for Azure Monitor based alerts + */ + @JsonProperty(value = "azureMonitorAlertSettings") + private AzureMonitorAlertSettings azureMonitorAlertSettings; + + /** + * Get the azureMonitorAlertSettings property: Settings for Azure Monitor based alerts. + * + * @return the azureMonitorAlertSettings value. + */ + public AzureMonitorAlertSettings azureMonitorAlertSettings() { + return this.azureMonitorAlertSettings; + } + + /** + * Set the azureMonitorAlertSettings property: Settings for Azure Monitor based alerts. + * + * @param azureMonitorAlertSettings the azureMonitorAlertSettings value to set. + * @return the MonitoringSettings object itself. + */ + public MonitoringSettings withAzureMonitorAlertSettings(AzureMonitorAlertSettings azureMonitorAlertSettings) { + this.azureMonitorAlertSettings = azureMonitorAlertSettings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (azureMonitorAlertSettings() != null) { + azureMonitorAlertSettings().validate(); + } + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationExtendedInfo.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationExtendedInfo.java index a12250e144932..968f88646e83b 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationExtendedInfo.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationExtendedInfo.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.dataprotection.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -22,8 +20,6 @@ @JsonSubTypes({@JsonSubTypes.Type(name = "OperationJobExtendedInfo", value = OperationJobExtendedInfoInner.class)}) @Immutable public class OperationExtendedInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationExtendedInfo.class); - /** * Validates the instance. * diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationResultsGetHeaders.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationResultsGetHeaders.java index 0aeb9e443e1f4..bd9a3a8f0bb23 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationResultsGetHeaders.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationResultsGetHeaders.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.dataprotection.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; /** The OperationResultsGetHeaders model. */ @Fluent public final class OperationResultsGetHeaders { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationResultsGetHeaders.class); - /* * The Retry-After property. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationStatus.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationStatus.java index 27b357f339fbe..a775d5d38b3c3 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationStatus.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationStatus.java @@ -30,7 +30,7 @@ public interface OperationStatus { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation status for a resource. + * @return the operation status for a resource along with {@link Response}. */ Response getWithResponse(String location, String operationId, Context context); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationStatusBackupVaultContexts.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationStatusBackupVaultContexts.java new file mode 100644 index 0000000000000..e4a84d547fba5 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationStatusBackupVaultContexts.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of OperationStatusBackupVaultContexts. */ +public interface OperationStatusBackupVaultContexts { + /** + * Gets the operation status for an operation over a BackupVault's context. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param operationId The operationId parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status for an operation over a BackupVault's context. + */ + OperationResource get(String resourceGroupName, String vaultName, String operationId); + + /** + * Gets the operation status for an operation over a BackupVault's context. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. + * @param operationId The operationId parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status for an operation over a BackupVault's context along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String vaultName, String operationId, Context context); +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationStatusResourceGroupContexts.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationStatusResourceGroupContexts.java new file mode 100644 index 0000000000000..408a4d376683a --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationStatusResourceGroupContexts.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of OperationStatusResourceGroupContexts. */ +public interface OperationStatusResourceGroupContexts { + /** + * Gets the operation status for an operation over a ResourceGroup's context. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param operationId The operationId parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status for an operation over a ResourceGroup's context. + */ + OperationResource getByResourceGroup(String resourceGroupName, String operationId); + + /** + * Gets the operation status for an operation over a ResourceGroup's context. + * + * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param operationId The operationId parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status for an operation over a ResourceGroup's context along with {@link Response}. + */ + Response getByResourceGroupWithResponse( + String resourceGroupName, String operationId, Context context); +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PatchBackupVaultInput.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PatchBackupVaultInput.java new file mode 100644 index 0000000000000..6c557f40151e7 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PatchBackupVaultInput.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Backup Vault Contract for Patch Backup Vault API. */ +@Fluent +public final class PatchBackupVaultInput { + /* + * Monitoring Settings + */ + @JsonProperty(value = "monitoringSettings") + private MonitoringSettings monitoringSettings; + + /** + * Get the monitoringSettings property: Monitoring Settings. + * + * @return the monitoringSettings value. + */ + public MonitoringSettings monitoringSettings() { + return this.monitoringSettings; + } + + /** + * Set the monitoringSettings property: Monitoring Settings. + * + * @param monitoringSettings the monitoringSettings value to set. + * @return the PatchBackupVaultInput object itself. + */ + public PatchBackupVaultInput withMonitoringSettings(MonitoringSettings monitoringSettings) { + this.monitoringSettings = monitoringSettings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (monitoringSettings() != null) { + monitoringSettings().validate(); + } + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PatchResourceRequestInput.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PatchResourceRequestInput.java index 99679b28ebc50..18128d108d65b 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PatchResourceRequestInput.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PatchResourceRequestInput.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,14 +12,18 @@ /** PatchResourceRequestInput Patch Request content for Microsoft.DataProtection resources. */ @Fluent public final class PatchResourceRequestInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PatchResourceRequestInput.class); - /* * DppIdentityDetails Input Managed Identity Details */ @JsonProperty(value = "identity") private DppIdentityDetails identity; + /* + * Resource properties. + */ + @JsonProperty(value = "properties") + private PatchBackupVaultInput properties; + /* * Resource tags. */ @@ -49,6 +51,26 @@ public PatchResourceRequestInput withIdentity(DppIdentityDetails identity) { return this; } + /** + * Get the properties property: Resource properties. + * + * @return the properties value. + */ + public PatchBackupVaultInput properties() { + return this.properties; + } + + /** + * Set the properties property: Resource properties. + * + * @param properties the properties value to set. + * @return the PatchResourceRequestInput object itself. + */ + public PatchResourceRequestInput withProperties(PatchBackupVaultInput properties) { + this.properties = properties; + return this; + } + /** * Get the tags property: Resource tags. * @@ -78,5 +100,8 @@ public void validate() { if (identity() != null) { identity().validate(); } + if (properties() != null) { + properties().validate(); + } } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PolicyInfo.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PolicyInfo.java index 92413bd9cdb5d..bbd5e4db8edac 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PolicyInfo.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PolicyInfo.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** PolicyInfo Policy Info in backupInstance. */ @Fluent public final class PolicyInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PolicyInfo.class); - /* * The policyId property. */ @@ -88,7 +85,7 @@ public PolicyInfo withPolicyParameters(PolicyParameters policyParameters) { */ public void validate() { if (policyId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property policyId in model PolicyInfo")); } @@ -96,4 +93,6 @@ public void validate() { policyParameters().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(PolicyInfo.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PolicyParameters.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PolicyParameters.java index 01397badec251..35f44e74c3492 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PolicyParameters.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PolicyParameters.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.dataprotection.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; /** Parameters in Policy. */ @Fluent public final class PolicyParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PolicyParameters.class); - /* * Gets or sets the DataStore Parameters */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ProtectionStatusDetails.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ProtectionStatusDetails.java index 8c2b9636df6a2..a5534c6a1022f 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ProtectionStatusDetails.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ProtectionStatusDetails.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.dataprotection.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; /** ProtectionStatusDetails Protection status details. */ @Fluent public final class ProtectionStatusDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ProtectionStatusDetails.class); - /* * Specifies the protection status error of the resource */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RangeBasedItemLevelRestoreCriteria.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RangeBasedItemLevelRestoreCriteria.java index bee5a2b725c7e..47097a5094e84 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RangeBasedItemLevelRestoreCriteria.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RangeBasedItemLevelRestoreCriteria.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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 com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,8 +14,6 @@ @JsonTypeName("RangeBasedItemLevelRestoreCriteria") @Fluent public final class RangeBasedItemLevelRestoreCriteria extends ItemLevelRestoreCriteria { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RangeBasedItemLevelRestoreCriteria.class); - /* * minimum value for range prefix match */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RecoveryPointDataStoreDetails.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RecoveryPointDataStoreDetails.java index 6ea4362d6f70c..034254ed15aa9 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RecoveryPointDataStoreDetails.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RecoveryPointDataStoreDetails.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.dataprotection.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** RecoveryPointDataStoreDetails RecoveryPoint datastore details. */ @Fluent public final class RecoveryPointDataStoreDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RecoveryPointDataStoreDetails.class); - /* * The creationTime property. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RecoveryPoints.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RecoveryPoints.java index 9c93a4fb18a48..238ed1c2473d2 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RecoveryPoints.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RecoveryPoints.java @@ -13,22 +13,22 @@ public interface RecoveryPoints { /** * Returns a list of Recovery Points for a DataSource in a vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azureBackupRecoveryPointResourceList. + * @return azureBackupRecoveryPointResourceList as paginated response with {@link PagedIterable}. */ PagedIterable list( - String vaultName, String resourceGroupName, String backupInstanceName); + String resourceGroupName, String vaultName, String backupInstanceName); /** * Returns a list of Recovery Points for a DataSource in a vault. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param filter OData filter options. * @param skipToken skipToken Filter. @@ -36,11 +36,11 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azureBackupRecoveryPointResourceList. + * @return azureBackupRecoveryPointResourceList as paginated response with {@link PagedIterable}. */ PagedIterable list( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, String filter, String skipToken, @@ -49,8 +49,8 @@ PagedIterable list( /** * Gets a Recovery Point using recoveryPointId for a Datasource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param recoveryPointId The recoveryPointId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -59,21 +59,21 @@ PagedIterable list( * @return a Recovery Point using recoveryPointId for a Datasource. */ AzureBackupRecoveryPointResource get( - String vaultName, String resourceGroupName, String backupInstanceName, String recoveryPointId); + String resourceGroupName, String vaultName, String backupInstanceName, String recoveryPointId); /** * Gets a Recovery Point using recoveryPointId for a Datasource. * - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param recoveryPointId The recoveryPointId parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 Recovery Point using recoveryPointId for a Datasource. + * @return a Recovery Point using recoveryPointId for a Datasource along with {@link Response}. */ Response getWithResponse( - String vaultName, String resourceGroupName, String backupInstanceName, String recoveryPointId, Context context); + String resourceGroupName, String vaultName, String backupInstanceName, String recoveryPointId, Context context); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuard.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuard.java index ecca368885d5b..d1620678e2495 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuard.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuard.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.dataprotection.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.util.List; /** The ResourceGuard model. */ @Immutable public final class ResourceGuard { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceGuard.class); - /* * Provisioning state of the BackupVault resource */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardOperation.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardOperation.java index 616a884ae1ddb..247326d17bf8c 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardOperation.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardOperation.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.dataprotection.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; /** This class contains all the details about a critical operation. */ @Immutable public final class ResourceGuardOperation { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceGuardOperation.class); - /* * Name of the critical operation. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardResource.java index 6d17a228493b3..e5e7cff0c2061 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardResource.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardResource.java @@ -209,7 +209,7 @@ interface WithProperties { ResourceGuardResource.Update update(); /** The template for ResourceGuardResource update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithProperties { /** * Executes the update request. * @@ -247,6 +247,16 @@ interface WithIdentity { */ Update withIdentity(DppIdentityDetails identity); } + /** The stage of the ResourceGuardResource update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Resource properties.. + * + * @param properties Resource properties. + * @return the next definition stage. + */ + Update withProperties(PatchBackupVaultInput properties); + } } /** * Refreshes the resource to sync with Azure. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardResourceList.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardResourceList.java index 161dd11ceba56..2e1a70899d111 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardResourceList.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardResourceList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.dataprotection.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardResourceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of ResourceGuard resources. */ @Fluent public final class ResourceGuardResourceList extends DppTrackedResourceList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceGuardResourceList.class); - /* * List of resources. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuards.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuards.java index 5ff9c2cba2547..e52d970349674 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuards.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuards.java @@ -15,7 +15,7 @@ public interface ResourceGuards { * * @throws com.azure.core.management.exception.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 ResourceGuard resources. + * @return list of ResourceGuard resources as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -26,7 +26,7 @@ public interface ResourceGuards { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 ResourceGuard resources. + * @return list of ResourceGuard resources as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -37,7 +37,7 @@ public interface ResourceGuards { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 ResourceGuard resources. + * @return list of ResourceGuard resources as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -49,7 +49,7 @@ public interface ResourceGuards { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 ResourceGuard resources. + * @return list of ResourceGuard resources as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -74,7 +74,7 @@ public interface ResourceGuards { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String resourceGuardsName, Context context); @@ -99,7 +99,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse(String resourceGroupName, String resourceGuardsName, Context context); @@ -112,7 +112,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ PagedIterable getDisableSoftDeleteRequestsObjects( String resourceGroupName, String resourceGuardsName); @@ -127,7 +127,7 @@ PagedIterable getDisableSoftDeleteRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ PagedIterable getDisableSoftDeleteRequestsObjects( String resourceGroupName, String resourceGuardsName, Context context); @@ -141,7 +141,7 @@ PagedIterable getDisableSoftDeleteRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ PagedIterable getDeleteResourceGuardProxyRequestsObjects( String resourceGroupName, String resourceGuardsName); @@ -156,7 +156,7 @@ PagedIterable getDeleteResourceGuardProxyRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ PagedIterable getDeleteResourceGuardProxyRequestsObjects( String resourceGroupName, String resourceGuardsName, Context context); @@ -170,7 +170,7 @@ PagedIterable getDeleteResourceGuardProxyRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ PagedIterable getBackupSecurityPinRequestsObjects( String resourceGroupName, String resourceGuardsName); @@ -185,7 +185,7 @@ PagedIterable getBackupSecurityPinRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ PagedIterable getBackupSecurityPinRequestsObjects( String resourceGroupName, String resourceGuardsName, Context context); @@ -199,7 +199,7 @@ PagedIterable getBackupSecurityPinRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ PagedIterable getDeleteProtectedItemRequestsObjects( String resourceGroupName, String resourceGuardsName); @@ -214,7 +214,7 @@ PagedIterable getDeleteProtectedItemRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ PagedIterable getDeleteProtectedItemRequestsObjects( String resourceGroupName, String resourceGuardsName, Context context); @@ -228,7 +228,7 @@ PagedIterable getDeleteProtectedItemRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ PagedIterable getUpdateProtectionPolicyRequestsObjects( String resourceGroupName, String resourceGuardsName); @@ -243,7 +243,7 @@ PagedIterable getUpdateProtectionPolicyRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ PagedIterable getUpdateProtectionPolicyRequestsObjects( String resourceGroupName, String resourceGuardsName, Context context); @@ -257,7 +257,7 @@ PagedIterable getUpdateProtectionPolicyRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ PagedIterable getUpdateProtectedItemRequestsObjects( String resourceGroupName, String resourceGuardsName); @@ -272,7 +272,7 @@ PagedIterable getUpdateProtectedItemRequestsObjects( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base for all lists of V2 resources. + * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ PagedIterable getUpdateProtectedItemRequestsObjects( String resourceGroupName, String resourceGuardsName, Context context); @@ -303,7 +303,7 @@ DppBaseResource getDefaultDisableSoftDeleteRequestsObject( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ Response getDefaultDisableSoftDeleteRequestsObjectWithResponse( String resourceGroupName, String resourceGuardsName, String requestName, Context context); @@ -334,7 +334,7 @@ DppBaseResource getDefaultDeleteResourceGuardProxyRequestsObject( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ Response getDefaultDeleteResourceGuardProxyRequestsObjectWithResponse( String resourceGroupName, String resourceGuardsName, String requestName, Context context); @@ -365,7 +365,7 @@ DppBaseResource getDefaultBackupSecurityPinRequestsObject( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ Response getDefaultBackupSecurityPinRequestsObjectWithResponse( String resourceGroupName, String resourceGuardsName, String requestName, Context context); @@ -396,7 +396,7 @@ DppBaseResource getDefaultDeleteProtectedItemRequestsObject( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ Response getDefaultDeleteProtectedItemRequestsObjectWithResponse( String resourceGroupName, String resourceGuardsName, String requestName, Context context); @@ -427,7 +427,7 @@ DppBaseResource getDefaultUpdateProtectionPolicyRequestsObject( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ Response getDefaultUpdateProtectionPolicyRequestsObjectWithResponse( String resourceGroupName, String resourceGuardsName, String requestName, Context context); @@ -458,7 +458,7 @@ DppBaseResource getDefaultUpdateProtectedItemRequestsObject( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base resource under Microsoft.DataProtection provider namespace. + * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ Response getDefaultUpdateProtectedItemRequestsObjectWithResponse( String resourceGroupName, String resourceGuardsName, String requestName, Context context); @@ -470,7 +470,7 @@ Response getDefaultUpdateProtectedItemRequestsObjectWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ ResourceGuardResource getById(String id); @@ -482,7 +482,7 @@ Response getDefaultUpdateProtectedItemRequestsObjectWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -504,7 +504,7 @@ Response getDefaultUpdateProtectedItemRequestsObjectWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceMoveDetails.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceMoveDetails.java index 461e44ed229f4..75e82bf065b4f 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceMoveDetails.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceMoveDetails.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.dataprotection.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; /** ResourceMoveDetails will be returned in response to GetResource call from ARM. */ @Fluent public final class ResourceMoveDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceMoveDetails.class); - /* * CorrelationId of latest ResourceMove operation attempted */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestorableTimeRange.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestorableTimeRange.java index 2712bf276abdb..cbe5c8d53e63d 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestorableTimeRange.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestorableTimeRange.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The RestorableTimeRange model. */ @Fluent public final class RestorableTimeRange { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RestorableTimeRange.class); - /* * Start time for the available restore range */ @@ -99,14 +96,16 @@ public RestorableTimeRange withObjectType(String objectType) { */ public void validate() { if (startTime() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property startTime in model RestorableTimeRange")); } if (endTime() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property endTime in model RestorableTimeRange")); } } + + private static final ClientLogger LOGGER = new ClientLogger(RestorableTimeRange.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestorableTimeRanges.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestorableTimeRanges.java index 3aeb74323ab6d..4d20ea2801fac 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestorableTimeRanges.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestorableTimeRanges.java @@ -10,8 +10,8 @@ /** Resource collection API of RestorableTimeRanges. */ public interface RestorableTimeRanges { /** - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -20,25 +20,25 @@ public interface RestorableTimeRanges { * @return list Restore Ranges Response. */ AzureBackupFindRestorableTimeRangesResponseResource find( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters); /** - * @param vaultName The name of the backup vault. * @param resourceGroupName The name of the resource group where the backup vault is present. + * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. * @param parameters Request body for 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 list Restore Ranges Response. + * @return list Restore Ranges Response along with {@link Response}. */ Response findWithResponse( - String vaultName, String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters, Context context); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreFilesTargetInfo.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreFilesTargetInfo.java index a32de43d64f3d..da4c2fd552560 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreFilesTargetInfo.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreFilesTargetInfo.java @@ -6,7 +6,6 @@ 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 com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,8 +15,6 @@ @JsonTypeName("RestoreFilesTargetInfo") @Fluent public final class RestoreFilesTargetInfo extends RestoreTargetInfoBase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RestoreFilesTargetInfo.class); - /* * Destination of RestoreAsFiles operation, when destination is not a * datasource @@ -68,7 +65,7 @@ public RestoreFilesTargetInfo withRestoreLocation(String restoreLocation) { public void validate() { super.validate(); if (targetDetails() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property targetDetails in model RestoreFilesTargetInfo")); @@ -76,4 +73,6 @@ public void validate() { targetDetails().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(RestoreFilesTargetInfo.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreJobRecoveryPointDetails.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreJobRecoveryPointDetails.java index 991160496ca5b..a4058f45ca778 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreJobRecoveryPointDetails.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreJobRecoveryPointDetails.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.dataprotection.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** The RestoreJobRecoveryPointDetails model. */ @Fluent public final class RestoreJobRecoveryPointDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RestoreJobRecoveryPointDetails.class); - /* * The recoveryPointID property. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreTargetInfo.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreTargetInfo.java index b70e93d538338..4eb6ce0f8816b 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreTargetInfo.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreTargetInfo.java @@ -6,7 +6,6 @@ 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 com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,8 +15,6 @@ @JsonTypeName("RestoreTargetInfo") @Fluent public final class RestoreTargetInfo extends RestoreTargetInfoBase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RestoreTargetInfo.class); - /* * Datasource Information of target DS */ @@ -119,7 +116,7 @@ public RestoreTargetInfo withRestoreLocation(String restoreLocation) { public void validate() { super.validate(); if (datasourceInfo() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property datasourceInfo in model RestoreTargetInfo")); @@ -133,4 +130,6 @@ public void validate() { datasourceAuthCredentials().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(RestoreTargetInfo.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreTargetInfoBase.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreTargetInfoBase.java index 80c1fb7ef70a8..d7cd803493c91 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreTargetInfoBase.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreTargetInfoBase.java @@ -6,7 +6,6 @@ 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 com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -26,8 +25,6 @@ }) @Fluent public class RestoreTargetInfoBase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RestoreTargetInfoBase.class); - /* * Recovery Option */ @@ -87,10 +84,12 @@ public RestoreTargetInfoBase withRestoreLocation(String restoreLocation) { */ public void validate() { if (recoveryOption() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property recoveryOption in model RestoreTargetInfoBase")); } } + + private static final ClientLogger LOGGER = new ClientLogger(RestoreTargetInfoBase.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RetentionTag.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RetentionTag.java index be582769762d5..e9514cdef3aa6 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RetentionTag.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RetentionTag.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** RetentionTag Retention tag. */ @Fluent public final class RetentionTag { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RetentionTag.class); - /* * Retention Tag version. */ @@ -77,9 +74,11 @@ public RetentionTag withTagName(String tagName) { */ public void validate() { if (tagName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property tagName in model RetentionTag")); } } + + private static final ClientLogger LOGGER = new ClientLogger(RetentionTag.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ScheduleBasedBackupCriteria.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ScheduleBasedBackupCriteria.java index 8ed995d5709e3..28b5d709b8dee 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ScheduleBasedBackupCriteria.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ScheduleBasedBackupCriteria.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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 com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +16,6 @@ @JsonTypeName("ScheduleBasedBackupCriteria") @Fluent public final class ScheduleBasedBackupCriteria extends BackupCriteria { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduleBasedBackupCriteria.class); - /* * it contains absolute values like "AllBackup" / "FirstOfDay" / * "FirstOfWeek" / "FirstOfMonth" diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ScheduleBasedTriggerContext.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ScheduleBasedTriggerContext.java index 8060d36d2356b..4ad60b77ebd48 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ScheduleBasedTriggerContext.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ScheduleBasedTriggerContext.java @@ -6,7 +6,6 @@ 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 com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +16,6 @@ @JsonTypeName("ScheduleBasedTriggerContext") @Fluent public final class ScheduleBasedTriggerContext extends TriggerContext { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduleBasedTriggerContext.class); - /* * BackupSchedule Schedule for this backup */ @@ -80,7 +77,7 @@ public ScheduleBasedTriggerContext withTaggingCriteria(List tag public void validate() { super.validate(); if (schedule() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property schedule in model ScheduleBasedTriggerContext")); @@ -88,7 +85,7 @@ public void validate() { schedule().validate(); } if (taggingCriteria() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property taggingCriteria in model ScheduleBasedTriggerContext")); @@ -96,4 +93,6 @@ public void validate() { taggingCriteria().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(ScheduleBasedTriggerContext.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecretStoreBasedAuthCredentials.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecretStoreBasedAuthCredentials.java index b3a7c621d6f35..6627de5a6e9ae 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecretStoreBasedAuthCredentials.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecretStoreBasedAuthCredentials.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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 com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,8 +14,6 @@ @JsonTypeName("SecretStoreBasedAuthCredentials") @Fluent public final class SecretStoreBasedAuthCredentials extends AuthCredentials { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SecretStoreBasedAuthCredentials.class); - /* * Secret store resource */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecretStoreResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecretStoreResource.java index 05358573dab36..783d810359610 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecretStoreResource.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecretStoreResource.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Class representing a secret store resource. */ @Fluent public final class SecretStoreResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SecretStoreResource.class); - /* * Uri to get to the resource */ @@ -26,6 +23,12 @@ public final class SecretStoreResource { @JsonProperty(value = "secretStoreType", required = true) private SecretStoreType secretStoreType; + /* + * Gets or sets value stored in secret store resource + */ + @JsonProperty(value = "value") + private String value; + /** * Get the uri property: Uri to get to the resource. * @@ -66,6 +69,26 @@ public SecretStoreResource withSecretStoreType(SecretStoreType secretStoreType) return this; } + /** + * Get the value property: Gets or sets value stored in secret store resource. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Gets or sets value stored in secret store resource. + * + * @param value the value value to set. + * @return the SecretStoreResource object itself. + */ + public SecretStoreResource withValue(String value) { + this.value = value; + return this; + } + /** * Validates the instance. * @@ -73,10 +96,12 @@ public SecretStoreResource withSecretStoreType(SecretStoreType secretStoreType) */ public void validate() { if (secretStoreType() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property secretStoreType in model SecretStoreResource")); } } + + private static final ClientLogger LOGGER = new ClientLogger(SecretStoreResource.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SourceLifeCycle.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SourceLifeCycle.java index cb9138f32ef77..4bdb81deea74c 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SourceLifeCycle.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SourceLifeCycle.java @@ -6,15 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** SourceLifeCycle Source LifeCycle. */ @Fluent public final class SourceLifeCycle { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SourceLifeCycle.class); - /* * DeleteOption Delete Option */ @@ -100,14 +97,14 @@ public SourceLifeCycle withTargetDataStoreCopySettings(List t */ public void validate() { if (deleteAfter() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property deleteAfter in model SourceLifeCycle")); } else { deleteAfter().validate(); } if (sourceDataStore() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property sourceDataStore in model SourceLifeCycle")); } else { @@ -117,4 +114,6 @@ public void validate() { targetDataStoreCopySettings().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(SourceLifeCycle.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/StorageSetting.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/StorageSetting.java index a68e8d2e34c78..d758b21b670ae 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/StorageSetting.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/StorageSetting.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.dataprotection.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; /** StorageSetting Storage setting. */ @Fluent public final class StorageSetting { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageSetting.class); - /* * Gets or sets the type of the datastore. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SupportedFeature.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SupportedFeature.java index 4b089c23756b1..7b267cff969d3 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SupportedFeature.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SupportedFeature.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.dataprotection.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; /** Elements class for feature request. */ @Fluent public final class SupportedFeature { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SupportedFeature.class); - /* * support feature type. */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SyncBackupInstanceRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SyncBackupInstanceRequest.java new file mode 100644 index 0000000000000..7a35708f8935c --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SyncBackupInstanceRequest.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Sync BackupInstance Request. */ +@Fluent +public final class SyncBackupInstanceRequest { + /* + * Field indicating sync type e.g. to sync only in case of failure or in + * all cases + */ + @JsonProperty(value = "syncType") + private SyncType syncType; + + /** + * Get the syncType property: Field indicating sync type e.g. to sync only in case of failure or in all cases. + * + * @return the syncType value. + */ + public SyncType syncType() { + return this.syncType; + } + + /** + * Set the syncType property: Field indicating sync type e.g. to sync only in case of failure or in all cases. + * + * @param syncType the syncType value to set. + * @return the SyncBackupInstanceRequest object itself. + */ + public SyncBackupInstanceRequest withSyncType(SyncType syncType) { + this.syncType = syncType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SyncType.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SyncType.java new file mode 100644 index 0000000000000..dcf53b014fea0 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SyncType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for SyncType. */ +public final class SyncType extends ExpandableStringEnum { + /** Static value Default for SyncType. */ + public static final SyncType DEFAULT = fromString("Default"); + + /** Static value ForceResync for SyncType. */ + public static final SyncType FORCE_RESYNC = fromString("ForceResync"); + + /** + * Creates or finds a SyncType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SyncType. + */ + @JsonCreator + public static SyncType fromString(String name) { + return fromString(name, SyncType.class); + } + + /** @return known SyncType values. */ + public static Collection values() { + return values(SyncType.class); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/TaggingCriteria.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/TaggingCriteria.java index 70f1c0c1490e7..c668986f7ca7d 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/TaggingCriteria.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/TaggingCriteria.java @@ -6,15 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** TaggingCriteria Tagging criteria. */ @Fluent public final class TaggingCriteria { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TaggingCriteria.class); - /* * Criteria which decides whether the tag can be applied to a triggered * backup. @@ -130,11 +127,13 @@ public void validate() { criteria().forEach(e -> e.validate()); } if (tagInfo() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property tagInfo in model TaggingCriteria")); } else { tagInfo().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(TaggingCriteria.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/TargetCopySetting.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/TargetCopySetting.java index 2f84ba438b49a..0460719ebbad6 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/TargetCopySetting.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/TargetCopySetting.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** TargetCopySetting Target copy settings. */ @Fluent public final class TargetCopySetting { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TargetCopySetting.class); - /* * CopyOption It can be CustomCopyOption or ImmediateCopyOption. */ @@ -73,18 +70,20 @@ public TargetCopySetting withDataStore(DataStoreInfoBase dataStore) { */ public void validate() { if (copyAfter() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property copyAfter in model TargetCopySetting")); } else { copyAfter().validate(); } if (dataStore() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property dataStore in model TargetCopySetting")); } else { dataStore().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(TargetCopySetting.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/TargetDetails.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/TargetDetails.java index 8c005dcb08064..c9f98a0accc39 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/TargetDetails.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/TargetDetails.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Class encapsulating target details, used where the destination is not a datasource. */ @Fluent public final class TargetDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TargetDetails.class); - /* * Restore operation may create multiple files inside location pointed by * Url @@ -108,20 +105,22 @@ public TargetDetails withUrl(String url) { */ public void validate() { if (filePrefix() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property filePrefix in model TargetDetails")); } if (restoreTargetLocationType() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property restoreTargetLocationType in model TargetDetails")); } if (url() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property url in model TargetDetails")); } } + + private static final ClientLogger LOGGER = new ClientLogger(TargetDetails.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/TriggerBackupRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/TriggerBackupRequest.java index c147a2a0eafdf..19af20b9814c7 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/TriggerBackupRequest.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/TriggerBackupRequest.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** TriggerBackupRequest Trigger backup request. */ @Fluent public final class TriggerBackupRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TriggerBackupRequest.class); - /* * AdHocBackupRuleOptions Name for the Rule of the Policy which needs to be * applied for this backup @@ -50,7 +47,7 @@ public TriggerBackupRequest withBackupRuleOptions(AdHocBackupRuleOptions backupR */ public void validate() { if (backupRuleOptions() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property backupRuleOptions in model TriggerBackupRequest")); @@ -58,4 +55,6 @@ public void validate() { backupRuleOptions().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(TriggerBackupRequest.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/TriggerContext.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/TriggerContext.java index de2763ef44652..3391a9ddcca37 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/TriggerContext.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/TriggerContext.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -24,8 +22,6 @@ }) @Immutable public class TriggerContext { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TriggerContext.class); - /** * Validates the instance. * diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UserFacingError.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UserFacingError.java index d92904d1ca88f..86d3fe0621479 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UserFacingError.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UserFacingError.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.dataprotection.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.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -15,8 +13,6 @@ /** Error object used by layers that have access to localized content, and propagate that to user. */ @Fluent public final class UserFacingError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserFacingError.class); - /* * Unique code for this error */ diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ValidateForBackupRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ValidateForBackupRequest.java index a40f07d68d30b..d9df6f47f17e8 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ValidateForBackupRequest.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ValidateForBackupRequest.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** ValidateForBackupRequest Validate for backup request. */ @Fluent public final class ValidateForBackupRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ValidateForBackupRequest.class); - /* * Backup Instance */ @@ -47,7 +44,7 @@ public ValidateForBackupRequest withBackupInstance(BackupInstance backupInstance */ public void validate() { if (backupInstance() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property backupInstance in model ValidateForBackupRequest")); @@ -55,4 +52,6 @@ public void validate() { backupInstance().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(ValidateForBackupRequest.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ValidateRestoreRequestObject.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ValidateRestoreRequestObject.java index 7fd964193e2c4..a3b41f6ca8f76 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ValidateRestoreRequestObject.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ValidateRestoreRequestObject.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** ValidateRestoreRequestObject Validate restore request object. */ @Fluent public final class ValidateRestoreRequestObject { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ValidateRestoreRequestObject.class); - /* * AzureBackupRestoreRequest Gets or sets the restore request object. */ @@ -47,7 +44,7 @@ public ValidateRestoreRequestObject withRestoreRequestObject(AzureBackupRestoreR */ public void validate() { if (restoreRequestObject() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property restoreRequestObject in model ValidateRestoreRequestObject")); @@ -55,4 +52,6 @@ public void validate() { restoreRequestObject().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(ValidateRestoreRequestObject.class); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ValidationType.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ValidationType.java new file mode 100644 index 0000000000000..34953d214a26a --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ValidationType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ValidationType. */ +public final class ValidationType extends ExpandableStringEnum { + /** Static value ShallowValidation for ValidationType. */ + public static final ValidationType SHALLOW_VALIDATION = fromString("ShallowValidation"); + + /** Static value DeepValidation for ValidationType. */ + public static final ValidationType DEEP_VALIDATION = fromString("DeepValidation"); + + /** + * Creates or finds a ValidationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ValidationType. + */ + @JsonCreator + public static ValidationType fromString(String name) { + return fromString(name, ValidationType.class); + } + + /** @return known ValidationType values. */ + public static Collection values() { + return values(ValidationType.class); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesAdhocBackupSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesAdhocBackupSamples.java index 79e12eda232e6..0155951e9d3ad 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesAdhocBackupSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesAdhocBackupSamples.java @@ -12,7 +12,7 @@ /** Samples for BackupInstances AdhocBackup. */ public final class BackupInstancesAdhocBackupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/TriggerBackup.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/TriggerBackup.json */ /** * Sample code: Trigger Adhoc Backup. @@ -23,8 +23,8 @@ public static void triggerAdhocBackup(com.azure.resourcemanager.dataprotection.D manager .backupInstances() .adhocBackup( - "PratikPrivatePreviewVault1", "000pikumar", + "PratikPrivatePreviewVault1", "testInstance1", new TriggerBackupRequest() .withBackupRuleOptions( diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesCreateOrUpdateSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesCreateOrUpdateSamples.java index c53b6dad220eb..1294348de0ac5 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesCreateOrUpdateSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesCreateOrUpdateSamples.java @@ -14,12 +14,13 @@ import com.azure.resourcemanager.dataprotection.models.SecretStoreBasedAuthCredentials; import com.azure.resourcemanager.dataprotection.models.SecretStoreResource; import com.azure.resourcemanager.dataprotection.models.SecretStoreType; +import com.azure.resourcemanager.dataprotection.models.ValidationType; import java.util.Arrays; /** Samples for BackupInstances CreateOrUpdate. */ public final class BackupInstancesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/PutBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/PutBackupInstance.json */ /** * Sample code: Create BackupInstance. @@ -30,13 +31,13 @@ public static void createBackupInstance(com.azure.resourcemanager.dataprotection manager .backupInstances() .define("testInstance1") - .withExistingBackupVault("PratikPrivatePreviewVault1", "000pikumar") + .withExistingBackupVault("000pikumar", "PratikPrivatePreviewVault1") .withProperties( new BackupInstance() .withFriendlyName("harshitbi2") .withDataSourceInfo( new Datasource() - .withDatasourceType("OssDB") + .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") .withObjectType("Datasource") .withResourceId( "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") @@ -46,7 +47,7 @@ public static void createBackupInstance(com.azure.resourcemanager.dataprotection .withResourceUri("")) .withDataSourceSetInfo( new DatasourceSet() - .withDatasourceType("OssDB") + .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") .withObjectType("DatasourceSet") .withResourceId( "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") @@ -73,6 +74,7 @@ public static void createBackupInstance(com.azure.resourcemanager.dataprotection new SecretStoreResource() .withUri("https://samplevault.vault.azure.net/secrets/credentials") .withSecretStoreType(SecretStoreType.AZURE_KEY_VAULT))) + .withValidationType(ValidationType.SHALLOW_VALIDATION) .withObjectType("BackupInstance")) .create(); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesDeleteSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesDeleteSamples.java index 90a9126797baf..e165aabb7b9d7 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesDeleteSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for BackupInstances Delete. */ public final class BackupInstancesDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/DeleteBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/DeleteBackupInstance.json */ /** * Sample code: Delete BackupInstance. @@ -17,6 +17,6 @@ public final class BackupInstancesDeleteSamples { * @param manager Entry point to DataProtectionManager. */ public static void deleteBackupInstance(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager.backupInstances().delete("PratikPrivatePreviewVault1", "000pikumar", "testInstance1", Context.NONE); + manager.backupInstances().delete("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", Context.NONE); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesExtensionRoutingListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesExtensionRoutingListSamples.java new file mode 100644 index 0000000000000..a93252ce81742 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesExtensionRoutingListSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.generated; + +import com.azure.core.util.Context; + +/** Samples for BackupInstancesExtensionRouting List. */ +public final class BackupInstancesExtensionRoutingListSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/ListBackupInstancesExtensionRouting.json + */ + /** + * Sample code: List BackupInstances associated with an azure resource. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void listBackupInstancesAssociatedWithAnAzureResource( + com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager + .backupInstancesExtensionRoutings() + .list( + "subscriptions/36d32b25-3dc7-41b0-bde1-397500644591/resourceGroups/testRG/providers/Microsoft.Compute/disks/testDisk", + Context.NONE); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetBackupInstanceOperationResultSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetBackupInstanceOperationResultSamples.java new file mode 100644 index 0000000000000..570197c8eb93c --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetBackupInstanceOperationResultSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.generated; + +import com.azure.core.util.Context; + +/** Samples for BackupInstances GetBackupInstanceOperationResult. */ +public final class BackupInstancesGetBackupInstanceOperationResultSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/GetBackupInstanceOperationResult.json + */ + /** + * Sample code: Get BackupInstanceOperationResult. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void getBackupInstanceOperationResult( + com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager + .backupInstances() + .getBackupInstanceOperationResultWithResponse( + "SampleResourceGroup", + "swaggerExample", + "testInstance1", + "YWUzNDFkMzQtZmM5OS00MmUyLWEzNDMtZGJkMDIxZjlmZjgzOzdmYzBiMzhmLTc2NmItNDM5NS05OWQ1LTVmOGEzNzg4MWQzNA==", + Context.NONE); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetSamples.java index 40d26376eb342..083e432985445 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetSamples.java @@ -9,7 +9,7 @@ /** Samples for BackupInstances Get. */ public final class BackupInstancesGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/GetBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/GetBackupInstance.json */ /** * Sample code: Get BackupInstance. @@ -19,6 +19,6 @@ public final class BackupInstancesGetSamples { public static void getBackupInstance(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { manager .backupInstances() - .getWithResponse("PratikPrivatePreviewVault1", "000pikumar", "testInstance1", Context.NONE); + .getWithResponse("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", Context.NONE); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesListSamples.java index fd1f44ca9b851..165413e4d0daf 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesListSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesListSamples.java @@ -9,7 +9,7 @@ /** Samples for BackupInstances List. */ public final class BackupInstancesListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/ListBackupInstances.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/ListBackupInstances.json */ /** * Sample code: List BackupInstances in a Vault. @@ -18,6 +18,6 @@ public final class BackupInstancesListSamples { */ public static void listBackupInstancesInAVault( com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager.backupInstances().list("PratikPrivatePreviewVault1", "000pikumar", Context.NONE); + manager.backupInstances().list("000pikumar", "PratikPrivatePreviewVault1", Context.NONE); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeBackupsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeBackupsSamples.java new file mode 100644 index 0000000000000..7f4ccc9e84458 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeBackupsSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.generated; + +import com.azure.core.util.Context; + +/** Samples for BackupInstances ResumeBackups. */ +public final class BackupInstancesResumeBackupsSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/ResumeBackups.json + */ + /** + * Sample code: ResumeBackups. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void resumeBackups(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.backupInstances().resumeBackups("testrg", "testvault", "testbi", Context.NONE); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeProtectionSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeProtectionSamples.java new file mode 100644 index 0000000000000..1341938fe6aab --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeProtectionSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.generated; + +import com.azure.core.util.Context; + +/** Samples for BackupInstances ResumeProtection. */ +public final class BackupInstancesResumeProtectionSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/ResumeProtection.json + */ + /** + * Sample code: ResumeProtection. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void resumeProtection(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.backupInstances().resumeProtection("testrg", "testvault", "testbi", Context.NONE); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesStopProtectionSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesStopProtectionSamples.java new file mode 100644 index 0000000000000..1481f89934dd2 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesStopProtectionSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.generated; + +import com.azure.core.util.Context; + +/** Samples for BackupInstances StopProtection. */ +public final class BackupInstancesStopProtectionSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/StopProtection.json + */ + /** + * Sample code: StopProtection. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void stopProtection(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.backupInstances().stopProtection("testrg", "testvault", "testbi", Context.NONE); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSuspendBackupsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSuspendBackupsSamples.java new file mode 100644 index 0000000000000..431f647c171de --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSuspendBackupsSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.generated; + +import com.azure.core.util.Context; + +/** Samples for BackupInstances SuspendBackups. */ +public final class BackupInstancesSuspendBackupsSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/SuspendBackups.json + */ + /** + * Sample code: SuspendBackups. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void suspendBackups(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.backupInstances().suspendBackups("testrg", "testvault", "testbi", Context.NONE); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSyncBackupInstanceSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSyncBackupInstanceSamples.java new file mode 100644 index 0000000000000..4f00ef047f607 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSyncBackupInstanceSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.dataprotection.models.SyncBackupInstanceRequest; +import com.azure.resourcemanager.dataprotection.models.SyncType; + +/** Samples for BackupInstances SyncBackupInstance. */ +public final class BackupInstancesSyncBackupInstanceSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/SyncBackupInstance.json + */ + /** + * Sample code: Sync BackupInstance. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void syncBackupInstance(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager + .backupInstances() + .syncBackupInstance( + "testrg", + "testvault", + "testbi", + new SyncBackupInstanceRequest().withSyncType(SyncType.DEFAULT), + Context.NONE); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRehydrateSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRehydrateSamples.java index 106eeb333f440..cbc6e7f836ff4 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRehydrateSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRehydrateSamples.java @@ -11,7 +11,7 @@ /** Samples for BackupInstances TriggerRehydrate. */ public final class BackupInstancesTriggerRehydrateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/TriggerRehydrate.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/TriggerRehydrate.json */ /** * Sample code: Trigger Rehydrate. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRestoreSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRestoreSamples.java index 4ac0953a9c257..b08932f416be7 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRestoreSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRestoreSamples.java @@ -6,10 +6,11 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointBasedRestoreRequest; -import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreRequest; +import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreWithRehydrationRequest; import com.azure.resourcemanager.dataprotection.models.Datasource; import com.azure.resourcemanager.dataprotection.models.DatasourceSet; import com.azure.resourcemanager.dataprotection.models.RecoveryOption; +import com.azure.resourcemanager.dataprotection.models.RehydrationPriority; import com.azure.resourcemanager.dataprotection.models.RestoreFilesTargetInfo; import com.azure.resourcemanager.dataprotection.models.RestoreTargetInfo; import com.azure.resourcemanager.dataprotection.models.RestoreTargetLocationType; @@ -22,7 +23,7 @@ /** Samples for BackupInstances TriggerRestore. */ public final class BackupInstancesTriggerRestoreSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/TriggerRestoreAsFiles.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/TriggerRestoreAsFiles.json */ /** * Sample code: Trigger Restore As Files. @@ -33,8 +34,8 @@ public static void triggerRestoreAsFiles(com.azure.resourcemanager.dataprotectio manager .backupInstances() .triggerRestore( - "PrivatePreviewVault1", "000pikumar", + "PrivatePreviewVault1", "testInstance1", new AzureBackupRecoveryPointBasedRestoreRequest() .withRestoreTargetInfo( @@ -47,12 +48,14 @@ public static void triggerRestoreAsFiles(com.azure.resourcemanager.dataprotectio .withRestoreTargetLocationType(RestoreTargetLocationType.AZURE_BLOBS) .withUrl("https://teststorage.blob.core.windows.net/restoretest"))) .withSourceDataStoreType(SourceDataStoreType.VAULT_STORE) + .withSourceResourceId( + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") .withRecoveryPointId("hardcodedRP"), Context.NONE); } /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/TriggerRestoreWithRehydration.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/TriggerRestoreWithRehydration.json */ /** * Sample code: Trigger Restore With Rehydration. @@ -64,10 +67,10 @@ public static void triggerRestoreWithRehydration( manager .backupInstances() .triggerRestore( - "PratikPrivatePreviewVault1", "000pikumar", + "PratikPrivatePreviewVault1", "testInstance1", - new AzureBackupRestoreRequest() + new AzureBackupRestoreWithRehydrationRequest() .withRestoreTargetInfo( new RestoreTargetInfo() .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS) @@ -92,12 +95,17 @@ public static void triggerRestoreWithRehydration( .withResourceName("viveksipgtest") .withResourceType("Microsoft.DBforPostgreSQL/servers") .withResourceUri(""))) - .withSourceDataStoreType(SourceDataStoreType.VAULT_STORE), + .withSourceDataStoreType(SourceDataStoreType.VAULT_STORE) + .withSourceResourceId( + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") + .withRecoveryPointId("hardcodedRP") + .withRehydrationPriority(RehydrationPriority.HIGH) + .withRehydrationRetentionDuration("7D"), Context.NONE); } /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/TriggerRestore.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/TriggerRestore.json */ /** * Sample code: Trigger Restore. @@ -108,8 +116,8 @@ public static void triggerRestore(com.azure.resourcemanager.dataprotection.DataP manager .backupInstances() .triggerRestore( - "PratikPrivatePreviewVault1", "000pikumar", + "PratikPrivatePreviewVault1", "testInstance1", new AzureBackupRecoveryPointBasedRestoreRequest() .withRestoreTargetInfo( @@ -118,17 +126,17 @@ public static void triggerRestore(com.azure.resourcemanager.dataprotection.DataP .withRestoreLocation("southeastasia") .withDatasourceInfo( new Datasource() - .withDatasourceType("OssDB") + .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") .withObjectType("Datasource") .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb") .withResourceLocation("") - .withResourceName("testdb") + .withResourceName("targetdb") .withResourceType("Microsoft.DBforPostgreSQL/servers/databases") .withResourceUri("")) .withDatasourceSetInfo( new DatasourceSet() - .withDatasourceType("OssDB") + .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") .withObjectType("DatasourceSet") .withResourceId( "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") @@ -143,6 +151,8 @@ public static void triggerRestore(com.azure.resourcemanager.dataprotection.DataP .withUri("https://samplevault.vault.azure.net/secrets/credentials") .withSecretStoreType(SecretStoreType.AZURE_KEY_VAULT)))) .withSourceDataStoreType(SourceDataStoreType.VAULT_STORE) + .withSourceResourceId( + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") .withRecoveryPointId("hardcodedRP"), Context.NONE); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForBackupSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForBackupSamples.java index 2757afe7d811f..b069d3fe28959 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForBackupSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForBackupSamples.java @@ -17,7 +17,7 @@ /** Samples for BackupInstances ValidateForBackup. */ public final class BackupInstancesValidateForBackupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/ValidateForBackup.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/ValidateForBackup.json */ /** * Sample code: Validate For Backup. @@ -28,8 +28,8 @@ public static void validateForBackup(com.azure.resourcemanager.dataprotection.Da manager .backupInstances() .validateForBackup( - "PratikPrivatePreviewVault1", "000pikumar", + "PratikPrivatePreviewVault1", new ValidateForBackupRequest() .withBackupInstance( new BackupInstance() diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForRestoreSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForRestoreSamples.java index b25ddc8cb7932..9c1586206cf3b 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForRestoreSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForRestoreSamples.java @@ -19,7 +19,7 @@ /** Samples for BackupInstances ValidateForRestore. */ public final class BackupInstancesValidateForRestoreSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/ValidateRestore.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/ValidateRestore.json */ /** * Sample code: Validate Restore. @@ -30,8 +30,8 @@ public static void validateRestore(com.azure.resourcemanager.dataprotection.Data manager .backupInstances() .validateForRestore( - "PratikPrivatePreviewVault1", "000pikumar", + "PratikPrivatePreviewVault1", "testInstance1", new ValidateRestoreRequestObject() .withRestoreRequestObject( @@ -42,17 +42,17 @@ public static void validateRestore(com.azure.resourcemanager.dataprotection.Data .withRestoreLocation("southeastasia") .withDatasourceInfo( new Datasource() - .withDatasourceType("OssDB") + .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") .withObjectType("Datasource") .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb") .withResourceLocation("") - .withResourceName("testdb") + .withResourceName("targetdb") .withResourceType("Microsoft.DBforPostgreSQL/servers/databases") .withResourceUri("")) .withDatasourceSetInfo( new DatasourceSet() - .withDatasourceType("OssDB") + .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") .withObjectType("DatasourceSet") .withResourceId( "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") @@ -67,6 +67,8 @@ public static void validateRestore(com.azure.resourcemanager.dataprotection.Data .withUri("https://samplevault.vault.azure.net/secrets/credentials") .withSecretStoreType(SecretStoreType.AZURE_KEY_VAULT)))) .withSourceDataStoreType(SourceDataStoreType.VAULT_STORE) + .withSourceResourceId( + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") .withRecoveryPointId("hardcodedRP")), Context.NONE); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesCreateOrUpdateSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesCreateOrUpdateSamples.java index b363fd0ce4dba..7333528da64e6 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesCreateOrUpdateSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesCreateOrUpdateSamples.java @@ -24,7 +24,7 @@ /** Samples for BackupPolicies CreateOrUpdate. */ public final class BackupPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/PolicyCRUD/CreateOrUpdateBackupPolicy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/PolicyCRUD/CreateOrUpdateBackupPolicy.json */ /** * Sample code: CreateOrUpdate BackupPolicy. @@ -36,7 +36,7 @@ public static void createOrUpdateBackupPolicy( manager .backupPolicies() .define("OSSDBPolicy") - .withExistingBackupVault("PrivatePreviewVault", "000pikumar") + .withExistingBackupVault("000pikumar", "PrivatePreviewVault") .withProperties( new BackupPolicy() .withDatasourceTypes(Arrays.asList("OssDB")) diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesDeleteSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesDeleteSamples.java index 1a3e811b6154d..c9430402f44f3 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesDeleteSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for BackupPolicies Delete. */ public final class BackupPoliciesDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/PolicyCRUD/DeleteBackupPolicy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/PolicyCRUD/DeleteBackupPolicy.json */ /** * Sample code: Delete BackupPolicy. @@ -17,6 +17,6 @@ public final class BackupPoliciesDeleteSamples { * @param manager Entry point to DataProtectionManager. */ public static void deleteBackupPolicy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager.backupPolicies().deleteWithResponse("PrivatePreviewVault", "000pikumar", "OSSDBPolicy", Context.NONE); + manager.backupPolicies().deleteWithResponse("000pikumar", "PrivatePreviewVault", "OSSDBPolicy", Context.NONE); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesGetSamples.java index ddb93a6a097e1..1c427d1872f7e 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesGetSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesGetSamples.java @@ -9,7 +9,7 @@ /** Samples for BackupPolicies Get. */ public final class BackupPoliciesGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/PolicyCRUD/GetBackupPolicy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/PolicyCRUD/GetBackupPolicy.json */ /** * Sample code: Get BackupPolicy. @@ -17,6 +17,6 @@ public final class BackupPoliciesGetSamples { * @param manager Entry point to DataProtectionManager. */ public static void getBackupPolicy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager.backupPolicies().getWithResponse("PrivatePreviewVault", "000pikumar", "OSSDBPolicy", Context.NONE); + manager.backupPolicies().getWithResponse("000pikumar", "PrivatePreviewVault", "OSSDBPolicy", Context.NONE); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesListSamples.java index eb4e74848bd2a..b628dd404a1c2 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesListSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesListSamples.java @@ -9,7 +9,7 @@ /** Samples for BackupPolicies List. */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/PolicyCRUD/ListBackupPolicy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/PolicyCRUD/ListBackupPolicy.json */ /** * Sample code: List BackupPolicy. @@ -17,6 +17,6 @@ public final class BackupPoliciesListSamples { * @param manager Entry point to DataProtectionManager. */ public static void listBackupPolicy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager.backupPolicies().list("PrivatePreviewVault", "000pikumar", Context.NONE); + manager.backupPolicies().list("000pikumar", "PrivatePreviewVault", Context.NONE); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultOperationResultsGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultOperationResultsGetSamples.java index d18d378219736..294a399ee28c4 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultOperationResultsGetSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultOperationResultsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for BackupVaultOperationResults Get. */ public final class BackupVaultOperationResultsGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/VaultCRUD/GetOperationResultPatch.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/VaultCRUD/GetOperationResultPatch.json */ /** * Sample code: GetOperationResult Patch. @@ -20,8 +20,8 @@ public static void getOperationResultPatch(com.azure.resourcemanager.dataprotect manager .backupVaultOperationResults() .getWithResponse( - "swaggerExample", "SampleResourceGroup", + "swaggerExample", "YWUzNDFkMzQtZmM5OS00MmUyLWEzNDMtZGJkMDIxZjlmZjgzOzdmYzBiMzhmLTc2NmItNDM5NS05OWQ1LTVmOGEzNzg4MWQzNA==", Context.NONE); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCheckNameAvailabilitySamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCheckNameAvailabilitySamples.java index 8b23bac108cb7..eb618332a091e 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCheckNameAvailabilitySamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCheckNameAvailabilitySamples.java @@ -10,7 +10,7 @@ /** Samples for BackupVaults CheckNameAvailability. */ public final class BackupVaultsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/VaultCRUD/CheckBackupVaultsNameAvailability.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/VaultCRUD/CheckBackupVaultsNameAvailability.json */ /** * Sample code: Check BackupVaults name availability. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCreateOrUpdateSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCreateOrUpdateSamples.java index b7ac67a28da25..92143ba8a7f33 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCreateOrUpdateSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCreateOrUpdateSamples.java @@ -4,8 +4,11 @@ package com.azure.resourcemanager.dataprotection.generated; +import com.azure.resourcemanager.dataprotection.models.AlertsState; +import com.azure.resourcemanager.dataprotection.models.AzureMonitorAlertSettings; import com.azure.resourcemanager.dataprotection.models.BackupVault; import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails; +import com.azure.resourcemanager.dataprotection.models.MonitoringSettings; import com.azure.resourcemanager.dataprotection.models.StorageSetting; import com.azure.resourcemanager.dataprotection.models.StorageSettingStoreTypes; import com.azure.resourcemanager.dataprotection.models.StorageSettingTypes; @@ -16,7 +19,7 @@ /** Samples for BackupVaults CreateOrUpdate. */ public final class BackupVaultsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/VaultCRUD/PutBackupVault.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/VaultCRUD/PutBackupVault.json */ /** * Sample code: Create BackupVault. @@ -36,14 +39,18 @@ public static void createBackupVault(com.azure.resourcemanager.dataprotection.Da .asList( new StorageSetting() .withDatastoreType(StorageSettingStoreTypes.VAULT_STORE) - .withType(StorageSettingTypes.LOCALLY_REDUNDANT)))) + .withType(StorageSettingTypes.LOCALLY_REDUNDANT))) + .withMonitoringSettings( + new MonitoringSettings() + .withAzureMonitorAlertSettings( + new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED)))) .withTags(mapOf("key1", "val1")) .withIdentity(new DppIdentityDetails().withType("None")) .create(); } /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/VaultCRUD/PutBackupVaultWithMSI.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/VaultCRUD/PutBackupVaultWithMSI.json */ /** * Sample code: Create BackupVault With MSI. @@ -64,7 +71,11 @@ public static void createBackupVaultWithMSI( .asList( new StorageSetting() .withDatastoreType(StorageSettingStoreTypes.VAULT_STORE) - .withType(StorageSettingTypes.LOCALLY_REDUNDANT)))) + .withType(StorageSettingTypes.LOCALLY_REDUNDANT))) + .withMonitoringSettings( + new MonitoringSettings() + .withAzureMonitorAlertSettings( + new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED)))) .withTags(mapOf("key1", "val1")) .withIdentity(new DppIdentityDetails().withType("systemAssigned")) .create(); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsDeleteSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsDeleteSamples.java index 4aa9c68552233..066a308475029 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsDeleteSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for BackupVaults Delete. */ public final class BackupVaultsDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/VaultCRUD/DeleteBackupVault.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/VaultCRUD/DeleteBackupVault.json */ /** * Sample code: Delete BackupVault. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsGetByResourceGroupSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsGetByResourceGroupSamples.java index a7cee1adbf922..28799ded90049 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsGetByResourceGroupSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for BackupVaults GetByResourceGroup. */ public final class BackupVaultsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/VaultCRUD/GetBackupVault.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/VaultCRUD/GetBackupVault.json */ /** * Sample code: Get BackupVault. @@ -21,7 +21,7 @@ public static void getBackupVault(com.azure.resourcemanager.dataprotection.DataP } /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/VaultCRUD/GetBackupVaultWithMSI.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/VaultCRUD/GetBackupVaultWithMSI.json */ /** * Sample code: Get BackupVault With MSI. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListByResourceGroupSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListByResourceGroupSamples.java index 58677cda26e88..021a515b88a1e 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListByResourceGroupSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for BackupVaults ListByResourceGroup. */ public final class BackupVaultsListByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/VaultCRUD/GetBackupVaultsInResourceGroup.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/VaultCRUD/GetBackupVaultsInResourceGroup.json */ /** * Sample code: Get BackupVaults in ResourceGroup. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListSamples.java index ddce45ebbe163..fe2f5527a4508 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListSamples.java @@ -9,7 +9,7 @@ /** Samples for BackupVaults List. */ public final class BackupVaultsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/VaultCRUD/GetBackupVaultsInSubscription.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/VaultCRUD/GetBackupVaultsInSubscription.json */ /** * Sample code: Get BackupVaults in Subscription. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsUpdateSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsUpdateSamples.java index 28465667dd1ed..616ef15e105e5 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsUpdateSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsUpdateSamples.java @@ -5,14 +5,18 @@ package com.azure.resourcemanager.dataprotection.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.dataprotection.models.AlertsState; +import com.azure.resourcemanager.dataprotection.models.AzureMonitorAlertSettings; import com.azure.resourcemanager.dataprotection.models.BackupVaultResource; +import com.azure.resourcemanager.dataprotection.models.MonitoringSettings; +import com.azure.resourcemanager.dataprotection.models.PatchBackupVaultInput; import java.util.HashMap; import java.util.Map; /** Samples for BackupVaults Update. */ public final class BackupVaultsUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/VaultCRUD/PatchBackupVault.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/VaultCRUD/PatchBackupVault.json */ /** * Sample code: Patch BackupVault. @@ -25,7 +29,16 @@ public static void patchBackupVault(com.azure.resourcemanager.dataprotection.Dat .backupVaults() .getByResourceGroupWithResponse("SampleResourceGroup", "swaggerExample", Context.NONE) .getValue(); - resource.update().withTags(mapOf("newKey", "newVal")).apply(); + resource + .update() + .withTags(mapOf("newKey", "newVal")) + .withProperties( + new PatchBackupVaultInput() + .withMonitoringSettings( + new MonitoringSettings() + .withAzureMonitorAlertSettings( + new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED)))) + .apply(); } @SuppressWarnings("unchecked") diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionCheckFeatureSupportSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionCheckFeatureSupportSamples.java index bffa2dca027aa..9a17d1fee1ad6 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionCheckFeatureSupportSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionCheckFeatureSupportSamples.java @@ -11,7 +11,7 @@ /** Samples for DataProtection CheckFeatureSupport. */ public final class DataProtectionCheckFeatureSupportSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/CheckfeatureSupport.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/CheckfeatureSupport.json */ /** * Sample code: Check Azure Vm Backup Feature Support. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionOperationsListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionOperationsListSamples.java index c9d238e35c222..5fc7a1b611df3 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionOperationsListSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionOperationsListSamples.java @@ -9,7 +9,7 @@ /** Samples for DataProtectionOperations List. */ public final class DataProtectionOperationsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/Operations/List.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/Operations/List.json */ /** * Sample code: Returns the list of supported REST operations. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsOperationResultGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsOperationResultGetSamples.java index cb89371952671..d3276f422845c 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsOperationResultGetSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsOperationResultGetSamples.java @@ -9,7 +9,7 @@ /** Samples for ExportJobsOperationResult Get. */ public final class ExportJobsOperationResultGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/JobCRUD/GetExportJobsOperationResult.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/JobCRUD/GetExportJobsOperationResult.json */ /** * Sample code: Get Export Jobs Operation Result. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsTriggerSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsTriggerSamples.java index b5ac8f2d9ea0b..4ea3b80e6e765 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsTriggerSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsTriggerSamples.java @@ -9,7 +9,7 @@ /** Samples for ExportJobs Trigger. */ public final class ExportJobsTriggerSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/JobCRUD/TriggerExportJobs.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/JobCRUD/TriggerExportJobs.json */ /** * Sample code: Trigger Export Jobs. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsGetSamples.java index b0a64b4ee875e..af79d29e356af 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsGetSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for Jobs Get. */ public final class JobsGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/JobCRUD/GetJob.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/JobCRUD/GetJob.json */ /** * Sample code: Get Job. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsListSamples.java index fda1a0ba3685e..f8b4eb8188048 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsListSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsListSamples.java @@ -9,7 +9,7 @@ /** Samples for Jobs List. */ public final class JobsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/JobCRUD/ListJobs.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/JobCRUD/ListJobs.json */ /** * Sample code: Get Jobs. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationResultGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationResultGetSamples.java index 699fe38493b40..b9fc8e9867b35 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationResultGetSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationResultGetSamples.java @@ -9,7 +9,7 @@ /** Samples for OperationResult Get. */ public final class OperationResultGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/GetOperationResult.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/GetOperationResult.json */ /** * Sample code: Get OperationResult. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusBackupVaultContextGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusBackupVaultContextGetSamples.java new file mode 100644 index 0000000000000..7cdcdfd24f05b --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusBackupVaultContextGetSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.generated; + +import com.azure.core.util.Context; + +/** Samples for OperationStatusBackupVaultContext Get. */ +public final class OperationStatusBackupVaultContextGetSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/GetOperationStatusVaultContext.json + */ + /** + * Sample code: Get OperationStatus. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void getOperationStatus(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager + .operationStatusBackupVaultContexts() + .getWithResponse( + "SampleResourceGroup", + "swaggerExample", + "MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==", + Context.NONE); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusGetSamples.java index 6a74e5ea68734..06035d56653c2 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusGetSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusGetSamples.java @@ -9,7 +9,7 @@ /** Samples for OperationStatus Get. */ public final class OperationStatusGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/GetOperationStatus.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/GetOperationStatus.json */ /** * Sample code: Get OperationStatus. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusResourceGroupContextGetByResourceGroupSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusResourceGroupContextGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..264d20bcc93d9 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusResourceGroupContextGetByResourceGroupSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.generated; + +import com.azure.core.util.Context; + +/** Samples for OperationStatusResourceGroupContext GetByResourceGroup. */ +public final class OperationStatusResourceGroupContextGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/GetOperationStatusRGContext.json + */ + /** + * Sample code: Get OperationStatus. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void getOperationStatus(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager + .operationStatusResourceGroupContexts() + .getByResourceGroupWithResponse( + "SampleResourceGroup", + "MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==", + Context.NONE); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsGetSamples.java index ebace86c0bc76..c46a0f0de2fc9 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsGetSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for RecoveryPoints Get. */ public final class RecoveryPointsGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/GetRecoveryPoint.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/GetRecoveryPoint.json */ /** * Sample code: Get Recovery Point. @@ -20,8 +20,8 @@ public static void getRecoveryPoint(com.azure.resourcemanager.dataprotection.Dat manager .recoveryPoints() .getWithResponse( - "PratikPrivatePreviewVault1", "000pikumar", + "PratikPrivatePreviewVault1", "testInstance1", "7fb2cddd-c5b3-44f6-a0d9-db3c4f9d5f25", Context.NONE); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsListSamples.java index de190f8c0acba..ab66d065670ee 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsListSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsListSamples.java @@ -9,7 +9,7 @@ /** Samples for RecoveryPoints List. */ public final class RecoveryPointsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/ListRecoveryPoints.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/ListRecoveryPoints.json */ /** * Sample code: List Recovery Points in a Vault. @@ -20,6 +20,6 @@ public static void listRecoveryPointsInAVault( com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { manager .recoveryPoints() - .list("PratikPrivatePreviewVault1", "000pikumar", "testInstance1", null, null, Context.NONE); + .list("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", null, null, Context.NONE); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsDeleteSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsDeleteSamples.java index 4ce9b7b112a7f..1714fe27c068b 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsDeleteSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for ResourceGuards Delete. */ public final class ResourceGuardsDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/DeleteResourceGuard.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/DeleteResourceGuard.json */ /** * Sample code: Delete ResourceGuard. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples.java index d7d979d140b2a..b4aa9246249f5 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples.java @@ -9,7 +9,7 @@ /** Samples for ResourceGuards GetBackupSecurityPinRequestsObjects. */ public final class ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/ListBackupSecurityPINRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/ListBackupSecurityPINRequests.json */ /** * Sample code: List OperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetByResourceGroupSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetByResourceGroupSamples.java index bd7d222ad0d4d..62af8a4b54b48 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetByResourceGroupSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for ResourceGuards GetByResourceGroup. */ public final class ResourceGuardsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/GetResourceGuard.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/GetResourceGuard.json */ /** * Sample code: Get ResourceGuard. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSamples.java index 0c6d563c297f2..3102659e196e8 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSamples.java @@ -9,7 +9,7 @@ /** Samples for ResourceGuards GetDefaultBackupSecurityPinRequestsObject. */ public final class ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/GetDefaultBackupSecurityPINRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/GetDefaultBackupSecurityPINRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamples.java index 449e4d838a8ca..409d6dbe2087e 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamples.java @@ -9,7 +9,7 @@ /** Samples for ResourceGuards GetDefaultDeleteProtectedItemRequestsObject. */ public final class ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/GetDefaultDeleteProtectedItemRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/GetDefaultDeleteProtectedItemRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectSamples.java index 9234ccdf8495f..ef370aa17f031 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectSamples.java @@ -9,7 +9,7 @@ /** Samples for ResourceGuards GetDefaultDeleteResourceGuardProxyRequestsObject. */ public final class ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/GetDefaultDeleteResourceGuardProxyRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/GetDefaultDeleteResourceGuardProxyRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSamples.java index 7476f1934c24e..89ceae085f154 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSamples.java @@ -9,7 +9,7 @@ /** Samples for ResourceGuards GetDefaultDisableSoftDeleteRequestsObject. */ public final class ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/GetDefaultDisableSoftDeleteRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/GetDefaultDisableSoftDeleteRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamples.java index 45874a35dd1f8..194650d25bcdc 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamples.java @@ -9,7 +9,7 @@ /** Samples for ResourceGuards GetDefaultUpdateProtectedItemRequestsObject. */ public final class ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectedItemRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/GetDefaultUpdateProtectedItemRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectSamples.java index 47abe872c179a..20a93f507e1ee 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectSamples.java @@ -9,7 +9,7 @@ /** Samples for ResourceGuards GetDefaultUpdateProtectionPolicyRequestsObject. */ public final class ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectionPolicyRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/GetDefaultUpdateProtectionPolicyRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples.java index 02d6850827884..3ec4d049ed28b 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples.java @@ -9,7 +9,7 @@ /** Samples for ResourceGuards GetDeleteProtectedItemRequestsObjects. */ public final class ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/ListDeleteProtectedItemRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/ListDeleteProtectedItemRequests.json */ /** * Sample code: List OperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSamples.java index 2133d8ca860c3..1e501ef97fb31 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSamples.java @@ -9,7 +9,7 @@ /** Samples for ResourceGuards GetDeleteResourceGuardProxyRequestsObjects. */ public final class ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/ListDeleteResourceGuardProxyRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/ListDeleteResourceGuardProxyRequests.json */ /** * Sample code: List OperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples.java index d3151261133b6..e76172fd1ff07 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples.java @@ -9,7 +9,7 @@ /** Samples for ResourceGuards GetDisableSoftDeleteRequestsObjects. */ public final class ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/ListDisableSoftDeleteRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/ListDisableSoftDeleteRequests.json */ /** * Sample code: List OperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples.java index 5f1289c443522..ac71d5bf7986c 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples.java @@ -9,7 +9,7 @@ /** Samples for ResourceGuards GetUpdateProtectedItemRequestsObjects. */ public final class ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/ListUpdateProtectedItemRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/ListUpdateProtectedItemRequests.json */ /** * Sample code: List OperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples.java index 6ff75eda06d9c..383a3ec238b66 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples.java @@ -9,7 +9,7 @@ /** Samples for ResourceGuards GetUpdateProtectionPolicyRequestsObjects. */ public final class ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/ListUpdateProtectionPolicyRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/ListUpdateProtectionPolicyRequests.json */ /** * Sample code: List OperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListByResourceGroupSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListByResourceGroupSamples.java index 76dd20906556c..e2f661bee0ae9 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListByResourceGroupSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for ResourceGuards ListByResourceGroup. */ public final class ResourceGuardsListByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/GetResourceGuardsInResourceGroup.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/GetResourceGuardsInResourceGroup.json */ /** * Sample code: Get ResourceGuards in ResourceGroup. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListSamples.java index d180da6eb9ae2..3f3ef545673b2 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListSamples.java @@ -9,7 +9,7 @@ /** Samples for ResourceGuards List. */ public final class ResourceGuardsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/GetResourceGuardsInSubscription.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/GetResourceGuardsInSubscription.json */ /** * Sample code: Get ResourceGuards in Subscription. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPatchSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPatchSamples.java index 69a7c863358c3..313d39d65896b 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPatchSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPatchSamples.java @@ -12,7 +12,7 @@ /** Samples for ResourceGuards Patch. */ public final class ResourceGuardsPatchSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/PatchResourceGuard.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/PatchResourceGuard.json */ /** * Sample code: Patch ResourceGuard. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPutSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPutSamples.java index 11d842a4788f1..9850d7b6b38ab 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPutSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPutSamples.java @@ -10,7 +10,7 @@ /** Samples for ResourceGuards Put. */ public final class ResourceGuardsPutSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/ResourceGuardCRUD/PutResourceGuard.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/ResourceGuardCRUD/PutResourceGuard.json */ /** * Sample code: Create ResourceGuard. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RestorableTimeRangesFindSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RestorableTimeRangesFindSamples.java index 38f78cfbf5c72..6b4963cf8f7ad 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RestorableTimeRangesFindSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RestorableTimeRangesFindSamples.java @@ -11,7 +11,7 @@ /** Samples for RestorableTimeRanges Find. */ public final class RestorableTimeRangesFindSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2021-07-01/examples/BackupInstanceOperations/FindRestorableTimeRanges.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-03-31-preview/examples/BackupInstanceOperations/FindRestorableTimeRanges.json */ /** * Sample code: Find Restorable Time Ranges. @@ -23,8 +23,8 @@ public static void findRestorableTimeRanges( manager .restorableTimeRanges() .findWithResponse( - "ZBlobBackupVaultBVTD3", "Blob-Backup", + "ZBlobBackupVaultBVTD3", "zblobbackuptestsa58", new AzureBackupFindRestorableTimeRangesRequest() .withSourceDataStoreType(RestoreSourceDataStoreType.OPERATIONAL_STORE)